Merge branch 'master' of https://github.com/seaweedchan/4chan-x into v3
Conflicts: CHANGELOG.md Gruntfile.coffee LICENSE builds/4chan-X.user.js builds/crx/script.js json/archives.json package.json src/Archive/Redirect.coffee src/General/Build.coffee src/General/Config.coffee src/General/html/Build/post.html src/Monitoring/ThreadUpdater.coffee src/Posting/QuickReply.coffee
This commit is contained in:
commit
0415de74c1
23
CHANGELOG.md
23
CHANGELOG.md
@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
**MayhemYDG**:
|
||||
- Tiny posting cooldown adjustment:
|
||||
* You can post an image reply immediately after a non-image reply.
|
||||
@ -12,6 +13,28 @@
|
||||
|
||||
### v1.2.39
|
||||
*2013-09-19*
|
||||
=======
|
||||
### v1.2.41
|
||||
*2013-10-03*
|
||||
|
||||
**MayhemYDG**:
|
||||
- Minor Chrome 30 fix
|
||||
|
||||
### v1.2.40
|
||||
*2013-09-22*
|
||||
|
||||
**MayhemYDG**:
|
||||
- /pol/ flag selector
|
||||
|
||||
**seaweedchan**:
|
||||
- Delete cooldown update
|
||||
- Small bug fixes
|
||||
- Don't show warnings AND desktop notifications at the same time, and prefer QR warnings unless the document is hidden
|
||||
|
||||
### v1.2.39
|
||||
*2013-09-19*
|
||||
|
||||
>>>>>>> 26a0c27ac304d70bc296de9294b7fd4bc6e52048
|
||||
**seaweedchan**:
|
||||
- Fix thread updater bug introduced in last version
|
||||
|
||||
|
||||
@ -91,11 +91,11 @@ module.exports = (grunt) ->
|
||||
stderr: true
|
||||
failOnError: true
|
||||
commit:
|
||||
command: [
|
||||
'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."'
|
||||
'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
|
||||
'git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
|
||||
].join ' && '
|
||||
command: """
|
||||
git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."
|
||||
git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."
|
||||
git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>."
|
||||
"""
|
||||
push:
|
||||
command: 'git push origin --tags -f && git push origin --all'
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.2.39 - 2013-10-13
|
||||
* 4chan X - Version 1.2.41 - 2013-10-13
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.2.39
|
||||
// @version 1.2.41
|
||||
// @minGMVer 1.13
|
||||
// @minFFVer 22
|
||||
// @namespace 4chan-X
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "4chan X",
|
||||
"version": "1.2.39",
|
||||
"version": "1.2.41",
|
||||
"manifest_version": 2,
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"icons": {
|
||||
@ -15,7 +15,7 @@
|
||||
"run_at": "document_start"
|
||||
}],
|
||||
"homepage_url": "http://seaweedchan.github.io/4chan-x/",
|
||||
"minimum_chrome_version": "29",
|
||||
"minimum_chrome_version": "27",
|
||||
"permissions": [
|
||||
"storage"
|
||||
]
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
postMessage({version:'1.2.39'},'*')
|
||||
postMessage({version:'1.2.41'},'*')
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "4chan-X",
|
||||
"version": "1.2.39",
|
||||
"version": "1.2.41",
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
|
||||
@ -35,7 +35,7 @@ Redirect =
|
||||
http: true
|
||||
https: true
|
||||
software: 'foolfuuka'
|
||||
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
|
||||
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
|
||||
files: ['b', 'e', 'h', 'hc', 'p', 's', 'soc', 'sp', 'u']
|
||||
|
||||
'Foolz':
|
||||
@ -46,14 +46,6 @@ Redirect =
|
||||
boards: ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg']
|
||||
files: ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
|
||||
|
||||
'Foolz a Shit':
|
||||
domain: 'archive.foolzashit.com'
|
||||
http: true
|
||||
https: true
|
||||
software: 'foolfuuka'
|
||||
boards: ['adv', 'asp', 'cm', 'd', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y']
|
||||
files: ['cm', 'd', 'e', 'i', 'n', 'o', 'p', 's', 'trv', 'y']
|
||||
|
||||
'Foolz Beta':
|
||||
domain: 'beta.foolz.us'
|
||||
http: true
|
||||
|
||||
@ -453,8 +453,10 @@ Config =
|
||||
#/Mod$/;highlight:mod;op:yes
|
||||
# Set a custom class for moot:
|
||||
#/Admin$/;highlight:moot;op:yes
|
||||
"""
|
||||
"""
|
||||
|
||||
email: ""
|
||||
|
||||
subject: """
|
||||
# Filter Generals on /v/:
|
||||
#/general/i;boards:v;op:only
|
||||
@ -524,7 +526,6 @@ mu-replace
|
||||
sp-replace
|
||||
tv-replace
|
||||
vp-replace
|
||||
q-replace
|
||||
[external-text:"FAQ","https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions"]
|
||||
"""
|
||||
|
||||
|
||||
@ -269,7 +269,7 @@ Main =
|
||||
errors = null
|
||||
|
||||
func = (node, i) ->
|
||||
for callback in klass::callbacks
|
||||
for callback in klass.callbacks
|
||||
try
|
||||
callback.cb.call node
|
||||
catch err
|
||||
|
||||
@ -675,7 +675,7 @@ a.hide-announcement {
|
||||
:root.hide-original-post-form .postingMode,
|
||||
:root.hide-original-post-form #togglePostForm,
|
||||
#qr.autohide:not(.has-focus):not(:hover) > form,
|
||||
.postingMode ~ #qr select,
|
||||
.postingMode ~ #qr select[data-name=thread],
|
||||
#file-n-submit:not(.has-file) #qr-filerm {
|
||||
display: none;
|
||||
}
|
||||
@ -837,7 +837,7 @@ input#qr-filename:not(.edit) {
|
||||
position: absolute;
|
||||
}
|
||||
/* Thread Select / Spoiler Label */
|
||||
#qr select {
|
||||
#qr select[data-name=thread] {
|
||||
float: right;
|
||||
}
|
||||
#qr.has-spoiler .has-file #qr-spoiler-label {
|
||||
|
||||
@ -56,4 +56,4 @@
|
||||
|
||||
<blockquote class=postMessage id=m#{postID}>#{comment or ''}</blockquote>#{" "}
|
||||
|
||||
</div>"""
|
||||
</div>"""
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"run_at": "document_start"
|
||||
}],
|
||||
"homepage_url": "<%= meta.page %>",
|
||||
"minimum_chrome_version": "29",
|
||||
"minimum_chrome_version": "27",
|
||||
"permissions": [
|
||||
"storage"
|
||||
]
|
||||
|
||||
@ -62,6 +62,7 @@ ThreadUpdater =
|
||||
ThreadUpdater.thread = @
|
||||
ThreadUpdater.root = @OP.nodes.root.parentNode
|
||||
ThreadUpdater.lastPost = +ThreadUpdater.root.lastElementChild.id.match(/\d+/)[0]
|
||||
ThreadUpdater.outdateCount = 0
|
||||
|
||||
ThreadUpdater.cb.interval.call $.el 'input', value: Conf['Interval']
|
||||
|
||||
@ -79,14 +80,14 @@ ThreadUpdater =
|
||||
|
||||
cb:
|
||||
online: ->
|
||||
if navigator.onLine
|
||||
if ThreadUpdater.online = navigator.onLine
|
||||
ThreadUpdater.outdateCount = 0
|
||||
ThreadUpdater.setInterval()
|
||||
ThreadUpdater.set 'status', null, null
|
||||
else
|
||||
ThreadUpdater.set 'timer', null
|
||||
ThreadUpdater.set 'status', 'Offline', 'warning'
|
||||
ThreadUpdater.count true
|
||||
ThreadUpdater.cb.autoUpdate()
|
||||
post: (e) ->
|
||||
return unless ThreadUpdater.isUpdating and e.detail.threadID is ThreadUpdater.thread.ID
|
||||
ThreadUpdater.outdateCount = 0
|
||||
@ -107,7 +108,8 @@ ThreadUpdater =
|
||||
return if d.hidden
|
||||
# Reset the counter when we focus this tab.
|
||||
ThreadUpdater.outdateCount = 0
|
||||
ThreadUpdater.seconds = Math.min ThreadUpdater.seconds, ThreadUpdater.interval
|
||||
if ThreadUpdater.seconds > ThreadUpdater.interval
|
||||
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
|
||||
scrollBG: ->
|
||||
ThreadUpdater.scrollBG = if Conf['Scroll BG']
|
||||
-> true
|
||||
@ -120,29 +122,23 @@ ThreadUpdater =
|
||||
$.cb.value.call @
|
||||
load: (e) ->
|
||||
{req} = ThreadUpdater
|
||||
delete ThreadUpdater.req
|
||||
if e.type isnt 'loadend' # timeout or abort
|
||||
req.onloadend = null
|
||||
if e.type is 'timeout'
|
||||
ThreadUpdater.set 'status', 'Retrying', null
|
||||
ThreadUpdater.update()
|
||||
return
|
||||
switch req.status
|
||||
when 200
|
||||
g.DEAD = false
|
||||
ThreadUpdater.parse JSON.parse(req.response).posts
|
||||
ThreadUpdater.setInterval()
|
||||
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
|
||||
when 404
|
||||
g.DEAD = true
|
||||
ThreadUpdater.set 'timer', null
|
||||
ThreadUpdater.set 'status', '404', 'warning'
|
||||
clearTimeout ThreadUpdater.timeoutID
|
||||
ThreadUpdater.thread.kill()
|
||||
$.event 'ThreadUpdate',
|
||||
404: true
|
||||
thread: ThreadUpdater.thread
|
||||
else
|
||||
ThreadUpdater.outdateCount++
|
||||
ThreadUpdater.setInterval()
|
||||
ThreadUpdater.set 'timer', ThreadUpdater.getInterval()
|
||||
[text, klass] = if req.status is 304
|
||||
[null, null]
|
||||
else
|
||||
@ -182,15 +178,15 @@ ThreadUpdater =
|
||||
el.textContent = text
|
||||
el.className = klass if klass isnt undefined
|
||||
|
||||
count: (start) ->
|
||||
clearTimeout ThreadUpdater.timeoutID
|
||||
ThreadUpdater.timeout() if start and ThreadUpdater.isUpdating and navigator.onLine
|
||||
|
||||
timeout: ->
|
||||
ThreadUpdater.timeoutID = setTimeout ThreadUpdater.timeout, 1000
|
||||
sec = ThreadUpdater.seconds--
|
||||
ThreadUpdater.set 'timer', sec
|
||||
ThreadUpdater.update() if sec <= 0
|
||||
unless n = --ThreadUpdater.seconds
|
||||
ThreadUpdater.update()
|
||||
else if n <= -60
|
||||
ThreadUpdater.set 'status', 'Retrying', null
|
||||
ThreadUpdater.update()
|
||||
else if n > 0
|
||||
ThreadUpdater.set 'timer', n
|
||||
|
||||
update: ->
|
||||
return unless navigator.onLine
|
||||
@ -201,12 +197,7 @@ ThreadUpdater =
|
||||
ThreadUpdater.set 'timer', 'Update'
|
||||
ThreadUpdater.req.abort() if ThreadUpdater.req
|
||||
url = "//api.4chan.org/#{ThreadUpdater.thread.board}/res/#{ThreadUpdater.thread}.json"
|
||||
ThreadUpdater.req = $.ajax url,
|
||||
onabort: ThreadUpdater.cb.load
|
||||
onloadend: ThreadUpdater.cb.load
|
||||
ontimeout: ThreadUpdater.cb.load
|
||||
timeout: $.MINUTE
|
||||
,
|
||||
ThreadUpdater.req = $.ajax url, onloadend: ThreadUpdater.cb.load,
|
||||
whenModified: true
|
||||
|
||||
updateThreadStatus: (title, OP) ->
|
||||
|
||||
@ -141,7 +141,7 @@ QR =
|
||||
if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent
|
||||
# Focus the captcha input on captcha error.
|
||||
QR.captcha.nodes.input.focus()
|
||||
if Conf['Captcha Warning Notifications']
|
||||
if Conf['Captcha Warning Notifications'] and !d.hidden
|
||||
QR.notify el
|
||||
else
|
||||
$.addClass QR.captcha.nodes.input, 'error'
|
||||
@ -153,22 +153,23 @@ QR =
|
||||
|
||||
notify: (el) ->
|
||||
notice = new Notice 'warning', el
|
||||
QR.notifications.push notice
|
||||
return unless Header.areNotificationsEnabled
|
||||
notif = new Notification el.textContent,
|
||||
body: el.textContent
|
||||
icon: Favicon.logo
|
||||
notif.onclick = -> window.focus()
|
||||
<% if (type === 'crx') { %>
|
||||
# Firefox automatically closes notifications
|
||||
# so we can't control the onclose properly.
|
||||
notif.onclose = -> notice.close()
|
||||
notif.onshow = ->
|
||||
setTimeout ->
|
||||
notif.onclose = null
|
||||
notif.close()
|
||||
, 7 * $.SECOND
|
||||
<% } %>
|
||||
unless Header.areNotificationsEnabled and d.hidden
|
||||
QR.notifications.push notice
|
||||
else
|
||||
notif = new Notification el.textContent,
|
||||
body: el.textContent
|
||||
icon: Favicon.logo
|
||||
notif.onclick = -> window.focus()
|
||||
<% if (type === 'crx') { %>
|
||||
# Firefox automatically closes notifications
|
||||
# so we can't control the onclose properly.
|
||||
notif.onclose = -> notice.close()
|
||||
notif.onshow = ->
|
||||
setTimeout ->
|
||||
notif.onclose = null
|
||||
notif.close()
|
||||
, 7 * $.SECOND
|
||||
<% } %>
|
||||
|
||||
notifications: []
|
||||
cleanNotifications: ->
|
||||
@ -1216,6 +1217,8 @@ QR =
|
||||
|
||||
ThreadUpdater.postID = postID
|
||||
|
||||
|
||||
|
||||
# Post/upload confirmed as successful.
|
||||
$.event 'QRPostSuccessful', {
|
||||
board: g.BOARD
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user