Merge branch 'Stable' into Beta

Conflicts:
	LICENSE
	builds/4chan-X-beta.crx
	builds/4chan-X-beta.meta.js
	builds/4chan-X-beta.user.js
	builds/4chan-X-noupdate.crx
	builds/4chan-X-noupdate.user.js
	builds/4chan-X.crx
	builds/4chan-X.meta.js
	builds/4chan-X.user.js
	builds/4chan-X.zip
	builds/updates-beta.xml
	builds/updates.xml
	package.json
	src/Quotelinks/Quotify.coffee
This commit is contained in:
ccd0 2015-01-04 10:42:27 -08:00
commit 53ad72ee9a
41 changed files with 65 additions and 45 deletions

View File

@ -29,6 +29,12 @@ Based on v1.9.18.6.
- Minor bugfixes.
<!-- v1.9.18.x -->
### v1.9.18.9
*2015-01-04* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.9/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.9/builds/4chan-X-noupdate.crx "Chromium version")]
**ccd0**
- Support new archived threads list page.
### v1.9.18.8
*2015-01-04* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.8/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.18.8/builds/4chan-X-noupdate.crx "Chromium version")]

View File

@ -1,6 +1,7 @@
Anonymize =
init: ->
return if g.VIEW is 'catalog' or !Conf['Anonymize']
return if g.VIEW not in ['index', 'thread', 'archive'] or !Conf['Anonymize']
return @archive() if g.VIEW is 'archive'
Post.callbacks.push
name: 'Anonymize'
@ -16,3 +17,7 @@ Anonymize =
if @info.email
$.replace email, name
delete @nodes.email
archive: ->
$.ready ->
name.textContent = 'Anonymous' for name in $$ '.name'
$.rm trip for trip in $$ '.postertrip'

View File

@ -1,7 +1,7 @@
Filter =
filters: {}
init: ->
return if g.VIEW is 'catalog' or !Conf['Filter']
return if g.VIEW not in ['index', 'thread'] or !Conf['Filter']
unless Conf['Filtered Backlinks']
$.addClass doc, 'hide-backlinks'
@ -172,7 +172,7 @@ Filter =
menu:
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Filter']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu'] or !Conf['Filter']
div = $.el 'div',
textContent: 'Filter'

View File

@ -1,6 +1,6 @@
PostHiding =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reply Hiding Buttons'] and !(Conf['Menu'] and Conf['Reply Hiding Link'])
return if g.VIEW not in ['index', 'thread'] or !Conf['Reply Hiding Buttons'] and !(Conf['Menu'] and Conf['Reply Hiding Link'])
if Conf['Reply Hiding Buttons']
$.addClass doc, "reply-hide"
@ -23,7 +23,7 @@ PostHiding =
menu:
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Reply Hiding Link']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu'] or !Conf['Reply Hiding Link']
# Hide
div = $.el 'div',

View File

@ -1,7 +1,7 @@
Recursive =
recursives: {}
init: ->
return if g.VIEW is 'catalog'
return if g.VIEW not in ['index', 'thread']
Post.callbacks.push
name: 'Recursive'

View File

@ -1,6 +1,6 @@
ThreadHiding =
init: ->
return if g.VIEW is 'thread' or !Conf['Thread Hiding Buttons'] and !(Conf['Menu'] and Conf['Thread Hiding Link']) and !Conf['JSON Navigation']
return if g.VIEW not in ['index', 'catalog'] or !Conf['Thread Hiding Buttons'] and !(Conf['Menu'] and Conf['Thread Hiding Link']) and !Conf['JSON Navigation']
@db = new DataBoard 'hiddenThreads'
return @catalogWatch() if g.VIEW is 'catalog'
@catalogSet g.BOARD

View File

@ -1,7 +1,7 @@
<% if (tests_enabled) { %>
BuildTest =
init: ->
return if !Conf['Menu'] or g.VIEW is 'catalog'
return if !Conf['Menu'] or g.VIEW not in ['index', 'thread']
a = $.el 'a',
textContent: 'Test HTML building'

View File

@ -59,6 +59,7 @@ Index =
$.extend @navLinks, <%= importHTML('Features/Index-navlinks') %>
$('.returnlink a', @navLinks).href = CatalogLinks.index()
$('.cataloglink a', @navLinks).href = CatalogLinks.catalog()
$('.archlistlink', @navLinks).hidden = true if g.BOARD.ID is 'b'
@searchInput = $ '#index-search', @navLinks
@setupSearch()
@hideLabel = $ '#hidden-label', @navLinks

View File

@ -15,6 +15,8 @@ Main =
'thread'
when 'catalog'
'catalog'
when 'archive'
'archive'
else
'index'
if g.VIEW is 'thread'

View File

@ -1,5 +1,6 @@
<span class="brackets-wrap returnlink"><a href="./">Return</a></span>
<span class="brackets-wrap cataloglink"><a href="./catalog">Catalog</a></span>
<span class="brackets-wrap archlistlink"><a href="./archive">Archive</a></span>
<span class="brackets-wrap bottomlink"><a href="#bottom">Bottom</a></span>
<span class="brackets-wrap" id="index-last-refresh"><time title="Last index refresh">...</time></span>
<input type="search" id="index-search" class="field" placeholder="Search">

View File

@ -1,6 +1,6 @@
FappeTyme =
init: ->
return if !(Conf['Fappe Tyme'] or Conf['Werk Tyme']) or g.VIEW is 'catalog' or g.BOARD is 'f'
return if !(Conf['Fappe Tyme'] or Conf['Werk Tyme']) or g.VIEW not in ['index', 'thread'] or g.BOARD is 'f'
@nodes = {}
@enabled =

View File

@ -1,6 +1,6 @@
Gallery =
init: ->
return if g.VIEW is 'catalog' or g.BOARD is 'f' or !Conf['Gallery']
return if g.VIEW not in ['index', 'thread'] or g.BOARD is 'f' or !Conf['Gallery']
@delay = Conf['Slide Delay']
@ -286,7 +286,7 @@ Gallery =
menu:
init: ->
return if g.VIEW is 'catalog' or !Conf['Gallery']
return if g.VIEW not in ['index', 'thread'] or !Conf['Gallery']
el = $.el 'span',
textContent: 'Gallery'

View File

@ -1,6 +1,6 @@
ImageExpand =
init: ->
return if g.VIEW is 'catalog' or !Conf['Image Expansion']
return if g.VIEW not in ['index', 'thread'] or !Conf['Image Expansion']
@EAI = $.el 'a',
className: 'expand-all-shortcut fa fa-expand'
@ -269,7 +269,7 @@ ImageExpand =
menu:
init: ->
return if g.VIEW is 'catalog' or !Conf['Image Expansion']
return if g.VIEW not in ['index', 'thread'] or !Conf['Image Expansion']
el = $.el 'span',
textContent: 'Image Expansion'

View File

@ -1,6 +1,6 @@
ImageHover =
init: ->
return if g.VIEW is 'catalog'
return if g.VIEW not in ['index', 'thread']
if Conf['Image Hover']
Post.callbacks.push
name: 'Image Hover'

View File

@ -1,6 +1,6 @@
ImageLoader =
init: ->
return if g.VIEW is 'catalog'
return if g.VIEW not in ['index', 'thread']
return unless Conf['Image Prefetching'] or Conf['Replace JPG'] or Conf['Replace PNG'] or Conf['Replace GIF'] or Conf['Replace WEBM']
Post.callbacks.push

View File

@ -1,6 +1,6 @@
RevealSpoilers =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reveal Spoiler Thumbnails']
return if g.VIEW not in ['index', 'thread'] or !Conf['Reveal Spoiler Thumbnails']
Post.callbacks.push
cb: @node

View File

@ -1,6 +1,6 @@
Sauce =
init: ->
return if g.VIEW is 'catalog' or !Conf['Sauce']
return if g.VIEW not in ['index', 'thread'] or !Conf['Sauce']
links = []
for link in Conf['sauces'].split '\n'

View File

@ -1,6 +1,6 @@
Linkify =
init: ->
return if g.VIEW is 'catalog' or not Conf['Linkify']
return if g.VIEW not in ['index', 'thread'] or not Conf['Linkify']
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node

View File

@ -1,6 +1,6 @@
ArchiveLink =
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Archive Link']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu'] or !Conf['Archive Link']
div = $.el 'div',
textContent: 'Archive'

View File

@ -1,6 +1,6 @@
DeleteLink =
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Delete Link']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu'] or !Conf['Delete Link']
div = $.el 'div',
className: 'delete-link'

View File

@ -1,6 +1,6 @@
DownloadLink =
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Download Link']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu'] or !Conf['Download Link']
a = $.el 'a',
className: 'download-link'

View File

@ -1,6 +1,6 @@
Menu =
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu']
@button = $.el 'a',
className: 'menu-button'

View File

@ -1,6 +1,6 @@
ReportLink =
init: ->
return if g.VIEW is 'catalog' or !Conf['Menu'] or !Conf['Report Link']
return if g.VIEW not in ['index', 'thread'] or !Conf['Menu'] or !Conf['Report Link']
a = $.el 'a',
className: 'report-link'

View File

@ -2,7 +2,7 @@ CatalogLinks =
init: ->
if (Conf['External Catalog'] or Conf['JSON Navigation']) and !(Conf['JSON Navigation'] and g.VIEW is 'index')
selector = switch g.VIEW
when 'thread' then '.navLinks.desktop > a'
when 'thread', 'archive' then '.navLinks.desktop > a'
when 'catalog' then '.navLinks > :first-child > a'
when 'index' then '.middlead + .desktop > a, .cataloglink > a'
$.ready ->

View File

@ -1,6 +1,6 @@
FileInfo =
init: ->
return if g.VIEW is 'catalog' or !Conf['File Info Formatting']
return if g.VIEW not in ['index', 'thread'] or !Conf['File Info Formatting']
Post.callbacks.push
name: 'File Info Formatting'

View File

@ -1,6 +1,6 @@
Fourchan =
init: ->
return if g.VIEW is 'catalog'
return if g.VIEW not in ['index', 'thread']
if g.BOARD.ID is 'g'
$.globalEval '''

View File

@ -1,6 +1,6 @@
IDColor =
init: ->
return if g.VIEW is 'catalog' or not Conf['Color User IDs']
return if g.VIEW not in ['index', 'thread'] or not Conf['Color User IDs']
@ids = {}
Post.callbacks.push

View File

@ -1,6 +1,6 @@
IDHighlight =
init: ->
return if g.VIEW is 'catalog'
return if g.VIEW not in ['index', 'thread']
Post.callbacks.push
name: 'Highlight by User ID'

View File

@ -21,7 +21,7 @@ Keybinds =
{target} = e
if target.nodeName in ['INPUT', 'TEXTAREA']
return unless /(Esc|Alt|Ctrl|Meta|Shift\+\w{2,})/.test key
unless g.VIEW is 'catalog' or g.VIEW is 'index' and Conf['JSON Navigation'] and Conf['Index Mode'] is 'catalog'
unless g.VIEW not in ['index', 'thread'] or g.VIEW is 'index' and Conf['JSON Navigation'] and Conf['Index Mode'] is 'catalog'
threadRoot = Nav.getThread()
if op = $ '.op', threadRoot
thread = Get.postFromNode(op).thread
@ -94,13 +94,13 @@ Keybinds =
return unless threadRoot
Keybinds.img threadRoot, true
when Conf['Open Gallery']
return if g.VIEW is 'catalog'
return if g.VIEW not in ['index', 'thread']
Gallery.cb.toggle()
when Conf['fappeTyme']
return if !Conf['Fappe Tyme'] or g.VIEW is 'catalog' or g.BOARD is 'f'
return if !Conf['Fappe Tyme'] or g.VIEW not in ['index', 'thread'] or g.BOARD is 'f'
FappeTyme.toggle 'fappe'
when Conf['werkTyme']
return if !Conf['Werk Tyme'] or g.VIEW is 'catalog' or g.BOARD is 'f'
return if !Conf['Werk Tyme'] or g.VIEW not in ['index', 'thread'] or g.BOARD is 'f'
FappeTyme.toggle 'werk'
# Board Navigation
when Conf['Front page']

View File

@ -5,7 +5,7 @@ Nav =
return unless Conf['Index Navigation']
when 'thread'
return unless Conf['Reply Navigation']
else # catalog
else
return
span = $.el 'span',

View File

@ -2,7 +2,7 @@ RelativeDates =
INTERVAL: $.MINUTE / 2
init: ->
if (
g.VIEW isnt 'catalog' and Conf['Relative Post Dates'] and !Conf['Relative Date Title'] or
g.VIEW in ['index', 'thread'] and Conf['Relative Post Dates'] and !Conf['Relative Date Title'] or
g.VIEW is 'index' and Conf['JSON Navigation'] and g.BOARD.ID isnt 'f'
)
@flush()

View File

@ -11,9 +11,14 @@ RemoveSpoilers =
CatalogThread.callbacks.push
name: 'Reveal Spoilers'
cb: @node
if g.VIEW is 'archive'
$.ready -> RemoveSpoilers.unspoiler $.id 'arc-list'
node: (post) ->
spoilers = $$ 's', @nodes.comment
RemoveSpoilers.unspoiler @nodes.comment
unspoiler: (el) ->
spoilers = $$ 's', el
for spoiler in spoilers
span = $.el 'span', className: 'removed-spoiler'
$.replace spoiler, span

View File

@ -1,6 +1,6 @@
Time =
init: ->
return if g.VIEW is 'catalog' or !Conf['Time Formatting']
return if g.VIEW not in ['index', 'thread'] or !Conf['Time Formatting']
Post.callbacks.push
name: 'Time Formatting'

View File

@ -12,7 +12,7 @@ QuoteBacklink =
# and that as much backlinks are appended in the background as possible.
containers: {}
init: ->
return if g.VIEW is 'catalog' or !Conf['Quote Backlinks']
return if g.VIEW not in ['index', 'thread'] or !Conf['Quote Backlinks']
Post.callbacks.push
name: 'Quote Backlinking Part 1'

View File

@ -1,6 +1,6 @@
QuoteCT =
init: ->
return if g.VIEW is 'catalog' or !Conf['Mark Cross-thread Quotes']
return if g.VIEW not in ['index', 'thread'] or !Conf['Mark Cross-thread Quotes']
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node

View File

@ -1,6 +1,6 @@
QuoteInline =
init: ->
return if g.VIEW is 'catalog' or !Conf['Quote Inlining']
return if g.VIEW not in ['index', 'thread'] or !Conf['Quote Inlining']
@process = if Conf['Quote Hash Navigation']
(link, clone) ->

View File

@ -1,6 +1,6 @@
QuoteOP =
init: ->
return if g.VIEW is 'catalog' or !Conf['Mark OP Quotes']
return if g.VIEW not in ['index', 'thread'] or !Conf['Mark OP Quotes']
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node

View File

@ -1,6 +1,6 @@
QuotePreview =
init: ->
return if g.VIEW is 'catalog' or !Conf['Quote Previewing']
return if g.VIEW not in ['index', 'thread'] or !Conf['Quote Previewing']
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node

View File

@ -1,6 +1,6 @@
QuoteStrikeThrough =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reply Hiding Buttons'] and !(Conf['Menu'] and Conf['Reply Hiding Link']) and !Conf['Filter']
return if g.VIEW not in ['index', 'thread'] or !Conf['Reply Hiding Buttons'] and !(Conf['Menu'] and Conf['Reply Hiding Link']) and !Conf['Filter']
Post.callbacks.push
name: 'Strike-through Quotes'

View File

@ -1,6 +1,6 @@
QuoteYou =
init: ->
return unless g.VIEW isnt 'catalog' and Conf['Mark Quotes of You'] and Conf['Quick Reply']
return unless g.VIEW in ['index', 'thread'] and Conf['Mark Quotes of You'] and Conf['Quick Reply']
if Conf['Highlight Own Posts']
$.addClass doc, 'highlight-own'

View File

@ -1,6 +1,6 @@
Quotify =
init: ->
return if g.VIEW is 'catalog' or !Conf['Resurrect Quotes'] and g.BOARD.ID isnt 'pol'
return if g.VIEW not in ['index', 'thread'] or !Conf['Resurrect Quotes'] and g.BOARD.ID isnt 'pol'
if Conf['Comment Expansion']
ExpandComment.callbacks.push @node