User:Tube of Light/common.js

mw.loader.load( '/w/index.php?title=User:%C3%9Ejarkur/NeverUseMobileVersion.js&action=raw&ctype=text/javascript' ); // Backlink: User:Þjarkur/NeverUseMobileVersion.js mw.loader.load( '/w/index.php?title=User:Galobtter/scripts/adminhighlighter.js&action=raw&ctype=text/javascript' ); // Backlink: User:Galobtter/scripts/adminhighlighter.js mw.loader.load( '/w/index.php?title=User:Amorymeltzer/crathighlighter.js&action=raw&ctype=text/javascript' ); // Backlink: User:Amorymeltzer/crathighlighter.js mw.loader.load( '/w/index.php?title=User:PerfektesChaos/js/listPageOptions/r.js&action=raw&ctype=text/javascript' ); // Backlink: User:PerfektesChaos/js/listPageOptions/r.js mw.loader.load( '/w/index.php?title=User:Zocky/PicturePopupsVector.js&action=raw&ctype=text/javascript' ); // Backlink: User:Zocky/PicturePopupsVector.js mw.loader.load( '/w/index.php?title=User:Opencooper/svgReplace.js&action=raw&ctype=text/javascript' ); // Backlink: User:Opencooper/svgReplace.js mw.loader.load( '/w/index.php?title=User:Shubinator/DYKcheck.js&action=raw&ctype=text/javascript' ); // Backlink: User:Shubinator/DYKcheck.js mw.loader.load( '/w/index.php?title=User:Evad37/EditWarChecker.js&action=raw&ctype=text/javascript' ); // Backlink: User:Evad37/EditWarChecker.js mw.loader.using( 'mediawiki.util', function {	var showNotice = function  {		// Stick a "Watchlist update!" notice after the notification count		$( "#pt-notifications-notice" ).after( $( "" ).append( $( "" )       		.text( "Watchlist update!" )       		.css( { "background-color": "#002F6C", "color": "white", "border-radius": "2px", "padding": "0.25em 0.45em 0.2em", "cursor": "pointer", "font-weight": "bold", "transition": "background-color 0.5s" } )       		.attr( "href", "/wiki/Special:Watchlist" )        		.mouseover( updateNotice )        	) .attr( "id", "watchlist-update-notice" ) );	};	var updateNotice = function {		// Lighten the background color so the user knows we're updating		$( "#watchlist-update-notice a" ).css( "background-color", "#7bff7b" );		// Update the notice		$.getJSON( mw.util.wikiScript( 'api' ), {   			format: "json", action: "query", list: "watchlist", wlshow: "unread", wllimit: 1 // Because we're checking if there are *any* entries } ).done(function( data ) { if( !data.query ) return; if( data.query.watchlist.length ) { // There are new watchlist diffs to read, so show notice if( !$( "#watchlist-update-notice" ).length ) { // That is, if it isn't shown already showNotice; } else { // There's already a notice, so change background $( "#watchlist-update-notice a" ).css( "background-color", "#002F6C" ); }   			} else { // No new watchlist diffs to read, so hide notice $( "#watchlist-update-notice" ).remove; }   		}    	);	};    $( document ).ready( function  { updateNotice; window.setInterval( updateNotice, 120000 ); } ); } );