Author Topic: Blockland Javascript Scripts V2 - New Scripts Directory!  (Read 12027 times)

Alright.
Testing.
Will post when finished.

I have Wedge's for now. Seems to be working correctly.

fixed, put in an actual check to see if it's on a topic for non-tampermonkey/greasemonkey users
page loss, just to be sure that everyone having problems sees this.

page loss, just to be sure that everyone having problems sees this.

Fixed, thanks. <3

I lied. It doesn't work at all now.

haha, i'm stupid

i checked for the reverse of what I was supposed to get, if it's not a topic the check returns negative 1 and anything greater if it's found

i used a less than symbol

:D

tl;dr: should be fixed now, if not fml


Code: [Select]
if (location.href.search('http://forum.blockland.us/index.php?topic=')<-1)If we're at the Blockland forums, this returns 1. Then you execute the code below if -1 is ever greater than whatever number is returned. Since this comparison should only return 0 or 1, neither of which are less than -1,  the code doesn't get executed ever.

Why don't you use >0 or ==1 or something like that?

thought this was cool until i saw "user blockage free!"

The user blocking tool is probably fine, it just included Lord Tony and Stocking as defacto blocked which is dumb and got the thread moved to drama. It also has me on the whitelist which I don't understand since I'm neither an administrator nor a mod.

thought this was cool until i saw "user blockage free!"

that stuff is still in the other drama topic.


It also has me on the whitelist which I don't understand since I'm neither an administrator nor a mod.

That's because everyone likes you, Wedge.

Code: [Select]
if (location.href.search('http://forum.blockland.us/index.php?topic=')<-1)If we're at the Blockland forums, this returns 1. Then you execute the code below if -1 is ever greater than whatever number is returned. Since this comparison should only return 0 or 1, neither of which are less than -1,  the code doesn't get executed ever.

Why don't you use >0 or ==1 or something like that?
i fixed that, and then it still didn't work, and i turned around the symbol and it STILL didn't work.

i changed it to location.href.indexOf('forum.blockland.us/index.php?topic=') and it worked.

for some stupid reason.

i fixed that, and then it still didn't work, and i turned around the symbol and it STILL didn't work.

i changed it to location.href.indexOf('forum.blockland.us/index.php?topic=') and it worked.

for some stupid reason.
Oh right, you shouldn't even need to do a comparison.

Since you're going to get 0 or 1 out of that, it's either going to be if(1) and if(0). No comparison needed.

The user blocking tool is probably fine, it just included Lord Tony and Stocking as defacto blocked which is dumb and got the thread moved to drama. It also has me on the whitelist which I don't understand since I'm neither an administrator nor a mod.

He was hoping you'd be his friend if he did that lol

I completely disagree with the blocking tool, as do most people. If you really want it I'd say look into the drama thread for it, but I really respect Kingdaro for leaving something like that out of this thread.


i fixed that, and then it still didn't work, and i turned around the symbol and it STILL didn't work.

i changed it to location.href.indexOf('forum.blockland.us/index.php?topic=') and it worked.

for some stupid reason.

Any channel links in the topic still redirect me.

Any channel links in the topic still redirect me.
checked for youtube.com/watch?

fffs.
Oh right, you shouldn't even need to do a comparison.

Since you're going to get 0 or 1 out of that, it's either going to be if(1) and if(0). No comparison needed.
incorrect, it returns the position of where it found the string, which can be 0 if it is found firstmost in the string, and -1 if it is not found.

only thing is that indexOf allows you to set a starting position where search does not, otherwise they do the same thing and i haven't had problems with search until now :/

checked for youtube.com/v=

fffs.incorrect, it returns the position of where it found the string, which can be 0 if it is found firstmost in the string, and -1 if it is not found.
This is what I get for not looking at the documentation of the function and just assuming I know how it works.

test

http://www.youtube.com/user/TheOnion