User:Oripaypaykim/common.js

mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );

javascript:if(typeof%20wgEnableAPI=='undefined'){alert('This%20bookmarklet%20only%20works%20on%20Wikimedia%20pages')}else{xhr=new%20XMLHttpRequest;xhr.onreadystatechange=function{if(xhr.readyState==4){eval('pages=('+xhr.responseText+').query.pages');for(var%20page%20in%20pages)edittoken=pages[page].edittoken;if(edittoken=='+\\')if(!confirm('You%20are%20not%20logged%20in,%20continue?'))return;location.href='https://tools.wmflabs.org/refill/result.php?defaults=y&nowatch=y&wiki='+wgContentLanguage+'&page='+encodeURIComponent(mw.config.get('wgPageName'));};};xhr.open('GET',wgScriptPath+'/api.php?action=query&prop=info&intoken=edit&titles=M&format=json',true);xhr.send(null);}

/*** BEGIN WIKIBREAK ENFORCER ***/ $(document).ready(function {	/*** Start editing here ***/	// When you want to end your break?	// no leading zeroes. (example: 9 - correct, 09 - incorrect)	var date = { year: 2015, month: 7, day: 17};	var time = { hours: 1, minutes: 00, seconds: 0 };	/*** Stop editing here ***/	var currentDate = new Date;	var enforcedBreakEnd = new Date( date.year,date.month-1,date.day,time.hours,time.minutes,time.seconds);	if (currentDate <= enforcedBreakEnd) {		alert("Enforced wikibreak until "+enforcedBreakEnd.toLocaleString + "\n(now is "+currentDate.toLocaleString+")\n\noctober 1 is no longer from the month by 1 weeks before activated");		location = "//"+location.host+"/w/index.php?title="			+ "Special:Userlogout&returnto=Main_Page";	} }); /*** END WIKIBREAK ENFORCER ***/