User:Huawei251/common.js

//

// Wikiplus 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      console.log('A');      importScriptRL('User:Huawei251/edit.js');    } else {      mw.hook('ve.activationComplete').add(function  { console.log('B'); importScriptRL('User:Huawei251/edit.js'); });   }

});

//