SHOW:
|
|
- or go back to the newest paste.
| 1 | // ==UserScript== | |
| 2 | // @name Baguette | |
| 3 | // @namespace https://translate.google.com/#auto/en/baguette | |
| 4 | // @include *://* | |
| 5 | // @version 1 | |
| 6 | // @grant none | |
| 7 | - | // @require http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/xregexp-min.js |
| 7 | + | |
| 8 | - | // @require http://xregexp.com/addons/unicode/unicode-base.js |
| 8 | + | |
| 9 | - | // @require http://xregexp.com/addons/unicode/unicode-properties.js |
| 9 | + | (function(f,r,x){f(f,r,x);})(function(f,r,x){["title","alt","value"].map(function(s){r.hasAttribute(s)?r.setAttribute(s,x(r.getAttribute(s))):0;})==[].slice.call(r.childNodes).map(function(p){return p.nodeType==1&&["script","style"].indexOf(p.nodeName)==-1?f(f,p,x):p.nodeType==3?r.replaceChild(document.createTextNode(x(p.nodeValue)),p):0;});},document.documentElement,function(s){return s.split(/\s/).map(function(q){return Math.random()<.1&&/^[A-Za-zÅÄÖåäö]/.test(q)?q.replace(/[A-Za-zÅÄÖåäö]+/,(function(r){return r==r.toUpperCase();})(q.match(/^[A-Za-zÅÄÖåäö]/)[0])?"Baguette":"baguette"):q;}).join(" ");}); |