by ByteOfWood · 2w ago · 0 comments
https://developer.mozilla.org/en-US/docs/Glossary/Top_layer
As a fun fact the Devtools also have a separate "Overlay Page" to draw on top of the web page for specifically this reason. The date picker on some platforms similarly uses an overlay page. This machinery was just never exposed to extensions.
> We’ve fixed an issue where the 1Password extension could break syntax highlighting for code blocks on some websites.
[0]: https://releases.1password.com/b5x/stable/#1password-in-the-...
https://en.wikipedia.org/wiki/PRISM
> PRISM is a code name for a program under which the United States National Security Agency (NSA) collects internet communications from various U.S. internet companies.
people are really bad at naming things XD
If this sounds appealing to you, you may be happy to know that XUL lives on as Unified XUL Platform (UXP) and is still supported by currently maintained browsers.
UXP: https://repo.palemoon.org/MoonchildProductions/UXP
Pale Moon: https://www.palemoon.org/
Basilisk: https://www.basilisk-browser.org/faq.html
SeaMonkey: https://www.seamonkey-project.org/
(The two security features are X-ray vision and cross-origin access controls. The former makes it so extension code doesn’t see the page’s modifications to built-in properties. For example, if my extension calls document.createRange(), but the page has overwritten that method, my code will see the original and not the modified version. But if I call document.wrappedJSObject.createRange(), I ask to get the page’s version, which might be malicious. The latter just means that objects created by extensions and made accessible to the page can’t actually be used by it unless the extension explicitly exports them. Both of these are still active for WebExtensions.)
Lotta rose-tinted glasses when people remember the XUL extension days. It was an extraordinarily risky and fragile architecture. Every single extension had full control over your machine, and every major Firefox update broke most extensions (or made them break Firefox), because the main way to inject your logic into the browser was monkey-patching.
You can probably drop an absolutely positioned block (relative to the browser chrome, outside the tabbrowser) too, but I think that didn't work in some older versions?
Note that this is all based on very vague memories, so may be off… Also, both scenarios don't bother injecting anything inside the content. This unfortunately means you need to do some annoying math to position things correctly (in particular if funny DPIs are involved).
>However, you should not consider this a strong security mechanism, because there are ways it can be evaded, for example by browser extensions running in the page. It's more of an indication that the page should not access the internals of your shadow DOM tree.
https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...
This presentation talks about using window.find() and other methods:
https://speakerdeck.com/masatokinugawa/shadow-dom-and-securi...
I'm aware that several show all accounts in the DOM itself _and then_ prompt to disclosed only the secret material, but that's honestly not great design.
Can't the extension use the sidebar? I know Tree Style Tab uses it, so why couldn't an extension put the selector there?