|
Post by crazynarutard on Nov 17, 2005 23:55:07 GMT
/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/
|
|
|
Post by pascanner(v4) on Nov 18, 2005 0:04:56 GMT
Sorry, but what does this do?
|
|
|
Post by crazynarutard on Nov 18, 2005 0:10:30 GMT
Sorry, but what does this do? It's javascript regular expressions to check if the user is viewing the main page. Usuall used for info centers or other codes for the main page. If a beginner coder doesn't know regular expressions very well, they can use this
|
|
|
Post by pascanner(v4) on Nov 18, 2005 0:13:42 GMT
Ok thanks, now I understand what it does.
|
|
|
Post by .hp_pickle on Nov 18, 2005 12:14:51 GMT
meh I'm not really a beginner, but I'm still kinda new at regexp, so this might help a little . pascaner, if you still don't understand, you put this in a if statement/location check. if(location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=(home|logout)?)?)?)?)?$/)){kinda like that. And so the code executed inside the if statement will only be if it is the main page.
|
|
|
Post by pascanner(v4) on Nov 18, 2005 17:37:03 GMT
Neat code.
|
|
|
Post by Mucleus on Mar 22, 2006 17:27:20 GMT
Thank you so much, this is great
|
|