Periodically reloads and searches a tab for text. Sounds an alarm and sends a notification when the text has been found.
https://addons.mozilla.org/en-us/firefox/addon/auto-tab-searcher/
Master branch is the last submitted to Mozilla and found on mozilla.org.
- The popup the user interacts with is called "config", under
popup/
. It has an HTML and CSS file as you'd expect, defining the styles. config.js
defines interactions with buttons on the config popup, and fires every time it is clicked to grab all current browser window tabsconfig.js
requests the background script,scripts/background.js
, to monitor the tab requestedconfig.js
also requests it to be removed, and handles all front-end mechanics for refreshing and updating the popup listsbackground.js
is persistent as long as the addon is enabled, hence why it must be used to track timers and refresh/search tabsbackground.js
receives messages to monitor tabs, stop monitoring them, and manages the timers with listenersbackground.js
injects the content scriptscripts/content-script.js
into the monitored tab when it is refreshed, and sounds the alarm/notification should results comecontent-script.js
is responsible for searching for the string term/regex in the tab it is injected to. It must be done this way, becausebackground.js
cannot interact with the document in any tabs. It passes back its results tobackground.js
.