Miserlou / Glance-Bookmarklet

A Speed Reading Bookmarklet
https://gun.io/blog/openspritz-a-free-speed-reading-bookmarklet
MIT License
1.56k stars 247 forks source link

Update spritz.js #91

Open JannieP opened 10 years ago

JannieP commented 10 years ago

Removed the independent management of "." into "•" by separating the management of the padding, thus removing the need for replacement. Extracted the bestLetter switch into its own function re-structured the pivot() method for easier reading.

JannieP commented 10 years ago

I have redone the commit and closed [#89], however since I have moved some of the code, the diff totally gets it wrong.

If you look at the full file, you will see that I removed: Line 108 - 111

I moved the bestLetter switch Statement to its own function, just above the pivot function: Line 186-214, to Line 186 - 210

Resulting in the pivot function moving: From: Line 186-231 To: Line 215-255

I have also reworked the pivot function: removed the replacing of "." and separately managing the pre- and post- padding

I have tested this on my own fork of OpenSpritz, and works well

tomByrer commented 10 years ago

cool thanks; much easier to read

JannieP commented 10 years ago

Can I still add to this commit, or should I wait till you merged and add another change, it feeds off these changes

tomByrer commented 10 years ago

I'm not the maintainer, but usually you can keep updating until merged. But you may have to respond to a squish request again ;)

Miserlou commented 10 years ago

Tried to test, it didn't work: ReferenceError: wordLength is not defined

JannieP commented 10 years ago

Ah, darn... Thats what you get for copy pasting. This is corrected now. I am having problems with my local PC and proxy with Git, hence I have been updating online. Please test again

Miserlou commented 10 years ago

New version fails on some punctuation while spritzing selecting text.

TypeError: word is undefined

On Tue, Mar 18, 2014 at 10:27 PM, JannieP notifications@github.com wrote:

Ah, darn... Thats what you get for copy pasting. This is corrected now. I am having problems with my local PC and proxy with Git, hence I have been updating online. Please test again

Reply to this email directly or view it on GitHubhttps://github.com/Miserlou/OpenSpritz/pull/91#issuecomment-38019097 .

JannieP commented 10 years ago

Where are you testing, please advise, as I have tested this.

What does this mean?: TypeError: word is undefined

Thanks

Miserlou commented 10 years ago

Testing this on the George Orwell tea essay on index.html.

On Tue, Mar 18, 2014 at 11:43 PM, JannieP notifications@github.com wrote:

Where are you testing, please advise, as I have tested this.

What does this mean?: TypeError: word is undefined

Thanks

Reply to this email directly or view it on GitHubhttps://github.com/Miserlou/OpenSpritz/pull/91#issuecomment-38022031 .

JannieP commented 10 years ago

I have now done a split test between JannieP/OpenSpritz/patch-3/index.html & Miserlou/OpenSpritz/dev/index.html

I dont see the miss aligned words, or punctuation problems.

attached is my screenslips

please advise splittest-spritz

JannieP commented 10 years ago

Where do we go now from here?

tomByrer commented 10 years ago

Seems that the values aren't propitiating correctly. Maybe an extra closure is needed?

JannieP commented 10 years ago

@tomByrer , dude I have no Idea what you are trying to tell me. please give me an example.