{"id":14988963,"url":"https://github.com/daijro/always-on-focus","last_synced_at":"2025-07-09T18:05:39.581Z","repository":{"id":45316015,"uuid":"311504960","full_name":"daijro/always-on-focus","owner":"daijro","description":"Prevent websites from knowing that you switched tabs","archived":false,"fork":false,"pushed_at":"2024-06-09T06:41:25.000Z","size":520,"stargazers_count":42,"open_issues_count":5,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T06:53:52.583Z","etag":null,"topics":["greasemonkey","tampermonkey","userscript"],"latest_commit_sha":null,"homepage":"https://greasyfork.org/en/scripts/429635","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daijro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-10T00:55:43.000Z","updated_at":"2025-03-30T18:08:13.000Z","dependencies_parsed_at":"2022-09-17T05:02:18.019Z","dependency_job_id":"ee76a6fe-ae2f-4b02-aabe-1de295482678","html_url":"https://github.com/daijro/always-on-focus","commit_stats":{"total_commits":21,"total_committers":4,"mean_commits":5.25,"dds":0.1428571428571429,"last_synced_commit":"2ab80112642cfbff6fe32a7ea7888d88eaef5815"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daijro%2Falways-on-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daijro%2Falways-on-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daijro%2Falways-on-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daijro%2Falways-on-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daijro","download_url":"https://codeload.github.com/daijro/always-on-focus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501960,"owners_count":21114681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["greasemonkey","tampermonkey","userscript"],"created_at":"2024-09-24T14:17:30.045Z","updated_at":"2025-04-12T00:41:24.378Z","avatar_url":"https://github.com/daijro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Always on focus\nUserscript to trick websites into thinking the tab is always on focus\n\n---\n## Installation\n\n1. Download the [Tampermonkey](https://www.tampermonkey.net/) browser extension\n\n2. Click [here](https://github.com/daijro/always-on-focus/raw/main/alwaysonfocus.user.js) to install the userscript\n\n3. Toggle the userscript on/off from the Tampermonkey dashboard\n\n\n\u003chr width=50\u003e\n\n\n## What it does\n\nAlways on focus is a lightweight userscript that prevents websites from knowing that you switched tabs or unfocused the window. This is a fork of [this userscript](https://userscripts-mirror.org/scripts/review/177284) that adds these:\n\n- Disables the [Page Visibility API](https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API)\n\n- Disables the `window.onblur()` event and and sets `window.hasFocus()` and `window.onFocus()` to always true ([Ex.](https://www.codingwithjesse.com/demo/2007-05-16-detect-browser-window-focus/))\n\n- Removes the `visibilitychange` and `blur` event listeners ([Ex.](http://daniemon.com/tech/webapps/page-visibility/))\n\n\n#### Example:\n\nHere is an example website that changes color when the window isn't focused:\n\n![Preview](https://github.com/daijro/always-on-focus/blob/main/preview/preview.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaijro%2Falways-on-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaijro%2Falways-on-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaijro%2Falways-on-focus/lists"}