cherrycyanide
Member
Thanks this is great! I can finally click on links again.
Last edited by a moderator:
Sorry, those things are handeled by the server and can't be changed easily by a GM script. As I said, this is only a hack and isn't perfect. If I would have to do BBCode parsing in my little script, I'd still be typing today.PoisonedV said:smileys and links and pics dont work for me, creature. weird.
'dflemstr' said:'PoisonedV' said:smileys and links and pics dont work for me, creature. weird.
Sorry, those things are handeled by the server and can't be changed easily by a GM script. As I said, this is only a hack and isn't perfect. If I would have to do BBCode parsing in my little script, I'd still be typing today.Actually, just for URLs it shouldn't be that hard. I'll look into it tonight.
'fischju2000' said:The one sinbad just posted works fine in Opera. Just name it .user.js.
But for some reason it disables Windows 7's Aero, I just blame an incompatibility with it and java.
A js script inside a webpage changing system settings? I think it's an Opera and Windows 7 incompatibility.
Now... how does this help? the ".*" is greedy and thus makes this line do dangerous stuffsindbad said:Slightly improved version of the script here CODE
http://pastie.org/413751
Helps a bit, but it still doesn't remove some garbage from the end of links.
Also changed for ( d in tds) to for(var d in tds) because I felt pedantic.
OK, the line you added was:
CODE
contents = contents.replace(/<a href=".*http/g, "<a href=\"http");
'dflemstr' said:Now... how does this help? the ".*" is greedy and thus makes this line do dangerous stuff
And the 2 lines above that one already fixes links, at least in FF
I could try something like
CODE
contents = contents.replace(/<a href=".*?http/g, "<a href=\"http");
(note extra question mark)
...but it wouldn't change much anyways, since that would prevent ftp links and such.
Also, the "var d" vs "d" actually has (or had a while ago) some performance issues: I wrote the code without the "var" to prevent firefox to make a new field for the var every time the loop went through, because that's what it does otherwise.
I am grateful for all comments and improvements, though; if someone has a better version of the code, post it and I will upload it to the original link.I didn't know about the performance thing for var declarations, I'll need to check. Thing is, declarations without var are global. Not that it matters in this case anyway, hence pedantic.
I know it's potentially dangerous, but that's the only way I could get it to work in Safari too. I'll look into it some more.
[edit]
Got it! CODE
http://pastie.org/414344
Works in Safari for me, probably other webkits as well.
That'll teach me to develop in firefox!
'dflemstr' said:What is opera on (WebKit, Gecko etc)? Someone able to test the absolutely latest update (that I made a minute ago)?
Its own, called Presto. I'll test it if I can figure out greasemonkey on opera.'dflemstr' said:When we have a good-enough -implementation, all will be well (aka, the forum will be as it was before with the script enabled)
I'll have a look at your latest script.