Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is something that browsers should solve.


Unfortunately, browsers "solved" this by intentionally adding APIs that enable websites to do this to you. It wasn't possible to abuse users this way until the relevant APIs for detecting focus and occlusion were added. :(


It's a huge conflict of interest for an ads company to develop a browser, let alone the browser with...(checks notes)...77% market share.



This, but as a built-in browser feature, configurable per-site, and also for all the other potentially useful/creepy web APIs.


Both could work. The API could be permission based. E.g. without consent the app would always see itself as in focus.


So one could stub out https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibi... or fake it via an extension (there are actually some already that disable the API by injecting JS that always returns "visible", f.e. https://addons.mozilla.org/firefox/addon/disable-page-visibi...). Don't know if there are more.


But just use Chrome! Our website only works in Chrome. Everyone should just be using Chrome. What's wrong with a Chrome monoculture?

:)


Open a new browser window just for that tab. Presto, that tab is always active, even if that window is underneath another window.

In Firefox you can drag'n'drop a tab "out" of the tab bar, which will move it to a new window. Might work in other browsers too.


Browsers are funded by ads




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: