Getting rid of target="_blank"
May. 7th, 2009 04:58 amOK, found a way to keep links from opening new windows in Safari. Here it is:
Step 1: Install GreaseKit. (GreaseKit is the Safari port of Greasemonkey, a Firefox add-on that lets you run arbitrary JavaScript code to modify web pages as they download.)
Step 2: Install _blank Must Die, a userscript that strips the target="_blank" attributes out of link tags.
Step 3: Quit and relaunch Safari.
Step 4: Sigh with relief when Twitter links no longer spawn new windows.
Note for Firefox users: That userscript in Step 2 ought to work for you as well, but you don’t need to bother, since you’ve got some useful features baked right into your browser, no add-ons required.
Microsoft Internet Explorer users, I dunno. If you guys cared about your web experience, you wouldn’t be using MSIE.
Update: Just discovered that the GreaseKit _blank Must Die hack will mess up Google Calendar. The fix is to disable the hack for Google, like so:
- In Safari, from the GreaseKit menu, choose “Manage Scripts…”
- In the Manage Scripts dialog, select “_blank Must Die” from the list on the left of the box. (Don’t turn the check-box off, just click the name “_blank Must Die” to select it.)
- See the “Exclude” box? Click the “Add” button next to it.
- In that new line that was just created in the Exclude box, type:
*.google.com/* - Close the Manage Scripts box. Maybe you need to quit and restart Safari, too.
(no subject)
Date: 2009-05-07 12:25 pm (UTC)(no subject)
Date: 2009-05-07 02:22 pm (UTC)(no subject)
Date: 2009-05-07 04:58 pm (UTC)(no subject)
Date: 2009-05-07 09:53 pm (UTC)With target=_blank: Clicking spawns a new fucking window, which is pretty much never what I want. Right-clicking brings up a menu that lets me load in a new tab, but I can't just load in the current window if I do happen to be done with what I'm currently looking at. So one option is gone, another requires more work, and the default option is the one I like least.
(no subject)
Date: 2009-05-07 05:23 pm (UTC)(no subject)
Date: 2009-05-07 09:45 pm (UTC)(no subject)
Date: 2009-05-07 05:45 pm (UTC)(no subject)
Date: 2009-05-07 09:46 pm (UTC)(no subject)
Date: 2009-05-08 03:18 pm (UTC)(no subject)
Date: 2009-05-08 03:54 am (UTC)(no subject)
Date: 2009-05-08 03:54 am (UTC)unable to install GreaseKit
Date: 2009-12-14 07:00 am (UTC)I verified that SIMBL installation did create the 'SIMBL.bundle' file under'/Library/InputManagers/SIMBL/'.
Stuck here. Any help appreciated.