Content deleted Content added
Technical 13 (talk | contribs) m Some mw:Manual:Coding conventions/JavaScript changes. Still needs to be changed over to use mw.api and some other changes to bring it up to current standards for a gadget. Also added code for feature request. Orphan box should always exist now. |
Technical 13 (talk | contribs) |
||
Line 36:
deOrphanedText += '<a href="#reLoad" onClick="___location.reload();" style="font-weight: bold;">reload</a> | ';
}
deOrphanedText += '<a href="//en.wikipedia.org/w/index.php?title=' + encodeURIComponent( mw.config.get( 'wgTitle' ) ) + '&diff=cur&oldid=prev" style="font-weight: bold;">diff</a> )</small>';
$( '.loadinganimation' ).html( deOrphanedText );
} );
Line 67:
switch ( backLinks ){
case 0:
var blStatement = '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/' + encodeURIComponent( mw.config.get( 'wgTitle' ) ) + '&namespace=0&hideredirs=1&hidetrans=1" style="font-weight: bold;">other articles</a> link to it.';
break;
case 1:
var blStatement = 'There is <b>1 link to this page</b> from an <a href="//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/' + encodeURIComponent( 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;
case 2:
var blStatement = 'There are <b>2 links to this page</b> from <a href="//en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/' + encodeURIComponent( 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:
var blStatement = '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/' + encodeURIComponent( 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>';
// setTimeout( function() { deOrphan( backLinks ); }, 2500 );
break;
|