Skip to content

Commit 7d40f5e

Browse files
committed
Project cleanup
1 parent a1e8ab6 commit 7d40f5e

File tree

5 files changed

+106
-137
lines changed

5 files changed

+106
-137
lines changed

package-lock.json

Lines changed: 101 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"start": "npm run firefox",
88
"build": "webpack",
9-
"firefox": "npm run build && web-ext run",
9+
"firefox": "web-ext run",
10+
"chrome": "web-ext run -t chromium",
1011
"lint": "web-ext lint --source-dir src",
1112
"package": "npm run build && web-ext build"
1213
},
@@ -15,7 +16,7 @@
1516
"url": "git+https://github.com/Spring3/twitch-auto-points.git"
1617
},
1718
"keywords": [],
18-
"author": "",
19+
"author": "Daniyil Vasylenko (https://github.com/Spring3)",
1920
"license": "GNU GPL v3",
2021
"bugs": {
2122
"url": "https://github.com/Spring3/twitch-auto-points/issues"
@@ -25,7 +26,7 @@
2526
"copy-webpack-plugin": "^5.1.1",
2627
"web-ext": "^4.1.0",
2728
"webextension-polyfill": "^0.6.0",
28-
"webpack": "^4.42.0",
29+
"webpack": "^4.42.1",
2930
"webpack-cli": "^3.3.11"
3031
}
3132
}

src/background/browserAction.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ browser.browserAction.onClicked.addListener(() => {
3636
function broadcastUpdate(isEnabled) {
3737
browser.tabs.query({ url: 'https://www.twitch.tv/*' })
3838
.then((tabs) => {
39-
console.log('tabs', tabs);
4039
for (let i = 0; i < tabs.length; i++) {
4140
const tab = tabs[i];
4241
emitStatus(tab.id, isEnabled);
@@ -57,7 +56,6 @@ function unlockForTab(tabId) {
5756
}
5857

5958
browser.storage.onChanged.addListener((changes, areaName) => {
60-
console.log('changed', changes);
6159
if (areaName === 'local' && changes.isEnabled && changes.isEnabled.newValue !== undefined) {
6260
isEnabled = changes.isEnabled.newValue;
6361
if (isEnabled) {
@@ -72,16 +70,12 @@ browser.storage.onChanged.addListener((changes, areaName) => {
7270
const redirectedToTwitch = {};
7371

7472
browser.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
75-
console.log(redirectedToTwitch);
7673
if (changeInfo.status === 'loading') {
77-
console.log('changeInfo', changeInfo);
7874
if (twitchUrlRegexp.test(changeInfo.url)) {
7975
unlockForTab(tabId);
80-
console.log('loading', tab.url);
8176
redirectedToTwitch[tabId] = true;
8277
// if was on twitch, but is redirecting outside
8378
} else if (redirectedToTwitch[tabId]) {
84-
console.log('bye twitch');
8579
lockForTab(tabId);
8680
delete redirectedToTwitch[tabId];
8781
} else if (!twitchUrlRegexp.test(changeInfo.url)) {

0 commit comments

Comments
 (0)