Skip to content

Commit 2ac91ab

Browse files
authored
Merge pull request #57 from cloudoptlab/feat/2.1.2
Version 2.1.2
2 parents 4cee519 + 7567cd7 commit 2ac91ab

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

image/icon/default/icon19.png

452 Bytes
Loading

image/icon/default/icon38.png

844 Bytes
Loading

manifest.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 2,
33
"name": "__MSG_infoName__",
44
"short_name": "Cloudopt AdBlocker",
5-
"version": "2.1.1",
5+
"version": "2.1.2",
66
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
77
"description": "__MSG_infoDescription__",
88
"default_locale": "en",
@@ -30,8 +30,8 @@
3030
],
3131
"browser_action": {
3232
"default_icon": {
33-
"19": "image/icon/default/icon64.png",
34-
"38": "image/icon/default/icon64.png"
33+
"19": "image/icon/default/icon19.png",
34+
"38": "image/icon/default/icon38.png"
3535
},
3636
"default_title": "Cloudopt AdBlocker",
3737
"default_popup": "popup.html"
@@ -101,4 +101,4 @@
101101
"adguard/assistant/i/close.svg",
102102
"suspend.html"
103103
]
104-
}
104+
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@types/dompurify": "^0.0.33",
2929
"@types/lodash": "^4.14.138",
3030
"art-template": "^4.13.2",
31-
"babel-polyfill": "^6.26.0",
3231
"bootstrap": "^4.3.1",
3332
"cross-env": "^6.0.3",
3433
"css-loader": "^3.2.0",

src/background/memoryOptimization.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,15 @@ function memoryOptimization() {
103103
};
104104

105105
function preCheckForMemOpt() {
106-
chrome.system.memory.getInfo(function (info) {
107-
if (info.availableCapacity / info.capacity < 0.2) {
108-
checkForMemOpt();
109-
}
110-
});
106+
if (utils.getUa() === 'firefox') {
107+
checkForMemOpt();
108+
} else {
109+
chrome.system.memory.getInfo(function (info) {
110+
if (info.availableCapacity / info.capacity < 0.2) {
111+
checkForMemOpt();
112+
}
113+
});
114+
}
111115
}
112116

113117
function saveSuspendUrl(tab) {

0 commit comments

Comments
 (0)