User:PetraMagna/common.js: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
PetraMagna (talk | contribs) faster js load times? |
PetraMagna (talk | contribs) fix? |
||
Line 1: | Line 1: | ||
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/HotCat.js&action=raw&ctype=text |
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/HotCat.js&action=raw&ctype=text%2Fjavascript' ); |
||
/* common.js does not work in previews; need this to see momotalk choice effects */ |
/* common.js does not work in previews; need this to see momotalk choice effects */ |
||
if (document.getElementsByClassName("momotalk-container").length > 0) { |
if (document.getElementsByClassName("momotalk-container").length > 0) { |
||
console.log("Loading personal momotalk js."); |
console.log("Loading personal momotalk js."); |
||
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/momotalk-choice.js&action=raw&ctype=text |
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/momotalk-choice.js&action=raw&ctype=text%2Fjavascript' ); |
||
} |
} |
||
if (document.getElementsByClassName("story-container").length > 0) { |
if (document.getElementsByClassName("story-container").length > 0) { |
||
console.log("Loading story js"); |
console.log("Loading story js"); |
||
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/story.js&action=raw&ctype=text |
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/story.js&action=raw&ctype=text%2Fjavascript' ); |
||
} |
} |
||
if (document.getElementsByClassName("audio-player").length > 0) { |
if (document.getElementsByClassName("audio-player").length > 0) { |
||
console.log("Loading audio js"); |
console.log("Loading audio js"); |
||
mw.loader.load ( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/audio.js&action=raw&ctype=text |
mw.loader.load ( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/audio.js&action=raw&ctype=text%2Fjavascript' ); |
||
} |
} |
||
// if (document.getElementsByClassName("server-toggle-parent").length > 0 || document.getElementsByClassName("server-toggle-jp-button").length > 0 || document.getElementsByClassName("tabber__tabs").length > 0) { |
// if (document.getElementsByClassName("server-toggle-parent").length > 0 || document.getElementsByClassName("server-toggle-jp-button").length > 0 || document.getElementsByClassName("tabber__tabs").length > 0) { |
||
// console.log("Loading server switching js"); |
// console.log("Loading server switching js"); |
||
// mw.loader.load ( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/server-toggle.js&action=raw&ctype=text |
// mw.loader.load ( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/server-toggle.js&action=raw&ctype=text%2Fjavascript' ); |
||
// } |
// } |
||
Line 61: | Line 61: | ||
// (function() { |
// (function() { |
||
// console.log("Loading popups."); |
// console.log("Loading popups."); |
||
// mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text |
// mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text%2Fjavascript'); |
||
// mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-popups.css&action=raw&ctype=text |
// mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-popups.css&action=raw&ctype=text%2Fcss', 'text/css'); |
||
// })(); |
// })(); |
||
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/popups.js&action=raw&ctype=text |
mw.loader.load( '//bluearchive.wiki/wiki/index.php?title=User:PetraMagna/popups.js&action=raw&ctype=text%2Fjavascript'); // [[w:Wikipedia:Tools/Navigation popups]] |
||
/** |
/** |
||
* Cat-a-lot - changes category of multiple files |
* Cat-a-lot - changes category of multiple files |
||
Line 73: | Line 73: | ||
mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function () { |
mw.loader.using(['jquery.ui', 'mediawiki.util']).done(function () { |
||
mw.util.addCSS("#cat_a_lot_settings { display:none !important;}"); // Preferences depend on some Commons gadgets, not available locally |
mw.util.addCSS("#cat_a_lot_settings { display:none !important;}"); // Preferences depend on some Commons gadgets, not available locally |
||
mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-Cat-a-lot.js&action=raw&ctype=text |
mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-Cat-a-lot.js&action=raw&ctype=text%2Fjavascript'); |
||
mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text |
mw.loader.load('//commons.wikimedia.org/wiki/index.php?title=MediaWiki:Gadget-Cat-a-lot.css&action=raw&ctype=text%2Fcss', 'text/css'); |
||
}); |
}); |
||
} |
} |