diff --git a/4chan_x.user.js b/4chan_x.user.js index 34874154d..e78a5da93 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1127,6 +1127,7 @@ this.el = $.el('div', { innerHTML: '×
' }); + this.el.style.opacity = 0; this.setType(type); $.on(this.el.firstElementChild, 'click', this.close); if (typeof content === 'string') { @@ -1147,6 +1148,8 @@ } $.off(d, 'visibilitychange', this.add); $.add($.id('notifications'), this.el); + this.el.clientHeight; + this.el.style.opacity = 1; if (this.timeout) { return setTimeout(this.close, this.timeout * $.SECOND); } @@ -6964,7 +6967,7 @@ if (err) { if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') { if (/mistyped/i.test(err.textContent)) { - err = 'Error: You seem to have mistyped the CAPTCHA.'; + err = 'You seem to have mistyped the CAPTCHA.'; } QR.cooldown.auto = QR.captcha.isEnabled ? !!QR.captcha.captchas.length : err === 'Connection error with sys.4chan.org.' ? true : false; QR.cooldown.set({ diff --git a/src/features.coffee b/src/features.coffee index d3db53b44..79b969a09 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -96,6 +96,7 @@ class Notification @el = $.el 'div', innerHTML: '×' + @el.style.opacity = 0 @setType type $.on @el.firstElementChild, 'click', @close if typeof content is 'string' @@ -113,6 +114,8 @@ class Notification return $.off d, 'visibilitychange', @add $.add $.id('notifications'), @el + @el.clientHeight # force reflow + @el.style.opacity = 1 setTimeout @close, @timeout * $.SECOND if @timeout close = -> diff --git a/src/qr.coffee b/src/qr.coffee index 7e38161be..a7c46cd48 100644 --- a/src/qr.coffee +++ b/src/qr.coffee @@ -927,7 +927,7 @@ QR = if /captcha|verification/i.test(err.textContent) or err is 'Connection error with sys.4chan.org.' # Remove the obnoxious 4chan Pass ad. if /mistyped/i.test err.textContent - err = 'Error: You seem to have mistyped the CAPTCHA.' + err = 'You seem to have mistyped the CAPTCHA.' # Enable auto-post if we have some cached captchas. QR.cooldown.auto = if QR.captcha.isEnabled !!QR.captcha.captchas.length