A little help porting a simple chrome extension as user script
It is a script that replaces text with random characters from an unknown script so that you can focus on the images or ignore bordersome text, without collapsing it. The chrome extension had a button to click when you visited a page you wanted to change characters.
var frequent = ['అ','ఇ','ఉ','ఎ','ౡ','ఒ'];
var med = ['ఌ','ఐ','ఆ','ఊ','ౠ','ఏ'];
var rare = ['ఋ','ఓ','అం','ఈ'];
A little help porting a simple chrome extension as user script
It is a script that replaces text with random characters from an unknown script so that you can focus on the images or ignore bordersome text, without collapsing it. The chrome extension had a button to click when you visited a page you wanted to change characters.
var frequent = ['అ','ఇ','ఉ','ఎ','ౡ','ఒ']; var med = ['ఌ','ఐ','ఆ','ఊ','ౠ','ఏ']; var rare = ['ఋ','ఓ','అం','ఈ'];
chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if( request.message === "clicked_browser_action" ) { replaceTxt(); } } );
function replaceTxt(){ var elements = document.getElementsByTagName('*');
}
function replaceChar(){ var temp = Math.random()* 10; if(temp <= 1){ return rare[Math.floor(Math.random()*rare.length)]; } else if (temp <= 3){ return med[Math.floor(Math.random()*med.length)]; } else{ return frequent[Math.floor(Math.random()*frequent.length)]; } }
Pastebin for easier view: http://pastebin.com/0yWPakv8