מדיה ויקי:Gadget-TemplatesExternalLinks.js: הבדלים בין גרסאות בדף
חדרי חרדים |
יותר טוב ככה: 0 מספר חוקי אבל ה-if יחזיר false... |
||
| שורה 37: | שורה 37: | ||
if (matches) { | if (matches) { | ||
for (var i = 1; i < matches.length; i++) { | for (var i = 1; i < matches.length; i++) { | ||
var fieldIndex = this.regexDict.params[i-1] | var fieldIndex = this.regexDict.params[i-1]; //parameters are counted from one, we count from 0. | ||
if (fieldIndex && this.doc.allFields[fieldIndex]) | if (fieldIndex && this.doc.allFields[fieldIndex-1]) | ||
this.doc.allFields[fieldIndex].value = matches[i]; | this.doc.allFields[fieldIndex-1].value = matches[i]; | ||
} | } | ||
} | } | ||