User:Brandybradham/global.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
Documentation for this user script can be added at User:Brandybradham/global. |
// load global js stuff
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=user:lustiger_seth/global.js&action=raw&ctype=text/javascript&smaxage=2678400&dontcountme=s');
// copied from http://de.wikipedia.org/wiki/Benutzer:Olliminatore/monobook.js and modified
function importPage(page, proj, lang, script_path) { // all languages support
ns = 'User:'; // international name, works in all wikipedias
if(!proj) proj = 'wikipedia';
if(!lang) lang = wgContentLanguage;
if(!script_path) script_path = wgScriptPath; // e.g. "/w"
if(typeof(mw)!="undefined" && typeof(mw.config)!="undefined" && mw.config.get('wgServer').indexOf('https://')===0){
script_path = '/wikipedia/' + lang + script_path;
lang = 'secure';
proj = 'wikimedia';
}
page = '//' + lang + '.' + proj + '.org' + script_path + '/index.php?title=' + ns + page +
'&action=raw&ctype=text/javascript&smaxage=2678400';
return mw.loader.load(page);
}
// install [[w:en:user:Cacycle/wikEdDiff]] enhanced diff view using ajax
importPage('Cacycle/wikEdDiff.js', 'wikipedia', 'en', '/w');
// remove spam addon
importPage('Mike.lifeguard/removeSpam.js', 'wikimedia', 'meta', '/w');
// install [[w:de:user:lustiger_seth/unsigned.js]] for signing unsigned posts
importPage('lustiger_seth/unsigned.js', 'wikipedia', 'de', '/w');
//edit section 0
importPage('lustiger_seth/editsection0.js', 'wikipedia', 'de', '/w');