Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gautamp8/stay-focused-web-extension
A browser add-on to keep you focused.
https://github.com/gautamp8/stay-focused-web-extension
android chrome-extension firefox firefox-addon webextensions webextensions-apis
Last synced: 26 days ago
JSON representation
A browser add-on to keep you focused.
- Host: GitHub
- URL: https://github.com/gautamp8/stay-focused-web-extension
- Owner: gautamp8
- Created: 2017-03-25T18:11:28.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-26T11:34:35.000Z (almost 8 years ago)
- Last Synced: 2024-11-07T18:00:26.523Z (3 months ago)
- Topics: android, chrome-extension, firefox, firefox-addon, webextensions, webextensions-apis
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stay-focused
An extension which doesn't let you browse social media and Youtube more than few seconds(kept for demonstration purposes). It utilises Web Extension APIs namely [alarm](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/alarms), [storage](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage) and [tabs](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs) provided by Mozilla. It also comes with a preference page by which you can select which quote is to be loaded.## What it does
After N seconds of browsing on social media(facebook, twitter) or youtube (defined as the user not having navigated
or switched away from the active tab) it loads a stay focused image quote in browser. It works with every browser(Chrome, Edge, Firefox desktop, Firefox for Android and others)."N" is set to 6 seconds in this example. Such a short period is chosen to make
the extension's behavior more obvious, but this is not recommended in real life.
Note that in Chrome, alarms cannot be set for less than a minute. In Chrome:* if you install this extension "unpacked", you'll see a warning
in the console, but the alarm will still go off after 6 seconds
* if you package the extension and install it, then the alarm will go off after
a minute.