Commit d29f70af authored by ariasuni's avatar ariasuni

Update dependencies and use web-ext to build and test

parent 6d1ec9d0
This diff is collapsed.
......@@ -5,16 +5,17 @@
},
"license": "LGPL-3.0-or-later",
"scripts": {
"build": "npm test && zip -r tst-tabflip _locales/ background.js icon.svg manifest.json",
"test": "standard --env webextensions"
"build": "npm test && web-ext build -s src/ --overwrite-dest",
"test": "standard --env webextensions && web-ext lint -s src/"
},
"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",
"eslint": "^5.15.3",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"standard": "^11.0.1"
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"standard": "^12.0.1",
"web-ext": "^3.0.0"
}
}
......@@ -41,7 +41,7 @@ browser.runtime.onMessageExternal.addListener((aMessage, aSender) => {
browser.commands.onCommand.addListener(async command => {
if (command === 'toggle-feature') {
let activeWindowTabs = await browser.tabs.query({'currentWindow': true})
let activeWindowTabs = await browser.tabs.query({ 'currentWindow': true })
activatePreviousTab(activeWindowTabs)
}
})
......@@ -71,7 +71,7 @@ async function onMouseUp (event) {
return
}
let windowTabs = await browser.tabs.query({'currentWindow': true})
let windowTabs = await browser.tabs.query({ 'currentWindow': true })
if (windowTabs.length >= 2 &&
windowTabs.some(elem => elem.id === event.tab.id && elem.active === true)) {
activatePreviousTab(windowTabs)
......@@ -91,5 +91,5 @@ async function updatehasMTHselection () {
function activatePreviousTab (tabs) {
tabs.sort((a, b) => b.lastAccessed - a.lastAccessed)
browser.tabs.update(tabs[1].id, {'active': true})
browser.tabs.update(tabs[1].id, { 'active': true })
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment