Merge branch 'v3'

Conflicts:
	CHANGELOG.md
	LICENSE
	builds/crx/manifest.json
	builds/crx/script.js
	latest.js
	package.json
	src/General/Config.coffee
	src/General/lib/post.class
	src/Posting/QuickReply.coffee
This commit is contained in:
Zixaphir 2013-07-24 22:17:35 -07:00
commit a6d05a6115
14 changed files with 1096 additions and 21429 deletions

View File

@ -188,19 +188,19 @@ module.exports = (grunt) ->
]
grunt.registerTask 'patch', [
'bump'
'bump-only'
'reloadPkg'
'updcl:3'
]
grunt.registerTask 'minor', [
'bump:minor'
'bump-only:minor'
'reloadPkg'
'updcl:2'
]
grunt.registerTask 'major', [
'bump:major'
'bump-only:major'
'reloadPkg'
'updcl:1'
]

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.1.3 - 2013-07-22
* appchan x - Version 2.1.3 - 2013-07-24
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

File diff suppressed because one or more lines are too long

View File

@ -1,19 +0,0 @@
// ==UserScript==
// @name 4chan X
// @version 1.2.19
// @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan.
// @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
// @match *://api.4chan.org/*
// @match *://boards.4chan.org/*
// @match *://images.4chan.org/*
// @match *://sys.4chan.org/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_openInTab
// @run-at document-start
// @updateURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.meta.js
// @downloadURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC
// ==/UserScript==

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
<div class="move" title="Post count / File count / Page count">
<span id="post-count">...</span> / <span id="file-count">...</span> / <span id="page-count">...</span>
</div>

View File

@ -1,38 +0,0 @@
<div>
<input type="checkbox" id="autohide" title="Auto-hide">
<select data-name="thread" title="Create a new thread / Reply">
<option value="new">New thread</option>
</select>
<span class="move"></span>
<a href="javascript:;" class="close" title="Close">×</a>
</div>
<form>
<div class="persona">
<input type="button" id="dump-button" title="Dump list" value="+">
<input data-name="name" list="list-name" placeholder="Name" class="field" size="1">
<input data-name="email" list="list-email" placeholder="E-mail" class="field" size="1">
<input data-name="sub" list="list-sub" placeholder="Subject" class="field" size="1">
</div>
<div id="dump-list-container">
<div id="dump-list"></div>
<a id="add-post" href="javascript:;" title="Add a post">+</a>
</div>
<div class="textarea">
<textarea data-name="com" placeholder="Comment" class="field"></textarea>
<span id="char-count"></span>
</div>
<div id="file-n-submit">
<input type="submit">
<input type="button" id="qr-file-button" value="Choose files">
<span id="qr-filename-container">
<span id="qr-no-file">No selected file</span>
<span id="qr-filename"></span>
</span>
<a id="qr-filerm" href="javascript:;" title="Remove file">×</a>
<input type="checkbox" id="qr-file-spoiler" title="Spoiler image">
</div>
<input type="file" multiple hidden>
</form>
<datalist id="list-name"></datalist>
<datalist id="list-email"></datalist>
<datalist id="list-sub"></datalist>

View File

@ -28,7 +28,7 @@ Redirect =
'http': false
'https': true
'software': 'foolfuuka'
'boards': ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vg', 'vp', 'vr', 'wsg']
'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']
'NSFW Foolz':
@ -70,6 +70,14 @@ Redirect =
'boards': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
'files': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
'World Athletic Project':
'domain': 'fuuka.worldathleticproject.org'
'http': true
'https': false
'software': 'foolfuuka'
'boards': ['e', 'h', 'p', 's', 'u']
'files': ['e', 'h', 'p', 's', 'u']
'Install Gentoo':
'domain': 'archive.installgentoo.net'
'http': false
@ -78,6 +86,14 @@ Redirect =
'boards': ['diy', 'g', 'sci']
'files': []
'warosu':
'domain': 'fuuka.warosu.org'
'http': true
'https': true
'software': 'fuuka'
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
'Rebecca Black Tech':
'domain': 'rbt.asia'
'http': true

View File

@ -26,7 +26,7 @@ Config =
'Localize and format timestamps.'
]
'Relative Post Dates': [
false
true
'Display dates like "3 minutes ago". Tooltip shows the timestamp.'
]
'File Info Formatting': [
@ -104,11 +104,11 @@ Config =
'Hide replies of hidden posts, recursively.'
]
'Thread Hiding Buttons': [
true
false
'Add buttons to hide entire threads.'
]
'Reply Hiding Buttons': [
true
false
'Add buttons to hide single replies.'
]
'Filtered Backlinks': [
@ -126,7 +126,7 @@ Config =
'Expand images.'
]
'Image Hover': [
false
true
'Show full image on mouseover.'
]
'Sauce': [
@ -258,7 +258,7 @@ Config =
'The Quick reply won\'t disappear after posting.'
]
'Auto Hide QR': [
false
true
'Automatically hide the quick reply when posting.'
]
'Open Post in New Tab': [
@ -358,13 +358,13 @@ Config =
'Add \'(Cross-thread)\' to cross-threads quotes.'
]
'Quote Threading': [
false
true
'Thread conversations'
]
imageExpansion:
'Fit width': [
true
false
''
]
'Fit height': [
@ -376,7 +376,7 @@ Config =
'Expand all images along with spoilers.'
]
'Expand from here': [
true
false
'Expand all images only from current position to thread end.'
]
'Advance on contract': [
@ -829,12 +829,11 @@ http://iqdb.org/?url=%TURL
boardnav: """
[ toggle-all ]
[current-title]
[external-text:"FAQ","https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions"]
"""
QR:
'QR.personas': """
#email:"sage";boards:jp;always
"""
'QR.personas': """#email:"sage";boards:jp;always"""
time: '%m/%d/%y(%a)%H:%M:%S'

View File

@ -46,10 +46,11 @@ class Post
if date = $ '.dateTime', info
@nodes.date = date
@info.date = new Date date.dataset.utc * 1000
@info.yours = QR.db.get
boardID: @board
threadID: @thread
postID: @ID
if Conf['Quick Reply']
@info.yours = QR.db.get
boardID: @board
threadID: @thread
postID: @ID
@parseComment()
@parseQuotes()
@ -81,29 +82,34 @@ class Post
@info.comment = text.join('').trim().replace /\s+$/gm, ''
parseQuotes: ->
quotes = {}
@quotes = []
for quotelink in $$ '.quotelink', @nodes.comment
# Don't add board links. (>>>/b/)
{hash} = quotelink
continue unless hash
@parseQuote quotelink
return
# Don't add catalog links. (>>>/b/catalog or >>>/b/search)
{pathname} = quotelink
continue if /catalog$/.test pathname
parseQuote: (quotelink) ->
# Only add quotes that link to posts on an imageboard.
# Don't add:
# - board links. (>>>/b/)
# - catalog links. (>>>/b/catalog or >>>/b/search)
# - rules links. (>>>/a/rules)
# - text-board quotelinks. (>>>/img/1234)
return unless match = quotelink.href.match ///
boards\.4chan\.org/
([^/]+) # boardID
/res/\d+#p
(\d+) # postID
$
///
# Don't add rules links. (>>>/a/rules)
# Don't add text-board quotelinks. (>>>/img/1234)
continue if quotelink.hostname isnt 'boards.4chan.org'
@nodes.quotelinks.push quotelink
@nodes.quotelinks.push quotelink
# Don't count capcode replies as quotes in OPs. (Admin/Mod/Dev Replies: ...)
return if @isClone or !@isReply and $.hasClass quotelink.parentNode.parentNode, 'capcodeReplies'
# Don't count capcode replies as quotes in OPs. (Admin/Mod/Dev Replies: ...)
continue if !@isReply and $.hasClass quotelink.parentNode.parentNode, 'capcodeReplies'
# Basically, only add quotes that link to posts on an imageboard.
quotes["#{pathname.split('/')[1]}.#{hash[2..]}"] = true
return if @isClone
@quotes = Object.keys quotes
# ES6 Set when?
fullID = "#{match[1]}.#{match[2]}"
@quotes.push fullID unless @quotes.contains fullID
parseFile: (that) ->
return unless (fileEl = $ '.file', @nodes.post) and thumb = $ 'img[data-md5]', fileEl

View File

@ -1,6 +1,6 @@
Report =
init: ->
return unless /report/.test(location.search) and d.cookie.indexOf('pass_enabled=1') is -1
return unless /report/.test(location.search) and not d.cookie.contains 'pass_enabled=1'
$.asap (-> $.id 'recaptcha_response_field'), Report.ready
ready: ->
field = $.id 'recaptcha_response_field'

View File

@ -5,7 +5,7 @@ QR =
$.ready @initReady
if Conf['Persistent QR']
unless g.BOARD.ID is 'f'
unless g.BOARD.ID is 'f' and g.VIEW is 'index'
$.on d, '4chanXInitFinished', @persist
else
$.ready @persist
@ -1081,8 +1081,8 @@ QR =
QR.status()
QR.error $.el 'span',
innerHTML: """
Connection error. You may have been <a href=//www.4chan.org/banned target=_blank>banned</a>.
[<a href="https://github.com/MayhemYDG/4chan-x/wiki/FAQ#what-does-connection-error-you-may-have-been-banned-mean" target=_blank>FAQ</a>]
4chan X encountered an error while posting. Please try again.
[<a href="https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions#what-does-4chan-x-encountered-an-error-while-posting-please-try-again-mean" target=_blank>?</a>]
"""
opts =
cred: true