אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Gadget-Checkty.js"

שפארן פאפ-אפס
(נאר אין ארטיקל בלעטער)
(שפארן פאפ-אפס)
שורה 238: שורה 238:
     },
     },
     articleOrgChecks: function () {
     articleOrgChecks: function () {
    if ([0, 3000, 8000].includes(mw.config.get('wgNamespaceNumber'))) {
        if ([0, 3000, 8000].includes(mw.config.get('wgNamespaceNumber'))) {
             this.descriptionInsert();
             this.descriptionInsert();
             this.interwikiInsert();
             this.interwikiInsert();
    }
        }
         this.titleOrderCheck();
         this.titleOrderCheck();
         this.checkRefs();
         this.checkRefs();
שורה 1,222: שורה 1,222:
         // check whether description is empty
         // check whether description is empty
         if (!regex.test(wikitext)) {
         if (!regex.test(wikitext)) {
             // insert description
             descriptionInsertMsg = $('<div>', { text: "דער ארטיקל פארמאגט נישט קיין דעסקריפציע" }).append($('<a>', {
            var desc = prompt('ווילט איר צולייגן דעסקריפציע?\nשטעלט אריין א שילדערונג מיט געציילטע ווערטער');
                href: '#',
            if (desc) {
                text: 'צולייגן',
                this.textbox.value = '{' + '{דעסקריפציע|' + desc + '}}\n' + wikitext;
            }).click(function () {
                chectTyTool.addSummary('צוגעלייגט דעסקריפציע');
                // insert description
             }
                var desc = prompt('שטעלט אריין א שילדערונג מיט געציילטע ווערטער');
                if (desc) {
                    this.textbox.value = '{' + '{דעסקריפציע|' + desc + '}}\n' + wikitext;
                    chectTyTool.addSummary('צוגעלייגט דעסקריפציע');
                }
                return false;
             }));
            chectTyTool.writeMsg(descriptionInsertMsg, 'info');
         }
         }
     },
     },
     interwikiInsert: function () {
     interwikiInsert: function () {
         var wikitext = this.textbox.value;
         var wikitext = this.textbox.value;
         // check whether hebrew is not lnked
         // check whether hebrew is not linked
         if (!wikitext.toLowerCase().includes('[' + '[he:')) {
         if (!wikitext.toLowerCase().includes('[' + '[he:')) {
             // insert interlink
             interwikiInsertMsg = $('<div>', { text: "דער ארטיקל פארמאגט נישט קיין אינטערשפראך לינק" }).append($('<a>', {
             var inter = prompt('ווילט איר פארבינדן צו המכלול העברי?\nשטעלט אריין דעם נאמען פון דארטיגן ערך');
                href: '#',
                text: 'צולייגן',
            }).click(function () {
                // insert interlink
             var inter = prompt('שטעלט אריין דעם נאמען פון ערך אויף המכלול העברי');
             if (inter) {
             if (inter) {
                 this.textbox.value = wikitext + '\n[' + '[he:' + inter + ']]';
                 this.textbox.value = wikitext + '\n[' + '[he:' + inter + ']]';
                 chectTyTool.addSummary('צוגעלייגט אינטערשפראך לינק');
                 chectTyTool.addSummary('צוגעלייגט אינטערשפראך לינק');
             }
             }
                return false;
            }));
            chectTyTool.writeMsg(interwikiInsertMsg, 'info');
         }
         }
     },
     },