Home › Forums › Archives › Community Center › Forum Support › BBB Greasemonkey Script – Open searches in a new window
- This topic has 3 replies, 3 voices, and was last updated 18 years, 2 months ago by Tigerblade.
-
AuthorPosts
-
July 21, 2006 at 4:06 am #24073shifterMember
NOTE: This only applies for Firefox users.
I don’t about you, but when I do a New Posts Search, I like to open up the topic results I’m interested in reading in a new tab. So as I’ve grown tired of holding that darn ctrl button everytime I click a topic in a New Posts Search, I wrote a quick and dirty Greasemonkey script to change the links on all search pages to open in a new window (which gives me a new tab in FF). Now the problem with that was that ALL the links on the search page opened in a new window (kind of annoying if you’re trying to navigate away from the New Posts page right?) so I excluded the main navigation links from opening in a new window, so it should help quell the annoyance, though I was too lazy to include every possible link, so don’t yell if something besides a topic opens in a new window! I should also note that this only applies to Search pages, it won’t happen anywhere else (it only applies if the url contains https://bigblueball.com/forums/search.php?searchid=)
Anyway, if you’re interested, install this script (You will need to install the Greasemonkey extension for Firefox first):
(to install the script right click the link and choose “Install User Script …”)
July 21, 2006 at 5:07 am #148496TigerbladeParticipantmm, sounds interesting… i’d use it, except for me, new-window-opening-links are just a middle-click away.
but good work nonetheless, shifter.
July 21, 2006 at 5:13 am #148494DavidParticipantErr… At the risk of being a know-it-all-bastard, it works a lot better if you take out that switch, and search for .html.
Code:var a, links;
links = document.getElementsByTagName(‘a’);
for (var i = 0; i -1) {
a.target = “_BLANK”;
}
}That means topics and user-profile open in new links, and everything else doesn’t.
July 21, 2006 at 5:46 am #148495shifterMemberDave – Nice, I didn’t think of the .html thing. I was trying to come up with an easier way, but my JS skills are pretty shibby. Thanks Dave, that rocks much harder than my lame way and as such I’ve updated the script to your way.
Tigerblade – I suppose the middle click would do the trick, but I just never use that button for some reason.
-
AuthorPosts
- You must be logged in to reply to this topic.