Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Javascript to clean URL's

Name: Anonymous 2014-02-25 9:50

Javascript noob here. I'm making a greasemonkey to clean URL's:
http://pastebin.com/XAbJMenZ

Cleaning up the main page url works, but cleaning links on the page doesn't. What am I doing wrong? (apart from probably everything).

Name: Anonymous 2014-02-25 9:57

CLEAN MY ANUS

Name: Anonymous 2014-02-25 9:57

The problem is jews.

Name: Anonymous 2014-02-25 10:29

*cleans >>2's anus with my greasemonkey.*

Name: Anonymous 2014-02-25 10:37

Install Gentoo

Name: Anonymous 2014-02-25 14:21

install BSD/Gentoo

Name: Anonymous 2014-02-25 21:43

you tryin' to tell me you don't know what's wrong?

nigga, you got like 50 else if's in there.  clean that shit up.

throw it on a jsfiddle and I'll help

Name: Anonymous 2014-02-25 22:13

>>7
throw it on a jsfiddle and I'll help
Please don't, you'd be setting a bad example.

Name: Anonymous 2014-02-26 15:51

>>7
the else's are there because it shouldn't need to keep checking the url if it's already matched one.

Name: Anonymous 2014-02-26 15:54

>>7
Anyway, the modifyurl() function does work. Cleaning links on the page doesn't:

// Clean links on the page
var links = document.getElementsByTagName('a');
for (var i = 0; i < links.length; i++) {
    links[i].href = modifyurl(links[i].href);
}

Name: Anonymous 2014-02-28 20:29

KEK'EM

Name: Anonymous 2014-03-01 0:14

>>10
Install Gentoo

Don't change these.
Name: Email:
Entire Thread Thread List