Created
May 7, 2012 18:56
-
-
Save valpackett/2629680 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
document.oncopy = function() { | |
var sel = window.getSelection(); | |
var $div = $('<div style="position:absolute;left:-99999px">').html((sel+"").replace('', 'руб.')).appendTo('body'); | |
sel.selectAllChildren($div[0]); | |
setTimeout($div.detach, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment