mozilla / lightbeam-we

Web Extension version of the Firefox Lightbeam add-on
https://addons.mozilla.org/en-GB/firefox/addon/lightbeam/
Mozilla Public License 2.0
179 stars 61 forks source link

Make vars dynamic. Fixes #65. #169

Closed biancadanforth closed 7 years ago

biancadanforth commented 7 years ago

Added a few new methods to lightbeam.js and store.js to fetch these values from storage to initialize them, and then increment numVisitedSites and numThirdParties when appropriate on each redraw() in lightbeam.js.

It should be noted that for some reason [Dexie filtering does not support boolean values](http://dexie.org/docs/WhereClause/WhereClause.equals().html) for primary keys or indices, so I had to convert the firstParty and isVisible keys to use 0 for false and 1 for true...

biancadanforth commented 7 years ago

@jonathanKingston This is ready for a look-see. :) Have a couple questions in the most recent commit description:

Should I worry about the <dl> elements in .top-bar shifting when there is and isn't content in these fields? Was thinking I could do a pseudoelement and remove it once they're populated.

Also, if you know a better way in lightbeam.updateVars to distinguish between initialization and update other than isFirstParty === undefined, please let me know!

biancadanforth commented 7 years ago

@jonathanKingston Made the changes requested. Ready for another look-see. :)

biancadanforth commented 7 years ago

It's easy enough to change, either way.

On Thu, Aug 24, 2017 at 12:03 PM, Princiya Marina Sequeira < notifications@github.com> wrote:

@princiya commented on this pull request.

In index.html https://github.com/mozilla/lightbeam-we/pull/169#discussion_r135103166:

         <dd>
  • 6 Sites

cool no problem. i had missed this discussion :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla/lightbeam-we/pull/169#discussion_r135103166, or mute the thread https://github.com/notifications/unsubscribe-auth/AQoS_HsyuYL9oABsakNc26hDT87tSrQjks5sbckbgaJpZM4O_Nk6 .