Thread:机智的小鱼君/@comment-5811199-20190228110540

Hi,

This is about Thread:1623351 :)

I updated User:Monchoman45 and his InterWiki.js script. I have put my changes below - you can copy and paste it into the old script. It will show the same box in InterwikiEdit, and you can put anything like https://foo.fandom.com/zh and zh.foo and it will try and find the right wiki before linking.

), one on each line. This will link each specified wiki to every other specified wiki.    ';           document.getElementById('mw-content-text').appendChild(gui);        }); } }; $(InterwikiEdit.onload); InterwikiEdit.getWikiData = function (wiki) { // Create WikiUtils for them var wikiutil; if (wiki.match(/wikia\.com/) || wiki.match(/fandom\.com/) || wiki.match(/wikia\.org/)) { wikiutil = new WikiUtil.fromURL(wiki); } else { wikiutil = new WikiUtil.fromPartial(wiki, 'wikia'); }   // Find the wiki ID    return wikiutil.getWikiData; }; InterwikiEdit.linkAll = function (wikis) { InterwikiEdit.ids = []; var promises = []; for (var i = 0; i < wikis.length; i++) { promises.push(InterwikiEdit.getWikiData(wikis[i]).then(function(data) { InterwikiEdit.ids.push(data); }));   }    $.when.apply($, promises).then(function {        var numberFailed = InterwikiEdit.ids.length;        InterwikiEdit.ids = InterwikiEdit.ids.filter(function(el) { return el != null; });       numberFailed = numberFailed - InterwikiEdit.ids.length;        if (numberFailed > 0) {            $('#interwiki-multiple-button').after(' Error, ' + numberFailed + ' wikis failed to be found. ');       }        $('#interwiki-multiple-button').after('

Let me know if you need any help with this! 