Merge branch 'v3' of git://github.com/MayhemYDG/4chan-x into v3
Conflicts: CHANGELOG.md CONTRIBUTING.md Gruntfile.coffee package.json src/Miscellaneous/Keybinds.coffee
This commit is contained in:
commit
bdba59eccc
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.2.43 - 2013-12-06
|
||||
* 4chan X - Version 1.2.43 - 2013-12-09
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.2.43 - 2013-12-06
|
||||
* 4chan X - Version 1.2.43 - 2013-12-09
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
@ -2752,7 +2752,7 @@
|
||||
}
|
||||
flag = !flagCode ? '' : boardID === 'pol' ? " <img src='" + staticPath + "country/troll/" + (flagCode.toLowerCase()) + ".gif' alt=" + flagCode + " title='" + flagName + "' class=countryFlag>" : " <span title='" + flagName + "' class='flag flag-" + (flagCode.toLowerCase()) + "'></span>";
|
||||
if (file != null ? file.isDeleted : void 0) {
|
||||
fileHTML = isOP ? ("<div class=file id=f" + postID + "><div class=fileInfo></div><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted" + gifIcon + "' alt='File deleted.' class=fileDeleted>") + "</span></div>" : ("<div class=file id=f" + postID + "><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted-res" + gifIcon + "' alt='File deleted.' class=fileDeletedRes>") + "</span></div>";
|
||||
fileHTML = isOP ? ("<div class=file id=f" + postID + "><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted" + gifIcon + "' alt='File deleted.' class=fileDeleted>") + "</span></div>" : ("<div class=file id=f" + postID + "><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted-res" + gifIcon + "' alt='File deleted.' class=fileDeletedRes>") + "</span></div>";
|
||||
} else if (file) {
|
||||
ext = file.name.slice(-3);
|
||||
if (!file.twidth && !file.theight && ext === 'gif') {
|
||||
@ -10723,7 +10723,7 @@
|
||||
if (!this.file || this.isClone) {
|
||||
return;
|
||||
}
|
||||
return this.file.text.innerHTML = FileInfo.funk(FileInfo, this);
|
||||
return this.file.text.innerHTML = "<span class=file-info>" + (FileInfo.funk(FileInfo, this)) + "</span>";
|
||||
},
|
||||
createFunc: function(format) {
|
||||
var code;
|
||||
@ -11295,7 +11295,7 @@
|
||||
Keybinds.hl(0, threadRoot);
|
||||
break;
|
||||
case Conf['Hide']:
|
||||
if (g.VIEW === 'index') {
|
||||
if (ThreadHiding.db) {
|
||||
ThreadHiding.toggle(thread);
|
||||
}
|
||||
break;
|
||||
@ -11408,7 +11408,7 @@
|
||||
}
|
||||
},
|
||||
hl: function(delta, thread) {
|
||||
var axe, height, next, postEl, replies, reply, root, _i, _len;
|
||||
var axis, height, next, postEl, replies, reply, root, _i, _len;
|
||||
|
||||
postEl = $('.reply.highlight', thread);
|
||||
if (!delta) {
|
||||
@ -11421,8 +11421,8 @@
|
||||
height = postEl.getBoundingClientRect().height;
|
||||
if (Header.getTopOf(postEl) >= -height && Header.getBottomOf(postEl) >= -height) {
|
||||
root = postEl.parentNode;
|
||||
axe = delta === +1 ? 'following' : 'preceding';
|
||||
if (!(next = $.x("" + axe + "-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root))) {
|
||||
axis = delta === +1 ? 'following' : 'preceding';
|
||||
if (!(next = $.x("" + axis + "-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root))) {
|
||||
return;
|
||||
}
|
||||
Header.scrollToIfNeeded(next, delta === +1);
|
||||
@ -11518,11 +11518,11 @@
|
||||
return $('.board');
|
||||
},
|
||||
scroll: function(delta) {
|
||||
var axe, next, thread, top;
|
||||
var axis, next, thread, top;
|
||||
|
||||
thread = Nav.getThread();
|
||||
axe = delta === +1 ? 'following' : 'preceding';
|
||||
if (next = $.x("" + axe + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) {
|
||||
axis = delta === +1 ? 'following' : 'preceding';
|
||||
if (next = $.x("" + axis + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) {
|
||||
top = Header.getTopOf(thread);
|
||||
if (delta === +1 && top < 5 || delta === -1 && top > -5) {
|
||||
thread = next;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* 4chan X - Version 1.2.43 - 2013-12-06
|
||||
* 4chan X - Version 1.2.43 - 2013-12-09
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
|
||||
@ -2764,7 +2764,7 @@
|
||||
}
|
||||
flag = !flagCode ? '' : boardID === 'pol' ? " <img src='" + staticPath + "country/troll/" + (flagCode.toLowerCase()) + ".gif' alt=" + flagCode + " title='" + flagName + "' class=countryFlag>" : " <span title='" + flagName + "' class='flag flag-" + (flagCode.toLowerCase()) + "'></span>";
|
||||
if (file != null ? file.isDeleted : void 0) {
|
||||
fileHTML = isOP ? ("<div class=file id=f" + postID + "><div class=fileInfo></div><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted" + gifIcon + "' alt='File deleted.' class=fileDeleted>") + "</span></div>" : ("<div class=file id=f" + postID + "><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted-res" + gifIcon + "' alt='File deleted.' class=fileDeletedRes>") + "</span></div>";
|
||||
fileHTML = isOP ? ("<div class=file id=f" + postID + "><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted" + gifIcon + "' alt='File deleted.' class=fileDeleted>") + "</span></div>" : ("<div class=file id=f" + postID + "><span class=fileThumb>") + ("<img src='" + staticPath + "filedeleted-res" + gifIcon + "' alt='File deleted.' class=fileDeletedRes>") + "</span></div>";
|
||||
} else if (file) {
|
||||
ext = file.name.slice(-3);
|
||||
if (!file.twidth && !file.theight && ext === 'gif') {
|
||||
@ -10714,7 +10714,7 @@
|
||||
if (!this.file || this.isClone) {
|
||||
return;
|
||||
}
|
||||
return this.file.text.innerHTML = FileInfo.funk(FileInfo, this);
|
||||
return this.file.text.innerHTML = "<span class=file-info>" + (FileInfo.funk(FileInfo, this)) + "</span>";
|
||||
},
|
||||
createFunc: function(format) {
|
||||
var code;
|
||||
@ -11286,7 +11286,7 @@
|
||||
Keybinds.hl(0, threadRoot);
|
||||
break;
|
||||
case Conf['Hide']:
|
||||
if (g.VIEW === 'index') {
|
||||
if (ThreadHiding.db) {
|
||||
ThreadHiding.toggle(thread);
|
||||
}
|
||||
break;
|
||||
@ -11399,7 +11399,7 @@
|
||||
}
|
||||
},
|
||||
hl: function(delta, thread) {
|
||||
var axe, height, next, postEl, replies, reply, root, _i, _len;
|
||||
var axis, height, next, postEl, replies, reply, root, _i, _len;
|
||||
|
||||
postEl = $('.reply.highlight', thread);
|
||||
if (!delta) {
|
||||
@ -11412,8 +11412,8 @@
|
||||
height = postEl.getBoundingClientRect().height;
|
||||
if (Header.getTopOf(postEl) >= -height && Header.getBottomOf(postEl) >= -height) {
|
||||
root = postEl.parentNode;
|
||||
axe = delta === +1 ? 'following' : 'preceding';
|
||||
if (!(next = $.x("" + axe + "-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root))) {
|
||||
axis = delta === +1 ? 'following' : 'preceding';
|
||||
if (!(next = $.x("" + axis + "-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root))) {
|
||||
return;
|
||||
}
|
||||
Header.scrollToIfNeeded(next, delta === +1);
|
||||
@ -11509,11 +11509,11 @@
|
||||
return $('.board');
|
||||
},
|
||||
scroll: function(delta) {
|
||||
var axe, next, thread, top;
|
||||
var axis, next, thread, top;
|
||||
|
||||
thread = Nav.getThread();
|
||||
axe = delta === +1 ? 'following' : 'preceding';
|
||||
if (next = $.x("" + axe + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) {
|
||||
axis = delta === +1 ? 'following' : 'preceding';
|
||||
if (next = $.x("" + axis + "-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread)) {
|
||||
top = Header.getTopOf(thread);
|
||||
if (delta === +1 && top < 5 || delta === -1 && top > -5) {
|
||||
thread = next;
|
||||
|
||||
@ -540,8 +540,8 @@ a.hide-announcement {
|
||||
}
|
||||
|
||||
/* File */
|
||||
.fileText:hover .fntrunc,
|
||||
.fileText:not(:hover) .fnfull,
|
||||
.file-info:hover .fntrunc,
|
||||
.file-info:not(:hover) .fnfull,
|
||||
.expanded-image > .post > .file > .fileThumb > img[data-md5],
|
||||
:not(.expanded-image) > .post > .file > .fileThumb > .full-image {
|
||||
display: none;
|
||||
|
||||
@ -124,7 +124,7 @@ Build =
|
||||
|
||||
if file?.isDeleted
|
||||
fileHTML = if isOP
|
||||
"<div class=file id=f#{postID}><div class=fileInfo></div><span class=fileThumb>" +
|
||||
"<div class=file id=f#{postID}><span class=fileThumb>" +
|
||||
"<img src='#{staticPath}filedeleted#{gifIcon}' alt='File deleted.' class=fileDeleted>" +
|
||||
"</span></div>"
|
||||
else
|
||||
|
||||
@ -8,7 +8,7 @@ FileInfo =
|
||||
cb: @node
|
||||
node: ->
|
||||
return if !@file or @isClone
|
||||
@file.text.innerHTML = FileInfo.funk FileInfo, @
|
||||
@file.text.innerHTML = "<span class=file-info>#{FileInfo.funk FileInfo, @}</span>"
|
||||
createFunc: (format) ->
|
||||
code = format.replace /%(.)/g, (s, c) ->
|
||||
if c of FileInfo.formatters
|
||||
@ -21,11 +21,10 @@ FileInfo =
|
||||
return "#{size.toFixed()} Bytes"
|
||||
i = 1 + ['KB', 'MB'].indexOf unit
|
||||
size /= 1024 while i--
|
||||
size =
|
||||
if unit is 'MB'
|
||||
Math.round(size * 100) / 100
|
||||
else
|
||||
size.toFixed()
|
||||
size = if unit is 'MB'
|
||||
Math.round(size * 100) / 100
|
||||
else
|
||||
size.toFixed()
|
||||
"#{size} #{unit}"
|
||||
escape: (name) ->
|
||||
name.replace /<|>/g, (c) ->
|
||||
|
||||
@ -126,7 +126,7 @@ Keybinds =
|
||||
when Conf['Deselect reply']
|
||||
Keybinds.hl 0, threadRoot
|
||||
when Conf['Hide']
|
||||
ThreadHiding.toggle thread if g.VIEW is 'index'
|
||||
ThreadHiding.toggle thread if ThreadHiding.db
|
||||
when Conf['Previous Post Quoting You']
|
||||
QuoteYou.cb.seek 'preceding'
|
||||
when Conf['Next Post Quoting You']
|
||||
@ -222,11 +222,11 @@ Keybinds =
|
||||
{height} = postEl.getBoundingClientRect()
|
||||
if Header.getTopOf(postEl) >= -height and Header.getBottomOf(postEl) >= -height # We're at least partially visible
|
||||
root = postEl.parentNode
|
||||
axe = if delta is +1
|
||||
axis = if delta is +1
|
||||
'following'
|
||||
else
|
||||
'preceding'
|
||||
return unless next = $.x "#{axe}-sibling::div[contains(@class,'replyContainer')][1]/child::div[contains(@class,'reply')]", root
|
||||
return unless next = $.x "#{axis}-sibling::div[contains(@class,'replyContainer') and not(@hidden) and not(child::div[@class='stub'])][1]/child::div[contains(@class,'reply')]", root
|
||||
Header.scrollToIfNeeded next, delta is +1
|
||||
@focus next
|
||||
$.rmClass postEl, 'highlight'
|
||||
|
||||
@ -48,11 +48,11 @@ Nav =
|
||||
|
||||
scroll: (delta) ->
|
||||
thread = Nav.getThread()
|
||||
axe = if delta is +1
|
||||
axis = if delta is +1
|
||||
'following'
|
||||
else
|
||||
'preceding'
|
||||
if next = $.x "#{axe}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread
|
||||
if next = $.x "#{axis}-sibling::div[contains(@class,'thread') and not(@hidden)][1]", thread
|
||||
# Unless we're not at the beginning of the current thread,
|
||||
# and thus wanting to move to beginning,
|
||||
# or we're above the first thread and don't want to skip it.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user