Skip to content

Commit 83f7efa

Browse files
committed
Improve compat. with Facebook, WhatsApp Web, Twitter
1 parent ba23e9f commit 83f7efa

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
v0.46.56.8 - Thursday, April 13, 2017
2+
- Improve Facebook compatibility: show main timeline titles, overlayed photos
3+
- Improve WhatsApp Web compatibility: show emojis and message indicators
4+
- Improve Twitter compatibility: show overlayed photos
5+
16
v0.46.56.7 - Monday, July 25, 2016
27
- Added capability to Import/Export Settings (and even save your settings to a text file)
38
- Added option to add custom CSS

js/dp.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function addCloak(sfw, f, fsize, u, bg, text, table, link, bold, o1, o2, collaps
2828
else if (o1 == 0 && collapseimage == 'true') magic += 'i.img { display: none !important; } ';
2929
else if (sfw == 'Paranoid') magic += 'i.img { visibility: hidden !important; opacity: 0 !important; } ';
3030
} else {
31-
magic += 'html, html *, body *:before, body *:after { background-image: none !important; } ';
31+
if (!curlocation.match(/^https?:\/\/web\.whatsapp\.com\//i)) magic += 'html, html *, body *:before, body *:after { background-image: none !important; } ';
3232
}
3333
if (curlocation.match(/^https?:\/\/www\.engadget\.com\//i)) {
3434
magic += 'html, html *, html *[style], body *:before, body *:after { border-width: 0px !important; }';
@@ -54,12 +54,16 @@ function addCloak(sfw, f, fsize, u, bg, text, table, link, bold, o1, o2, collaps
5454
magic += ' .dp'+timestamp+'_visible { visibility: visible !important; opacity: 1 !important; }';
5555
magic += ' .dp'+timestamp+'_unbold { font-weight: normal !important }';
5656
magic += ' .dp'+timestamp+'_link { color: #'+link+' !important; background-color: #'+bg+' !important; background-image: none !important; }';
57-
magic += ' .dp'+timestamp+'_text { color: #'+text+' !important; background-color: #'+bg+' !important; background-image: none !important; }';
57+
if (curlocation.match(/^https?:\/\/web\.whatsapp\.com\//i)) magic += ' .dp'+timestamp+'_text { color: #'+text+' !important; background-color: #'+bg+' !important; }';
58+
else magic += ' .dp'+timestamp+'_text { color: #'+text+' !important; background-color: #'+bg+' !important; background-image: none !important; }';
5859
magic += ' .dp'+timestamp+'_hide { display: none !important }';
5960

6061
if (curlocation.match(/^https?:\/\/www\.facebook\.com\//i)) {
6162
magic += " ._52c6, ._5ine, .__cy, .fbPhotosPhotoTagboxes, ._jfi, ._5vb_ ._5aqh::before { position: initial !important; } "; // fix link caption, event cover photo, full-screen photo mode (._jfi = uploaded image thumbnail), instagram
6263
magic += " ._4zoz._4zoz._4zoz, ._559p { clear: both !important; } "; // fix main timeline post status box
64+
magic += " ._2yq ._4-u2::before { background-color: transparent !important; } "; // fix main timeline post title bars
65+
magic += " ._2-sx { position: absolute !important; top: 0 !important; left: 0 !important; } "; // fix spotlight photo positioning
66+
magic += " ._4d3w._2nw8 ._4g9v, ._4d3w._2nw8 ._4g9v *, ._4d3w._2nw8 .snowliftOverlayBar, ._4d3w .rightButtons .overlayBarButtons, ._4d3w .rightButtons .overlayBarButtons * { background-color: transparent !important; } "; // make spotlight top/bottom bars transparent
6367
}
6468
else if (curlocation.match(/^https?:\/\/www\.instagram\.com\//i)) {
6569
magic += " ._ovg3g, ._njmhc { position: initial !important; } ._sppa1 { display: none !important; } ";
@@ -73,9 +77,11 @@ function addCloak(sfw, f, fsize, u, bg, text, table, link, bold, o1, o2, collaps
7377
magic += " .message-meta { position: initial !important; } "; // fix message timestamping
7478
magic += ' .bubble { border: 1px dotted #' + table + ' !important; } '; // distinguish bubbles
7579
magic += ' .drawer-manager, .drawer-manager > .pane { background-color: transparent !important; } '; // fix white screen bug
80+
magic += ' .intro-image { opacity: '+o1+' !important; } .intro-image:hover { opacity: '+o2+' !important; } '; // add cloak support for welcome graphic
81+
magic += ' .emoji, .icon { opacity: '+o2+' !important; } '; // make emojis and icons at cloak-hover opacity
7682
}
7783
else if (curlocation.match(/^https?:\/\/twitter\.com\//i)) {
78-
magic += " .QuoteTweet, .QuoteTweet *, #playerContainer, #playerContainer * { background-color: transparent !important; } ";
84+
magic += " .QuoteTweet, .QuoteTweet *, #playerContainer, #playerContainer *, .Gallery, .Gallery * { background-color: transparent !important; } ";
7985
if (sfw != 'Paranoid' && sfw != 'SFW1') magic += " #playerContainer video { opacity: 1 !important; } ";
8086
magic += " .Grid--withGutter>.Grid-cell { margin-right: -1px !important; margin-left: -1px !important; } ";
8187
}

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

updated.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
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.56.7! (Monday, July 25, 2016)</h1>
10+
<h1>Updated to v0.46.56.8! (Thursday, April 13, 2017)</h1>
1111
<ul>
12-
<li>v0.46.56.7:<ul>
13-
<li>Added capability to Import/Export Settings (and even save your settings to a text file)</li>
14-
<li>Added option to add custom CSS</li>
15-
<li>Added support for cloaking of &lt;canvas&gt; elements</li>
12+
<li>v0.46.56.8:<ul>
13+
<li>Improve Facebook compatibility: show main timeline titles, overlayed photos</li>
14+
<li>Improve WhatsApp Web compatibility: show emojis and message indicators</li>
15+
<li>Improve Twitter compatibility: show overlayed photos</li>
1616
<li><strong>if you do not want this page appearing every time DP auto-updates, you can disable them by unticking "Show Update Popup" in the <a href="options.html">Options page</a>.</strong></li>
1717
</ul>
1818
</li>

0 commit comments

Comments
 (0)