Pocket / extension-save-to-pocket

Save to Pocket is a browser extension that is used to save pages to a connected Pocket account
https://getpocket.com
MIT License
280 stars 50 forks source link

fix(inject): do not inject html elements until user saves page [FRONT-762] #220

Closed anthony-liddle closed 4 years ago

anthony-liddle commented 4 years ago

Goal

We received user reports that the HTML elements for the pocket dropdown were being included on every page before a user had saved the page. This was adding unnecessary clutter to the dom.

Todos:

Implementation Decisions

We were attempting to inject the elements into the dom twice; once on page load, and once when a user saved the page. I removed the call to the inject script from page load.

The call on page save is here: https://github.com/Pocket/extension-save-to-pocket/blob/master/src/containers/dispatch.js#L70