diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a2dbd7a0..13c90bf14 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.19
+**v1.11.19.5** *(2015-12-06)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.5/builds/4chan-X-noupdate.crx "Chromium version")]
+- Work around bug causing desktop notifications to not focus the window when clicked in Tampermonkey.
+
**v1.11.19.4** *(2015-12-04)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.19.4/builds/4chan-X-noupdate.crx "Chromium version")]
- Update Vocaroo embedding.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index 9236e92d1..aad8b91fb 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index 8c17d2054..1d81e211c 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.19.4
+// @version 1.11.19.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index dd1e0ba16..a4174eb2a 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.19.4
+// @version 1.11.19.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -432,7 +432,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.19.4',
+ VERSION: '1.11.19.5',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7196,7 +7196,9 @@
icon: Favicon.logo
});
notif.onclick = function() {
- return window.focus();
+ return $.global(function() {
+ return window.focus();
+ });
};
if ($.engine !== 'gecko') {
notif.onclose = function() {
@@ -14422,7 +14424,9 @@
});
notif.onclick = function() {
Header.scrollToIfNeeded(post.nodes.root, true);
- return window.focus();
+ return $.global(function() {
+ return window.focus();
+ });
};
return notif.onshow = function() {
return setTimeout(function() {
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index 3e1dc18c9..4b4f3a942 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index 259ae2b5f..e895063e6 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.19.4
+// @version 1.11.19.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -432,7 +432,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.19.4',
+ VERSION: '1.11.19.5',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7196,7 +7196,9 @@
icon: Favicon.logo
});
notif.onclick = function() {
- return window.focus();
+ return $.global(function() {
+ return window.focus();
+ });
};
if ($.engine !== 'gecko') {
notif.onclose = function() {
@@ -14422,7 +14424,9 @@
});
notif.onclick = function() {
Header.scrollToIfNeeded(post.nodes.root, true);
- return window.focus();
+ return $.global(function() {
+ return window.focus();
+ });
};
return notif.onshow = function() {
return setTimeout(function() {
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 10ad29bad..4aa0d60ba 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index bebe735f9..325f34769 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.11.19.4
+// @version 1.11.19.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 8e3d7c0df..39eee42a7 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.19.4
+// @version 1.11.19.5
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -432,7 +432,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.19.4',
+ VERSION: '1.11.19.5',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -7196,7 +7196,9 @@
icon: Favicon.logo
});
notif.onclick = function() {
- return window.focus();
+ return $.global(function() {
+ return window.focus();
+ });
};
if ($.engine !== 'gecko') {
notif.onclose = function() {
@@ -14422,7 +14424,9 @@
});
notif.onclick = function() {
Header.scrollToIfNeeded(post.nodes.root, true);
- return window.focus();
+ return $.global(function() {
+ return window.focus();
+ });
};
return notif.onshow = function() {
return setTimeout(function() {
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 29ad240a9..0acf82cc0 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index c78b7f6a1..007be902c 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index cb157565d..415d7c8bd 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee
index 0b779c80b..0e67a138e 100644
--- a/src/Monitoring/Unread.coffee
+++ b/src/Monitoring/Unread.coffee
@@ -136,7 +136,8 @@ Unread =
icon: Favicon.logo
notif.onclick = ->
Header.scrollToIfNeeded post.nodes.root, true
- window.focus()
+ # XXX https://github.com/derjanb/tampermonkey/issues/253
+ $.global -> window.focus()
notif.onshow = ->
setTimeout ->
notif.close()
diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee
index 15290fa49..a13b6adda 100644
--- a/src/Posting/QR.coffee
+++ b/src/Posting/QR.coffee
@@ -215,7 +215,8 @@ QR =
notif = new Notification el.textContent,
body: el.textContent
icon: Favicon.logo
- notif.onclick = -> window.focus()
+ # XXX https://github.com/derjanb/tampermonkey/issues/253
+ notif.onclick = -> $.global -> window.focus()
if $.engine isnt 'gecko'
# Firefox automatically closes notifications
# so we can't control the onclose properly.
diff --git a/version.json b/version.json
index e8d6eb384..059a0ccff 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.11.19.4",
- "date": "2015-12-04T22:36:59.324Z"
+ "version": "1.11.19.5",
+ "date": "2015-12-06T23:42:45.212Z"
}