|
Main Page (global and main footers) location.href.match(/action=home/) || !location.href.match(/(action|board)=/)
OR
!location.href.match(/action=(?!home)|board=/) Main Page and Sub-Boards (if in global footer) location.href.match(/action=home/) || !location.href.match(/action=/)
OR
!location.href.match(/action=(?!home)/) Posting Page/PM Page document.postForm && document.postForm.message Modify Profile Page document.modifyForm MiniProfile location.href.match(/action=(display|(calendar|pm)?view)/) || document.title.match(/\s-\s(Search|Preview)/i)
Last Edit: Mar 9, 2008 6:08:58 GMT by Chris
|
|
|
|
|
Just as a heads up, I've up some of these for v4.5 compatibility.
|
|
|
|
|
Which have changed? Might be worth pointing that ouT!
|
|
|
|
The first three. I also updated the last one, but that's not a PBv4.5 fix.
|
|
|
|
|
surely:
location.href.match(/action=(change|home)/i) || !location.href.match(/(action|board)=/i)
That is only global not main?
main would be: location.href.match(/action=(change|home)/i) || !location.href.match(/action=/i)
?
|
|
|
|
It's labeled like that saying the code's location. It will work in both spots with no hitches.
|
|
|
|
|
I'm just being picky!
|
|
|
|
I've done some major updating to the list of checks. Updated- Main page (Both) - Miniprofile Miniprofile has been simplified. I removed the i parameter from the RegExp for them and main page. I also added two new main page ones. Both fairly effective.
|
|
|
|
|
|
This board is for things for coders, not users looking for codes. But what these do is they help you make sure you're on a specific page before executing coding, just to make the coding faster.
|
|
|
|
|
I'm going to be adding a few as I mess around with them.
Posting Page (New Thread/Modify first post of the thread)
document.postForm && (!document.postForm.thread || document.postForm.post && document.postForm.post.value == 1)
|
AFK Aug 2011 - ???
I'll be actively developing codes, tutorials, and templates when I return, later this year.
|
|
|
|
&& document.postForm.post.value == 1)
Only the first post ever made on a forum will have the ID of 1 though... so that doesn't work unfortunately. =/
|
|
|
|
|
&& document.postForm.post.value == 1) Only the first post ever made on a forum will have the ID of 1 though... so that doesn't work unfortunately. =/ Oh of course they wouldn't make it that easy convenient way. I guess that idea would have to be scrapped. I suppose the only way to find the modify post page of the first post in a thread would have to be using the topic summary or something. Lovely Edit: I suppose I could have the first instance of the modify post button pass along some info in the URL. Guess that wouldn't qualify too well as a location check though.
Last Edit: Mar 1, 2009 17:34:17 GMT by Devin
|
AFK Aug 2011 - ???
I'll be actively developing codes, tutorials, and templates when I return, later this year.
|
|
|
|
&& document.postForm.post.value == 1) Only the first post ever made on a forum will have the ID of 1 though... so that doesn't work unfortunately. =/ Oh of course they wouldn't make it that easy convenient way. I guess that idea would have to be scrapped. I suppose the only way to find the modify post page of the first post in a thread would have to be using the topic summary or something. Lovely Edit: I suppose I could have the first instance of the modify post button pass along some info in the URL. Guess that wouldn't qualify too well as a location check though. It would not unfortunately. But yeah, it's possible to do it that way. As for the topic summary idea: Topic summary only shows the last page... so if they're on the 2nd page, it's SoL.
|
|
|
|