בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,716
רעדאגירונגען
אין תקציר עריכה |
(טויש נישט אינטערשפראך לינקס) |
||
| שורה 1: | שורה 1: | ||
// הוספת כפתור "בדיקה" שמבצע החלפות נפוצות של בוט ההחלפות וכן מתריע על בעיות סגנון ועיצוב שונות | // הוספת כפתור "בדיקה" שמבצע החלפות נפוצות של בוט ההחלפות וכן מתריע על בעיות סגנון ועיצוב שונות | ||
// לעזרה ראו [[mediawiki:Gadget-Checkty.js/הוראות]] | // לעזרה ראו [[mediawiki:Gadget-Checkty.js/הוראות]] | ||
mw.messages.set({ | mw.messages.set({ | ||
| שורה 599: | שורה 598: | ||
var specials = [], | var specials = [], | ||
ignoreRegex = new RegExp('(' + this.ignoreRegexes.join('|') + ')'); | ignoreRegex = new RegExp('(' + this.ignoreRegexes.join('|') + ')'); | ||
const interlanguageLinkPattern = /^\s*\[\[[a-z\-]{2,12}:[^\]]+\]\]\s*$/i; | |||
if ( interlanguageLinkPattern.test(t) ) { | |||
} | |||
for (i in this.regexes) // assume regexs on templates are safe if contain template wikicode | for (i in this.regexes) // assume regexs on templates are safe if contain template wikicode | ||
if (/\\{\\{/.test(this.regexes[i][0]) && this.regexes[i][0].test(t)) { | if (/\\{\\{/.test(this.regexes[i][0]) && this.regexes[i][0].test(t)) { | ||
| שורה 700: | שורה 702: | ||
var origTxt = this.getContents(), txt = origTxt, m; | var origTxt = this.getContents(), txt = origTxt, m; | ||
while (m = /(\{\{(?:הפניה לערך מורחב| | while (m = /(\{\{(?:הפניה לערך מורחב|הויפט ארטיקל)\|[^=\n]+?\}\}\n){2,}/g.exec(txt)) { | ||
var articles = [], expArticleRE = /\{\{(?:הפניה לערך מורחב| | var articles = [], expArticleRE = /\{\{(?:הפניה לערך מורחב|הויפט ארטיקל)\|([^=\n]+?)\}\}/g; | ||
while (ma = expArticleRE.exec(m[0])) articles.push(ma[1]); | while (ma = expArticleRE.exec(m[0])) articles.push(ma[1]); | ||
txt = txt.replace(m[0], '{{ | txt = txt.replace(m[0], '{{הויפט ארטיקל|ערכים=[[' + articles.join(']], [[') + ']]}}\n'); | ||
} | } | ||
this.updateText(txt, true); | this.updateText(txt, true); | ||
רעדאגירונגען