Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/******************************************************************************
MoveToDraft (Bharatpedia)
-------------
Version 2.5.8
-------------
Loader. The working code is in MoveToDraft/core.js
******************************************************************************/
/* jshint laxbreak: true, undef: true, maxerr:999 */
/* globals console, window, document, $, mw */
// <nowiki>
var mtd = {
config: {
script: {
location: "User:WikiDwarf/gadgets/MoveToDraft",
version: "2.5.8"
}
}
},
API;
$.when(
mw.loader.using( [ 'mediawiki.util', 'mediawiki.api', 'mediawiki.Title' ] ),
$.ready
).then( function() {
mtd.config.mw = mw.config.get( [
"wgArticleId",
"wgCurRevisionId",
"wgPageName",
"wgUserGroups",
"wgUserName",
"wgMonthNames",
"wgNamespaceNumber",
"wgTitle",
"wgArticlePath",
"wgIsMainPage",
"wgIsRedirect"
]
);
API = new mw.Api( {
ajax: {
headers: {
"Api-User-Agent": "MoveToDraft/" + mtd.config.script.version +
" ( https://en.bharatpedia.org/wiki/User:WikiDwarf/gadgets/MoveToDraft )"
}
}
} );
window.mtd = mtd;
window.API = API;
if ( mtd.config.mw.wgNamespaceNumber !== 0 ) {
return;
}
if ( mtd.config.mw.wgIsMainPage === true ) {
return;
}
if ( mtd.config.mw.wgCurRevisionId === 0 ) {
return;
}
if ( mtd.config.mw.wgIsRedirect === true ) {
return;
}
var loadScript = document.createElement( 'script' );
loadScript.src = mtd.config.mw.wgArticlePath.replace(
'$1',
'User:WikiDwarf/gadgets/MoveToDraft/core.js'
) + '?action=raw&ctype=text/javascript';
document.head.appendChild( loadScript );
});
// </nowiki>