Skip to content

Commit

Permalink
Revert unfinished changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbnuqw committed Mar 24, 2021
1 parent 9be15cb commit fab044e
Show file tree
Hide file tree
Showing 26 changed files with 276 additions and 536 deletions.
35 changes: 3 additions & 32 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"env": {
"browser": true,
"es2020": true
"es6": true
},
"extends": ["eslint:recommended", "plugin:vue/recommended", "plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": 2020,
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
Expand Down Expand Up @@ -42,34 +42,5 @@
"require": true,
"xdescribe": true,
"xit": true
},
"plugins": ["@typescript-eslint"],
"overrides": [
{
"files": ["src/**/*.ts"],

"extends": [
"eslint:recommended",
"plugin:vue/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],

"parser": "vue-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser",
"ecmaVersion": 2020,
"sourceType": "module",
"project": "tsconfig.json",
"tsconfigRootDir": "."
},
"rules": {
"@typescript-eslint/no-namespace": "off"
},
"plugins": []
}
]
}
}
2 changes: 0 additions & 2 deletions addon/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import MsgActions from './actions/msg.js'
import ProxyActions from './actions/proxy.js'
import FaviconsActions from './actions/favicons.js'
import StorageActions from './actions/storage.js'
import LogsActions from './actions/logs.js'
import MiscActions from './actions/misc.js'

const Actions = {
Expand All @@ -18,7 +17,6 @@ const Actions = {
...ProxyActions,
...FaviconsActions,
...StorageActions,
...LogsActions,
...MiscActions,
}

Expand Down
67 changes: 0 additions & 67 deletions addon/actions/logs.js

This file was deleted.

4 changes: 0 additions & 4 deletions addon/actions/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ function initToolbarButton() {
if (info && info.button === 1) return browser.runtime.openOptionsPage()
else browser.sidebarAction.open()
})

this.actions.infoLog('Toolbar button initialized')
}

/**
Expand All @@ -36,8 +34,6 @@ async function loadPermissions() {
if (c.userAgentActive) c.userAgentActive = false
}
}

this.actions.infoLog('Permissions loaded')
}

function onMenuHidden() {
Expand Down
10 changes: 2 additions & 8 deletions addon/actions/msg.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ function initMessaging() {
}
firstSidebarInitHandlers = null
}

this.actions.infoLog(`Sidebar (win: ${info.windowId}) connected`)
}

// Handle disconnect
Expand All @@ -59,16 +57,12 @@ function initMessaging() {
let targetPort = connectedSidebars[info.windowId]
if (info.instanceType === 'sidebar' && targetPort) {
let window = this.windows[info.windowId]
delete window.sidebarPort

if (window) {
delete window.sidebarPort
if (this.settings.markWindow) browser.windows.update(info.windowId, { titlePreface: '' })
}
if (this.settings.markWindow) browser.windows.update(info.windowId, { titlePreface: '' })

targetPort.onMessage.removeListener(onSidebarMsg)
delete connectedSidebars[info.windowId]

this.actions.infoLog(`Sidebar (win: ${info.windowId}) disconnected`)
}
})
})
Expand Down
2 changes: 0 additions & 2 deletions addon/actions/snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ async function scheduleSnapshots() {
else nextTimeout = interval - elapsed

Actions.scheduleNextSnapshot(nextTimeout)

Actions.infoLog('Auto snapshots scheduled')
}

/**
Expand Down
2 changes: 0 additions & 2 deletions addon/actions/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ async function getWindows() {
async function onWindowCreated(window) {
this.windows[window.id] = window
window.tabs = await browser.tabs.query({ windowId: window.id })
this.actions.infoLog('Window created: ' + window.id)
}

/**
* Handle window remove
*/
function onWindowRemoved(windowId) {
delete this.windows[windowId]
this.actions.infoLog('Window removed: ' + windowId)
}

function setupWindowsListeners() {
Expand Down
3 changes: 0 additions & 3 deletions addon/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ void (async function main() {
state.images = {}
state.windows = {}

Actions.initLogs()
Actions.infoLog('Initialization start')

// Init first-need stuff
Actions.initToolbarButton()
Actions.initGlobalMessaging()
Expand Down
Loading

0 comments on commit fab044e

Please sign in to comment.