Skip to content

Instantly share code, notes, and snippets.

@ucnv
Created March 13, 2010 05:10
Show Gist options
  • Save ucnv/331124 to your computer and use it in GitHub Desktop.
Save ucnv/331124 to your computer and use it in GitHub Desktop.
// ==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