User:Aidan9382/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | The accompanying .css page for this skin is at User:Aidan9382/common.css. |
//Some script importing has been moved to [[meta:User:Aidan9382/global.js]]. All scripts will continue to be managed on enwiki (See [[User:Aidan9382/scripts]])
//enwiki-specific scripts will still be imported from here
// Script imports
importScript('User:Andy M. Wang/pageswap.js'); // [[User:Andy M. Wang/pageswap.js]]
importScript('User:Anomie/useridentifier.js'); // [[User:Anomie/useridentifier.js]]
importScript('User:Suffusion of Yellow/abusecontribs.js'); // [[User:Suffusion of Yellow/abusecontribs.js]]
importScript('User:Frietjes/masspurge.js'); // [[User:Frietjes/masspurge.js]]
importScript('User:PerfektesChaos/js/lintHint/r.js'); // [[User:PerfektesChaos/js/lintHint/r.js]] / [[User:PerfektesChaos/js/lintHint/d.js]]
// My scripts
importScript('User:Aidan9382/scripts/defaultSummaries.js'); // [[User:Aidan9382/scripts/defaultSummaries.js]] - Default summaries, only ever used on enwiki
importScript('User:Aidan9382/scripts/IPBlockNotice.js'); // [[User:Aidan9382/scripts/IPBlockNotice.js]] - Small notice to inform you if your current IP is Anon/Hardblocked
//importScript('User:Aidan9382/scripts/noedit.js'); // [[User:Aidan9382/scripts/noedit.js]] - Stop editing
// [[User:Novem Linguae/Scripts/UserHighlighterSimple.js]]
function import_UHS(){importScript('User:Novem Linguae/Scripts/UserHighlighterSimple.js')}
mw.util.addPortletLink('p-tb', 'javascript:import_UHS()', 'Enable UHS');
mw.hook( "lintHint.config" ).fire( {rooms: "*", oldid: true} ); // Configure lintHint
//mw.notification.notify("Body Text",{autoHideSeconds:"short",title:"Title Text",type:"success"});
//for custom lengths, change mw.notification.autoHideSeconds
var replace = document.getElementById("pt-betafeatures"); // Replace beta features tab with my bookmark page for convenience
if (replace) {
replace.innerHTML = '<a href="/wiki/User:Aidan9382/Bookmarks" title="Your bookmarks"><span>Bookmarks</span></a>';
}
// a really hacky way to add a button for subpages below the page information button
var tinfo = document.getElementById("t-info");
if (tinfo) {
pagename = RegExp("\\?title=(.+?)&action=").exec(tinfo.children[0].href);
tinfo.outerHTML += '<li id="t-subpages" class="mw-list-item"><a href="/wiki/Special:PrefixIndex/' + pagename[1] + '/" title="Subpages of this page"><span>Subpage list</span></a></li>';
}
var watchbutton = document.getElementById("wpWatchthis"); //Auto-watch all unwatched pages for a week when editing
if (watchbutton && !watchbutton.checked) {
var expirylist = document.getElementById("wpWatchlistExpiry");
if (expirylist) {
watchbutton.checked = true;
expirylist.value = "1 week";
}
}
if (mw.util.getParamValue( 'withJS' ) === 'MediaWiki:Synchronizer.js') { //Synchronizer workaround - see [[Module talk:Excerpt#Synchronizer]]
mw.loader.load('https://www.mediawiki.org/wiki/MediaWiki:Synchronizer.js?action=raw&ctype=text/javascript');
}
mw.loader.load('//en.wikipedia.org/wiki/User:Sophivorus/ExcerptHunter.js?action=raw&ctype=text/javascript');
mw.loader.load('http://127.0.0.1:5500'); //Local JS testing (aka Twinkle)