This commit is contained in:
Zixaphir 2013-04-09 19:22:29 -07:00
parent bf27740fa4
commit 386e0c617d
4 changed files with 18 additions and 24 deletions

View File

@ -3817,16 +3817,14 @@
return $.on(d, 'click scroll blur resize', Rice.cleanup); return $.on(d, 'click scroll blur resize', Rice.cleanup);
}, },
cleanup: function() { cleanup: function() {
var child, _i, _len, _ref, _results; var child, _i, _len, _ref;
$.off(d, 'click scroll blur resize', Rice.cleanup); $.off(d, 'click scroll blur resize', Rice.cleanup);
_ref = __slice.call(Rice.ul.children); _ref = __slice.call(Rice.ul.children);
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
child = _ref[_i]; child = _ref[_i];
_results.push($.rm(child)); $.rm(child);
} }
return _results;
}, },
nodes: function(source) { nodes: function(source) {
var checkboxes, checkrice, input, selectrice, selects, _i, _j, _len, _len1; var checkboxes, checkrice, input, selectrice, selects, _i, _j, _len, _len1;
@ -9507,7 +9505,7 @@
return post.nodes.comment = post.nodes.shortComment; return post.nodes.comment = post.nodes.shortComment;
}, },
parse: function(req, a, post) { parse: function(req, a, post) {
var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results; var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1;
status = req.status; status = req.status;
if (![200, 304].contains(status)) { if (![200, 304].contains(status)) {
@ -9546,12 +9544,10 @@
post.parseComment(); post.parseComment();
post.parseQuotes(); post.parseQuotes();
_ref1 = ExpandComment.callbacks; _ref1 = ExpandComment.callbacks;
_results = [];
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) { for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
callback = _ref1[_k]; callback = _ref1[_k];
_results.push(callback.call(post)); callback.call(post);
} }
return _results;
} }
}; };
@ -10556,7 +10552,7 @@
regString: /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]+|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-z]{3,}:[a-z0-9?]|[a-z0-9._%+-:]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi, regString: /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]+|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-z]{3,}:[a-z0-9?]|[a-z0-9._%+-:]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi,
cypher: $.el('div'), cypher: $.el('div'),
node: function() { node: function() {
var a, child, cypher, cypherText, data, embedder, i, index, len, link, links, lookahead, name, next, node, nodes, snapshot, spoiler, text, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _results; var a, child, cypher, cypherText, data, embedder, i, index, len, link, links, lookahead, name, next, node, nodes, snapshot, spoiler, text, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2;
if (this.isClone && Conf['Embedding']) { if (this.isClone && Conf['Embedding']) {
_ref = $$('.embedder', this.nodes.comment); _ref = $$('.embedder', this.nodes.comment);
@ -10570,7 +10566,6 @@
cypher = Linkify.cypher; cypher = Linkify.cypher;
i = -1; i = -1;
len = snapshot.snapshotLength; len = snapshot.snapshotLength;
_results = [];
while (++i < len) { while (++i < len) {
nodes = $.frag(); nodes = $.frag();
node = snapshot.snapshotItem(i); node = snapshot.snapshotItem(i);
@ -10631,9 +10626,8 @@
$.add(nodes, child); $.add(nodes, child);
} }
} }
_results.push($.replace(node, nodes)); $.replace(node, nodes);
} }
return _results;
}, },
toggle: function() { toggle: function() {
var el, embed, style, type, url; var el, embed, style, type, url;
@ -12682,26 +12676,22 @@
g.TYPE = 'nsfw'; g.TYPE = 'nsfw';
} }
$.get("userThemes", {}, function(item) { $.get("userThemes", {}, function(item) {
var name, theme, _ref, _results; var name, theme, _ref;
_ref = item["userThemes"]; _ref = item["userThemes"];
_results = [];
for (name in _ref) { for (name in _ref) {
theme = _ref[name]; theme = _ref[name];
_results.push(Themes[name] = theme); Themes[name] = theme;
} }
return _results;
}); });
$.get("userMascots", {}, function(item) { $.get("userMascots", {}, function(item) {
var mascot, name, _ref, _results; var mascot, name, _ref;
_ref = item["userMasctos"]; _ref = item["userMasctos"];
_results = [];
for (name in _ref) { for (name in _ref) {
mascot = _ref[name]; mascot = _ref[name];
_results.push(Mascots[name] = mascot); Mascots[name] = mascot;
} }
return _results;
}); });
if (Conf["NSFW/SFW Mascots"]) { if (Conf["NSFW/SFW Mascots"]) {
g.MASCOTSTRING = "Enabled Mascots " + g.TYPE; g.MASCOTSTRING = "Enabled Mascots " + g.TYPE;
@ -12715,14 +12705,12 @@
'Deleted Mascots': [] 'Deleted Mascots': []
}; };
$.get(items, function(items) { $.get(items, function(items) {
var key, val, _results; var key, val;
_results = [];
for (key in items) { for (key in items) {
val = items[key]; val = items[key];
_results.push(Conf[key] = val); Conf[key] = val;
} }
return _results;
}); });
switch (location.hostname) { switch (location.hostname) {
case 'sys.4chan.org': case 'sys.4chan.org':

View File

@ -579,6 +579,7 @@ Rice =
$.off d, 'click scroll blur resize', Rice.cleanup $.off d, 'click scroll blur resize', Rice.cleanup
for child in [Rice.ul.children...] for child in [Rice.ul.children...]
$.rm child $.rm child
return
nodes: (source) -> nodes: (source) ->
source or= d.body source or= d.body

View File

@ -3019,6 +3019,7 @@ ExpandComment =
for callback in ExpandComment.callbacks for callback in ExpandComment.callbacks
callback.call post callback.call post
return
ExpandThread = ExpandThread =
init: -> init: ->
@ -3906,6 +3907,7 @@ Linkify =
$.add nodes, child $.add nodes, child
$.replace node, nodes $.replace node, nodes
return
toggle: -> toggle: ->
# We setup the link to be replaced by the embedded video # We setup the link to be replaced by the embedded video

View File

@ -331,10 +331,12 @@ Main =
$.get "userThemes", {}, (item) -> $.get "userThemes", {}, (item) ->
for name, theme of item["userThemes"] for name, theme of item["userThemes"]
Themes[name] = theme Themes[name] = theme
return
$.get "userMascots", {}, (item) -> $.get "userMascots", {}, (item) ->
for name, mascot of item["userMasctos"] for name, mascot of item["userMasctos"]
Mascots[name] = mascot Mascots[name] = mascot
return
if Conf["NSFW/SFW Mascots"] if Conf["NSFW/SFW Mascots"]
g.MASCOTSTRING = "Enabled Mascots #{g.TYPE}" g.MASCOTSTRING = "Enabled Mascots #{g.TYPE}"
@ -350,6 +352,7 @@ Main =
$.get items, (items) -> $.get items, (items) ->
for key, val of items for key, val of items
Conf[key] = val Conf[key] = val
return
switch location.hostname switch location.hostname
when 'sys.4chan.org' when 'sys.4chan.org'