tn -> $.tn
This commit is contained in:
parent
be2d61dd8c
commit
bcb5b64d9b
18
4chan_x.js
18
4chan_x.js
@ -56,7 +56,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, DAY, a, arr, as, autoWatch, callback, changeCheckbox, changeValue, clearHidden, closeQR, config, cooldown, cutoff, d, delform, down, editSauce, el, expand, expandComment, expandThread, g, getConfig, getThread, hideReply, hideThread, href, html, i, id, imageClick, imageExpand, imageExpandClick, imageHover, imageResize, imageThumb, imageToggle, imageType, imageTypeChange, img, inAfter, input, inputs, keyModeInsert, keyModeNormal, keydown, keypress, l1, lastChecked, log, mv, navbotr, navtopr, nodeInserted, now, omitted, onloadComment, onloadThread, option, options, parseResponse, pathname, qr, recaptcha, recaptchaListener, recaptchaReload, redirect, replyNav, report, request, scroll, scrollThread, showReply, showThread, slice, span, src, start, stopPropagation, temp, text, textContent, threadF, threads, tn, tzOffset, ui, up, updateAuto, updateCallback, updateFavicon, updateInterval, updateNow, updateTime, updateTitle, updateVerbose, updaterMake, watch, watchX, watcher, watcherUpdate, x, zeroPad, _i, _j, _k, _l, _len, _len2, _len3, _len4, _len5, _len6, _len7, _m, _n, _ref, _ref2, _ref3, _ref4;
|
var $, $$, DAY, a, arr, as, autoWatch, callback, changeCheckbox, changeValue, clearHidden, closeQR, config, cooldown, cutoff, d, delform, down, editSauce, el, expand, expandComment, expandThread, g, getConfig, getThread, hideReply, hideThread, href, html, i, id, imageClick, imageExpand, imageExpandClick, imageHover, imageResize, imageThumb, imageToggle, imageType, imageTypeChange, img, inAfter, input, inputs, keyModeInsert, keyModeNormal, keydown, keypress, l1, lastChecked, log, mv, navbotr, navtopr, nodeInserted, now, omitted, onloadComment, onloadThread, option, options, parseResponse, pathname, qr, recaptcha, recaptchaListener, recaptchaReload, redirect, replyNav, report, request, scroll, scrollThread, showReply, showThread, slice, span, src, start, stopPropagation, temp, text, textContent, threadF, threads, tzOffset, ui, up, updateAuto, updateCallback, updateFavicon, updateInterval, updateNow, updateTime, updateTitle, updateVerbose, updaterMake, watch, watchX, watcher, watcherUpdate, x, zeroPad, _i, _j, _k, _l, _len, _len2, _len3, _len4, _len5, _len6, _len7, _m, _n, _ref, _ref2, _ref3, _ref4;
|
||||||
var __slice = Array.prototype.slice;
|
var __slice = Array.prototype.slice;
|
||||||
if (typeof console != "undefined" && console !== null) {
|
if (typeof console != "undefined" && console !== null) {
|
||||||
log = console.log;
|
log = console.log;
|
||||||
@ -242,6 +242,9 @@
|
|||||||
return object;
|
return object;
|
||||||
};
|
};
|
||||||
$.extend($, {
|
$.extend($, {
|
||||||
|
tn: function(s) {
|
||||||
|
return d.createTextNode(s);
|
||||||
|
},
|
||||||
replace: function(root, el) {
|
replace: function(root, el) {
|
||||||
return root.parentNode.replaceChild(el, root);
|
return root.parentNode.replaceChild(el, root);
|
||||||
},
|
},
|
||||||
@ -365,9 +368,6 @@
|
|||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
};
|
};
|
||||||
tn = function(s) {
|
|
||||||
return d.createTextNode(s);
|
|
||||||
};
|
|
||||||
x = function(path, root) {
|
x = function(path, root) {
|
||||||
if (root == null) {
|
if (root == null) {
|
||||||
root = d.body;
|
root = d.body;
|
||||||
@ -1516,7 +1516,7 @@
|
|||||||
textContent: thread.text,
|
textContent: thread.text,
|
||||||
href: "/" + board + "/res/" + thread.id
|
href: "/" + board + "/res/" + thread.id
|
||||||
});
|
});
|
||||||
mv(a, tn(' '), link, $.el('br'), div);
|
mv(a, $.tn(' '), link, $.el('br'), div);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
old = $('#watcher div:last-child');
|
old = $('#watcher div:last-child');
|
||||||
@ -1806,7 +1806,7 @@
|
|||||||
textContent: names[i],
|
textContent: names[i],
|
||||||
href: prefixes[i] + suffix
|
href: prefixes[i] + suffix
|
||||||
});
|
});
|
||||||
mv(tn(' '), link, span);
|
mv($.tn(' '), link, span);
|
||||||
_results.push(i++);
|
_results.push(i++);
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
@ -1860,7 +1860,7 @@
|
|||||||
});
|
});
|
||||||
$.bind(a, 'click', report);
|
$.bind(a, 'click', report);
|
||||||
inAfter(el, a);
|
inAfter(el, a);
|
||||||
_results.push(inAfter(el, tn(' ')));
|
_results.push(inAfter(el, $.tn(' ')));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
});
|
});
|
||||||
@ -1931,7 +1931,7 @@
|
|||||||
className: 'pointer'
|
className: 'pointer'
|
||||||
});
|
});
|
||||||
$.bind(down, 'click', replyNav);
|
$.bind(down, 'click', replyNav);
|
||||||
mv(tn(' '), up, tn(' '), down, span);
|
mv($.tn(' '), up, $.tn(' '), down, span);
|
||||||
_results.push(inAfter(el, span));
|
_results.push(inAfter(el, span));
|
||||||
}
|
}
|
||||||
return _results;
|
return _results;
|
||||||
@ -2030,7 +2030,7 @@
|
|||||||
textContent: textContent,
|
textContent: textContent,
|
||||||
href: href
|
href: href
|
||||||
});
|
});
|
||||||
mv(up, tn(' '), down, span);
|
mv(up, $.tn(' '), down, span);
|
||||||
$.before(el, span);
|
$.before(el, span);
|
||||||
}
|
}
|
||||||
if (location.hash === '#p0') {
|
if (location.hash === '#p0') {
|
||||||
|
|||||||
@ -145,6 +145,8 @@ $.extend = (object, properties) ->
|
|||||||
object
|
object
|
||||||
|
|
||||||
$.extend $,
|
$.extend $,
|
||||||
|
tn: (s) ->
|
||||||
|
d.createTextNode s
|
||||||
replace: (root, el) ->
|
replace: (root, el) ->
|
||||||
root.parentNode.replaceChild el, root
|
root.parentNode.replaceChild el, root
|
||||||
hide: (el) ->
|
hide: (el) ->
|
||||||
@ -239,8 +241,6 @@ slice = (arr, id) ->
|
|||||||
arr.splice i, 1
|
arr.splice i, 1
|
||||||
return arr
|
return arr
|
||||||
i++
|
i++
|
||||||
tn = (s) ->
|
|
||||||
d.createTextNode s
|
|
||||||
x = (path, root=d.body) ->
|
x = (path, root=d.body) ->
|
||||||
d.evaluate(path, root, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).
|
d.evaluate(path, root, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).
|
||||||
singleNodeValue
|
singleNodeValue
|
||||||
@ -1154,7 +1154,7 @@ watcherUpdate = ->
|
|||||||
link = $.el 'a',
|
link = $.el 'a',
|
||||||
textContent: thread.text
|
textContent: thread.text
|
||||||
href: "/#{board}/res/#{thread.id}"
|
href: "/#{board}/res/#{thread.id}"
|
||||||
mv a, tn(' '), link, $.el('br'), div
|
mv a, $.tn(' '), link, $.el('br'), div
|
||||||
old = $('#watcher div:last-child')
|
old = $('#watcher div:last-child')
|
||||||
$.replace(old, div)
|
$.replace(old, div)
|
||||||
|
|
||||||
@ -1409,7 +1409,7 @@ if getConfig 'Sauce'
|
|||||||
link = $.el 'a',
|
link = $.el 'a',
|
||||||
textContent: names[i]
|
textContent: names[i]
|
||||||
href: prefixes[i] + suffix
|
href: prefixes[i] + suffix
|
||||||
mv tn(' '), link, span
|
mv $.tn(' '), link, span
|
||||||
i++
|
i++
|
||||||
|
|
||||||
if getConfig 'Reply Hiding'
|
if getConfig 'Reply Hiding'
|
||||||
@ -1440,7 +1440,7 @@ if getConfig 'Quick Report'
|
|||||||
className: 'pointer'
|
className: 'pointer'
|
||||||
$.bind a, 'click', report
|
$.bind a, 'click', report
|
||||||
inAfter el, a
|
inAfter el, a
|
||||||
inAfter el, tn(' ')
|
inAfter el, $.tn(' ')
|
||||||
|
|
||||||
if getConfig 'Thread Watcher'
|
if getConfig 'Thread Watcher'
|
||||||
#create watcher
|
#create watcher
|
||||||
@ -1492,7 +1492,7 @@ if getConfig 'Reply Navigation'
|
|||||||
textContent: '▼'
|
textContent: '▼'
|
||||||
className: 'pointer'
|
className: 'pointer'
|
||||||
$.bind down, 'click', replyNav
|
$.bind down, 'click', replyNav
|
||||||
mv tn(' '), up, tn(' '), down, span
|
mv $.tn(' '), up, $.tn(' '), down, span
|
||||||
inAfter el, span
|
inAfter el, span
|
||||||
|
|
||||||
if getConfig 'Keybinds'
|
if getConfig 'Keybinds'
|
||||||
@ -1566,7 +1566,7 @@ else #not reply
|
|||||||
className: 'pointer'
|
className: 'pointer'
|
||||||
textContent: textContent
|
textContent: textContent
|
||||||
href: href
|
href: href
|
||||||
mv up, tn(' '), down, span
|
mv up, $.tn(' '), down, span
|
||||||
$.before el, span
|
$.before el, span
|
||||||
if location.hash is '#p0'
|
if location.hash is '#p0'
|
||||||
window.location = window.location
|
window.location = window.location
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user