Updated some Firefox APIs

This commit is contained in:
Alyssa X 2022-01-18 13:34:31 +00:00
parent adcf82c236
commit f477217437
2 changed files with 8 additions and 11 deletions

View file

@ -128,15 +128,13 @@ browser.runtime.onInstalled.addListener((object) => {
const s = scripts.length;
for (let i = 0; i < s; i++) {
browser.scripting.executeScript({
target: { tabId: tab.id },
files: [scripts[i]],
browser.tabs.executeScript(tab.id, {
file: scripts[i]
});
}
browser.scripting.insertCSS({
target: { tabId: tab.id },
files: [manifest.content_scripts[0].css[0]],
browser.tabs.insertCSS(tab.id, {
file: manifest.content_scripts[0].css[0],
});
};
@ -475,8 +473,8 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
}
break;
case "search":
browser.search.query(
{text:message.query}
browser.search.search(
{query:message.query}
)
break;
case "restore-new-tab":

View file

@ -1,8 +1,7 @@
{
"name": "Omni",
"description": "Supercharge Chrome with commands, shortcuts, and more",
"offline_enabled": true,
"version": "1.4.2",
"version": "1.4.3",
"manifest_version": 2,
"browser_action": {
"default_icon": {
@ -40,6 +39,6 @@
],
"web_accessible_resources": ["content.html", "newtab.html", "assets/*", "popup.css", "popup.js"],
"permissions": [
"tabs", "activeTab", "bookmarks", "browsingData", "history", "scripting", "search"
"tabs", "activeTab", "bookmarks", "browsingData", "history", "search"
]
}