7 ms·
Web pages can now detect when Chrome’s window is covered by another window
- tartoran 8y agoYuck. Is this a move to help advertisers pause ads when we switch to a different tab? Imagine adds not going away until you watch them... What's the official use case for this?
- backspace_ 8y agoOr more ways to pause any kind of count down timers.
- pssflops 8y agoIt is already possible to detect whether the current tab is being viewed or not (window.onfocus) in javascript.
- hackersword 8y agoCan an extension like tampermonkey block/highjack events from a page?
- sli 8y agoYes. jQuery's `.unbind()` can do it easily, but doing it in vanilla JS is a bit different[1]. You essentially clone the node and swap the clone into the original node's spot. This also clears all event handlers for any child nodes (so, swap out <body> with a clone and you're set). [1]: https://stackoverflow.com/a/19470348/13876 https://stackoverflow.com/a/19470348/13876
- purple_ducks 8y agoSeems like a good time for the various OSes to have a blacklist of programs who shouldn't be able to access this info - chrome being the first program to add to list.
- marssaxman 8y agoOnce upon a time, I genuinely thought of a browser as a "user-agent", as hinted in the HTTP header; a tool I could use to reach out into the world. I have increasingly had to abandon that idea and treat browsers as potentially hostile incursions into my computer, since browser makers seem determined to prioritize the needs of web developers by granting them access into my machine without really bothering to get my consent. Why do I have to use third-party add-ons that break browser default behaviors in order to get back to a comfortable security state? This suggests that my interests and those of the browser makers, especially Google, are not well aligned, and that really reduces the usefulness of the web for me.