Content deleted Content added
|
|
(14 intermediate revisions by the same user not shown) |
// <pre>
// Wikiplus blocked by this site
//mw.loader.load('https://wikiplus-app.com/Main.js');
//mw.loader.using(['mediawiki.util', 'ext.gadget.site-lib'], function () {
/* 當需要時載入對應的 scripts */
var importScriptRL=function(page){
mw.loader.load(mw.config.get('wgScript')+'?title='+mw.util.wikiUrlencode(page)+'&action=raw&ctype=text/javascript&_='+Math.floor((new Date())/1000/60/60/24/7));
};
if (mw.config.get('wgAction') == "edit" || mw.config.get('wgAction') == "submit" || mw.config.get('wgCanonicalSpecialPageName') == 'Search') { // scripts specific to editing pages
importScriptRL('User:Huawei251/edit.js');
} else {
mw.loader.using('ext.visualEditor.desktopArticleTarget.init', function () {
console.log('ext.visualEditor.desktopArticleTarget.init');
mw.libs.ve.addPlugin(function () {
importScriptRL('User:Huawei251/edit.js');
});
});
}
//});
// </pre>
|