This is an old revision of this page, as edited by Technical 13(talk | contribs) at 02:27, 3 December 2014(ce (eventually I have to get it all right, right?)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.Revision as of 02:27, 3 December 2014 by Technical 13(talk | contribs)(ce (eventually I have to get it all right, right?))
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.
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.
if(mw.config.get('wgNamespaceNumber')===0&&$.inArray("All orphaned articles",mw.config.get('wgCategories'))>=0){functiondeOrphan(backLinks){vardeOrphanerRequest={action:"query",titles:mw.config.get('wgPageName'),prop:"revisions",intoken:"edit",rvprop:"content",indexpageids:1,dataType:"xml",format:"xml"};$.get(mw.config.get('wgScriptPath')+"/api.php",deOrphanerRequest,function(deOrphanerResponse){vardeOrphanerContent=$(deOrphanerResponse).find('rev').text();vardeOrphanerSubmit={action:"edit",titles:mw.config.get('wgPageName'),text:deOrphanerContent.replace(/\{\{Orphan(.*?)\}\}\n/gi,""),summary:"Article [[User:Technical_13/Scripts/OrphanStatus|deOrphaned]]!",token:mw.user.tokens.get('editToken')};console.log("Replacement wikitext:\n%s",deOrphanerContent.replace(/\{\{Orphan(.*?)\}\}\n/gi,""));$.when($.post(mw.config.get('wgScriptPath')+"/api.php",deOrphanerSubmit,function(deOrphanerSesponse){$(".loadinganimation").html("Article deOrphanin in progress...");})).done(function(){$(".loadinganimation").html("Article deOrphaned!");});});}$('#firstHeading').append(' <span class="loadinganimation" style="font-size: medium !important; color: #000 !important; font-family: sans-serif !important;">• • • </span> ');varloadingAnimation=window.setInterval(function(){($(".loadinganimation").html()=="• • • "?$(".loadinganimation").html(" • • • "):($(".loadinganimation").html()==" • • • "?$(".loadinganimation").html(" • • •"):($(".loadinganimation").html()==" • • •"?$(".loadinganimation").html(" • • • "):$(".loadinganimation").html("• • • "))))},250);varrequestBacklinks={action:"query",list:"backlinks",format:"json",blfilterredir:"nonredirects",bllimit:3,blnamespace:0,bltitle:mw.config.get('wgTitle')};$.get(mw.config.get('wgScriptPath')+"/api.php",requestBacklinks,function(responseBacklinks){varbackLinks=responseBacklinks.query.backlinks.length;switch(backLinks){case0:varblStatement='This page is an <a href="//en.wikipedia.org/wiki/Wikipedia:Orphan" style="font-weight: bold;">orphan</a> as no <a href="//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/'+mw.config.get('wgTitle')+'&namespace=0&hideredirs=1&hidetrans=1" style="font-weight: bold;">other articles</a> link to it.';break;case1:varblStatement='There is <b>1 link to this page</b> from an <a href="//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/'+mw.config.get('wgTitle')+'&namespace=0&hideredirs=1&hidetrans=1" style="font-weight: bold;">other article</a>. <small>(<a href="#deOrphan" onClick="deOrphan('+backLinks+');" style="font-weight: bold;">deOrphan</a>)</small>';break;case2:varblStatement='There are <b>2 links to this page</b> from <a href="//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/'+mw.config.get('wgTitle')+'&namespace=0&hideredirs=1&hidetrans=1" style="font-weight: bold;">other articles</a>. <small>(<a href="#deOrphan" onClick="deOrphan('+backLinks+');" style="font-weight: bold;">deOrphan</a>)</small>';break;default:varblStatement='This page is not an <a href="//en.wikipedia.org/wiki/Wikipedia:Orphan" style="font-weight: bold;">orphan</a> as it meets the "Rule of Three" by having three or more links from <a href="//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/'+mw.config.get('wgTitle')+'&namespace=0&hideredirs=1&hidetrans=1" style="font-weight: bold;">other articles</a>.';deOrphan(backLinks);break;}clearInterval(loadingAnimation);$(".loadinganimation").html(blStatement);});}