Skip to content

Migrate to Manifest V3 and add cross-browser compatibility#2

Open
scottmmcintyre wants to merge 4 commits into
grinnellplans:masterfrom
scottmmcintyre:manifest-v3-update
Open

Migrate to Manifest V3 and add cross-browser compatibility#2
scottmmcintyre wants to merge 4 commits into
grinnellplans:masterfrom
scottmmcintyre:manifest-v3-update

Conversation

@scottmmcintyre
Copy link
Copy Markdown

Honestly I just threw this into Cursor and asked it to do it for me, seems to work alright when I load it as an unpacked extension in Chrome, I honestly didn't check it in Firefox but I'll see if I can

  • Update manifest to Manifest V3
  • Add browser-polyfill.js for cross-browser support
  • Refactor newlove.user.js to use browser extension APIs
  • Update copyright year
  • Modernize JavaScript syntax
  • Improve error handling and storage management

scottwiw added 2 commits March 5, 2025 18:42
- Update manifest to Manifest V3
- Add browser-polyfill.js for cross-browser support
- Refactor newlove.user.js to use browser extension APIs
- Update copyright year
- Modernize JavaScript syntax
- Improve error handling and storage management
- Update Makefile to build both Chrome and Firefox extension zips
- Include browser-polyfill.js in extension packages
- Bump script version to 2.0.0 for Firefox 109 compatibility
- Minor cleanup of browser-polyfill.js
Copy link
Copy Markdown
Member

@iangreenleaf iangreenleaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is super helpful. My only concern would be testing it in Firefox to ensure it continues working there. That's something I can probably do if you don't get to it, but it might take me a week or two. It looks like the AI might have retained compatibility with Greasemonkey, but it's hard to say for sure. I don't think the polyfill will get loaded in Greasemonkey, but it's probably also not needed.

It looks like it might now be possible to use it as a standalone Firefox extension, which could be a nice alternative to Greasemonkey. We'd need to test that too, though, before making it available.

Comment thread newlove.user.js Outdated
// 1.2 - Erin [nichols] reworked this to work in Chrome!
// 1.3 - Use native JSON for storage, fix problems with FF4
// 1.4 - Updates for GreaseMonkey 3.0
// 2.0 - Updates for Firefox 109
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably shouldn't leave the AI in charge of this comment 😄

@scottmmcintyre
Copy link
Copy Markdown
Author

I was able to test it as a standalone extension in Firefox Developer Edition, so that works at least

@scottmmcintyre
Copy link
Copy Markdown
Author

scottmmcintyre commented Mar 18, 2025

Added a bunch of new stuff, this one is a fairly significant change to the behavior/look so totally understand if you don't want to do all that. I realized I broke all of the context menu greasemonkey stuff but it was still in, so I re-added that functionality as buttons that appear up near the planlove checkbox, and also added a link to each author item to click and reveal hidden old plan love. I could have sworn the old extension let you do that but I didn't actually see that in the code? I guess I'm crazy. Or if it did do that before, I broke it for sure.

Here's a screenshot of the new stuff:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants