User:JAAqqO/common.js

// Begin: 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])}} // End: Enable caching for resource loads, see User:SD0001/Making_user_scripts_load_faster, @revision 6

// Begin AutoEd/Customization / AutoEd/complete.js importScript('Wikipedia:AutoEd/core.js'); // Backlink: AutoEd/core.js autoEdMinor = false; autoEdTag = ""; //Supplies link to CHECKWIKI in summary autoEdLinkLocation = "ca-edit"; var AutoEd_baseurl = 'https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedia:AutoEd/';

mw.loader.load(AutoEd_baseurl + 'unicodify.js'); // autoEdUnicodify converts HTML entities to WikiText mw.loader.load(AutoEd_baseurl + 'isbn.js'); // autoEdISBN fixes ISBN syntax so that WikiMagic can work //mw.loader.load(AutoEd_baseurl + 'whitespace.js'); // autoEdWhitespace cleans up whitespace mw.loader.load(AutoEd_baseurl + 'wikilinks.js'); // autoEdWikilinks simplifies and shortens wikilinks where appropriate mw.loader.load(AutoEd_baseurl + 'htmltowikitext.js'); // autoEdHTMLtoWikitext converts HTML to wikitext mw.loader.load(AutoEd_baseurl + 'headlines.js'); // autoEdHeadlines fixes common headline errors and renames some headers mw.loader.load(AutoEd_baseurl + 'unicodecontrolchars.js'); // autoEdUnicodeControlChars converts HTML to wikitext mw.loader.load(AutoEd_baseurl + 'unicodehex.js'); // autoEdUnicodeHex converts hex encoded characters to unicode mw.loader.load(AutoEd_baseurl + 'templates.js'); // autoEdTemplates cleans up templates mw.loader.load(AutoEd_baseurl + 'tablestowikitext.js'); // autoEdTablestoWikitext replaces HTML tables with wikitables mw.loader.load(AutoEd_baseurl + 'extrabreaks.js'); // autoEdExtraBreaks removes extra BR tags mw.loader.load(AutoEd_baseurl + 'links.js'); // autoEdLinks cleans up common link errors mw.loader.load(AutoEd_baseurl + 'fullwidth.js'); //importScript('User:Jerome Frank Disciple/curlyfixer.js'); // Backlink: User:Jerome Frank Disciple/curlyfixer.js //importScript('User:Ohconfucius/dashes.js'); // Backlink: User:Ohconfucius/dashes.js importScript('User:JAAqqO/own.js'); // Backlink: User:JAAqqO/own.js

function autoEdFunctions { //Activates individual modules when "auto ed" tab is clicked var $textbox = $( '#wpTextbox1' ); var txt = $textbox.textSelection('getContents'); txt = autoEdUnicodify(txt); txt = autoEdISBN(txt); //   txt = autoEdWhitespace(txt); txt = autoEdUnicodeHex(txt); txt = autoEdWikilinks(txt); txt = autoEdHTMLtoWikitext(txt); txt = autoEdHeadlines(txt); txt = autoEdUnicodeControlChars(txt); txt = autoEdTemplates(txt); txt = autoEdTablestoWikitext(txt); txt = autoEdExtraBreaks(txt); txt = autoEdLinks(txt); //   txt = autoEdDashes(txt); txt = autoEdFullwidth(txt); //   txt = autoEdCurlyFixer(txt); txt = autoEdOwn(txt); if(txt===$textbox.textSelection('getContents')) mw.notify("No changes required!"); else $textbox.textSelection('setContents', txt); } // End AutoEd/Customization / AutoEd/complete.js

mw.loader.load( '/w/index.php?title=User:Evad37/rater.js&action=raw&ctype=text/javascript' ); // Backlink: User:Evad37/rater.js

mw.util.addPortletLink ('p-personal', 'https://en.wikipedia.org/wiki/User:JAAqqO/RCL', 'RECENT', null, null, null, '#pt-preferences');

mw.util.addPortletLink ('p-personal', 'https://en.wikipedia.org/wiki/User:JAAqqO/FIX', 'FIX', null, null, null, '#pt-preferences');

mw.util.addPortletLink ('p-personal', 'https://en.wikipedia.org/wiki/User:JAAqqO/A', 'A', null, null, null, '#pt-preferences');

mw.util.addPortletLink ('p-personal', 'https://petscan.wmflabs.org/?psid=25996186', 'P', null, null, null, '#pt-preferences');

mw.util.addPortletLink ('p-personal', 'https://en.wikipedia.org/wiki/WP:ORDER', 'O', null, null, null, '#pt-preferences');

mw.util.addPortletLink ('p-personal', 'https://en.wikipedia.org/wiki/WP:TALKORDER', 'T-O', null, null, null, '#pt-preferences');