(Creating) |
(adding comments making personal use only plain.) |
||
Line 6: | Line 6: | ||
* @version 1.0 |
* @version 1.0 |
||
* @license CC-BY-SA 3.0 |
* @license CC-BY-SA 3.0 |
||
+ | * @scope For PERSONAL use only. Please do NOT import to |
||
+ | * MediaWiki:ImportJS, Wikia.js or Common.js. |
||
* |
* |
||
*/ |
*/ |
Revision as of 21:04, 9 September 2018
/** <nowiki>
*
* @module DisableInfoboxBuilder
* @description Bypasses infobox builder.
* @author Speedit
* @version 1.0
* @license CC-BY-SA 3.0
* @scope For PERSONAL use only. Please do NOT import to
* MediaWiki:ImportJS, Wikia.js or Common.js.
*
*/
mw.loader.using('mediawiki.util').then(function() {
if (
mw.config.get('wgCanonicalSpecialPageName') !== 'InfoboxBuilder' ||
window.DisableInfoboxBuilderLoaded
) {
return;
}
window.DisableInfoboxBuilderLoaded = true;
var r = new RegExp(mw.config.get('wgArticlePath').replace('$1', '([\\s\\S]+)')),
n = window.location.pathname.match(r)[1].match(/[^/]+\/([\s\S]+)/)[1];
window.location.href = new mw.Uri(mw.util.wikiGetlink('Template:' + n)).extend({
'action': 'edit',
'useeditor': 'source'
}).toString();
});