Main.node
This commit is contained in:
parent
2f2104a672
commit
2e2850b880
@ -61,7 +61,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, QR, SECOND, Time, anonymize, conf, config, d, expandComment, expandThread, filter, firstRun, flatten, g, getTitle, imgExpand, imgGif, imgHover, imgPreloading, key, keybinds, log, nav, nodeInserted, options, pathname, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, temp, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
|
var $, $$, DAY, Favicon, HOUR, MINUTE, Main, NAMESPACE, QR, SECOND, Time, anonymize, conf, config, d, expandComment, expandThread, filter, firstRun, flatten, g, getTitle, imgExpand, imgGif, imgHover, imgPreloading, key, keybinds, log, nav, options, pathname, quoteBacklink, quoteInline, quoteOP, quotePreview, redirect, replyHiding, reportButton, revealSpoilers, sauce, temp, threadHiding, threadStats, threading, titlePost, ui, unread, updater, val, watcher;
|
||||||
var __slice = Array.prototype.slice;
|
var __slice = Array.prototype.slice;
|
||||||
config = {
|
config = {
|
||||||
main: {
|
main: {
|
||||||
@ -2746,15 +2746,6 @@
|
|||||||
}
|
}
|
||||||
return location.href = url;
|
return location.href = url;
|
||||||
};
|
};
|
||||||
nodeInserted = function(e) {
|
|
||||||
var target;
|
|
||||||
target = e.target;
|
|
||||||
if (target.nodeName === 'TABLE') {
|
|
||||||
return g.callbacks.forEach(function(callback) {
|
|
||||||
return callback(target);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
imgHover = {
|
imgHover = {
|
||||||
init: function() {
|
init: function() {
|
||||||
return g.callbacks.push(function(root) {
|
return g.callbacks.push(function(root) {
|
||||||
@ -3106,7 +3097,7 @@
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$.bind($('form[name=delform]'), 'DOMNodeInserted', nodeInserted);
|
$.bind($('form[name=delform]'), 'DOMNodeInserted', Main.node);
|
||||||
options.init();
|
options.init();
|
||||||
if (!$.get('firstrun')) {
|
if (!$.get('firstrun')) {
|
||||||
return firstRun.init();
|
return firstRun.init();
|
||||||
@ -3119,6 +3110,24 @@
|
|||||||
return QR.receive(data);
|
return QR.receive(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
node: function(e) {
|
||||||
|
var callback, target, _i, _len, _ref, _results;
|
||||||
|
target = e.target;
|
||||||
|
if (target.nodeName !== 'TABLE') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_ref = g.callbacks;
|
||||||
|
_results = [];
|
||||||
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
|
callback = _ref[_i];
|
||||||
|
try {
|
||||||
|
nodes.forEach(callback);
|
||||||
|
} catch (e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _results;
|
||||||
|
},
|
||||||
css: '\
|
css: '\
|
||||||
/* dialog styling */\
|
/* dialog styling */\
|
||||||
div.dialog {\
|
div.dialog {\
|
||||||
|
|||||||
@ -2024,11 +2024,6 @@ redirect = ->
|
|||||||
url = "http://boards.4chan.org/#{g.BOARD}"
|
url = "http://boards.4chan.org/#{g.BOARD}"
|
||||||
location.href = url
|
location.href = url
|
||||||
|
|
||||||
nodeInserted = (e) ->
|
|
||||||
{target} = e
|
|
||||||
if target.nodeName is 'TABLE'
|
|
||||||
g.callbacks.forEach (callback) -> callback target
|
|
||||||
|
|
||||||
imgHover =
|
imgHover =
|
||||||
init: ->
|
init: ->
|
||||||
g.callbacks.push (root) ->
|
g.callbacks.push (root) ->
|
||||||
@ -2368,7 +2363,7 @@ Main =
|
|||||||
catch e
|
catch e
|
||||||
alert e
|
alert e
|
||||||
continue
|
continue
|
||||||
$.bind $('form[name=delform]'), 'DOMNodeInserted', nodeInserted
|
$.bind $('form[name=delform]'), 'DOMNodeInserted', Main.node
|
||||||
options.init()
|
options.init()
|
||||||
|
|
||||||
unless $.get 'firstrun'
|
unless $.get 'firstrun'
|
||||||
@ -2379,6 +2374,15 @@ Main =
|
|||||||
if origin is 'http://sys.4chan.org'
|
if origin is 'http://sys.4chan.org'
|
||||||
QR.receive data
|
QR.receive data
|
||||||
|
|
||||||
|
node: (e) ->
|
||||||
|
{target} = e
|
||||||
|
return unless target.nodeName is 'TABLE'
|
||||||
|
for callback in g.callbacks
|
||||||
|
try
|
||||||
|
nodes.forEach callback
|
||||||
|
catch e
|
||||||
|
continue
|
||||||
|
|
||||||
css: '
|
css: '
|
||||||
/* dialog styling */
|
/* dialog styling */
|
||||||
div.dialog {
|
div.dialog {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user