|
Post by ch00beh on Feb 17, 2007 14:14:12 GMT -5
Hi all. So, I've randomly been h4xing... er... "modifying" the boards, by using greasemonkey scripts to change the way it does things. The scripts that I make only work in my browser, not the actual board, so it's not really hacking. Anyways, I've been using greasemonkey to teach myself javascript and the various other things that the internet can do. So, now that I have one script working, I feel that I should share it with y'all. First of all: How to get Greasemonkey greasemonkey.mozdev.org/You'll need Firefox. Then again, why aren't you already using it? Because it only works with Firefox, I haven't tried making it cross-browser compatible in any way. This script is a simple little doohickey that makes it so when you click on the banner, you'll be sent to the forum's main page. Just a warning, your cursor won't change into the hand when it hovers over the image. // ==UserScript== // @name Banner Redirect // @description Causes clicks on the banner to redirect to the forum main page // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
document.addEventListener("click", function(e){ if(e.button==0 && e.target.nodeName.toUpperCase()=="IMG" && e.target.alt=="The Exodus"){ window.location.href="http://archipelagoexodus.proboards67.com/"; } }, true);
Sorry it's not indented all happily for those of you who want to be able to actually read it, but that's not my fault that the <code> blocks don't indent. >.< Anyways, to install stuff, just copy and paste it into a text document titled "BannerRedirect.user.js", save it somewhere where you'll remember, then use Firefox to open the file. Greasemonkey will automatically prompt you to install it or not.BREAKTHROUGH FOR EASE OF INSTALLING THESE SCRIPTS Merely click on the respective link and you'll be prompted to install. Easy as a couple clicks of a button now. Magic User RevealBanner RedirectConstrain ImagesStop Post Color Change
|
|
|
Post by ch00beh on Feb 19, 2007 16:37:45 GMT -5
// ==UserScript== // @name Constrain Images // @description Smashes images into a link // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
var images = document.getElementsByTagName("img"); var image, elem;
for(var i = 0; i < images.length; i++){ image = images[i]; if(image.alt == "[image] " && (image.width > 640 || image.height > 480)){ elem = document.createElement("a"); elem.href = image.src; elem.innerHTML = image.src; image.parentNode.replaceChild(elem, image); } }
Wee, new script! So what this does it is makes any image larger than 640x480 pixels turn into its link counterpart, so that it doesn't stretch any margins or just cause general scrolling badness. This is particularly for the art and the self-photo topics, where people have a penchant for posting large images. *glares*
There may be some issues where it misses some pictures. I have no idea why this is.
|
|
|
Post by ch00beh on Feb 19, 2007 21:14:15 GMT -5
by the way, if anyone has managed to install these scripts and likes them or dislikes them, comments would be awesome. Even people who were completely indifferent can post. Also, if people would like to ask if I can make some sort of script, that's cool too.
|
|
|
Post by ch00beh on Feb 20, 2007 17:40:04 GMT -5
Hmm... I feel like it's bad form to be quad posting, but no one seems to care, so yeah. // ==UserScript== // @name Magic user reveal // @description Reveals who a user is when you hover the cursor over his/her name // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
document.addEventListener("mouseover", function(e){ var targ = e.target; if(targ.nodeName.toUpperCase()=="FONT"){ targ = targ.parentNode; } if(targ.nodeName.toUpperCase()=="A" && targ.href.match("user=") && !targ.href.match("modifyprofile") && !targ.href.match("karma")){ var temp = targ.innerHTML; e.target.addEventListener("mouseout", function(event){ targ.innerHTML = temp; }, true); var truth = targ.href.substring(72).toUpperCase(); if(targ.firstChild.nodeName.toUpperCase()!="FONT"){ for(var i = (e.target.innerHTML.length) - (truth.length); --i >= 0; ){ truth = truth + "_"; } } targ.innerHTML = truth; } }, true);
This script makes it so that when you hover your mouse over a name, their "true" name will show. The hardest part was making it go back go normal after you stopped hovering your mouse. >.< This is for when people go on renaming sprees. Bulbs. *cough cough*. Oh. You're supposed to cough while saying the name? [EDIT] - Well, ironically, for the first version, Bulbs was impervious to the name revealing. But this new version got him. >
|
|
|
Post by Tout-Perd on Feb 21, 2007 0:35:47 GMT -5
Lee uses IE because he knows all of its ins and outs, as opposed to FinickyFox, which IIRC, kills my E-mail program. But doing these scripts for us is appreciated, good sir.
|
|
|
Post by ch00beh on Feb 21, 2007 0:42:32 GMT -5
IE has ins and outs? o.O And you probably don't use GMail, and therein lies the problem.
|
|
|
Post by ch00beh on Apr 20, 2007 13:57:41 GMT -5
So after realizing that the boards were using some javascript bits to click on the various sub forums to highlight them and make the cursor change, I changed the banner redirect code to change the cursor to the pointing hand so you'd be able to know if you were doing something. Yeah, terrible explanation, but basically, this is a revamp of the banner redirect script, just for better user usability. // ==UserScript== // @name Banner Redirect // @description Causes clicks on the banner to redirect to the forum main page // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
var doStuff = function(bnnr){ bnnr.style.cursor = 'pointer'; banner.addEventListener("click", function(e){ if(e.button == 0){ window.location.href = "http://archipelagoexodus.proboards67.com/"; } }, false); banner.addEventListener("mouseover", function(e){ window.status="Home"; }, false); banner.addEventListener("mouseout", function(e){ window.status = window.defaultStatus; }, false); };
var elems = document.getElementsByTagName("img"); var banner = elems[0];
if(banner.alt == "The Exodus"){ doStuff(banner); }else{ for(var i = 1; i < elems.length; i++){ if(elems[i].alt == "The Exodus"){ doStuff(elems[i]); break; } } }
Readable Version
// ==UserScript== // @name Banner Redirect // @description Causes clicks on the banner to redirect to the forum main page // @include archipelagoexodus.proboards67.com/* // ==/UserScript==
var doStuff = function(bnnr){ bnnr.style.cursor = 'pointer'; banner.addEventListener("click", function(e){ if(e.button == 0){ window.location.href = "http://archipelagoexodus.proboards67.com/"; } }, false); banner.addEventListener("mouseover", function(e){ window.status="Home"; }, false); banner.addEventListener("mouseout", function(e){ window.status = window.defaultStatus; }, false); };
var elems = document.getElementsByTagName("img"); var banner = elems[0];
if(banner.alt == "The Exodus"){ doStuff(banner); }else{ for(var i = 1; i < elems.length; i++){ if(elems.alt == "The Exodus"){ doStuff(elems); break; } } }
|
|
|
Post by ch00beh on Jun 21, 2007 11:14:03 GMT -5
I HAVE UNDONE POPE! (by simply reworking the script that did him) // ==UserScript== // @name Stop post color change // @namespace namespace // @description stops post color changes. duh. // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
var monster=document.getElementsByTagName('td') for(i=0;i<monster.length;i++){ if(monster[i].className.match(/(windowbg|windowbg2)/i) && monster[i].width.match(/20%/i) && this.location.href.match(/thread=/i) && monster[i].innerHTML.match(/user=(popebenedict|blue)/i)){ monster[i].className="windowbg" monster[i+1].className="windowbg" monster[i+6].className="windowbg" } }
The new version of Greasemonkey actually makes it really really really easy to install user scripts. Simply right click the monkey face at the bottom right of your Firefox window, select "New user script", then copy my code into the Notepad (if it asks for what type of editor to use, select Notepad or Wordpad, but not Word, because weird things can happen). After copying and pasting, save the file, then close it, and it should work.
Readable version: // ==UserScript== // @name Stop post color change // @namespace namespace // @description stops post color changes. duh. // @include archipelagoexodus.proboards67.com/* // ==/UserScript==
var monster=document.getElementsByTagName('td') for(i=0;i<monster.length;i++){ if(monster.className.match(/(windowbg|windowbg2)/i) && monster.width.match(/20%/i) && this.location.href.match(/thread=/i) && monster.innerHTML.match(/user=(popebenedict|blue)/i)){ monster.className="windowbg" monster[i+1].className="windowbg" monster[i+6].className="windowbg" } }
|
|
|
Post by Vaxx on Jun 21, 2007 13:58:48 GMT -5
Thaks for the scripts I just now installed a few and they work great. Thanks again for all your effort.
|
|
|
Post by ch00beh on Jun 22, 2007 22:14:25 GMT -5
Glad to see at least one person other than me who uses them. Thanks.
|
|
|
Post by drew on Jun 23, 2007 1:26:10 GMT -5
im a greasemonkey.... as in i can fix your car, change your oil, those sort of things.... i can hax! too....
My program is like this though...
PROGRAM< Go to lowes Buy a handaxe stick it in shed wait three days get it out and go to computer of enemy you want to hax hax it all up LMAOLOLBBQSAUCE
|
|
|
Post by Popebenedict on Jun 23, 2007 8:59:16 GMT -5
I think im going to have to learn how to make these, so I can make one that undo's the one you made for me XD. Ive been playing around with them in IRC, is it basically the same type of thing that you are doing here or is it completely different?
|
|
|
Post by ch00beh on Jun 23, 2007 11:16:04 GMT -5
I dunno how they work in IRC, but the ones for firefox are basically javascript. In fact, they are exactly javascript. And anyways, the script that undoes yours only works on machines that have the script installed. I doubt anyone else will install your anti-undoer.
|
|
|
Post by Popebenedict on Jun 23, 2007 11:36:23 GMT -5
*cough* mass hack *uncough*I bought that post color so people could see it and all its majestry! I will not have it taken away!!!... at least by the majority of people XD
|
|
|
Post by ch00beh on Jul 8, 2007 19:23:37 GMT -5
Readable version: // ==UserScript== // @name Magic user reveal // @description Reveals who a user is when you hover the cursor over his/her name // @include archipelagoexodus.proboards67.com/* // ==/UserScript==
document.addEventListener("mouseover", function(e){ var targ = e.target; if(targ.nodeName.toUpperCase()=="FONT"){ targ = targ.parentNode; } if(targ.nodeName.toUpperCase()=="A" && targ.href.match("user=") && !targ.href.match("modifyprofile") && !targ.href.match("karma")){ var temp = targ.innerHTML; e.target.addEventListener("mouseout", function(event){ targ.innerHTML = temp; }, true); var truth = targ.href.substring(72).toUpperCase(); if(targ.firstChild.nodeName.toUpperCase()!="FONT"){ var iterations = e.target.innerHTML.length - truth.length; var n = iterations / 8; var caseTest = iterations % 8; do{ switch(caseTest){ case 0: truth += " _"; case 7: truth += " _"; case 6: truth += " _"; case 5: truth += " _"; case 4: truth += " _"; case 3: truth += " _"; case 2: truth += " _"; case 1: truth += " _"; } caseTest = 0; }while(--n > 0);
} targ.innerHTML = truth; } }, true);
[/size] arrharrharr! pre tags ftw! Anyways, I optimized the Magic User Name Reveal script, using Duff's Device to speed up the addition of underscores to a revealed name. If you don't know what Duff's Device is, good, you haven't sold your soul then. But copy and paste this one into Greasemonkey, not the readable one: // ==UserScript== // @name Magic user reveal // @description Reveals who a user is when you hover the cursor over his/her name // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
document.addEventListener("mouseover", function(e){ var targ = e.target; if(targ.nodeName.toUpperCase()=="FONT"){ targ = targ.parentNode; } if(targ.nodeName.toUpperCase()=="A" && targ.href.match("user=") && !targ.href.match("modifyprofile") && !targ.href.match("karma")){ var temp = targ.innerHTML; e.target.addEventListener("mouseout", function(event){ targ.innerHTML = temp; }, true); var truth = targ.href.substring(72).toUpperCase(); if(targ.firstChild.nodeName.toUpperCase()!="FONT"){ var iterations = e.target.innerHTML.length - truth.length; var n = iterations / 8; var caseTest = iterations % 8; do{ switch(caseTest){ case 0: truth += " _"; case 7: truth += " _"; case 6: truth += " _"; case 5: truth += " _"; case 4: truth += " _"; case 3: truth += " _"; case 2: truth += " _"; case 1: truth += " _"; } caseTest = 0; }while(--n > 0);
} targ.innerHTML = truth; } }, true);
|
|
|
Post by ch00beh on Jul 20, 2007 19:31:40 GMT -5
Someone changed the alt tag of the banner so it broke my script. Here's the fix. Just copy it all and paste it over the old script.
// ==UserScript== // @name Banner Redirect // @description Causes clicks on the banner to redirect to the forum main page // @include http://archipelagoexodus.proboards67.com/* // ==/UserScript==
//adds various listeners to the banner so that it acts like a link var doStuff = function(bnnr){ bnnr.style.cursor = "pointer"; bnnr.addEventListener("click", function(e){ if(e.button == 0){ window.location.href = "http://archipelagoexodus.proboards67.com/index.cgi"; } }, false); bnnr.addEventListener("mouseover", function(e){ window.status="Home"; }, false); bnnr.addEventListener("mouseout", function(e){ window.status = window.defaultStatus; }, false); };
var elems = document.getElementsByTagName("img"); var banner = elems[0];
//if the first image on the page is the banner, add the listeners, otherwise look for the banner if(banner.alt == "Archipelago Exodus"){ doStuff(banner); }else{ for(var i = 1; i < elems.length; i++){ if(elems[i].alt == "Archipelago Exodus"){ doStuff(elems[i]); break; } } }
|
|
|
Post by ch00beh on Nov 6, 2007 12:28:07 GMT -5
|
|
|
Post by ch00beh on Nov 30, 2007 22:51:14 GMT -5
|
|