-
Without a mouse
Q: Is it possible to open bookmark without mouse?
A: Yes, it's possible.
Ctrl+Shift+O
, type something, a lot ofTab
's and that's it! -
Efficiency
Q: Is it possible to do it in a more efficient way?
A: There are a lot of extensions in the marketplace, but none of them can do it. At least it is not obvious from description.
-
Bycicle
Q: Can I write my Google Chrome extension?
A: Yeah, no problems.
-
Glory
Q: Can I publish it?
A: Register as a dev and pay 10$.
-
Perfomance
Q: Can I scan bookmarks only on change?
A: Yes, it's possible. Just move code to
service worker
. -
Modules
Q: Can I reuse my code without
webpack
?A: Yeah, it is necessary to set
service worker
type tomodule
. The same is working forpopup
andoptions
. -
Storage
Q: Where can I store model?
A: Use
chrome.storage.*
. -
Sugar
Q: Can I use
async/await
or call callback as simple as possible to return value from background to popup?A: Unfortunately, no, because of bug in GC.
-
Limits
Q: Is there a limit for values in
sync
storage?A: Yes, it is 8,192 bytes. Use
local
because it has greater limit - 5,242,880 bytes. Or even grantunlimitedStorage
permission. -
Quality
Q: Can I use
nyc
for code coverage?A: No, use
c8
instead ofnyc
, hint is here. -
Close
Q: Can I close popup from JS?
A: Yes, just call
window.close()
. -
Index
Q: How can I find last index of element in array?
A:
findLastIndex
is not implemented inNode.js
- tests are not working withoutbabel
-
e2e testing framework
Q: What is best e2e test framework for extensions?
A:
Selenium
is good old one.Nightwatch
andTestCafe
are not so popular now.Cypress
is not support required protocol.Playwright
is new and fast option with ready solution for Google Chrome extensions. -
Too fast
Q: How to wait for client JS execution finish before test?
A: Simulate real user speed via
slowMo
option. -
Test data
Q: How to run browser with test bookmarks?
A: First argument for
chromium.launchPersistentContext
is path to profile directory. Create temporary directory and copyBookmarks
. -
Icons?!
Q: Can I retrieve and use favicons of bookmarks?
A: Unfortunately, no, because of bug in GC. But new API should be awailable soon. Or it's available now. It's needed to be checked.
- e2e code coverage
Q: Can I get code coverage of e2e tests?
A: Yes, in theory it should be possible. But for now I was not able to configure it properly or this feature is not "ready".