ds300 / jetzt

Speed reader extension for chrome
Other
485 stars 124 forks source link

how to install in my hard drive and modify the bookmarklet to keep my wpm values #145

Closed espinozaluis closed 8 years ago

espinozaluis commented 9 years ago

HI, I use linux Mint and firefox browser. I tried to modify the script in the bookmarklet; but I am not a programmer I download the .css and the .js files and modify the directions on the bookmarklet this way:

original: javascript:%20(function()%20{var%20addStyle%20=%20function(url)%20{var%20style%20=%20document.createElement('link');style.rel%20=%20'stylesheet';style.type%20=%20'text/css';style.href%20=%20url;document.head.appendChild(style);};var%20addScript%20=%20function(url,cb)%20{var%20script%20=%20document.createElement('script');script.src%20=%20url;if(cb)%20{script.onload%20=%20cb;}document.body.appendChild(script);};if%20(typeof%20window.jetzt%20===%20'undefined')%20{var%20cb%20=%20function()%20{window.jetzt.select();};addStyle('https://ds300.github.io/jetzt/jetzt.css');addScript('https://ds300.github.io/jetzt/jetzt-solid.min.js',cb);}%20else%20{window.jetzt.select();}})();

MINE: javascript:%20(function()%20{var%20addStyle%20=%20function(url)%20{var%20style%20=%20document.createElement('link');style.rel%20=%20'stylesheet';style.type%20=%20'text/css';style.href%20=%20url;document.head.appendChild(style);};var%20addScript%20=%20function(url,cb)%20{var%20script%20=%20document.createElement('script');script.src%20=%20url;if(cb)%20{script.onload%20=%20cb;}document.body.appendChild(script);};if%20(typeof%20window.jetzt%20===%20'undefined')%20{var%20cb%20=%20function()%20{window.jetzt.select();};addStyle('file:///home/luis/websites/jetzt/jetzt.css');addScript('file:///home/luis/websites/jetzt/jetzt-solid.min.js',cb);}%20else%20{window.jetzt.select();}})();

thanks in advance!! _Luis from Argentina.

ds300 commented 9 years ago

Alas, there's no simple way to get the bookmarklet to save WPM settings across domains, even if you're loading it from the local filesystem. Fortunately, you can give it a different default value by changing only one number!

In jetzt.solid.min.js search for the substring target_wpm:400 and change 400 to whatever WPM you like. Voila!

espinozaluis commented 9 years ago

Hi, I did not mean a different value across domains just to keep a higher number as you show me. By the way, how is the right way to edit the script in the bookmarklet to make it function locally. Thanks!

El 14/11/14 a las 12:13, David Sheldrick escibió:

Alas, there's no simple way to get the bookmarklet to save WPM settings across domains, even if you're loading it from the local filesystem. Fortunately, you can give it a different default value by changing only one number!

In jetzt.solid.min.js search for the substring |target_wpm:400| and change |400| to whatever WPM you like. Voila!

— Reply to this email directly or view it on GitHub https://github.com/ds300/jetzt/issues/145#issuecomment-63077612.

ds300 commented 9 years ago

You can't load local files from a non-local page. That would be an insane security risk!

You'd have to host your version of jetzt-solid.min.js on a server somewhere (you could use your github account for this).

espinozaluis commented 9 years ago

Thank you, very useful advice.

El 14/11/14 a las 13:55, David Sheldrick escibió:

You can't load local files from a non-local page. That would be an insane security risk!

You'd have to host your version of jetzt-solid.min.js on a server somewhere (you could use your github account for this).

— Reply to this email directly or view it on GitHub https://github.com/ds300/jetzt/issues/145#issuecomment-63094364.