Merge branch 'master' of git://github.com/MayhemYDG/4chan-x into filesize
This commit is contained in:
commit
56dd919b0b
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan x
|
||||
// @version 2.26.4
|
||||
// @version 2.27.0
|
||||
// @namespace aeosynth
|
||||
// @description Adds various features.
|
||||
// @copyright 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||
@ -20,7 +20,7 @@
|
||||
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||
* Copyright (c) 2012 Nicolas Stepien <stepien.nicolas@gmail.com>
|
||||
* http://mayhemydg.github.com/4chan-x/
|
||||
* 4chan X 2.26.4
|
||||
* 4chan X 2.27.0
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
@ -209,7 +209,7 @@
|
||||
|
||||
NAMESPACE = '4chan_x.';
|
||||
|
||||
VERSION = '2.26.4';
|
||||
VERSION = '2.27.0';
|
||||
|
||||
SECOND = 1000;
|
||||
|
||||
@ -634,9 +634,20 @@
|
||||
return sub.textContent;
|
||||
},
|
||||
comment: function(root) {
|
||||
return ($.el('a', {
|
||||
innerHTML: root.lastChild.innerHTML.replace(/<br>/g, '\n')
|
||||
})).textContent;
|
||||
var i, len, node, nodes, text;
|
||||
text = [];
|
||||
nodes = d.evaluate('.//node()', root.lastChild, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
|
||||
i = 0;
|
||||
len = nodes.snapshotLength;
|
||||
while (i < len) {
|
||||
node = nodes.snapshotItem(i++);
|
||||
if (node instanceof Text) {
|
||||
text.push(node.data);
|
||||
} else if (node instanceof HTMLBRElement) {
|
||||
text.push('\n');
|
||||
}
|
||||
}
|
||||
return text.join('');
|
||||
},
|
||||
filename: function(root) {
|
||||
var file;
|
||||
|
||||
2
Cakefile
2
Cakefile
@ -2,7 +2,7 @@
|
||||
{exec} = require 'child_process'
|
||||
fs = require 'fs'
|
||||
|
||||
VERSION = '2.26.4'
|
||||
VERSION = '2.27.0'
|
||||
|
||||
HEADER = """
|
||||
// ==UserScript==
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
master
|
||||
|
||||
2.27.0
|
||||
- aeosynth / ahodesuka
|
||||
new option: expand images from current position
|
||||
- ahodesuka
|
||||
|
||||
@ -1 +1 @@
|
||||
postMessage({version:'2.26.4'},'*');
|
||||
postMessage({version:'2.27.0'},'*');
|
||||
|
||||
@ -156,7 +156,7 @@ conf = {}
|
||||
) null, config
|
||||
|
||||
NAMESPACE = '4chan_x.'
|
||||
VERSION = '2.26.4'
|
||||
VERSION = '2.27.0'
|
||||
SECOND = 1000
|
||||
MINUTE = 60*SECOND
|
||||
HOUR = 60*MINUTE
|
||||
@ -546,7 +546,17 @@ filter =
|
||||
sub = if isOP then $ '.filetitle', root else $ '.replytitle', root
|
||||
sub.textContent
|
||||
comment: (root) ->
|
||||
($.el 'a', innerHTML: root.lastChild.innerHTML.replace /<br>/g, '\n').textContent
|
||||
text = []
|
||||
nodes = d.evaluate './/node()', root.lastChild, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null
|
||||
i = 0
|
||||
len = nodes.snapshotLength
|
||||
while i < len
|
||||
node = nodes.snapshotItem i++
|
||||
if node instanceof Text
|
||||
text.push node.data
|
||||
else if node instanceof HTMLBRElement
|
||||
text.push '\n'
|
||||
text.join ''
|
||||
filename: (root) ->
|
||||
if file = $ '.filesize > span', root
|
||||
return file.title
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user