Only inform one time about supported site
This commit is contained in:
parent
e92baff49b
commit
45b3388851
1 changed files with 3 additions and 6 deletions
9
scripts/external/watch.js
vendored
9
scripts/external/watch.js
vendored
|
@ -20,9 +20,6 @@ export default class watch {
|
|||
@param {dictionary} filter the filter to work with
|
||||
*/
|
||||
static async process(filter) {
|
||||
// Let user know that the website is supported, if ever they have opened the console.
|
||||
new logging((new texts(`message_external_supported`)).localized);
|
||||
|
||||
document.onreadystatechange = async () => {
|
||||
if (document.readyState == 'complete' && await global.read([`settings`, `behavior`, `autoRun`])) {
|
||||
new logging((new texts(`scrape_msg_ready`)).localized);
|
||||
|
@ -34,14 +31,14 @@ export default class watch {
|
|||
static main() {
|
||||
(check.platform()).then((FILTER_RESULT) => {
|
||||
if (FILTER_RESULT && Object.keys(FILTER_RESULT).length > 0) {
|
||||
// Let user know that the website is supported, if ever they have opened the console.
|
||||
new logging((new texts(`message_external_supported`)).localized);
|
||||
|
||||
watch.process(FILTER_RESULT);
|
||||
watch.callGUI();
|
||||
|
||||
// Create a listener for messages indicating re-processing.
|
||||
chrome.runtime.onMessage.addListener(async (message, sender, sendResponse) => {
|
||||
// Get the tabId where this content script is running.
|
||||
|
||||
|
||||
(((typeof message).includes(`obj`) && !Array.isArray(message)) ? message[`refresh`] : false) ? watch.process(FILTER_RESULT) : false;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue