Jump to content

User:EpochFail/wikignome.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by EpochFail (talk | contribs) at 15:29, 14 September 2011. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
function importCSSURI(url) {
	$('head').append(
		$("<link>")
			.attr('rel', 'stylesheet')
			.attr('type', 'text/css')
			.attr('href', url)
	)
}
function importCSS(page) {
	var url = wgScript + '?title=' +
		encodeURIComponent(page.replace(' ','_')).replace('%2F','/').replace('%3A',':') +
		'&action=raw&ctype=text/css'

	importCSSURI(url)
}
function getParameterByName(name)
{
	name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
	var regexS = "[\\?&]" + name + "=([^&#]*)";
	var regex = new RegExp(regexS);
	var results = regex.exec(window.location.href);
	if(results == null)
		return "";
	else
		return decodeURIComponent(results[1].replace(/\+/g, " "));
}
if(
	wgPageName.search("User:EpochFail") > -1 || (
		wgNamespaceNumber            == 0 && 
		getParameterByName('action') == '' && 
		getParameterByName('diff')   == ''
	)
){
	importCSSURI("http://www-users.cs.umn.edu/~halfak/todo/todo.css")
	//importCSS("User:EpochFail/jquery-ui-1.8.16.custom.css")
	//importScript("User:EpochFail/jquery-1.6.2.min.js")
	//importScript("User:EpochFail/jquery-ui-1.8.16.custom.js")
	importScriptURI("http://www-users.cs.umn.edu/~halfak/todo/todo_system.js")
}