karlicoss / promnesia

Another piece of your extended mind
https://beepb00p.xyz/promnesia.html
MIT License
1.74k stars 74 forks source link

Extension: Fix multiple inits (onload) #307

Closed yoyurec closed 1 year ago

yoyurec commented 2 years ago

Fixes https://github.com/karlicoss/promnesia/issues/295 Fixes https://github.com/karlicoss/promnesia/issues/177

Please be aware chrome.tabs.onUpdated will also fired for iframes, if a page contains many iframes, each completed iframe will trigger the event though you have checked changeInfo.status. Use chrome.webNavigation.onCompleted

yoyurec commented 2 years ago

Cannot get chrome.webNavigation because property webNavigation is missing in object type [1]. [prop-missing] node_modules/flow-interfaces-chrome/interfaces/Chrome.js

em... ) too old package https://github.com/Shraymonks/flow-interfaces-chrome/search?q=webNavigation

yoyurec commented 2 years ago

any updates with checking functionality here?

karlicoss commented 2 years ago

ah have you seen CI logs for build_extension pipeline? (not sure you have the permissions) -- otherwise you can try running npm run flow locally (just make sure to pull my latest commits, where I annotated the function properly)

I think there are more changes that need to be done -- the object we are now passing into onTabLoaded here

Haven't checked exactly what's missing though -- it may be possible it's just a few occasions of replacing .id with .tabId like here? https://github.com/karlicoss/promnesia/blob/f076f1c374f71b754881e0e33b2eaf42f0dd729e/extension/src/background.js#L529-L530

yoyurec commented 2 years ago

so what's the status? will this PR be used somehow or you have found another solution?

karlicoss commented 1 year ago

Hey, @yoyurec sorry for late reply -- as I mention in the comment https://github.com/karlicoss/promnesia/pull/307#issuecomment-1120473302 , there are still some outstanding issues -- but otherwise I haven't look at it

karlicoss commented 1 year ago

closing in favor of https://github.com/karlicoss/promnesia/pull/354 (thanks for the inspiration though :) )