User:MPGuy2824/common.js

Source: Wikipedia, the free encyclopedia.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// Enable caching for resource loads, see [[User:SD0001/Making_user_scripts_load_faster]], @revision 6
if(!/\bnocache=\b/.test(location.href)){let e=(e,t,n)=>(e=e.replace(/special:mypage/i,"User:"+mw.config.get("wgUserName")),$.get("https://"+t+"/w/api.php?titles="+e+"&origin=*&format=json&formatversion=2&uselang=content&maxage=86400&smaxage=86400&action=query&prop=revisions|info&rvprop=content&rvlimit=1").then((r=>{let o=r.query.pages[0];if(o.missing)return;let a=o.revisions[0].content;if(n&&"text/javascript"!==n||"javascript"!==o.contentmodel){if("text/css"!==n||"css"!==o.contentmodel)return $.Deferred().reject('Refused to load "'+e+'"@'+t+": content type mismatch");mw.loader.addStyleTag(a)}else{let e=document.createElement("script");e.innerHTML=a,document.head.appendChild(e)}}))),t=e=>{let t=/^(?:(?:https:)?\/\/(.*))?\/w\/index.php/.exec(e),n=/\btitle=([^=?&]*)/.exec(e);return t&&n&&/\baction=raw\b/.test(e)&&/\bctype=/.test(e)?[n[1],t[1]||mw.config.get("wgServerName")]:null};window.importScript=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/javascript")},window.importStyleSheet=t=>{e(encodeURIComponent(t),mw.config.get("wgServerName"),"text/css")};let n=mw.loader.load;mw.loader.load=function(r,o){let a=t(r);a?e(a[0],a[1],o):n.apply(mw.loader,[...arguments])};let r=mw.loader.getScript;mw.loader.getScript=function(n){let o=t(n);return o?e(o[0],o[1],"text/javascript"):r.apply(mw.loader,[...arguments])}}

//Adding the Special:NewPagesFeed link to the header
$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).done( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.getUrl('Special:NewPagesFeed'),
    'NewPagesFeed',
    'pt-pagecuration',
    'View the new pages feed',
    null,
    '#pt-preferences'
  );
});
importScript( 'User:MPGuy2824/MoveToDraft.js' ); // Backlink: [[User:MPGuy2824/MoveToDraft.js]]
importScript( 'User:MPGuy2824/scripts/getOresScores.js' ); // Backlink: [[User:MPGuy2824/scripts/getOresScores.js]]
importScript( 'User:MPGuy2824/scripts/constituencyCleaner.js' ); // Backlink: [[User:MPGuy2824/scripts/constituencyCleaner.js]]
importScript( 'User:MPGuy2824/scripts/nullEdit.js' ); // Backlink: [[User:MPGuy2824/scripts/nullEdit.js]]
//importScript('User:MPGuy2824/Evad37/MoveToDraft.js' ); // Testing a change

//importScript('User:Svick/HarvErrors.js'); // Backlink: [[User:Svick/HarvErrors.js]]
//importScript('User:Frietjes/findargdups.js'); // Backlink: [[User:Frietjes/findargdups.js]]
//importScript('User:Lourdes/PageCuration.js'); // Linkback: [[User:Lourdes/PageCuration.js]]
//mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" ); // Refill Tool
//importScript('User:MPGuy2824/Evad37/rater.js'); // Backlink: [[User:MPGuy2824/Evad37/rater.js]]
importScript('User:SD0001/StubSorter.js'); // Backlink: [[User:SD0001/StubSorter.js]]
importScript('User:Enterprisey/delsort.js'); // Backlink: [[User:Enterprisey/delsort.js]]
//importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
//importScript('User:Novem Linguae/Scripts/SpeciesHelper.js'); // Backlink: [[User:Novem Linguae/Scripts/SpeciesHelper.js]]
importScript('User:SD0001/W-Ping.js'); // Backlink: [[User:SD0001/W-Ping.js]]
importScript('User:Evad37/OneClickArchiver.js'); // Backlink: [[User:Evad37/OneClickArchiver.js]]
//importScript( 'User:Andy M. Wang/pageswap.js' ); // Backlink: [[User:Andy M. Wang/pageswap]]

//importScript('User:MPGuy2824/MoveToDraft-sandbox.js' ); // Backlink: [[User:MPGuy2824/MoveToDraft.js]]
//importScript('User:MPGuy2824/db-r2.js' ); // Backlink: [[User:MPGuy2824/db-r2.js]]

//importScript('User:DannyS712/VueNPP.js');
importScript('User:Novem Linguae/Scripts/NPPLinks.js'); // Backlink: [[User:Novem Linguae/Scripts/NPPLinks.js]]
importScript('User:Novem Linguae/Scripts/DraftCleaner.js'); // Backlink: [[User:Novem Linguae/Scripts/DraftCleaner.js]]
importScript('User:Eejit43/scripts/AFCRHS.js'); // Backlink: [[User:Eejit43/scripts/AFCRHS.js]]
importScript('User:Novem Linguae/Scripts/GANReviewTool.js'); // Backlink: [[User:Novem Linguae/Scripts/GANReviewTool.js]]
importScript('User:Sohom Datta/fastreview.js'); // Backlink: [[User:Sohom Datta/fastreview.js]]
importScript('MediaWiki:Gadget-find-archived-section.js');
importScript('User:Lingzhi2/reviewsourcecheck-sb.js'); // Backlink: [[User:Lingzhi2/reviewsourcecheck-sb.js]]
importScript('User:Evad37/rater.js'); // Backlink: [[User:Evad37/rater.js]]