Skip to content

Commit 9fdac35

Browse files
committed
v0.46.54.2
- "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab
1 parent 5c268dc commit 9fdac35

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

changelog.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
v0.46.54.1 - Thursday, May 19, 2016
1+
v0.46.54.2 - Thursday, May 19, 2016
2+
- v0.46.54.2 - "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab
23
- v0.46.54.1 - fixed issue where DP icon was showing it was enabled even when it wasn't
34
- v0.46.54.1 - fixed situations where the default coffee cup DP icon would be shown despite a custom icon being selected (e.g. creating a new tab)
45
- optimized foundation code (this is a significant update, too many to list: below are some of the major improvements)

js/background.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,24 @@ chrome.tabs.onUpdated.addListener(function(tabid, changeinfo, tab) {
306306
if (dpcloakindex == -1) cloakedTabs.push(dpTabId);
307307
magician('true', tabid);
308308
if (localStorage["global"] == "false" && localStorage["enable"] == "false") localStorage["enable"] = "true";
309-
}
310-
if (localStorage["enableStickiness"] == "true") {
311-
if (tab.openerTabId) {
312-
if (cloakedTabs.indexOf(tab.windowId+"|"+tab.openerTabId) != -1 && uncloakedTabs.indexOf(dpTabId) == -1) {
313-
if (domainCheck(extractDomainFromURL(tab.url)) != '0') {
314-
if (dpcloakindex == -1) cloakedTabs.push(dpTabId);
315-
magician('true', tabid);
316-
} else uncloakedTabs.push(dpTabId);
309+
} else {
310+
if (localStorage["enableStickiness"] == "true") {
311+
if (tab.openerTabId) {
312+
if (cloakedTabs.indexOf(tab.windowId+"|"+tab.openerTabId) != -1 && uncloakedTabs.indexOf(dpTabId) == -1) {
313+
if (domainCheck(extractDomainFromURL(tab.url)) != '0') {
314+
cloakedTabs.push(dpTabId);
315+
magician('true', tabid);
316+
} else uncloakedTabs.push(dpTabId);
317+
}
318+
} else {
319+
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
320+
if (cloakedTabs.indexOf(tabs[0].windowId+"|"+tabs[0].id) != -1 && uncloakedTabs.indexOf(dpTabId) == -1) {
321+
if (domainCheck(extractDomainFromURL(tab.url)) != '0') {
322+
cloakedTabs.push(dpTabId);
323+
magician('true', tabid);
324+
} else uncloakedTabs.push(dpTabId);
325+
}
326+
});
317327
}
318328
}
319329
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
},
2828
"permissions": [ "http://*/*", "https://*/*", "contextMenus", "tabs" ],
2929
"update_url": "http://clients2.google.com/service/update2/crx",
30-
"version": "0.46.54.1"
30+
"version": "0.46.54.2"
3131
}

updated.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
<body id="updatepage">
88
<span id="title">Decreased Productivity</span> by Andrew Y.<br /><br />
99
<div id="main">
10-
<h1>Updated to v0.46.54.1! (Thursday, May 19, 2016)</h1>
10+
<h1>Updated to v0.46.54.2! (Thursday, May 19, 2016)</h1>
1111
<ul>
12-
<li>v0.46.54.1:<ul>
12+
<li>v0.46.54.2:<ul>
13+
<li>v0.46.54.2 - "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab</li>
1314
<li>v0.46.54.1 - fixed issue where DP icon was showing it was enabled even when it wasn't</li>
1415
<li>v0.46.54.1 - fixed situations where the default coffee cup DP icon would be shown despite a custom icon being selected (e.g. creating a new tab)</li>
1516
<li>optimized foundation code (this is a significant update, too many to list: below are some of the major improvements)</li>

0 commit comments

Comments
 (0)