Skip to content

Commit e96085d

Browse files
committed
Tweaked stickiness
1 parent 74c9cc8 commit e96085d

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

changelog.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
v0.46.54.3 - Thursday, May 19, 2016
2-
- v0.46.54.3 - "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab
1+
v0.46.54.4 - Thursday, May 19, 2016
2+
- v0.46.54.2-4 - "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab
33
- v0.46.54.1 - fixed issue where DP icon was showing it was enabled even when it wasn't
44
- 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)
55
- optimized foundation code (this is a significant update, too many to list: below are some of the major improvements)

js/background.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,21 +308,26 @@ chrome.tabs.onUpdated.addListener(function(tabid, changeinfo, tab) {
308308
if (localStorage["global"] == "false" && localStorage["enable"] == "false") localStorage["enable"] = "true";
309309
} else {
310310
if (localStorage["enableStickiness"] == "true") {
311+
dpuncloakindex = uncloakedTabs.indexOf(dpTabId);
311312
if (tab.openerTabId) {
312-
if (cloakedTabs.indexOf(tab.windowId+"|"+tab.openerTabId) != -1 && uncloakedTabs.indexOf(dpTabId) == -1) {
313+
if (cloakedTabs.indexOf(tab.windowId+"|"+tab.openerTabId) != -1 && dpuncloakindex == -1) {
313314
if (domainCheck(extractDomainFromURL(tab.url)) != '0') {
314315
cloakedTabs.push(dpTabId);
315316
magician('true', tabid);
316-
} else uncloakedTabs.push(dpTabId);
317+
return;
318+
}
317319
}
320+
uncloakedTabs.push(dpTabId);
318321
} else {
319322
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
320-
if (tabs[0].windowId == tab.windowId && cloakedTabs.indexOf(tabs[0].windowId+"|"+tabs[0].id) != -1 && uncloakedTabs.indexOf(dpTabId) == -1) {
323+
if (tabs[0].windowId == tab.windowId && cloakedTabs.indexOf(tabs[0].windowId+"|"+tabs[0].id) != -1 && dpuncloakindex == -1) {
321324
if (domainCheck(extractDomainFromURL(tab.url)) != '0') {
322325
cloakedTabs.push(dpTabId);
323326
magician('true', tabid);
324-
} else uncloakedTabs.push(dpTabId);
327+
return;
328+
}
325329
}
330+
uncloakedTabs.push(dpTabId);
326331
});
327332
}
328333
}

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.3"
30+
"version": "0.46.54.4"
3131
}

updated.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +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.3! (Thursday, May 19, 2016)</h1>
10+
<h1>Updated to v0.46.54.4! (Thursday, May 19, 2016)</h1>
1111
<ul>
12-
<li>v0.46.54.2:<ul>
13-
<li>v0.46.54.3 - "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab</li>
12+
<li>v0.46.54.4:<ul>
13+
<li>v0.46.54.2-4 - "Stickiness" feature now applies when a bookmark is opened in the background while viewing a currently cloaked tab</li>
1414
<li>v0.46.54.1 - fixed issue where DP icon was showing it was enabled even when it wasn't</li>
1515
<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>
1616
<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)