I started to get very tired of websites forcing me to open new tabs or windows.
In Firefox you can apparently make all links open in the same window using TabMixPlus. However, I'm on Safari, and I couldn't find a similar plugin offering that functionality.
So I installed GreaseKit, which is a Safari implementation of the popular Greasemonkey site alteration plugin for Firefox.
After installing GreaseKit and restarting Safari, go to the link below and it will ask you to install the "Don't `target` me!" script (named as such because it removes the "target='blah'" attribute from all links in the page.)
By default the script will only operate on Google Docs, but you can change this in the GreaseKit -> Manage Scripts dialog.
Enjoy!
- Install link:
Removed the link, as DropBox won't just share the file, it adds it's own frame and such. Oh well.
Just take the source below, save it as a file called "killTrigger.user.js" and then browse to that file from Safari (eg, "file:///Users/naruzo/filez/killTrigger.user.js")
Just take the source below, save it as a file called "killTrigger.user.js" and then browse to that file from Safari (eg, "file:///Users/naruzo/filez/killTrigger.user.js")
- Source:
// ==UserScript==// @name Don't `target` me! // @description Removes the "target" attribute of all links on the page; this means that links that would have previously opened in a new window (or tab, depending on your browser settings) will now open in the same tab instead.// @version 0.0.1// @date 2010-08-09// @author Naruzo <naruzopsycho at gmail.com>// @namespace http://naruzo.vox.com// @source https://www.dropbox.com/s/g1ljaho6ytcgtht/killTargets.user.js// @include htt*://docs.google.*// ==/UserScript==// (CC) BY-SA: This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License. <http://creativecommons.org/licenses/by-sa/3.0/>function killTargets() {var links = document.getElementsByTagName('a');for (var i = 0; i < links.length; i++) {links[i].removeAttribute("target");}}killTargets();
Just found an alternative (although less heavy-handed) version here:
http://www.google.com/support/forum/p/Chrome/thread?tid=12feee09b7c1a36a&hl=en
Posted by: naruzo | 08/09/2010 at 04:06 PM