User:Trevor MacInnis/monobook.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:Trevor MacInnis/monobook.css. |
importScript('User:Misza13/watchlistSorter.js');
importScript('User:Mr.Z-man/closeAFD.js');
importScript('User:AzaToth/twinkle.js');
TwinkleConfig = {
revertMaxRevisions : 50,
userTalkPageMode : 'window',
showSharedIPNotice : true,
openTalkPage : [ 'agf', 'norm', 'vand' ],
openTalkPageOnAutoRevert : false,
summaryAd : " using [[WP:TWINKLE|TW]]",
deletionSummaryAd : " using [[WP:TWINKLE|TW]]",
protectionSummaryAd : " using [[WP:TWINKLE|TW]]",
watchSpeedyPages : [ 'g3', 'g5', 'g10', 'g11', 'g12' ],
watchProdPages : true,
openUserTalkPageOnSpeedyDelete : [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ],
watchRevertedPages : [ ],
markRevertedPagesAsMinor : [ 'agf', 'norm', 'vand', 'torev' ],
deleteTalkPageOnDelete : false,
watchWarnings : true,
markAIVReportAsMinor : true,
markSpeedyPagesAsMinor : true,
offerReasonOnNormalRevert : true,
orphanBacklinksOnSpeedyDelete : {orphan:true, exclude:['g6']}
};
// Script from [[User:Lightmouse/monobook.js/script.js]] to automatically unlink dates
importScript('User:Lightmouse/monobook.js/script.js');
// Cite button in editting
importScript('User:Mr.Z-man/refToolbar.js');
// google search
importScript('User:Mr.Z-man/gsearch.js');
// DOI checker
importScript("User:Smith609/toolbox.js");
importScript('User:Plastikspork/date.js');
// [[User:Outriggr/metadatatest.js]]
importScript('User:Outriggr/metadatatest.js');
document.write('<scr'+'ipt type="text/javascript"'
+
'src="http://nl.wikipedia.org/w/index.php?title=Gebruiker:JePe/recentrevisionsbox.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr'+'ipt>');
// Script from [[User:AndyZ/peerreviewer.js]]
mw.loader.load('https://wiki.riteme.site/w/index.php?title=User:AndyZ/peerreviewer.js'
+ '&action=raw&ctype=text/javascript');
// ==============
// NavBar testing
mw.loader.load('https://wiki.riteme.site/w/index.php?title=User:Gimmetrow/dynabars.js'
+ '&action=raw&ctype=text/javascript');
// ==============
//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
mw.loader.load('https://wiki.riteme.site/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); }
// Filter changes live
// [[User:Lupin/recent2.js]] - please include this line
mw.loader.load(
'https://wiki.riteme.site/w/index.php?title=User:Lupin/recent2.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s');
// [[User:Lupin/popups.js]] - please include this line
mw.loader.load('https://wiki.riteme.site/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript');
simplePopups=true;
popupAdminLinks=true;
// <pre><nowiki>
function BlockIpHelp()
{
var form = document.getElementById( 'blockip' );
if ( ! form || form.tagName != 'FORM' || ! form.wpBlockAddress ) return;
var span = document.createElement( 'SPAN' );
form.span = span; // avoid globals
// to the right of the IP or username field
//
form.wpBlockAddress.parentNode.insertBefore( span, form.wpBlockAddress.nextSibling );
function ipMessage( message, selectedIndex, color )
{ var span = document.createElement( 'SPAN' );
span.appendChild( document.createTextNode( ' ' + ( message || '' ) ) );
span.style.color = color || '#000000';
span.style.fontWeight = 'bold';
span.selectedIndex = selectedIndex || 0;
return span;
}
var expiry = {
'other' : 0,
'15 minutes' : 1,
'1 hour' : 2,
'3 hours' : 3,
'24 hours' : 4,
'48 hours' : 5,
'1 week' : 6,
'1 month' : 7,
'indefinite' : 8
};
span.ipNone = ipMessage();
span.ipNot = ipMessage( 'Not an IP.' , expiry[ '24 hours' ], '#009900' ); // green
span.ipUnknown = ipMessage( 'Unknown IP.' , expiry[ '1 hour' ], '#999900' ); // yellow
span.ipAOL = ipMessage( 'AOL IP address.', expiry[ '15 minutes' ], '#990000' ); // red
span.appendChild( span.ipNot ); // place holder
span.showMessage = function( span )
{ this.replaceChild( span, this.firstChild );
}
form.wpBlockAddress.onchange = function()
{
var ip = IpDottedToLong( this.value );
if ( ip === null ) this.form.span.showMessage( this.form.span.ipNone );
else if ( isNaN( ip ) ) this.form.span.showMessage( this.form.span.ipNot );
else if ( IsAOL( ip ) ) this.form.span.showMessage( this.form.span.ipAOL ); // what else, EarthLink?
else this.form.span.showMessage( this.form.span.ipUnknown );
this.form.wpBlockExpiry.selectedIndex = this.form.span.selectedIndex;
}
form.wpBlockAddress.onchange();
}
if ( window.addEventListener ) window.addEventListener( 'load', BlockIpHelp, false );
else if ( window.attachEvent ) window.attachEvent( 'onload', BlockIpHelp );
function IpDottedToLong( ip ) //-> number, Number.NaN for username, or null
{
if ( ! ip ) return null;
if ( ( ip.constructor != String ) ||
( (ip = ip.split( '.' )).length != 4 ) ) return Number.NaN;
//
for ( var i = 0; i < 4; i++ )
if ( isNaN( ip[ i ] = Number( ip[ i ] ) ) ||
ip[ i ] < 0 ||
ip[ i ] > 255 ) return Number.NaN;
// I "think" JavaScript numbers can handle this....
//
return ip[ 0 ] * 256 * 256 * 256 + // JS lacks an exponent op, I refuse to use Math.pow()
ip[ 1 ] * 256 * 256 +
ip[ 2 ] * 256 +
ip[ 3 ];
}
function IsAOL( ip )
{
if ( ip < 1074528256 ) return false; // 64. 12. 0. 0 ..
else if ( ip <= 1074593791 ) return true; // .255.255
else if ( ip < 2511208448 ) return false; // 149.174. 0. 0 ..
else if ( ip <= 2511273983 ) return true; // .255.255
else if ( ip < 2560819200 ) return false; // 152.163. 0. 0 ..
else if ( ip <= 2560884735 ) return true; // .255.255
else if ( ip < 2894069760 ) return false; // 172.128. 0. 0 ..
else if ( ip <= 2899574783 ) return true; // .211.255.255
else if ( ip < 3277651968 ) return false; // 195. 93. 0. 0 ..
else if ( ip <= 3277684735 ) return true; // .127.255
else if ( ip < 3327197184 ) return false; // 198. 81. 0. 0 ..
else if ( ip <= 3327205375 ) return true; // . 31.255
else if ( ip < 3393404928 ) return false; // 202. 67. 64. 0 ..
else if ( ip <= 3393421311 ) return true; // .127.255
else if ( ip < 3451650048 ) return false; // 205.188. 0. 0 ..
else if ( ip <= 3451715583 ) return true; // .255.255
else if ( ip < 3486007296 ) return false; // 207.200. 64. 0 ..
else if ( ip <= 3486023679 ) return true; // .127.255
else return false;
}
// </nowiki></pre>
/**** handy watch ****/
document.write('<script type="text/javascript"' +
'src="http://wiki.riteme.site/w/index.php?title=User:R3m0t/' +
'handywatch.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
/* This is to keep track of who is using this extension: [[User:R3m0t/handywatch.js]] */