Flickr Link Original Images

By Johannes la Poutre Last update Apr 2, 2009 — Installed 43,469 times.

New tab

in
Subscribe to New tab 2 posts, 2 voices



mattme Scriptwright
MozillaX11

Great script.

Why must the link always open in a new tab? I would prefer the default behaviour for links, which makes no assumptions. If I want to open a new window or tab, I would middle-click on the link.

Matt

 
Anton Giguz Scriptwright
X11

mattme:

To achieve that, you should replace GM_openInTab with window.location.assign in the line 302 of flickr_link_original_ima.user.js file.

Here is the patch for version 1.25 of the script:

diff -Naur flickr_link_original_ima.orig/flickr_link_original_ima.user.js flickr_link_original_ima/flickr_link_original_ima.user.js
--- flickr_link_original_ima.orig/flickr_link_original_ima.user.js	2009-08-17 06:51:57.000000000 +0000
+++ flickr_link_original_ima/flickr_link_original_ima.user.js	2009-08-17 08:55:22.000000000 +0000
@@ -299,7 +299,7 @@
 	link.setAttribute("title", "Link to original uploaded image");
 	link.appendChild(document.createTextNode("ORIG"));
 	link.addEventListener("click", function(evt) {
-			GM_openInTab(evt.target.href);
+			window.location.assign(evt.target.href);
 			evt.stopPropagation();
 			evt.preventDefault();
 		}, true);

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel