Delete src/content/page-action.js

This commit is contained in:
erosman 2024-01-13 23:49:34 +03:30 committed by GitHub
parent ca4f82ba78
commit 4a18073dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 19 deletions

View File

@ -1,19 +0,0 @@
// page Action is not supported by Chrome in MV3
import {App} from './app.js';
import {Location} from './location.js';
// ---------- Firefox Page Action ------------------------
export class PageAction {
static set(tabId, item) {
const flag = App.getFlag(item.cc);
const host = flag + ' ' + [item.hostname, item.port].filter(Boolean).join(':');
const title = [host, item.city, ...Location.get(item.cc)].filter(Boolean).join('\n');
browser.pageAction.setTitle({tabId, title});
browser.pageAction.show(tabId);
}
static unset(tabId) {
browser.pageAction.hide(tabId);
}
}