GithubHelp home page GithubHelp logo

Comments (4)

trekshcool avatar trekshcool commented on June 17, 2024 1

Hey trekshcool and thanks for posting.

I believe that this is due to a recent update that changes the default value of a setting. Can you please try going to Just Read's Options page (chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/options.html) and unchecking "Remove the original page's content once the Just Read view has opened (better performance but loses original page load if JR view closed)." Then try what you're trying to do and see if it has the behavior that you're wanting?

Well that was weird, It was already unchecked but I quickly checked and unchecked it again and it solved the issue. Thanks!

from just-read.

ZachSaucier avatar ZachSaucier commented on June 17, 2024

Hey trekshcool and thanks for posting.

I believe that this is due to a recent update that changes the default value of a setting. Can you please try going to Just Read's Options page (chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/options.html) and unchecking "Remove the original page's content once the Just Read view has opened (better performance but loses original page load if JR view closed)." Then try what you're trying to do and see if it has the behavior that you're wanting?

from just-read.

ZachSaucier avatar ZachSaucier commented on June 17, 2024

It was already unchecked but I quickly checked and unchecked it again and it solved the issue

Thanks for that info! That means I probably need to update how the options page displays this value. I will get that fixed (for others) ASAP.

And thanks for the review on the Chrome store!

from just-read.

drenaren avatar drenaren commented on June 17, 2024

Not to interject, but no one told me specifically that I shouldn't, so I assume that I should. I was curious and took a peak in the code - noticied some assumptions in the key state logic for both 'options.js' and 'content_script.js'.

Starting with 'content_script.js' as the issue there affects both existing users post the version update, users who clear their storage, and all new users:

let removeOrigContent;
let chromeStorage, pageSelectedContainer;
chrome.storage.sync.get(null, function (result) {
    chromeStorage = result || {};
    // Allow content to be removed if enabled
    if(chromeStorage['remove-orig-content'] !== false) {
        removeOrigContent = true;
    }
    launch();
});

See also 'options.js':

    } else if (key === "remove-orig-content") {
      removeOrig.checked = storage[key] !== false;

Both scripts assume 'remove-orig-content' exists as a key in the user's chrome.storage, without checking for actual existence. Non-existent array keys are null, not undefined, so can't be treated as falsy in boolean logic.

testArray = {id1: true, id2: false};
(testArray["id1"] !== false)  // Returns true
(testArray["id2"] !== false)  // Returns false
(testArray["id3"] !== false)  // Returns true (id3 does not exist)
(undefined !== false)  // Returns false
(null !== false)  // Returns true

Otherwise, the code looks good. Would be nice if it didn't phone home every day to verify that I really am still not a premium member, and it would be nice if the fonts were included in the asset files so that googles servers weren't being pinged when opening the extension, but other than that - fairly nice.

from just-read.

Related Issues (20)

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.