Skip to content

Commit

Permalink
aligned code base from branch 'firefox'
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutCevik committed Feb 24, 2018
2 parents cafc849 + 108bac5 commit ac60288
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
1 change: 1 addition & 0 deletions html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<script src="../js/material.min.js"></script>
<link rel="stylesheet" href="../css/material_fonts.css">
<link rel="stylesheet" href="../css/options.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-drawer mdl-layout--fixed-header">
Expand Down
1 change: 1 addition & 0 deletions html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<script src="../js/material.min.js"></script>
<link rel="stylesheet" href="../css/material_fonts.css">
<link rel="stylesheet" href="../css/popup.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>

Expand Down
24 changes: 20 additions & 4 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,27 @@ function whitelistDomains(domains) {

function updateTabIcon(tabId) {
if (blockedTabs[tabId]) {
browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_red_48.png"});
browser.browserAction.setBadgeText({tabId: tabId, "text": "" + blockedTabs[tabId]});
if (browser.browserAction.setIcon !== undefined) {
browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_red_48.png"});
browser.browserAction.setBadgeText({tabId: tabId, "text": "" + blockedTabs[tabId]});
}
if (browser.browserAction.setTitle !== undefined ) {
browser.browserAction.setTitle({
tabId: tabId,
title: browser.runtime.getManifest().name + " (BLOCKED)"
});
}
} else {
browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_48.png"});
browser.browserAction.setBadgeText({tabId: tabId, "text": ""});
if (browser.browserAction.setIcon !== undefined) {
browser.browserAction.setIcon({tabId: tabId, path: "../img/icon_48.png"});
browser.browserAction.setBadgeText({tabId: tabId, "text": ""});
}
if (browser.browserAction.setTitle !== undefined ) {
browser.browserAction.setTitle({
tabId: tabId,
title: browser.runtime.getManifest().name
});
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.4",
"manifest_version": 2,
"icons": {
"48": "img/icon_48.png",
"128": "img/icon_128.png",
"512": "img/icon_512.png"
},
Expand All @@ -26,7 +27,7 @@
],
"browser_action": {
"default_title": "IDN Safe",

"default_icon": "img/icon_48.png",
"default_popup": "html/popup.html"
},
"author": "Aykut Çevik"
Expand Down

0 comments on commit ac60288

Please sign in to comment.