OP here. Nevermind I found out.

This commit is contained in:
Nicolas Stepien 2011-05-04 11:20:30 +02:00
parent 62763b2e0c
commit 741e52a047

View File

@ -60,7 +60,7 @@
(function() { (function() {
var $, $$, Favicon, NAMESPACE, Recaptcha, anonymize, config, d, expandComment, expandThread, g, imageHover, imgExpand, imgGif, imgPreloading, keybinds, localize, log, main, nav, nodeInserted, options, qr, quickReport, redirect, replyHiding, sauce, threadHiding, threading, titlePost, ui, unread, updater, watcher, _config, _ref; var $, $$, Favicon, NAMESPACE, Recaptcha, anonymize, config, d, expandComment, expandThread, g, imageHover, imgExpand, imgGif, imgPreloading, keybinds, localize, log, main, nav, nodeInserted, options, qr, quickReport, redirect, replyHiding, sauce, threadHiding, threading, titlePost, ui, unread, updater, watcher, _config, _ref;
var __slice = Array.prototype.slice; var __slice = Array.prototype.slice;
if (typeof console != "undefined" && console !== null) { if (typeof console !== "undefined" && console !== null) {
log = function(arg) { log = function(arg) {
return console.log(arg); return console.log(arg);
}; };
@ -384,7 +384,7 @@
} }
} }
}); });
if (typeof GM_deleteValue != "undefined" && GM_deleteValue !== null) { if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) {
$.extend($, { $.extend($, {
deleteValue: function(name) { deleteValue: function(name) {
return GM_deleteValue(name); return GM_deleteValue(name);
@ -1195,8 +1195,8 @@
in the global context. in the global context.
*/ */
return $.globalEval(function() { return $.globalEval(function() {
var data, _ref; var data, _ref3;
data = ((_ref = document.querySelector('table font b')) != null ? _ref.firstChild.textContent : void 0) || ''; data = ((_ref3 = document.querySelector('table font b')) != null ? _ref3.firstChild.textContent : void 0) || '';
return parent.postMessage(data, '*'); return parent.postMessage(data, '*');
}); });
} }
@ -1498,14 +1498,14 @@
_results = []; _results = [];
for (board in watched) { for (board in watched) {
_results.push((function() { _results.push((function() {
var _ref, _results; var _ref, _results2;
_ref = watched[board]; _ref = watched[board];
_results = []; _results2 = [];
for (id in _ref) { for (id in _ref) {
props = _ref[id]; props = _ref[id];
_results.push(watcher.addLink(props, $('#watcher'))); _results2.push(watcher.addLink(props, $('#watcher')));
} }
return _results; return _results2;
})()); })());
} }
return _results; return _results;
@ -1617,17 +1617,17 @@
span = _ref[_i]; span = _ref[_i];
suffix = $('a', span).href; suffix = $('a', span).href;
_results.push((function() { _results.push((function() {
var _len, _results; var _len2, _results2;
_results = []; _results2 = [];
for (i = 0, _len = prefixes.length; i < _len; i++) { for (i = 0, _len2 = prefixes.length; i < _len2; i++) {
prefix = prefixes[i]; prefix = prefixes[i];
link = $.el('a', { link = $.el('a', {
textContent: names[i], textContent: names[i],
href: prefix + suffix href: prefix + suffix
}); });
_results.push($.append(span, $.tn(' '), link)); _results2.push($.append(span, $.tn(' '), link));
} }
return _results; return _results2;
})()); })());
} }
return _results; return _results;
@ -1815,10 +1815,10 @@
}; };
Recaptcha = { Recaptcha = {
init: function() { init: function() {
var el, recaptcha, _i, _len, _ref; var el, recaptcha, _i, _len, _ref2;
_ref = $$('#recaptcha_table a'); _ref2 = $$('#recaptcha_table a');
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
el = _ref[_i]; el = _ref2[_i];
el.tabIndex = 1; el.tabIndex = 1;
} }
recaptcha = $('#recaptcha_response_field'); recaptcha = $('#recaptcha_response_field');
@ -1834,13 +1834,13 @@
} }
}; };
nodeInserted = function(e) { nodeInserted = function(e) {
var callback, dialog, target, _i, _len, _ref, _results; var callback, dialog, target, _i, _len, _ref2, _results;
target = e.target; target = e.target;
if (target.nodeName === 'TABLE') { if (target.nodeName === 'TABLE') {
_ref = g.callbacks; _ref2 = g.callbacks;
_results = []; _results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
callback = _ref[_i]; callback = _ref2[_i];
_results.push(callback(target)); _results.push(callback(target));
} }
return _results; return _results;
@ -1945,11 +1945,11 @@
}, },
cb: { cb: {
node: function(root) { node: function(root) {
var thumb, _i, _len, _ref, _results; var thumb, _i, _len, _ref2, _results;
_ref = $$('img[md5]', root); _ref2 = $$('img[md5]', root);
_results = []; _results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
thumb = _ref[_i]; thumb = _ref2[_i];
$.bind(thumb.parentNode, 'click', imgExpand.cb.toggle); $.bind(thumb.parentNode, 'click', imgExpand.cb.toggle);
_results.push(imgExpand.on ? imgExpand.toggle(thumb) : void 0); _results.push(imgExpand.on ? imgExpand.toggle(thumb) : void 0);
} }
@ -1984,12 +1984,12 @@
} }
}, },
typeChange: function(e) { typeChange: function(e) {
var img, _i, _len, _ref, _results; var img, _i, _len, _ref2, _results;
imgExpand.foo(); imgExpand.foo();
_ref = $$('img[md5] + img'); _ref2 = $$('img[md5] + img');
_results = []; _results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
img = _ref[_i]; img = _ref2[_i];
_results.push(imgExpand.resize(img)); _results.push(imgExpand.resize(img));
} }
return _results; return _results;
@ -2033,9 +2033,9 @@
return imgExpand.type = $('#imageType').value; return imgExpand.type = $('#imageType').value;
}, },
resize: function(img) { resize: function(img) {
var imgHeight, imgWidth, maxHeight, maxWidth, maxWidthOP, maxWidthReply, ratio, type, _, _ref; var imgHeight, imgWidth, maxHeight, maxWidth, maxWidthOP, maxWidthReply, ratio, type, _, _ref2;
maxWidthOP = imgExpand.maxWidthOP, maxWidthReply = imgExpand.maxWidthReply, maxHeight = imgExpand.maxHeight, type = imgExpand.type; maxWidthOP = imgExpand.maxWidthOP, maxWidthReply = imgExpand.maxWidthReply, maxHeight = imgExpand.maxHeight, type = imgExpand.type;
_ref = $.x("preceding::span[@class][1]/text()[2]", img).textContent.match(/(\d+)x(\d+)/), _ = _ref[0], imgWidth = _ref[1], imgHeight = _ref[2]; _ref2 = $.x("preceding::span[@class][1]/text()[2]", img).textContent.match(/(\d+)x(\d+)/), _ = _ref2[0], imgWidth = _ref2[1], imgHeight = _ref2[2];
imgWidth = Number(imgWidth); imgWidth = Number(imgWidth);
imgHeight = Number(imgHeight); imgHeight = Number(imgHeight);
if (img.parentNode.parentNode.nodeName === 'TD') { if (img.parentNode.parentNode.nodeName === 'TD') {
@ -2059,15 +2059,15 @@
} }
}, },
dialog: function() { dialog: function() {
var controls, delform, imageType, option, _i, _len, _ref; var controls, delform, imageType, option, _i, _len, _ref2;
controls = $.el('div', { controls = $.el('div', {
id: 'imgControls', id: 'imgControls',
innerHTML: "<select id=imageType name=imageType><option>full</option><option>fit width</option><option>fit screen</option></select> <label>Expand Images<input type=checkbox id=imageExpand></label>" innerHTML: "<select id=imageType name=imageType><option>full</option><option>fit width</option><option>fit screen</option></select> <label>Expand Images<input type=checkbox id=imageExpand></label>"
}); });
imageType = $.getValue('imageType', 'full'); imageType = $.getValue('imageType', 'full');
_ref = $$('option', controls); _ref2 = $$('option', controls);
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
option = _ref[_i]; option = _ref2[_i];
if (option.textContent === imageType) { if (option.textContent === imageType) {
option.selected = true; option.selected = true;
break; break;
@ -2088,7 +2088,7 @@
}; };
main = { main = {
init: function() { init: function() {
var DAY, callback, cutoff, hiddenThreads, id, lastChecked, now, pathname, temp, timestamp, tzOffset, _i, _len, _ref, _ref2; var DAY, callback, cutoff, hiddenThreads, id, lastChecked, now, pathname, temp, timestamp, tzOffset, _i, _len, _ref2, _ref3;
pathname = location.pathname.substring(1).split('/'); pathname = location.pathname.substring(1).split('/');
g.BOARD = pathname[0], temp = pathname[1]; g.BOARD = pathname[0], temp = pathname[1];
if (temp === 'res') { if (temp === 'res') {
@ -2127,9 +2127,9 @@
delete hiddenThreads[id]; delete hiddenThreads[id];
} }
} }
_ref = g.hiddenReplies; _ref2 = g.hiddenReplies;
for (id in _ref) { for (id in _ref2) {
timestamp = _ref[id]; timestamp = _ref2[id];
if (timestamp < cutoff) { if (timestamp < cutoff) {
delete g.hiddenReplies[id]; delete g.hiddenReplies[id];
} }
@ -2211,9 +2211,9 @@
expandComment.init(); expandComment.init();
} }
} }
_ref2 = g.callbacks; _ref3 = g.callbacks;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) { for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
callback = _ref2[_i]; callback = _ref3[_i];
callback(); callback();
} }
$.bind(d.body, 'DOMNodeInserted', nodeInserted); $.bind(d.body, 'DOMNodeInserted', nodeInserted);