Warn with a desktop notification when we're running low on cached captchas. Close #1253.
Also increase delay to close the notifications from 5 to 7 seconds. #1252
This commit is contained in:
parent
08ea3cf7d0
commit
6454090cfd
@ -1,6 +1,8 @@
|
|||||||
- **New feature**: `Linkify` and `Clean Links`, enabled by default
|
- **New feature**: `Linkify` and `Clean Links`, enabled by default
|
||||||
- Linkify will turn text URLs into working links.
|
- Linkify will turn text URLs into working links.
|
||||||
- Clean Links will get rid of spoiler and code tags in linkified URLs used to bypass spam blocks.
|
- Clean Links will get rid of spoiler and code tags in linkified URLs used to bypass spam blocks.
|
||||||
|
- New desktop notification:
|
||||||
|
- The QR will now warn you when you are running low on cached captchas while auto-posting.
|
||||||
|
|
||||||
## 3.9.0 - *2013-08-18*
|
## 3.9.0 - *2013-08-18*
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ Unread =
|
|||||||
window.focus()
|
window.focus()
|
||||||
setTimeout ->
|
setTimeout ->
|
||||||
notif.close()
|
notif.close()
|
||||||
, 5 * $.SECOND
|
, 7 * $.SECOND
|
||||||
|
|
||||||
onUpdate: (e) ->
|
onUpdate: (e) ->
|
||||||
if e.detail[404]
|
if e.detail[404]
|
||||||
|
|||||||
@ -125,7 +125,7 @@ QR =
|
|||||||
setTimeout ->
|
setTimeout ->
|
||||||
notif.onclose = null
|
notif.onclose = null
|
||||||
notif.close()
|
notif.close()
|
||||||
, 5 * $.SECOND
|
, 7 * $.SECOND
|
||||||
<% } %>
|
<% } %>
|
||||||
notifications: []
|
notifications: []
|
||||||
cleanNotifications: ->
|
cleanNotifications: ->
|
||||||
@ -1101,7 +1101,16 @@ QR =
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Enable auto-posting if we have stuff to post, disable it otherwise.
|
# Enable auto-posting if we have stuff to post, disable it otherwise.
|
||||||
QR.cooldown.auto = QR.posts.length > 1 and isReply
|
postsCount = QR.posts.length
|
||||||
|
QR.cooldown.auto = postsCount > 1 and isReply
|
||||||
|
if QR.cooldown.auto and QR.captcha.isEnabled and (captchasCount = QR.captcha.captchas.length) < 3 and captchasCount < postsCount
|
||||||
|
notif = new Notification 'Quick reply warning',
|
||||||
|
body: "You are running low on cached captchas. Cache count: #{captchasCount}."
|
||||||
|
icon: Favicon.logo
|
||||||
|
notif.onclick = -> window.focus()
|
||||||
|
setTimeout ->
|
||||||
|
notif.close()
|
||||||
|
, 7 * $.SECOND
|
||||||
|
|
||||||
unless Conf['Persistent QR'] or QR.cooldown.auto
|
unless Conf['Persistent QR'] or QR.cooldown.auto
|
||||||
QR.close()
|
QR.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user