Created
March 13, 2010 05:10
-
-
Save ucnv/331124 to your computer and use it in GitHub Desktop.
This file contains 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 ตัด เลือก | |
// @namespace http://aspietribe.com/ | |
// @include http://translate.google.com/* | |
// ==/UserScript== | |
// Inspired by this glitch <http://gist.github.com/330379>. | |
['old_tl','old_sl'].forEach(function(e) { | |
var s = document.getElementById(e); | |
s.style.cssText ='position:absolute; width:auto;'; | |
s.addEventListener('mousedown', function() { | |
var x = arguments[0].target; | |
x.style.left = - window.mozInnerScreenX; | |
x.style.top = - window.mozInnerScreenY - window.pageYOffset; | |
},false); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment