jeromepl / highlighter

A Chrome extension to highlight text and keep it all saved
MIT License
308 stars 77 forks source link

Extension not working on latest Chrome #35

Closed GokulNC closed 2 years ago

GokulNC commented 2 years ago

Chrome version: 101.0.4951.41

It no longer highlights any selected text. Tested on 2 latest versions of Chromium-based browsers: GoogleChrome and Opera

GokulNC commented 2 years ago

Not sure if I'm the only one facing the issue. It's quite frustrating to imagine losing all my highlights :) Please let me know if there's any way I can export the extension's storage (so that I can do it manually until backup is supported).

jeromepl commented 2 years ago

Hi @GokulNC , sorry for the late reply and thanks for the bug report. I found a way of replicating the issue and am working on a fix.

In the meantime, here is how you can download your highlight data:

  1. Go to chrome://extensions/
  2. Enable "Developer mode" user the toggle switch on the top right of the page
  3. Locate the "Highlighter" extension and click on the "Inspect views Service worker" button image
  4. In the console tab, type the following:
    chrome.storage.local.get({ highlights: {} }, ({ highlights }) => {
    console.log(highlights);
    });
  5. Right click on the output and select "Copy object" image
  6. Open a new file and paste the content you just copied. This is all your highlights data in a JSON format
jeromepl commented 2 years ago

I have submitted an updated version of the extension to the Chrome web store that should fix the issue. I am now waiting for the release to be approved by the Chrome team. I will notify you here once it is released!

Sorry again for the inconvenience!

GokulNC commented 2 years ago

Thanks a lot @jeromepl ! Looking forward.

GokulNC commented 2 years ago

Just a suggestion: in cases like this, it would be helpful to have this feature implemented: https://github.com/jeromepl/highlighter/issues/25

That is, exporting it as a JSON file from the local storage, something simple like this: https://stackoverflow.com/a/23167789

And importing JSON directly into the local-storage: https://stackoverflow.com/a/24886931 (This could probably append to the array of highlights instead of replacing the existing highlights; or maybe the user can select the option he wants)

jeromepl commented 2 years ago

Agreed, this is why it's on the roadmap for the next major release 🙂 (and any help is appreciated!

@GokulNC while waiting for the chrome web store approval, you can manually fix this by going to the console tab (follow all the same steps until step 4 and enter this in the console instead:

chrome.storage.sync.set({ color: "yellow" })
GokulNC commented 2 years ago

Interestingly, the service worker is inactive, hence I am unable to inspect it. (Clicking on it does nothing)

image

jeromepl commented 2 years ago

I believe you can wake up the service worker by either opening the extension popup or by trying to highlight anything on a webpage ( but not on the chrome://extensions page)

jeromepl commented 2 years ago

Latest version has been approved and is up on the chrome web store! I'll be closing this issue :)

jayprajapati009 commented 10 months ago

It's not working for me.