Coder Social home page Coder Social logo

glance-bookmarklet's People

Contributors

brandly avatar cameron avatar eranation avatar felipecortez avatar janniep avatar jbmartinez avatar niroyb avatar seriousm avatar thesavior avatar tombyrer avatar warrenmcquinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glance-bookmarklet's Issues

Words Per Line

The words per seconds is excellent but it would be nice if I could choose the quantity of words shown at once.

API key for readability.com is invalid

When I try to Spritz a webpage (any that I have tried), the JS console mentions a 403 error for the readability API URL. When I visit that URL manually, I get the following message (along with 403 code):

{"messages": "The API Key in the form of the 'token' parameter is invalid.", "error": true}

Rawgithub Replacement

OpenSpritz currently serves with RawGithub - which is a terrible idea and won't scale.

We need a better solution which allows us to either stable releases, or a way to have rolling releases that track the GitHub head but don't rely on a cache service which threatens to replace our script with evil.js.

Feature: Allow copy/paste source

It'd be awesome to be able to copy/paste any text source into the bookmarklet as an alternative to reading source text from a webpage. I have a textbook copied to my webspace as a txt file that works, some strange unicode here and there, but it'd be nice to copy chapters or paragraphs from DOC, TXT, PDF or EPUB without the FTP step.

RangeError: invalid array length

I cloned this project to my desktop and changed the index.html so that it uses the spritz.js file from the local source, because I wanted to see the latest changes. Then I started a simple webserver and pointed my browser (Firefox 27.0.1) to http://localhost:8080. If I open OpenSpritz, choose a wpm and click play I get the javascript error mentioned in the title. I figured out that the URL is used and some characters a cut off in the pivot function. This gives a negative value for the array length, in my case -14. Why is it not working with a local webserver?

Feature: More accurate time per word

I might be mistaken, but I think that it would be better if the time that each word is displayed (scaled by the wpm setting) could take more values and be more carefully selected, instead of only having the simple separation between a short/long word.

I would propose two improvements:

  1. Easier. Make the time that a word is displayed proportional to the amount of characters in it, something like: A ms + B ms * length.
  2. Harder. I'm not sure but I feel like when I'm reading I need more time to understand a word that is not in the language of the rest of the text, or is a name of a place/person: something which cannot be found in the "main dictionary" of the current text. It would be nice if we could detect the language of the text and assign more time to the words which are not found in the relative dictionary/list of words file.

Variable Width Fonts

So, here's a challenge.

OpenSpritz currently relies on fixed width monospace fonts for text centering to get the pivot letter aligned properly. Somebody emailed me an asked about using variable width fonts, got me thinking. The way Spritz proper does it is with a canvas, but I think there could actually be an easier solution.

Rather than having a single, text-centered display area, we could have two different text areas, one left aligned and one right aligned.

So rather than having a center-aligned

......Geronimo..

We would have a right-aligned

Ger

and a left-aligned

onimo.

Does that make sense? Needs experimentation.

Add pause option on mouse click

It would be very nice to be able to pause if int he middle of a large article. Best option would be to click on the moving words to toggle pause/start.

Is jQuery necessary?

It seems like loading jQuery is creating some issues for this app. You need to check to see if it's already been loaded and then there can be version conflicts. It also means another network request if it hasn't been loaded, which slows down the rendering of the widget.

I don't see anything in here that couldn't be done with vanilla javascript (expect maybe the transitions which you might be able to accomplish with css transitions). Check out http://youmightnotneedjquery.com/ for examples.

I can work on a branch that doesn't use jQuery if that would be helpful

List of Websites Which Don't Work

This is the issue for reporting specific websites which don't work. If you stumble on a site which OpenSpritz doesn't work with, please use this issue to report it!

When the cause is diagnosed, that cause can be taken to a new issue.

Word boundaries

The current implementation splits on " ", which works for a single line, but messes up on line breaks.

Two better approaches:

  1. Split on /\s+/ instead, which will match any run of one or more white space characters.
  2. Split on /\b\s*/ which matches word boundaries followed by white space. This means that e.g. "foo-bar" would turn into ["foo","-","bar"], which might be better for reading. This does have some artifacts though, like "Foo. Bar." becomes ["Foo", ". ", "Bar", "."]. So a more sophisticated regex might be preferable.

Development Guide

Because of the nature of the bookmarklet, developing OpenSpritz is actually kind of a bitch. It'd be cool if the README include a few instructions for easier development.

After closing once it won't re-open bookmarklet

Using the widget in gmail. After reading one message I click x to close the bookmarklet, then open a new gmail message, then try to open the bookmarklet again... doesn't work. Needs a page refresh.

Ability to decrease the speed ratio between long and short words

I find it kind of hard to follow the text when one or several long words are followed by several short. I don't know the exact speed ratio but to me it seems short words is displayed about half the time as large words.

I think this is a good feature, but personally I would like a toggle where I could alter that ratio.

Sometimes the script keeps running when reading from selected text

When the first or last character (or both) in a selected text are spaces the script keeps running after reaching the last word. It does not have any visible effect though, but it may cause battery draining if using for too long. Tested on dev brach.
I have a simple solution for this.

Better support for mobile browser (iOS Safari or other)

I've managed to get the bookmarklet to work on Mobile Safari but it's clearly not optimized for iPhone display. Ideally, I think, the word would be centered on the screen and take up much of the visible space. Is anyone aware of another project that has already taken this up? If not, could someone tweak the code to detect the browser and format properly for mobile Safari? (I wasn't able to get it to work at all in iOS Chrome).

Feature: Adding an estimated time remaining counter

It'd be cool to add a counter that estimated the number of minutes left in the article. I don't imagine it being an actual counter as that could be distracting, but something more like Medium blogs where it tells "5 min read." If there's interest, I'd be happy to submit a PR

minify files

Smaller files = faster downloading, better caching
Loads of online & scriptable minifers. HTML is a bit more rare; try kangax/html-minifier or Moveo/minimize.
Best if you use a condensed top-line banner.

My personal preference is that the minified versions are named spritz.js & spritz.css & sources are spritz.src.js & spritz.src.css; saves a few bytes.

Might be better to insert the CSS inside the HTML, since the CSS is so small & not worth a 2nd download IMHO. Maybe even insert all into the JS, either by hand or via browserify. But still have to ensure they all are minimized.

Use escape key to close the OpenSpritz layer

Is it possible to implement the feature of closing the OpenSpritz layer by pressing the Escape key?

That would be an enormous help instead of having to click on the x every time!

Thanks!

Use RequestAnimationFrame instead of Timers

There have been some comments about things not running as fast as advertised ( #49 #51), and skipping words ( #39 #41). I believe all of these issues are because we are using Timers to change the words. Timers work great for long running things that don't need much precision, but work terribly for running things really quickly.

In Chrome, with Timers, it can only run at 10fps, which means that it doesn't matter how fast you set it, it can't beat 10fps, so some frames will either be dropped, or it won't go as fast as we would like.

If we switch to using RequestAnimationFrame, we can guarantee the browser will run our code at 60fps, so we should be able to go significantly faster and smoother. This would also allow us to clean up the code for delaying on long words and being able to change the speed in the middle easily.

Persistent WPM

Consider having a persistent WPM either using local storage/cookie if possible or having per-wpm bookmarklet on the download page.

Feature: Rewind

Could there be a feature by a fixed amount of words, in case we missed some words.

Responsive design

Trying it on my iPhone did not yeild great results. The pop-up overflowed the screen size and there was no way to start the magic.

It'd be awesome if this worked on mobile.

Pausing

There's no way to pause/resume the text!

wpm slower than stated

The acctual words per minute displayed are fewer than the selected option.

At lipsum.com I've selected 650 words exactlly and set OpenSpritz to 650 wpm. It finished after 1 minute 48 seconds. Spritzed it again at 950 wpm and it come down to 1 minute and 10 seconds.

Maybe it has something to do with the occasional lagging?

Readability Proxy API / Replacement

Readability contacted me and told me that OpenSpritz violates their terms of service by keeping the access key on the client side.

We either need to deploy a service which can a) proxy requests to Readability, b) perform article extraction itself, or c) we just need to find a replacement service which doesn't have this criteria.

"Deployment" of the bookmarklet

The bookmarklet currently points to https://miserlou.github.io/OpenSpritz/spritz.js which is the github pages space.
Is this supposed to be the deployment area meaning a push to the branch gh-pages is equal to a release?
Why not pointing to https://rawgithub.com/Miserlou/OpenSpritz/master/spritz.js instead? (notice the domain!)

jQuery Version Detection is Kind of Broken

TheGuardian.com doesn't work because a jQuery conflict.

There are actually two issues related to this:

  1. The version string is probably too high.
  2. The version detector is kind of fucked.

This doesn't actually do what you want it to when comparing strings.
window.jQuery.fn.jquery < v

Needs to be made to actually compare versions properly.

jquery vs $

I've noticed that a lot of the sites where the bookmarklet doesn't work are where jQuery is defined only in the jquery variable, not the $ variable. Probably the best fix is for the bookmarklet to use the jQuery variable itself instead of the $ variable.

changing WPM starts over from the beginning

I like to start reading at a relatively low WPM and then increase it once I'm a bit more "in the zone". Other times, when the text hits a difficult part, I'd like to lower the WPM for a bit. Unfortunately, this knocks it back to the beginning of the text rather than just increasing the speed. Changing WPM should not affect the position in the text.

Make This Into a Firefox Extension

Wouldn't need to load files through ajax, wouldn't need to have the bookmarks bar active, would generally be more flexible.
All the seam reasons for making this into a chrome extension apply, except right now there isn't one.

This is an awesome tool as it is, but that would definitely be an improvement.

Play/pause function

When you play text for example with 200wpm then switch to 300wpm and hit the stop button the text plays at 300wpm. At this point you can toggle between 200 and 300 but not stop. When you change the speed again for example to 400wpm the Slider jumps between two positions.

Idea: During pause, show more text

Speed-reading works fine for me, but sometimes there a constructs, word in a text where I need more time for understanding.

My idea to fix this: When pressing the pause button, show 20 words before and after the current cursor-word.

Do you think this is valueable?

Text skips words when running at faster speeds

When running at high speeds (750-950wpm and yes I can read that fast) the text skips words. This could be due to the browser not processing javascript fast enough (not sure if its a hardware thing). It also gets progressively slower as the page goes on, and by slower, I mean each word stays on the screen for longer but then several words will be skipped in the mean time.

Not starting in Chrome

Clicking on the bookmarklet in any webpage in Chrome causes the "Choose a WPM to start." popup to appear at the top of the screen. However, on choosing a WPM from the drop down list, nothing happens. Spritzing does not start.
Reproduced on Chrome and Firefox in Ubuntu 12.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.