Created
April 3, 2010 11:52
-
-
Save cxx/354416 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Bing Images direct link | |
// @namespace http://twitter.com/cxx | |
// @include http://www.bing.com/images/* | |
// @version 0.0.1.20100403 | |
// ==/UserScript== | |
(function() { | |
function $(id) { | |
return document.getElementById(id); | |
} | |
$('scroll_panel').addEventListener('click', function(e) { | |
var target = e.target; | |
if (target.tagName == 'IMG') { | |
window.open(target.parentNode.href.match(/&furl=(.*)/)[1].replace(/&/g, '&')); | |
e.preventDefault(); | |
e.stopPropagation(); | |
} | |
}, true); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment