Skip to content

Commit 3fcb9be

Browse files
committed
MInify all css and js files
1 parent e6eca6c commit 3fcb9be

File tree

12 files changed

+121
-1700
lines changed

12 files changed

+121
-1700
lines changed

scripts/activity.js

Lines changed: 15 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,15 @@
1-
'use strict';
2-
3-
class Activity {
4-
addTab(tab) {
5-
if (this.isValidPage(tab) === true) {
6-
if (tab.id && (tab.id != 0)) {
7-
tabs = tabs || [];
8-
var domain = this.extractHostname(tab.url);
9-
this.setCurrentActiveTab(domain);
10-
if (this.isNewUrl(domain)) {
11-
var favicon = tab.favIconUrl;
12-
if (favicon === undefined){
13-
favicon = 'chrome://favicon/' + domain;
14-
}
15-
var newTab = new Tab(domain, favicon);
16-
tabs.push(newTab);
17-
}
18-
}
19-
}
20-
else this.clearCurrentActiveTab();
21-
}
22-
23-
isValidPage(tab) {
24-
if (!tab || !tab.url || (tab.url.indexOf('http:') == -1 && tab.url.indexOf('https:') == -1)
25-
|| tab.url.indexOf('chrome://') !== -1
26-
|| tab.url.indexOf('chrome-extension://') !== -1)
27-
return false;
28-
return true;
29-
}
30-
31-
isNewUrl(domain) {
32-
if (tabs.length > 0)
33-
return tabs.find(o => o.url === domain) === undefined;
34-
else return true;
35-
}
36-
37-
getTab(domain) {
38-
return tabs.find(o => o.url === domain);
39-
}
40-
41-
extractHostname(url) {
42-
var hostname;
43-
44-
if (url.indexOf("//") > -1) {
45-
hostname = url.split('/')[2];
46-
}
47-
else {
48-
hostname = url.split('/')[0];
49-
}
50-
51-
hostname = hostname.split(':')[0];
52-
hostname = hostname.split('?')[0];
53-
54-
return hostname;
55-
}
56-
57-
loadDataFromStorage(){
58-
var tabs = storage.load(STORAGE_TABS);
59-
}
60-
61-
updateFavicon(tab){
62-
var domain = this.extractHostname(tab.url);
63-
var currentTab = this.getTab(domain);
64-
if (currentTab !== null && currentTab !== undefined){
65-
if (tab.favIconUrl !== undefined && tab.favIconUrl !== currentTab.favicon){
66-
currentTab.favicon = tab.favIconUrl;
67-
}
68-
}
69-
}
70-
71-
setCurrentActiveTab(domain){
72-
currentTab = domain;
73-
}
74-
75-
clearCurrentActiveTab(){
76-
currentTab = '';
77-
}
78-
};
1+
'use strict';class Activity{addTab(tab){if(this.isValidPage(tab)===!0){if(tab.id&&(tab.id!=0)){tabs=tabs||[];var domain=this.extractHostname(tab.url);this.setCurrentActiveTab(domain);if(this.isNewUrl(domain)){var favicon=tab.favIconUrl;if(favicon===undefined){favicon='chrome://favicon/'+domain}
2+
var newTab=new Tab(domain,favicon);tabs.push(newTab)}}}
3+
else this.clearCurrentActiveTab()}
4+
isValidPage(tab){if(!tab||!tab.url||(tab.url.indexOf('http:')==-1&&tab.url.indexOf('https:')==-1)||tab.url.indexOf('chrome://')!==-1||tab.url.indexOf('chrome-extension://')!==-1)
5+
return!1;return!0}
6+
isNewUrl(domain){if(tabs.length>0)
7+
return tabs.find(o=>o.url===domain)===undefined;else return!0}
8+
getTab(domain){return tabs.find(o=>o.url===domain)}
9+
extractHostname(url){var hostname;if(url.indexOf("//")>-1){hostname=url.split('/')[2]}
10+
else{hostname=url.split('/')[0]}
11+
hostname=hostname.split(':')[0];hostname=hostname.split('?')[0];return hostname}
12+
loadDataFromStorage(){var tabs=storage.load(STORAGE_TABS)}
13+
updateFavicon(tab){var domain=this.extractHostname(tab.url);var currentTab=this.getTab(domain);if(currentTab!==null&&currentTab!==undefined){if(tab.favIconUrl!==undefined&&tab.favIconUrl!==currentTab.favicon){currentTab.favicon=tab.favIconUrl}}}
14+
setCurrentActiveTab(domain){currentTab=domain}
15+
clearCurrentActiveTab(){currentTab=''}}

scripts/background.js

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

0 commit comments

Comments
 (0)