-
-
Save eksana/9e97bd1818a9347ff1656a36193b906c 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
<script type="text/javascript"> | |
function addTrans() { | |
var d = document.getElementsByTagName('body')[0]; | |
var e = window.getSelection(); | |
var c = e + ""; | |
var f = "С с Е е Т О о р Р А а Н К Х х В М y З 3".split(/ +/g); | |
var g = "C c E e T O o p P A a H K X x B M у 3 З".split(/ +/g); | |
var b; | |
for (var b = 0; b < f.length; b++) { | |
c = c.split(f[b]).join(g[b]) | |
} | |
var a = document.createElement('div'); | |
a.style.position = 'absolute'; | |
a.style.left = '-99999px'; | |
d.appendChild(a); | |
a.innerHTML = c; | |
e.selectAllChildren(a); | |
window.setTimeout(function () { | |
d.removeChild(a) | |
}, 0) | |
} | |
document.oncopy = addTrans; | |
</script> | |
https://seo-zona.ru/novyj-unikalnyj-metod-zashhity-teksta-ot-kopirovaniya-2017-02-15.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://seo-zona.ru/novyj-unikalnyj-metod-zashhity-teksta-ot-kopirovaniya-2017-02-15.html