Merge branch 'master' into catalog
Conflicts: src/General/lib/thread.class
This commit is contained in:
commit
9e050bad65
@ -3,6 +3,12 @@ The attributions below are for work that has been incorporated into the script a
|
|||||||
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
|
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
|
||||||
|
|
||||||
<!-- v1.9.3.x -->
|
<!-- v1.9.3.x -->
|
||||||
|
### v1.9.3.6
|
||||||
|
*2014-09-19* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.6/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.6/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
|
||||||
|
**ccd0**
|
||||||
|
- Thread expansion bugfix.
|
||||||
|
|
||||||
### v1.9.3.5
|
### v1.9.3.5
|
||||||
*2014-09-18* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.5/builds/4chan-X-noupdate.crx "Chromium version")]
|
*2014-09-18* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.3.5/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.3.5
|
* 4chan X - Version 1.9.3.6
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.9.3.5
|
// @version 1.9.3.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.9.3.5
|
// @version 1.9.3.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.3.5
|
* 4chan X - Version 1.9.3.6
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -376,7 +376,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.9.3.5',
|
VERSION: '1.9.3.6',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -11777,7 +11777,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
replies = $$('.thread > .replyContainer', threadRoot);
|
replies = $$('.thread > .replyContainer', threadRoot);
|
||||||
if (Conf['Show Replies']) {
|
if (!Conf['JSON Navigation'] || Conf['Show Replies']) {
|
||||||
num = (function() {
|
num = (function() {
|
||||||
if (thread.isSticky) {
|
if (thread.isSticky) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -12872,7 +12872,7 @@
|
|||||||
className: 'dialog'
|
className: 'dialog'
|
||||||
});
|
});
|
||||||
$.extend(dialog, {
|
$.extend(dialog, {
|
||||||
innerHTML: "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href='https://github.com/ccd0/4chan-x' target=_blank>4chan X</a> | <a href='https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md' target=_blank>1.9.3.5</a> | <a href='https://github.com/ccd0/4chan-x/issues' target=_blank>Issues</a> | <a href=javascript:; class='close fa fa-times' title=Close></a></div></nav><div class=section-container><section></section></div>"
|
innerHTML: "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href='https://github.com/ccd0/4chan-x' target=_blank>4chan X</a> | <a href='https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md' target=_blank>1.9.3.6</a> | <a href='https://github.com/ccd0/4chan-x/issues' target=_blank>Issues</a> | <a href=javascript:; class='close fa fa-times' title=Close></a></div></nav><div class=section-container><section></section></div>"
|
||||||
});
|
});
|
||||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.9.3.5
|
// @version 1.9.3.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -23,7 +23,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.3.5
|
* 4chan X - Version 1.9.3.6
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -375,7 +375,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.9.3.5',
|
VERSION: '1.9.3.6',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -11776,7 +11776,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
replies = $$('.thread > .replyContainer', threadRoot);
|
replies = $$('.thread > .replyContainer', threadRoot);
|
||||||
if (Conf['Show Replies']) {
|
if (!Conf['JSON Navigation'] || Conf['Show Replies']) {
|
||||||
num = (function() {
|
num = (function() {
|
||||||
if (thread.isSticky) {
|
if (thread.isSticky) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -12871,7 +12871,7 @@
|
|||||||
className: 'dialog'
|
className: 'dialog'
|
||||||
});
|
});
|
||||||
$.extend(dialog, {
|
$.extend(dialog, {
|
||||||
innerHTML: "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href='https://github.com/ccd0/4chan-x' target=_blank>4chan X</a> | <a href='https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md' target=_blank>1.9.3.5</a> | <a href='https://github.com/ccd0/4chan-x/issues' target=_blank>Issues</a> | <a href=javascript:; class='close fa fa-times' title=Close></a></div></nav><div class=section-container><section></section></div>"
|
innerHTML: "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href='https://github.com/ccd0/4chan-x' target=_blank>4chan X</a> | <a href='https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md' target=_blank>1.9.3.6</a> | <a href='https://github.com/ccd0/4chan-x/issues' target=_blank>Issues</a> | <a href=javascript:; class='close fa fa-times' title=Close></a></div></nav><div class=section-container><section></section></div>"
|
||||||
});
|
});
|
||||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.9.3.5
|
// @version 1.9.3.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.9.3.5
|
// @version 1.9.3.6
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.9.3.5
|
* 4chan X - Version 1.9.3.6
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -376,7 +376,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.9.3.5',
|
VERSION: '1.9.3.6',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
NAME: '4chan X',
|
NAME: '4chan X',
|
||||||
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
|
||||||
@ -11777,7 +11777,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
replies = $$('.thread > .replyContainer', threadRoot);
|
replies = $$('.thread > .replyContainer', threadRoot);
|
||||||
if (Conf['Show Replies']) {
|
if (!Conf['JSON Navigation'] || Conf['Show Replies']) {
|
||||||
num = (function() {
|
num = (function() {
|
||||||
if (thread.isSticky) {
|
if (thread.isSticky) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -12872,7 +12872,7 @@
|
|||||||
className: 'dialog'
|
className: 'dialog'
|
||||||
});
|
});
|
||||||
$.extend(dialog, {
|
$.extend(dialog, {
|
||||||
innerHTML: "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href='https://github.com/ccd0/4chan-x' target=_blank>4chan X</a> | <a href='https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md' target=_blank>1.9.3.5</a> | <a href='https://github.com/ccd0/4chan-x/issues' target=_blank>Issues</a> | <a href=javascript:; class='close fa fa-times' title=Close></a></div></nav><div class=section-container><section></section></div>"
|
innerHTML: "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href='https://github.com/ccd0/4chan-x' target=_blank>4chan X</a> | <a href='https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md' target=_blank>1.9.3.6</a> | <a href='https://github.com/ccd0/4chan-x/issues' target=_blank>Issues</a> | <a href=javascript:; class='close fa fa-times' title=Close></a></div></nav><div class=section-container><section></section></div>"
|
||||||
});
|
});
|
||||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.3.5' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.3.6' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.3.5' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.3.6' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.9.3.5",
|
"version": "1.9.3.6",
|
||||||
"repo": "https://github.com/ccd0/4chan-x/",
|
"repo": "https://github.com/ccd0/4chan-x/",
|
||||||
"page": "https://github.com/ccd0/4chan-x",
|
"page": "https://github.com/ccd0/4chan-x",
|
||||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||||
|
|||||||
@ -45,6 +45,7 @@ Build =
|
|||||||
# thread status
|
# thread status
|
||||||
isSticky: !!data.sticky
|
isSticky: !!data.sticky
|
||||||
isClosed: !!data.closed
|
isClosed: !!data.closed
|
||||||
|
isArchived: !!data.archived
|
||||||
# file
|
# file
|
||||||
if data.filedeleted
|
if data.filedeleted
|
||||||
o.file =
|
o.file =
|
||||||
@ -76,7 +77,6 @@ Build =
|
|||||||
{
|
{
|
||||||
postID, threadID, boardID
|
postID, threadID, boardID
|
||||||
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
||||||
isSticky, isClosed
|
|
||||||
comment
|
comment
|
||||||
file
|
file
|
||||||
} = o
|
} = o
|
||||||
@ -153,15 +153,9 @@ Build =
|
|||||||
else
|
else
|
||||||
"/#{boardID}/thread/#{threadID}\#q#{postID}"
|
"/#{boardID}/thread/#{threadID}\#q#{postID}"
|
||||||
|
|
||||||
sticky = if isSticky
|
icons = for type in ['Sticky', 'Closed', 'Archived'] when o["is#{type}"] and !(type is 'Closed' and o.isArchived)
|
||||||
<%= html(' <img src="//s.4cdn.org/image/sticky${retina}.gif" alt="Sticky" title="Sticky" class="stickyIcon retina">') %>
|
typeLC = type.toLowerCase()
|
||||||
else
|
<%= html(' <img src="//s.4cdn.org/image/${typeLC}${retina}.gif" alt="${type}" title="${type}" class="${typeLC}Icon retina">') %>
|
||||||
<%= html('') %>
|
|
||||||
|
|
||||||
closed = if isClosed
|
|
||||||
<%= html(' <img src="//s.4cdn.org/image/closed${retina}.gif" alt="Closed" title="Closed" class="closedIcon retina">') %>
|
|
||||||
else
|
|
||||||
<%= html('') %>
|
|
||||||
|
|
||||||
replyLink = if isOP and g.VIEW is 'index'
|
replyLink = if isOP and g.VIEW is 'index'
|
||||||
<%= html(' <span>[<a href="/${boardID}/thread/${threadID}" class="replylink">Reply</a>]</span>') %>
|
<%= html(' <span>[<a href="/${boardID}/thread/${threadID}" class="replylink">Reply</a>]</span>') %>
|
||||||
@ -177,7 +171,7 @@ Build =
|
|||||||
'<span class="postNum${desktop2}">' +
|
'<span class="postNum${desktop2}">' +
|
||||||
'<a href="${postLink}" title="Link to this post">No.</a>' +
|
'<a href="${postLink}" title="Link to this post">No.</a>' +
|
||||||
'<a href="${quoteLink}" title="Reply to this post">${postID}</a>' +
|
'<a href="${quoteLink}" title="Reply to this post">${postID}</a>' +
|
||||||
'&{sticky}&{closed}&{replyLink}' +
|
'@{icons}&{replyLink}' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'</div>'
|
'</div>'
|
||||||
) %>
|
) %>
|
||||||
|
|||||||
@ -166,7 +166,6 @@ Main =
|
|||||||
|
|
||||||
for threadRoot in $$ '.board > .thread', board
|
for threadRoot in $$ '.board > .thread', board
|
||||||
thread = new Thread +threadRoot.id[1..], g.BOARD
|
thread = new Thread +threadRoot.id[1..], g.BOARD
|
||||||
thread.isDead = thread.isArchived = !!$('.closed')?.textContent.match(/Thread archived/) if g.VIEW is 'thread'
|
|
||||||
threads.push thread
|
threads.push thread
|
||||||
for postRoot in $$ '.thread > .postContainer', threadRoot
|
for postRoot in $$ '.thread > .postContainer', threadRoot
|
||||||
try
|
try
|
||||||
|
|||||||
@ -43,8 +43,10 @@ class Post
|
|||||||
|
|
||||||
unless @isReply = $.hasClass post, 'reply'
|
unless @isReply = $.hasClass post, 'reply'
|
||||||
@thread.OP = @
|
@thread.OP = @
|
||||||
@thread.isSticky = !!$ '.stickyIcon', info
|
@thread.isArchived = !!$ '.archivedIcon', info
|
||||||
@thread.isClosed = !!$ '.closedIcon', info
|
@thread.isSticky = !!$ '.stickyIcon', info
|
||||||
|
@thread.isClosed = @thread.isArchived or !!$ '.closedIcon', info
|
||||||
|
@thread.kill() if @thread.isArchived
|
||||||
|
|
||||||
@info = {}
|
@info = {}
|
||||||
if subject = $ '.subject', info
|
if subject = $ '.subject', info
|
||||||
|
|||||||
@ -3,16 +3,17 @@ class Thread
|
|||||||
toString: -> @ID
|
toString: -> @ID
|
||||||
|
|
||||||
constructor: (@ID, @board) ->
|
constructor: (@ID, @board) ->
|
||||||
@fullID = "#{@board}.#{@ID}"
|
@fullID = "#{@board}.#{@ID}"
|
||||||
@posts = new SimpleDict
|
@posts = new SimpleDict
|
||||||
@isDead = false
|
@isDead = false
|
||||||
@isHidden = false
|
@isHidden = false
|
||||||
@isOnTop = false
|
@isOnTop = false
|
||||||
@isPinned = false
|
@isPinned = false
|
||||||
@isSticky = false
|
@isSticky = false
|
||||||
@isClosed = false
|
@isClosed = false
|
||||||
@postLimit = false
|
@isArchived = false
|
||||||
@fileLimit = false
|
@postLimit = false
|
||||||
|
@fileLimit = false
|
||||||
|
|
||||||
@OP = null
|
@OP = null
|
||||||
@catalogView = null
|
@catalogView = null
|
||||||
@ -38,18 +39,25 @@ class Thread
|
|||||||
return if @[name] is status
|
return if @[name] is status
|
||||||
@[name] = status
|
@[name] = status
|
||||||
return unless @OP
|
return unless @OP
|
||||||
|
@setIcon 'Sticky', @isSticky
|
||||||
|
@setIcon 'Closed', @isClosed and !@isArchived
|
||||||
|
@setIcon 'Archived', @isArchived
|
||||||
|
|
||||||
|
setIcon: (type, status) ->
|
||||||
typeLC = type.toLowerCase()
|
typeLC = type.toLowerCase()
|
||||||
|
icon = $ ".#{typeLC}Icon", @OP.nodes.info
|
||||||
|
return if !!icon is status
|
||||||
unless status
|
unless status
|
||||||
$.rm $ ".#{typeLC}Icon", @OP.nodes.info
|
$.rm icon.previousSibling
|
||||||
|
$.rm icon
|
||||||
$.rm $ ".#{typeLC}Icon", @catalogView.nodes.icons if @catalogView
|
$.rm $ ".#{typeLC}Icon", @catalogView.nodes.icons if @catalogView
|
||||||
return
|
return
|
||||||
|
|
||||||
icon = $.el 'img',
|
icon = $.el 'img',
|
||||||
src: "#{Build.staticPath}#{typeLC}#{Build.gifIcon}"
|
src: "#{Build.staticPath}#{typeLC}#{Build.gifIcon}"
|
||||||
alt: type
|
alt: type
|
||||||
title: type
|
title: type
|
||||||
className: "#{typeLC}Icon retina"
|
className: "#{typeLC}Icon retina"
|
||||||
root = if type is 'Closed' and @isSticky
|
root = if type isnt 'Sticky' and @isSticky
|
||||||
$ '.stickyIcon', @OP.nodes.info
|
$ '.stickyIcon', @OP.nodes.info
|
||||||
else
|
else
|
||||||
$('.page-num', @OP.nodes.info) or $('[title="Reply to this post"]', @OP.nodes.info)
|
$('.page-num', @OP.nodes.info) or $('[title="Reply to this post"]', @OP.nodes.info)
|
||||||
|
|||||||
@ -60,7 +60,7 @@ ExpandThread =
|
|||||||
return
|
return
|
||||||
|
|
||||||
replies = $$ '.thread > .replyContainer', threadRoot
|
replies = $$ '.thread > .replyContainer', threadRoot
|
||||||
if Conf['Show Replies']
|
if !Conf['JSON Navigation'] or Conf['Show Replies']
|
||||||
num = if thread.isSticky
|
num = if thread.isSticky
|
||||||
1
|
1
|
||||||
else switch g.BOARD.ID
|
else switch g.BOARD.ID
|
||||||
|
|||||||
@ -132,8 +132,7 @@ ThreadUpdater =
|
|||||||
switch req.status
|
switch req.status
|
||||||
when 200
|
when 200
|
||||||
ThreadUpdater.parse req.response.posts
|
ThreadUpdater.parse req.response.posts
|
||||||
if !!req.response.posts[0].archived
|
if ThreadUpdater.thread.isArchived
|
||||||
ThreadUpdater.thread.isArchived = true
|
|
||||||
ThreadUpdater.set 'status', 'Archived', 'warning'
|
ThreadUpdater.set 'status', 'Archived', 'warning'
|
||||||
ThreadUpdater.kill()
|
ThreadUpdater.kill()
|
||||||
else
|
else
|
||||||
@ -263,6 +262,7 @@ ThreadUpdater =
|
|||||||
OP = postObjects[0]
|
OP = postObjects[0]
|
||||||
Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler
|
Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler
|
||||||
|
|
||||||
|
ThreadUpdater.thread.setStatus 'Archived', !!OP.archived
|
||||||
ThreadUpdater.updateThreadStatus 'Sticky', !!OP.sticky
|
ThreadUpdater.updateThreadStatus 'Sticky', !!OP.sticky
|
||||||
ThreadUpdater.updateThreadStatus 'Closed', !!OP.closed
|
ThreadUpdater.updateThreadStatus 'Closed', !!OP.closed
|
||||||
ThreadUpdater.thread.postLimit = !!OP.bumplimit
|
ThreadUpdater.thread.postLimit = !!OP.bumplimit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user