Merge branch '1.8.9.x'
This commit is contained in:
commit
85d614bb4b
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,3 +1,15 @@
|
||||
### v1.8.9.7
|
||||
*2014-08-13*
|
||||
|
||||
**ccd0**
|
||||
- Relabel the former email field as `Options` (unless `Show Name and Subject` is checked).
|
||||
|
||||
### v1.8.9.6
|
||||
*2014-08-12*
|
||||
|
||||
**ccd0**
|
||||
- 4chan update: Indicate death of threads with delayed pruning on /a/ and /v/.
|
||||
|
||||
### v1.8.9.5
|
||||
*2014-08-12*
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.8.9.5
|
||||
* 4chan X - Version 1.8.9.7
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
|
||||
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.9.5
|
||||
// @version 1.8.9.7
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.8.9.5
|
||||
// @version 1.8.9.7
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.8.9.5' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.8.9.7' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.8.9.5' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.8.9.7' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
"version": "1.8.9.5",
|
||||
"version": "1.8.9.7",
|
||||
"repo": "https://github.com/ccd0/4chan-x/",
|
||||
"page": "https://github.com/ccd0/4chan-x",
|
||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||
|
||||
@ -329,7 +329,7 @@ Config =
|
||||
]
|
||||
'Show Name and Subject': [
|
||||
false
|
||||
'Always show name and subject fields in the QR even when 4chan doesn\'t use them.'
|
||||
'Show the classic name, email, and subject fields in the QR, even when 4chan doesn\'t use them all.'
|
||||
]
|
||||
'Hide Original Post Form': [
|
||||
true
|
||||
@ -601,7 +601,7 @@ vp-replace
|
||||
|
||||
QR:
|
||||
'QR.personas': """
|
||||
#email:"sage";boards:jp;always
|
||||
#options:"sage";boards:jp;always
|
||||
"""
|
||||
|
||||
time: '%m/%d/%y(%a)%H:%M:%S'
|
||||
|
||||
@ -159,6 +159,8 @@ Main =
|
||||
new Notice 'warning', 'Cookies need to be enabled on 4chan for <%= meta.name %> to operate properly.', 30
|
||||
|
||||
initThread: ->
|
||||
g.DEAD = !!$('.closed')?.textContent.match(/Thread archived/)
|
||||
|
||||
if board = $ '.board'
|
||||
threads = []
|
||||
posts = []
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<form>
|
||||
<div class=persona>
|
||||
<input name=name data-name=name list="list-name" placeholder=Name class=field size=1 tabindex=10>
|
||||
<input name=email data-name=email list="list-email" placeholder=E-mail class=field size=1 tabindex=20>
|
||||
<input name=email data-name=email list="list-email" placeholder=Options class=field size=1 tabindex=20>
|
||||
<input name=sub data-name=sub list="list-sub" placeholder=Subject class=field size=1 tabindex=30>
|
||||
</div>
|
||||
<div class=textarea>
|
||||
|
||||
@ -75,10 +75,10 @@
|
||||
Lines starting with a <code>#</code> will be ignored.
|
||||
</p>
|
||||
<ul>You can use these settings with each item, separate them with semicolons:
|
||||
<li>Possible items are: <code>name</code>, <code>email</code>, <code>subject</code> and <code>password</code>.</li>
|
||||
<li>Wrap values of items with quotes, like this: <code>email:"sage"</code>.</li>
|
||||
<li>Force values as defaults with the <code>always</code> keyword, for example: <code>email:"sage";always</code>.</li>
|
||||
<li>Select specific boards for an item, separated with commas, for example: <code>email:"sage";boards:jp;always</code>.</li>
|
||||
<li>Possible items are: <code>name</code>, <code>options</code> (or equivalently <code>email</code>), <code>subject</code> and <code>password</code>.</li>
|
||||
<li>Wrap values of items with quotes, like this: <code>options:"sage"</code>.</li>
|
||||
<li>Force values as defaults with the <code>always</code> keyword, for example: <code>options:"sage";always</code>.</li>
|
||||
<li>Select specific boards for an item, separated with commas, for example: <code>options:"sage";boards:jp;always</code>.</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
|
||||
@ -74,7 +74,10 @@ ThreadUpdater =
|
||||
$.on d, 'QRPostSuccessful', ThreadUpdater.cb.checkpost
|
||||
$.on d, 'visibilitychange', ThreadUpdater.cb.visibility
|
||||
|
||||
ThreadUpdater.cb.online()
|
||||
if g.DEAD
|
||||
ThreadUpdater.set 'status', 'Archived', 'warning'
|
||||
else
|
||||
ThreadUpdater.cb.online()
|
||||
|
||||
###
|
||||
http://freesound.org/people/pierrecartoons1979/sounds/90112/
|
||||
@ -84,6 +87,7 @@ ThreadUpdater =
|
||||
|
||||
cb:
|
||||
online: ->
|
||||
return if g.DEAD
|
||||
if ThreadUpdater.online = navigator.onLine
|
||||
ThreadUpdater.outdateCount = 0
|
||||
ThreadUpdater.setInterval()
|
||||
@ -127,18 +131,17 @@ ThreadUpdater =
|
||||
{req} = ThreadUpdater
|
||||
switch req.status
|
||||
when 200
|
||||
g.DEAD = false
|
||||
g.DEAD = !!+req.response.posts[0].archived
|
||||
ThreadUpdater.parse req.response.posts
|
||||
ThreadUpdater.setInterval()
|
||||
if g.DEAD
|
||||
ThreadUpdater.set 'status', 'Archived', 'warning'
|
||||
ThreadUpdater.kill()
|
||||
else
|
||||
ThreadUpdater.setInterval()
|
||||
when 404
|
||||
g.DEAD = true
|
||||
ThreadUpdater.set 'timer', null
|
||||
ThreadUpdater.set 'status', '404', 'warning'
|
||||
clearTimeout ThreadUpdater.timeoutID
|
||||
ThreadUpdater.thread.kill()
|
||||
$.event 'ThreadUpdate',
|
||||
404: true
|
||||
threadID: ThreadUpdater.thread.fullID
|
||||
ThreadUpdater.kill()
|
||||
else
|
||||
ThreadUpdater.outdateCount++
|
||||
ThreadUpdater.setInterval()
|
||||
@ -151,6 +154,14 @@ ThreadUpdater =
|
||||
if ThreadUpdater.postID
|
||||
ThreadUpdater.cb.checkpost()
|
||||
|
||||
kill: ->
|
||||
ThreadUpdater.set 'timer', null
|
||||
clearTimeout ThreadUpdater.timeoutID
|
||||
ThreadUpdater.thread.kill()
|
||||
$.event 'ThreadUpdate',
|
||||
404: true
|
||||
threadID: ThreadUpdater.thread.fullID
|
||||
|
||||
setInterval: ->
|
||||
i = ThreadUpdater.interval + 1
|
||||
|
||||
|
||||
@ -472,6 +472,7 @@ QR =
|
||||
if Conf['Show Name and Subject']
|
||||
$.addClass QR.nodes.name, 'force-show'
|
||||
$.addClass QR.nodes.sub, 'force-show'
|
||||
QR.nodes.email.placeholder = 'E-mail'
|
||||
|
||||
QR.forcedAnon = !!$ '.postForm input[name=name][type=hidden]'
|
||||
if QR.forcedAnon
|
||||
|
||||
@ -16,7 +16,7 @@ QR.persona =
|
||||
|
||||
parseItem: (item, types) ->
|
||||
return if item[0] is '#'
|
||||
return unless match = item.match /(name|email|subject|password):"(.*)"/i
|
||||
return unless match = item.match /(name|options|email|subject|password):"(.*)"/i
|
||||
[match, type, val] = match
|
||||
|
||||
# Don't mix up item settings with val.
|
||||
@ -30,7 +30,8 @@ QR.persona =
|
||||
QR.persona.pwd = val
|
||||
return
|
||||
|
||||
type = 'sub' if type is 'subject'
|
||||
type = 'email' if type is 'options'
|
||||
type = 'sub' if type is 'subject'
|
||||
|
||||
if /always/i.test item
|
||||
QR.persona.always[type] = val
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user