All pastes #979190 Raw Edit

Unnamed

public javascript v1 · immutable
·published 2008-04-10 03:53 UTC
rendered paste body
// ==UserScript==// @name           The Eighth// @namespace      userscipts.org// @description    JB's Quick-Nav script Redeux// @include        http://forums.whirlpool.net.au*// ==/UserScript==(function() {	$ = unsafeWindow.jQuery;	if(document.URL == 'http://forums.whirlpool.net.au/' || document.URL == 'http://forums.whirlpool.net.au/index.cfm'){			function checkIfSimonHasChangedShitAgain(gm){			var arrHolder = [], hrefArr = [], dGetter;						(gm == 'h3check')?dGetter = $('h3') : dGetter = $("h3:contains('"+gm+"')").parent().find("a[@href*='forum-threads.cfm']");							dGetter.each(function(){				arrHolder.push($(this).text());				if(gm != 'h3check'){									hrefArr.push($(this)[0].href);									}			  			});			var ts = arrHolder.toString();			if(!GM_getValue(''+gm+'') || ts != GM_getValue(''+gm+'') ){				GM_setValue(''+gm+'',''+ts+'');								if(gm != 'h3check'){									GM_setValue(''+gm+'href',''+hrefArr.toString()+'');								}			}							}			checkIfSimonHasChangedShitAgain('h3check');				var splith3 = GM_getValue('h3check').split(',');		for(var i=0;i<splith3.length;i++){					checkIfSimonHasChangedShitAgain(splith3[i]);				}		}	GM_addStyle("#pmenu {padding:0; margin:25px 0 50px 15px; list-style-type: none; width:101px;position:fixed;z-index:50;}"+		"#pmenu ul {padding:0; margin:0; list-style-type: none; width:101px;}"+		"#pmenu li {position:relative;z-index:50;}"+		"#pmenu a{display:block;width:100px; font-size:10px; color:#000; height:23px; line-height:22px; "+			"text-decoration:none; text-indent:5px; background:#b2ab9b; border:1px solid #fff; border-width:0 1px 1px 0;}"+		"#pmenu li:hover > a {background:#dfd7ca; color:#c00;}"+		"#pmenu li ul {display: none;} "+		"#pmenu li:hover > ul {display:block; position:absolute; top:0; z-index:51;margin-left:90px;}");			var unLi = document.createElement('ul');	unLi.setAttribute('id', 'pmenu');			$('body').prepend(unLi);	var h3splitSecond = GM_getValue('h3check').split(',');		for(var j=0;j<h3splitSecond.length;j++){			var hrArrSplit = GM_getValue(''+h3splitSecond[j]+'href').split(',');					var splitagain = GM_getValue(''+h3splitSecond[j]+'').split(',');				var l = document.createElement('li');		l.setAttribute('class', 'theeighthli');		l.innerHTML = '<a href="#">'+h3splitSecond[j]+'</a>';		var ul2 = document.createElement('ul');		ul2.setAttribute('class', 'theeighthul');		l.appendChild(ul2);						for(var k=0;k<splitagain.length;k++){					var l2 = document.createElement('li');			l2.setAttribute('class', 'theeighthli2');			l2.innerHTML = '<a href="'+hrArrSplit[k]+'">'+splitagain[k]+'</a>';				ul2.appendChild(l2);						}					unLi.appendChild(l);			}				})();