From def4727bb3de1652ddbf72e26fbabda43fb8944b Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Sun, 11 Aug 2013 23:30:38 -0700 Subject: [PATCH 01/72] Redo error message Close #134 --- LICENSE | 2 +- builds/4chan-X.js | 394 +--------------------------------- builds/4chan-X.user.js | 393 +-------------------------------- builds/crx/script.js | 390 +-------------------------------- src/Posting/QuickReply.coffee | 4 +- 5 files changed, 9 insertions(+), 1174 deletions(-) diff --git a/LICENSE b/LICENSE index dd8831faf..d2ae960d0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.25 - 2013-08-04 +* 4chan X - Version 1.2.25 - 2013-08-11 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.js b/builds/4chan-X.js index dd5c3e4fe..b5ea4362f 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.25 - 2013-08-04 +* 4chan X - Version 1.2.25 - 2013-08-11 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -340,7 +340,6 @@ Array.prototype.add = function(object, position) { var keep; - keep = this.slice(position); this.length = position; this.push(object); @@ -353,7 +352,6 @@ Array.prototype.indexOf = function(object) { var i; - i = this.length; while (i--) { if (this[i] === object) { @@ -365,7 +363,6 @@ Array.prototype.pushArrays = function() { var arg, args, _i, _len; - args = arguments; for (_i = 0, _len = args.length; _i < _len; _i++) { arg = args[_i]; @@ -376,7 +373,6 @@ Array.prototype.remove = function(object) { var index; - if ((index = this.indexOf(object)) > -1) { return this.splice(index, 1); } else { @@ -393,7 +389,6 @@ $.extend = function(object, properties) { var key, val; - for (key in properties) { val = properties[key]; if (!properties.hasOwnProperty(key)) { @@ -411,7 +406,6 @@ $.ready = function(fc) { var cb, _ref; - if ((_ref = d.readyState) === 'interactive' || _ref === 'complete') { $.queueTask(fc); return; @@ -425,7 +419,6 @@ $.formData = function(form) { var fd, key, val; - if (form instanceof HTMLFormElement) { return new FormData(form); } @@ -446,7 +439,6 @@ $.ajax = function(url, callbacks, opts) { var cred, err, form, headers, key, r, sync, type, upCallbacks, val; - if (opts == null) { opts = {}; } @@ -472,11 +464,9 @@ $.cache = (function() { var reqs; - reqs = {}; return function(url, cb) { var err, req, rm; - if (req = reqs[url]) { if (req.readyState === 4) { cb.call(req, req.evt); @@ -492,7 +482,6 @@ req = $.ajax(url, { onload: function(e) { var _i, _len, _ref; - _ref = this.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { cb = _ref[_i]; @@ -534,7 +523,6 @@ $.addStyle = function(css, id) { var style; - style = $.el('style', { id: id, textContent: css @@ -581,7 +569,6 @@ } else { return function(el) { var _ref; - return (_ref = el.parentNode) != null ? _ref.removeChild(el) : void 0; }; } @@ -589,7 +576,6 @@ $.rmAll = function(root) { var node; - while (node = root.firstChild) { root.removeChild(node); } @@ -605,7 +591,6 @@ $.nodes = function(nodes) { var frag, node, _i, _len; - if (!(nodes instanceof Array)) { return nodes; } @@ -639,7 +624,6 @@ $.el = function(tag, properties) { var el; - el = d.createElement(tag); if (properties) { $.extend(el, properties); @@ -649,7 +633,6 @@ $.on = function(el, events, handler) { var event, _i, _len, _ref; - _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -659,7 +642,6 @@ $.off = function(el, events, handler) { var event, _i, _len, _ref; - _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -683,7 +665,6 @@ $.debounce = function(wait, fn) { var args, exec, lastCall, that, timeout; - lastCall = 0; timeout = null; that = null; @@ -705,11 +686,9 @@ $.queueTask = (function() { var execTask, taskChannel, taskQueue; - taskQueue = []; execTask = function() { var args, func, task; - task = taskQueue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -732,7 +711,6 @@ $.globalEval = function(code) { var script; - script = $.el('script', { textContent: code }); @@ -742,7 +720,6 @@ $.bytesToString = function(size) { var unit; - unit = 0; while (size >= 1024) { size /= 1024; @@ -761,7 +738,6 @@ $.sync = (function() { window.addEventListener('storage', function(e) { var cb; - if (cb = $.syncing[e.key]) { return cb(JSON.parse(e.newValue)); } @@ -773,7 +749,6 @@ $.item = function(key, val) { var item; - item = {}; item[key] = val; return item; @@ -781,11 +756,9 @@ (function() { var scriptStorage; - scriptStorage = opera.scriptStorage; $["delete"] = function(keys) { var key, _i, _len; - if (!(keys instanceof Array)) { keys = [keys]; } @@ -798,7 +771,6 @@ }; $.get = function(key, val, cb) { var items; - if (typeof cb === 'function') { items = $.item(key, val); } else { @@ -816,7 +788,6 @@ }; $.set = (function() { var set; - set = function(key, val) { key = g.NAMESPACE + key; val = JSON.stringify(val); @@ -827,7 +798,6 @@ }; return function(keys, val) { var key; - if (typeof keys === 'string') { set(keys, val); return; @@ -896,7 +866,6 @@ function Post(root, thread, board, that) { var alt, anchor, capcode, date, email, file, fileInfo, flag, info, name, post, size, subject, thumb, tripcode, uniqueID, unit; - this.thread = thread; this.board = board; if (that == null) { @@ -995,7 +964,6 @@ Post.prototype.parseComment = function() { var bq, data, i, node, nodes, text, _i, _len, _ref; - bq = this.nodes.comment.cloneNode(true); _ref = $$('.abbr, .capcodeReplies, .exif, b', bq); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1013,7 +981,6 @@ Post.prototype.parseQuotes = function() { var hash, pathname, quotelink, quotes, _i, _len, _ref; - quotes = {}; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1043,7 +1010,6 @@ Post.prototype.kill = function(file, now) { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; - now || (now = new Date()); if (file) { if (this.file.isDead) { @@ -1092,7 +1058,6 @@ Post.prototype.resurrect = function() { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; - delete this.isDead; delete this.timeOfDeath; $.rmClass(this.nodes.root, 'deleted-post'); @@ -1126,7 +1091,6 @@ Post.prototype.rmClone = function(index) { var clone, _i, _len, _ref; - this.clones.splice(index, 1); _ref = this.clones.slice(index); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1144,7 +1108,6 @@ function Clone(origin, context) { var file, index, info, inline, inlined, key, nodes, post, root, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; - this.origin = origin; this.context = context; _ref = ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']; @@ -1233,7 +1196,6 @@ function DataBoard(key, sync) { var init, _this = this; - this.key = key; this.data = Conf[key]; $.sync(key, this.onSync.bind(this)); @@ -1250,7 +1212,6 @@ DataBoard.prototype["delete"] = function(_arg) { var boardID, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; if (postID) { delete this.data.boards[boardID][threadID][postID]; @@ -1271,7 +1232,6 @@ DataBoard.prototype.deleteIfEmpty = function(_arg) { var boardID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID; if (threadID) { if (!Object.keys(this.data.boards[boardID][threadID]).length) { @@ -1287,7 +1247,6 @@ DataBoard.prototype.set = function(_arg) { var boardID, postID, threadID, val, _base, _base1, _base2; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, val = _arg.val; if (postID !== void 0) { ((_base = ((_base1 = this.data.boards)[boardID] || (_base1[boardID] = {})))[threadID] || (_base[threadID] = {}))[postID] = val; @@ -1301,7 +1260,6 @@ DataBoard.prototype.get = function(_arg) { var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { if (!threadID) { @@ -1325,7 +1283,6 @@ DataBoard.prototype.clean = function() { var boardID, now, val, _ref; - _ref = this.data.boards; for (boardID in _ref) { val = _ref[boardID]; @@ -1345,10 +1302,8 @@ DataBoard.prototype.ajaxClean = function(boardID) { var _this = this; - return $.cache("//api.4chan.org/" + boardID + "/threads.json", function(e) { var board, page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; - if (e.target.status === 404) { _this["delete"](boardID); } else if (e.target.status === 200) { @@ -1459,7 +1414,6 @@ init: function() { var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, _this = this; - this.menu = new UI.Menu('header'); this.menuButton = $.el('span', { className: 'menu-button', @@ -1543,7 +1497,6 @@ } $.asap((function() { var _ref; - return $.id('boardNavMobile') || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Header.setBoardList); $.prepend(d.body, _this.bar); @@ -1552,7 +1505,6 @@ }); return $.ready(function() { var a, cs; - _this.footer = $.id('boardNavDesktopFoot'); if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) { a.className = 'current'; @@ -1586,7 +1538,6 @@ }), setBoardList: function() { var a, boardList, btn, fourchannav, fullBoardList; - fourchannav = $.id('boardNavDesktop'); if (a = $("a[href*='/" + g.BOARD + "/']", fourchannav)) { a.className = 'current'; @@ -1608,7 +1559,6 @@ }, generateBoardList: function(text) { var as, list, nodes; - list = $('#custom-board-list', Header.bar); $.rmAll(list); if (!text) { @@ -1617,7 +1567,6 @@ as = $$('#full-board-list a', Header.bar); nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+")|\,"[^"]+[^"]"))*|[^\w@]+/g).map(function(t) { var a, board, m, _i, _len; - if (/^[^\w@]/.test(t)) { return $.tn(t); } @@ -1664,7 +1613,6 @@ }, toggleBoardList: function() { var bar, custom, full, showBoardList; - bar = Header.bar; custom = $('#custom-board-list', bar); full = $('#full-board-list', bar); @@ -1700,7 +1648,6 @@ }, toggleLinkJustify: function() { var centered; - $.event('CloseMenu'); centered = this.nodeName === 'INPUT' ? this.checked : void 0; Header.setLinkJustify(centered); @@ -1730,7 +1677,6 @@ }, toggleBarVisibility: function(e) { var hide, message; - if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -1747,7 +1693,6 @@ }, toggleFooterVisibility: function() { var hide, message; - $.event('CloseMenu'); hide = this.nodeName === 'INPUT' ? this.checked : !!Header.footer.hidden; Header.setFooterVisibility(hide); @@ -1757,7 +1702,6 @@ }, setCustomNav: function(show) { var btn, cust, full, _ref; - Header.customNavToggler.checked = show; cust = $('#custom-board-list', Header.bar); full = $('#full-board-list', Header.bar); @@ -1770,14 +1714,12 @@ }, editCustomNav: function() { var settings; - Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=boardnav]', settings).focus(); }, hashScroll: function() { var hash, post; - if (!((hash = this.location.hash.slice(1)) && (post = $.id(hash)))) { return; } @@ -1788,7 +1730,6 @@ }, scrollToPost: function(post) { var headRect, top; - top = post.getBoundingClientRect().top; if (Conf['Fixed Header'] && !Conf['Bottom Header']) { headRect = Header.bar.getBoundingClientRect(); @@ -1798,7 +1739,6 @@ }, addShortcut: function(el) { var shortcut; - shortcut = $.el('span', { className: 'shortcut fourchanx-link' }); @@ -1810,7 +1750,6 @@ }, createNotification: function(e) { var cb, content, lifetime, notif, type, _ref; - _ref = e.detail, type = _ref.type, content = _ref.content, lifetime = _ref.lifetime, cb = _ref.cb; notif = new Notification(type, content, lifetime); if (cb) { @@ -1823,7 +1762,6 @@ spoilerRange: {}, shortFilename: function(filename, isReply) { var threshold; - threshold = isReply ? 30 : 40; if (filename.length - 4 > threshold) { return "" + filename.slice(0, threshold - 5) + "(...)." + filename.slice(-3); @@ -1833,7 +1771,6 @@ }, postFromObject: function(data, boardID) { var o; - o = { postID: data.no, threadID: data.resto || data.no, @@ -1877,7 +1814,6 @@ */ var a, boardID, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; - postID = o.postID, threadID = o.threadID, boardID = o.boardID, name = o.name, capcode = o.capcode, tripcode = o.tripcode, uniqueID = o.uniqueID, email = o.email, subject = o.subject, flagCode = o.flagCode, flagName = o.flagName, date = o.date, dateUTC = o.dateUTC, isSticky = o.isSticky, isClosed = o.isClosed, comment = o.comment, file = o.file; isOP = postID === threadID; staticPath = '//static.4chan.org/image/'; @@ -1973,7 +1909,6 @@ Get = { threadExcerpt: function(thread) { var OP, excerpt, _ref; - OP = thread.OP; excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); if (excerpt.length > 70) { @@ -1986,7 +1921,6 @@ }, postFromRoot: function(root) { var boardID, index, link, post, postID; - link = $('a[title="Highlight this post"]', root); boardID = link.pathname.split('/')[1]; postID = link.hash.slice(2); @@ -2006,7 +1940,6 @@ }, postDataFromLink: function(link) { var boardID, path, postID, threadID; - if (link.hostname === 'boards.4chan.org') { path = link.pathname.split('/'); boardID = path[1]; @@ -2025,7 +1958,6 @@ }, allQuotelinksLinkingTo: function(post) { var ID, quote, quotedPost, quotelinks, quoterPost, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; - quotelinks = []; _ref = g.posts; for (ID in _ref) { @@ -2054,14 +1986,12 @@ } return quotelinks.filter(function(quotelink) { var boardID, postID, _ref4; - _ref4 = Get.postDataFromLink(quotelink), boardID = _ref4.boardID, postID = _ref4.postID; return boardID === post.board.ID && postID === post.ID; }); }, postClone: function(boardID, threadID, postID, root, context) { var post, url; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2082,7 +2012,6 @@ }, insert: function(post, root, context) { var clone, nodes; - if (!root.parentNode) { return; } @@ -2096,7 +2025,6 @@ }, fetchedPost: function(req, boardID, threadID, postID, root, context) { var board, post, posts, status, thread, url, _i, _len; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2146,7 +2074,6 @@ }, archivedPost: function(req, boardID, postID, root, context) { var board, bq, comment, data, o, post, thread, threadID, _ref; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2240,10 +2167,8 @@ UI = (function() { var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove; - dialog = function(id, position, html) { var child, el, move, _i, _len, _ref; - el = $.el('div', { className: 'dialog', innerHTML: html, @@ -2283,7 +2208,6 @@ Menu.prototype.makeMenu = function() { var menu; - menu = $.el('div', { className: 'dialog', id: 'menu', @@ -2298,7 +2222,6 @@ Menu.prototype.toggle = function(e, button, data) { var previousButton; - e.preventDefault(); e.stopPropagation(); if (currentMenu) { @@ -2316,7 +2239,6 @@ Menu.prototype.open = function(button, data) { var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2; - menu = this.makeMenu(); currentMenu = menu; lastToggledButton = button; @@ -2355,7 +2277,6 @@ Menu.prototype.insertEntry = function(entry, parent, data) { var subEntry, submenu, _i, _len, _ref; - if (typeof entry.open === 'function') { if (!entry.open(data)) { return; @@ -2389,7 +2310,6 @@ Menu.prototype.findNextEntry = function(entry, direction) { var entries; - entries = __slice.call(entry.parentNode.children); entries.sort(function(first, second) { return +(first.style.order || first.style.webkitOrder) - +(second.style.order || second.style.webkitOrder); @@ -2399,7 +2319,6 @@ Menu.prototype.keybinds = function(e) { var entry, next, nextPrev, subEntry, submenu; - entry = $('.focused', currentMenu); while (subEntry = $('.focused', entry)) { entry = subEntry; @@ -2445,7 +2364,6 @@ Menu.prototype.focus = function(entry) { var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; - while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2473,7 +2391,6 @@ Menu.prototype.addEntry = function(e) { var entry; - entry = e.detail; if (entry.type !== this.type) { return; @@ -2484,7 +2401,6 @@ Menu.prototype.parseEntry = function(entry) { var el, style, subEntries, subEntry, _i, _len; - el = entry.el, subEntries = entry.subEntries; $.addClass(el, 'entry'); $.on(el, 'focus mouseover', (function(e) { @@ -2508,7 +2424,6 @@ })(); dragstart = function(e) { var el, isTouching, o, rect, screenHeight, screenWidth, _ref; - if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -2547,7 +2462,6 @@ }; touchmove = function(e) { var touch, _i, _len, _ref; - _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2559,7 +2473,6 @@ }; drag = function(e) { var bottom, clientX, clientY, left, right, style, top; - clientX = e.clientX, clientY = e.clientY; left = clientX - this.dx; left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%'; @@ -2575,7 +2488,6 @@ }; touchend = function(e) { var touch, _i, _len, _ref; - _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2597,7 +2509,6 @@ }; hoverstart = function(_arg) { var asapTest, cb, el, endEvents, latestEvent, o, root; - root = _arg.root, el = _arg.el, latestEvent = _arg.latestEvent, endEvents = _arg.endEvents, asapTest = _arg.asapTest, cb = _arg.cb; o = { root: root, @@ -2626,7 +2537,6 @@ }; hover = function(e) { var clientX, clientY, height, left, right, style, top, _ref; - this.latestEvent = e; height = this.el.offsetHeight; clientX = e.clientX, clientY = e.clientY; @@ -2669,7 +2579,6 @@ }, node: function() { var email, name, tripcode, _ref; - if (this.info.capcode || this.isClone) { return; } @@ -2696,7 +2605,6 @@ filters: {}, init: function() { var boards, err, filter, hl, key, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4; - if (g.VIEW === 'catalog' || !Conf['Filter']) { return; } @@ -2733,7 +2641,6 @@ op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'yes'; stub = (function() { var _ref3; - switch ((_ref3 = filter.match(/stub:(yes|no)/)) != null ? _ref3[1] : void 0) { case 'yes': return true; @@ -2764,7 +2671,6 @@ }, createFilter: function(regexp, op, stub, hl, top) { var settings, test; - test = typeof regexp === 'string' ? function(value) { return regexp === value; } : function(value) { @@ -2788,7 +2694,6 @@ }, node: function() { var filter, firstThread, key, result, thisThread, value, _i, _len, _ref; - if (this.isClone) { return; } @@ -2900,7 +2805,6 @@ menu: { init: function() { var div, entry, type, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { return; } @@ -2926,7 +2830,6 @@ }, createSubEntry: function(text, type) { var el; - el = $.el('a', { href: 'javascript:;', textContent: text @@ -2937,7 +2840,6 @@ el: el, open: function(post) { var value; - value = Filter[type](post); return value !== false; } @@ -2945,7 +2847,6 @@ }, makeFilter: function() { var re, type, value; - type = this.dataset.type; value = Filter[type](Filter.menu.post); re = ['uniqueID', 'MD5'].contains(type) ? value : value.replace(/\/|\\|\^|\$|\n|\.|\(|\)|\{|\}|\[|\]|\?|\*|\+|\|/g, function(c) { @@ -2960,7 +2861,6 @@ re = ['uniqueID', 'MD5'].contains(type) ? "/" + re + "/" : "/^" + re + "$/"; return $.get(type, Conf[type], function(item) { var save, section, select, ta, tl; - save = item[type]; save = save ? "" + save + "\n" + re : re; $.set(type, save); @@ -2994,7 +2894,6 @@ }, node: function() { var data; - if (!this.isReply || this.isClone) { return; } @@ -3018,7 +2917,6 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub, replies, thisPost; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { return; } @@ -3089,7 +2987,6 @@ order: 20, open: function(post) { var data; - if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3121,7 +3018,6 @@ order: 15, open: function(post) { var data; - if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3138,7 +3034,6 @@ }, hide: function() { var makeStub, parent, post, replies, thisPost; - parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3157,7 +3052,6 @@ }, show: function() { var data, parent, post, replies, thisPost; - parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3181,7 +3075,6 @@ }, hideStub: function() { var post; - post = PostHiding.menu.post; post.nodes.root.hidden = true; $.event('CloseMenu'); @@ -3189,7 +3082,6 @@ }, makeButton: function(post, type) { var a; - a = $.el('a', { className: "" + type + "-reply-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3200,7 +3092,6 @@ }, saveHiddenState: function(post, isHiding, thisPost, makeStub, hideRecursively) { var data; - data = { boardID: post.board.ID, threadID: post.thread.ID, @@ -3219,7 +3110,6 @@ }, toggle: function() { var post; - post = Get.postFromNode(this); if (post.isHidden) { PostHiding.show(post); @@ -3230,7 +3120,6 @@ }, hide: function(post, makeStub, hideRecursively) { var a, postInfo, quotelink, _i, _len, _ref; - if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3268,7 +3157,6 @@ }, show: function(post, showRecursively) { var quotelink, _i, _len, _ref; - if (showRecursively == null) { showRecursively = Conf['Recursive Hiding']; } @@ -3304,7 +3192,6 @@ }, node: function() { var i, obj, quote, recursive, _i, _j, _len, _len1, _ref, _ref1; - if (this.isClone) { return; } @@ -3322,7 +3209,6 @@ }, add: function() { var args, obj, post, recursive, _base, _name; - recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; obj = (_base = Recursive.recursives)[_name = post.fullID] || (_base[_name] = { recursives: [], @@ -3333,7 +3219,6 @@ }, rm: function(recursive, post) { var i, obj, rec, _i, _len, _ref; - if (!(obj = Recursive.recursives[post.fullID])) { return; } @@ -3348,7 +3233,6 @@ }, apply: function() { var ID, args, fullID, post, recursive, _ref; - recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; fullID = post.fullID; _ref = g.posts; @@ -3375,7 +3259,6 @@ }, node: function() { var data; - if (data = ThreadHiding.db.get({ boardID: this.board.ID, threadID: this.ID @@ -3389,7 +3272,6 @@ }, syncCatalog: function() { var hiddenThreads, hiddenThreadsOnCatalog, threadID; - hiddenThreads = ThreadHiding.db.get({ boardID: g.BOARD.ID, defaultValue: {} @@ -3416,7 +3298,6 @@ cleanCatalog: function(hiddenThreadsOnCatalog) { return $.cache("//api.4chan.org/" + g.BOARD + "/threads.json", function() { var page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; - if (this.status !== 200) { return; } @@ -3442,7 +3323,6 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub; - if (g.VIEW !== 'index' || !Conf['Menu'] || !Conf['Thread Hiding Link']) { return; } @@ -3469,7 +3349,6 @@ order: 20, open: function(_arg) { var isReply, thread; - thread = _arg.thread, isReply = _arg.isReply; if (isReply || thread.isHidden) { return false; @@ -3491,7 +3370,6 @@ order: 15, open: function(_arg) { var isReply, thread; - thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3502,7 +3380,6 @@ }, hide: function() { var makeStub, thread; - makeStub = $('input', this.parentNode).checked; thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, makeStub); @@ -3511,7 +3388,6 @@ }, hideStub: function() { var thread; - thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, false); $.event('CloseMenu'); @@ -3519,7 +3395,6 @@ }, makeButton: function(thread, type) { var a; - a = $.el('a', { className: "" + type + "-thread-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3531,7 +3406,6 @@ }, saveHiddenState: function(thread, makeStub) { var hiddenThreadsOnCatalog; - hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem("4chan-hide-t-" + g.BOARD)) || {}; if (thread.isHidden) { ThreadHiding.db.set({ @@ -3564,7 +3438,6 @@ }, hide: function(thread, makeStub) { var OP, a, numReplies, opInfo, span, threadRoot; - if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3595,7 +3468,6 @@ }, show: function(thread) { var threadRoot; - if (thread.stub) { $.rm(thread.stub); delete thread.stub; @@ -3608,7 +3480,6 @@ QuoteBacklink = { init: function() { var format; - if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { return; } @@ -3626,7 +3497,6 @@ }, firstNode: function() { var a, clone, container, containers, frag, link, post, quote, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - if (this.isClone || !this.quotes.length) { return; } @@ -3664,7 +3534,6 @@ }, secondNode: function() { var container; - if (this.isClone && (this.origin.isReply || Conf['OP Backlinks'])) { this.nodes.backlinkContainer = $('.container', this.nodes.info); return; @@ -3678,7 +3547,6 @@ }, getContainer: function(id) { var _base; - return (_base = this.containers)[id] || (_base[id] = $.el('span', { className: 'container' })); @@ -3701,7 +3569,6 @@ }, node: function() { var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; - if (this.isClone && this.thread === this.context.thread) { return; } @@ -3737,7 +3604,6 @@ if (Conf['Quote Hash Navigation']) { this.node = function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3750,7 +3616,6 @@ } else { this.node = function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3774,7 +3639,6 @@ }, toggle: function(e) { var boardID, context, postID, threadID, _ref; - if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) { return; } @@ -3800,7 +3664,6 @@ }, add: function(quotelink, boardID, threadID, postID, context) { var inline, isBacklink, post, qroot, root; - isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, @@ -3825,7 +3688,6 @@ }, rm: function(quotelink, boardID, threadID, postID, context) { var el, inlined, isBacklink, post, qroot, root, _ref; - isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); @@ -3867,7 +3729,6 @@ }, node: function() { var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; - if (this.isClone && this.thread === this.context.thread) { return; } @@ -3910,7 +3771,6 @@ }, node: function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3919,7 +3779,6 @@ }, mouseover: function(e) { var boardID, clone, origin, post, postID, posts, qp, quote, quoterID, root, threadID, workaround, _i, _j, _len, _len1, _ref, _ref1; - if ($.hasClass(this, 'inlined')) { return; } @@ -3975,7 +3834,6 @@ }, mouseout: function() { var clone, post, root, _i, _len, _ref; - if (!(root = this.el.firstElementChild)) { return; } @@ -4005,7 +3863,6 @@ }, node: function() { var boardID, postID, quotelink, _i, _len, _ref, _ref1, _ref2; - if (this.isClone) { return; } @@ -4028,7 +3885,6 @@ QuoteThreading = { init: function() { var input; - if (!(Conf['Quote Threading'] && g.VIEW === 'thread')) { return; } @@ -4051,7 +3907,6 @@ }, setup: function() { var ID, post, posts; - $.off(d, '4chanXInitFinished', QuoteThreading.setup); posts = g.posts; for (ID in posts) { @@ -4064,7 +3919,6 @@ }, node: function() { var ID, fullID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _len; - if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) { return; } @@ -4094,7 +3948,6 @@ }, nodeinsert: function() { var bottom, height, posts, qpost, qroot, threadContainer, top, _ref; - posts = g.posts; qpost = posts[this.threaded]; delete this.threaded; @@ -4124,14 +3977,12 @@ }, toggle: function() { var container, containers, node, nodes, replies, reply, thread, _i, _j, _len, _len1; - thread = $('.thread'); replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread); QuoteThreading.enabled = this.checked; if (this.checked) { nodes = (function() { var _i, _len, _results; - _results = []; for (_i = 0, _len = replies.length; _i < _len; _i++) { reply = replies[_i]; @@ -4146,7 +3997,6 @@ } else { replies.sort(function(a, b) { var aID, bID; - aID = Number(a.id.slice(2)); bID = Number(b.id.slice(2)); return aID - bID; @@ -4162,7 +4012,6 @@ }, kb: function() { var control; - control = $.id('threadingControl'); return control.click(); } @@ -4189,7 +4038,6 @@ }, node: function() { var quotelink, _i, _len, _ref; - if (this.isClone) { return; } @@ -4225,7 +4073,6 @@ }, node: function() { var deadlink, _i, _len, _ref; - _ref = $$('.deadlink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; @@ -4240,7 +4087,6 @@ }, parseDeadlink: function(deadlink) { var a, boardID, m, post, postID, quote, quoteID, redirect, _ref; - if (deadlink.parentNode.className === 'prettyprint') { $.replace(deadlink, __slice.call(deadlink.childNodes)); return; @@ -4320,7 +4166,6 @@ cypher: $.el('div'), node: function() { var a, child, cypher, cypherText, data, embed, embedder, embeds, i, index, len, link, links, lookahead, name, next, node, nodes, snapshot, spoiler, text, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2; - if (this.isClone && Conf['Embedding']) { _ref = $$('.embedder', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -4405,7 +4250,6 @@ }, toggle: function() { var el, embed, style, type, url; - embed = this.previousElementSibling; if (this.className.contains("embedded")) { el = $.el('a', { @@ -4499,7 +4343,6 @@ style: 'height: auto; width: 500px; display: inline-block;', el: function() { var div; - div = $.el('div', { className: "soundcloud", name: "soundcloud" @@ -4525,7 +4368,6 @@ regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/, el: function() { var div; - return div = $.el('iframe', { src: "http://pastebin.com/embed_iframe.php?i=" + this.name }); @@ -4535,7 +4377,6 @@ regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function() { var div; - return div = $.el('iframe', { src: "http://www.purplegene.com/script?url=https://gist.github.com/" + this.name + ".js" }); @@ -4546,7 +4387,6 @@ }, text: function() { var file, response; - response = JSON.parse(this.responseText).files; for (file in response) { if (response.hasOwnProperty(file)) { @@ -4567,14 +4407,12 @@ }, embedder: function(a) { var callbacks, embed, key, match, service, titles, type, _ref; - if (!Conf['Link Title']) { return [a]; } titles = {}; callbacks = function() { var title; - return a.textContent = (function() { switch (this.status) { case 200: @@ -4616,7 +4454,6 @@ if (Conf['Link Title'] && (service = type.title)) { $.get('CachedTitles', {}, function(item) { var err, title; - titles = item['CachedTitles']; if (title = titles[match[1]]) { a.textContent = title[0]; @@ -4640,7 +4477,6 @@ QR = { init: function() { var sc; - if (!Conf['Quick Reply']) { return; } @@ -4687,7 +4523,6 @@ }, initReady: function() { var link; - QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; @@ -4707,13 +4542,11 @@ $.before($.id('postForm'), link); $.on(d, 'QRGetSelectedPost', function(_arg) { var cb; - cb = _arg.detail; return cb(QR.selected); }); $.on(d, 'QRAddPreSubmitHook', function(_arg) { var cb; - cb = _arg.detail; return QR.preSubmitHooks.push(cb); }); @@ -4742,7 +4575,6 @@ }, open: function() { var err; - if (QR.nodes) { QR.nodes.el.hidden = false; QR.unhide(); @@ -4761,7 +4593,6 @@ }, close: function() { var i, _i, _len, _ref; - if (QR.req) { QR.abort(); return; @@ -4808,7 +4639,6 @@ }, error: function(err) { var el; - QR.open(); if (typeof err === 'string') { el = $.tn(err); @@ -4836,7 +4666,6 @@ notifications: [], cleanNotifications: function() { var notification, _i, _len, _ref; - _ref = QR.notifications; for (_i = 0, _len = _ref.length; _i < _len; _i++) { notification = _ref[_i]; @@ -4846,7 +4675,6 @@ }, status: function() { var disabled, status, value; - if (!QR.nodes) { return; } @@ -4867,7 +4695,6 @@ QR.persona.getPassword(); return $.get('QR.personas', Conf['QR.personas'], function(_arg) { var arr, item, personas, type, types, _i, _len, _ref; - personas = _arg['QR.personas']; types = { name: [], @@ -4887,7 +4714,6 @@ }, parseItem: function(item, types) { var boards, match, type, val, _ref, _ref1; - if (item[0] === '#') { return; } @@ -4916,7 +4742,6 @@ }, loadPersonas: function(type, arr) { var list, val, _i, _len; - list = $("#list-" + type, QR.nodes.el); for (_i = 0, _len = arr.length; _i < _len; _i++) { val = arr[_i]; @@ -4930,7 +4755,6 @@ }, getPassword: function() { var input, m; - if (!QR.persona.pwd) { QR.persona.pwd = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : (input = $.id('postPassword')) ? input.value : $.id('delPassword').value; } @@ -4939,7 +4763,6 @@ get: function(cb) { return $.get('QR.persona', {}, function(_arg) { var persona; - persona = _arg['QR.persona']; return cb(persona); }); @@ -4947,7 +4770,6 @@ set: function(post) { return $.get('QR.persona', {}, function(_arg) { var persona; - persona = _arg['QR.persona']; persona = { name: post.name, @@ -4961,7 +4783,6 @@ cooldown: { init: function() { var board; - if (!Conf['Cooldown']) { return; } @@ -5003,7 +4824,6 @@ }, sync: function(cooldowns) { var id; - for (id in cooldowns) { QR.cooldown.cooldowns[id] = cooldowns[id]; } @@ -5011,7 +4831,6 @@ }, set: function(data) { var cooldown, delay, hasFile, isReply, isSage, post, req, start, type, upSpd; - if (!Conf['Cooldown']) { return; } @@ -5051,7 +4870,6 @@ }, count: function() { var cooldown, cooldowns, elapsed, hasFile, isReply, isSage, now, post, seconds, start, type, types, upSpd, upSpdAccuracy, update, _ref; - if (!Object.keys(QR.cooldown.cooldowns).length) { $["delete"]("" + g.BOARD + ".cooldown"); delete QR.cooldown.isCounting; @@ -5105,7 +4923,6 @@ }, quote: function(e) { var OP, caretPos, com, index, post, range, s, sel, selectionRoot, text, thread, _ref; - if (e != null) { e.preventDefault(); } @@ -5145,7 +4962,6 @@ }, characterCount: function() { var count, counter; - counter = QR.nodes.charCount; count = QR.nodes.com.textLength; counter.textContent = count; @@ -5154,7 +4970,6 @@ }, drag: function(e) { var toggle; - toggle = e.type === 'dragstart' ? $.off : $.on; toggle(d, 'dragover', QR.dragOver); return toggle(d, 'drop', QR.dropFile); @@ -5174,7 +4989,6 @@ }, paste: function(e) { var blob, files, item, _i, _len, _ref; - files = []; _ref = e.clipboardData.items; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -5202,7 +5016,6 @@ }, fileInput: function(files) { var file, length, max, post, _i, _len; - if (this instanceof Element) { files = __slice.call(this.files); QR.nodes.fileInput.value = null; @@ -5251,7 +5064,6 @@ function _Class(select) { var el, event, prev, _i, _len, _ref, _this = this; - el = $.el('a', { className: 'qr-preview', draggable: true, @@ -5305,7 +5117,6 @@ _Class.prototype.rm = function() { var index; - $.rm(this.nodes.el); index = QR.posts.indexOf(this); if (QR.posts.length === 1) { @@ -5323,7 +5134,6 @@ _Class.prototype.lock = function(lock) { var name, _i, _len, _ref; - if (lock == null) { lock = true; } @@ -5348,7 +5158,6 @@ _Class.prototype.select = function() { var rectEl, rectList; - if (QR.selected) { QR.selected.nodes.el.id = null; QR.selected.forceSave(); @@ -5365,7 +5174,6 @@ _Class.prototype.load = function() { var name, _i, _len, _ref; - _ref = ['thread', 'name', 'email', 'sub', 'com']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; @@ -5377,7 +5185,6 @@ _Class.prototype.save = function(input) { var value, _ref; - if (input.type === 'checkbox') { this.spoiler = input.checked; return; @@ -5396,7 +5203,6 @@ _Class.prototype.forceSave = function() { var name, _i, _len, _ref; - if (this !== QR.selected) { return; } @@ -5428,7 +5234,6 @@ _Class.prototype.setThumbnail = function(fileURL) { var img, reader, _this = this; - if (!window.URL) { if (!fileURL) { reader = new FileReader(); @@ -5444,7 +5249,6 @@ img = $.el('img'); img.onload = function() { var applyBlob, cv, data, height, i, l, s, ui8a, width, _i; - s = 90 * 2; if (_this.file.type === 'image/gif') { s *= 3; @@ -5524,11 +5328,9 @@ _Class.prototype.pasteText = function(file) { var reader, _this = this; - reader = new FileReader(); reader.onload = function(e) { var text; - text = e.target.result; if (_this.com) { _this.com += "\n" + text; @@ -5566,7 +5368,6 @@ _Class.prototype.drop = function() { var el, index, newIndex, oldIndex, post; - el = $('.drag', this.parentNode); $.rmClass(el, 'drag'); $.rmClass(this, 'over'); @@ -5601,7 +5402,6 @@ ready: function() { var imgContainer, input, observer, setLifetime, _this = this; - setLifetime = function(e) { return _this.lifetime = e.detail; }; @@ -5643,7 +5443,6 @@ }); $.get('captchas', [], function(_arg) { var captchas; - captchas = _arg.captchas; return _this.sync(captchas); }); @@ -5658,7 +5457,6 @@ }, getOne: function() { var captcha, challenge, response; - this.clear(); if (captcha = this.captchas.shift()) { challenge = captcha.challenge, response = captcha.response; @@ -5683,7 +5481,6 @@ }, save: function() { var response; - if (!(response = this.nodes.input.value.trim())) { return; } @@ -5698,7 +5495,6 @@ }, clear: function() { var captcha, i, now, _i, _len, _ref; - now = Date.now(); _ref = this.captchas; for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { @@ -5716,7 +5512,6 @@ }, load: function() { var challenge; - if (!this.nodes.challenge.firstChild) { return; } @@ -5729,7 +5524,6 @@ }, count: function() { var count; - count = this.captchas.length; this.nodes.input.placeholder = (function() { switch (count) { @@ -5762,7 +5556,6 @@ }, dialog: function() { var dialog, mimeTypes, name, nodes, thread, _i, _len, _ref; - dialog = UI.dialog('qr', 'top:0;right:0;', "
×
No selected file×+
"); QR.nodes = nodes = { el: dialog, @@ -5864,7 +5657,6 @@ preSubmitHooks: [], submit: function(e) { var callbacks, challenge, err, filetag, hook, opts, post, postData, response, textOnly, thread, threadID, _i, _len, _ref, _ref1; - if (e != null) { e.preventDefault(); } @@ -5950,7 +5742,7 @@ QR.cooldown.auto = false; QR.status(); return QR.error($.el('span', { - innerHTML: "4chan X encountered an error while posting. Please try again. \n[?]" + innerHTML: "4chan X encountered an error while posting. \n[Banned?] [More info]" })); } }; @@ -5977,7 +5769,6 @@ }, response: function() { var URL, ban, board, err, h1, isReply, m, post, postID, req, threadID, tmpDoc, _, _ref, _ref1; - QR.req.upload.onload(); req = QR.req; delete QR.req; @@ -6081,7 +5872,6 @@ FappeTyme = { init: function() { var el, input; - if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { return; } @@ -6133,7 +5923,6 @@ }, node: function() { var thumb, _ref; - if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6158,7 +5947,6 @@ }, toggleAll: function() { var ID, file, func, post, _i, _len, _ref, _ref1; - $.event('CloseMenu'); if (ImageExpand.on = $.hasClass(ImageExpand.EAI, 'expand-all-shortcut')) { ImageExpand.EAI.className = 'contract-all-shortcut'; @@ -6207,7 +5995,6 @@ }, toggle: function(post) { var headRect, node, rect, root, thumb, top; - thumb = post.file.thumb; if (!(post.file.isExpanded || $.hasClass(thumb, 'expanding'))) { ImageExpand.expand(post); @@ -6252,7 +6039,6 @@ }, expand: function(post, src) { var img, thumb; - thumb = post.file.thumb; if (post.isHidden || post.file.isExpanded || $.hasClass(thumb, 'expanding')) { return; @@ -6280,7 +6066,6 @@ }, completeExpand: function(post) { var prev, thumb; - thumb = post.file.thumb; if (!$.hasClass(thumb, 'expanding')) { return; @@ -6294,7 +6079,6 @@ prev = post.nodes.root.getBoundingClientRect(); return $.queueTask(function() { var curr, root; - $.addClass(post.nodes.root, 'expanded-image'); $.rmClass(post.file.thumb, 'expanding'); if (!(prev.top + prev.height <= 0)) { @@ -6307,7 +6091,6 @@ }, error: function() { var URL, post, src, timeoutID; - post = Get.postFromNode(this); $.rm(this); delete post.file.fullImage; @@ -6333,7 +6116,6 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; - if (this.status !== 200) { return; } @@ -6357,7 +6139,6 @@ menu: { init: function() { var conf, createSubEntry, el, key, subEntries, _ref; - if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { return; } @@ -6381,7 +6162,6 @@ }, createSubEntry: function(type, config) { var input, label; - label = $.el('label', { innerHTML: " " + type }); @@ -6417,7 +6197,6 @@ }, node: function() { var _ref; - if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6425,7 +6204,6 @@ }, mouseover: function(e) { var el, post; - post = Get.postFromNode(this); el = $.el('img', { id: 'ihover', @@ -6447,7 +6225,6 @@ error: function() { var URL, post, src, timeoutID, _this = this; - if (!doc.contains(this)) { return; } @@ -6472,7 +6249,6 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; - if (this.status !== 200) { return; } @@ -6498,7 +6274,6 @@ ImageLoader = { init: function() { var prefetch; - if (g.VIEW === 'catalog') { return; } @@ -6525,7 +6300,6 @@ }, node: function() { var URL, img, string, style, thumb, type, _ref, _ref1; - if (this.isClone || this.isHidden || this.thread.isHidden || !((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6547,7 +6321,6 @@ }, toggle: function() { var enabled, id, post, _ref; - enabled = Conf['prefetch'] = this.checked; if (enabled) { _ref = g.threads["" + g.BOARD.ID + "." + g.THREADID].posts; @@ -6571,7 +6344,6 @@ }, node: function() { var thumb, _ref; - if (this.isClone || !((_ref = this.file) != null ? _ref.isSpoiler : void 0)) { return; } @@ -6584,7 +6356,6 @@ ArchiveLink = { init: function() { var div, entry, type, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { return; } @@ -6597,7 +6368,6 @@ order: 90, open: function(_arg) { var ID, board, thread; - ID = _arg.ID, thread = _arg.thread, board = _arg.board; return !!Redirect.to('thread', { postID: ID, @@ -6616,14 +6386,12 @@ }, createSubEntry: function(text, type) { var el, open; - el = $.el('a', { textContent: text, target: '_blank' }); open = type === 'post' ? function(_arg) { var ID, board, thread; - ID = _arg.ID, thread = _arg.thread, board = _arg.board; el.href = Redirect.to('thread', { postID: ID, @@ -6633,7 +6401,6 @@ return true; } : function(post) { var value; - value = Filter[type](post); if (!value) { return false; @@ -6656,7 +6423,6 @@ DeleteLink = { init: function() { var div, fileEl, fileEntry, postEl, postEntry; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { return; } @@ -6684,7 +6450,6 @@ el: fileEl, open: function(_arg) { var file; - file = _arg.file; if (!file || file.isDead) { return false; @@ -6700,7 +6465,6 @@ order: 40, open: function(post) { var node; - if (post.isDead || post.board.ID === 'q') { return false; } @@ -6715,7 +6479,6 @@ }, "delete": function() { var fileOnly, form, link, post; - post = DeleteLink.post; if (DeleteLink.cooldown.counting === post) { return; @@ -6744,7 +6507,6 @@ }, load: function(link, post, fileOnly, html) { var msg, s, tmpDoc; - tmpDoc = d.implementation.createHTMLDocument(''); tmpDoc.documentElement.innerHTML = html; if (tmpDoc.title === '4chan - Banned') { @@ -6767,7 +6529,6 @@ cooldown: { start: function(post, node) { var length, seconds, _ref; - if (!((_ref = QR.db) != null ? _ref.get({ boardID: post.board.ID, threadID: post.thread.ID, @@ -6801,7 +6562,6 @@ DownloadLink = { init: function() { var a; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { return; } @@ -6815,7 +6575,6 @@ order: 100, open: function(_arg) { var file; - file = _arg.file; if (!file) { return false; @@ -6841,7 +6600,6 @@ }, node: function() { var button; - button = Menu.makeButton(this); if (this.isClone) { $.replace($('.menu-button', this.nodes.info), button); @@ -6851,11 +6609,9 @@ }, makeButton: (function() { var a; - a = null; return function(post) { var clone; - a || (a = $.el('a', { className: 'menu-button fourchanx-link', innerHTML: '', @@ -6872,7 +6628,6 @@ })(), toggle: function(e) { var post; - post = this.dataset.clone ? Get.postFromNode(this) : g.posts[this.dataset.postid]; return Menu.menu.toggle(e, this, post); } @@ -6881,7 +6636,6 @@ ReportLink = { init: function() { var a; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { return; } @@ -6903,7 +6657,6 @@ }, report: function() { var id, post, set, url; - post = ReportLink.post; url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; id = Date.now(); @@ -6916,7 +6669,6 @@ init: function() { return $.ready(function() { var href; - Favicon.el = $('link[rel="shortcut icon"]', d.head); Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; @@ -6989,7 +6741,6 @@ init: function() { var sc, _this = this; - if (g.VIEW !== 'thread' || !Conf['Thread Stats']) { return; } @@ -7019,7 +6770,6 @@ }, node: function() { var ID, fileCount, post, postCount, _ref; - postCount = 0; fileCount = 0; _ref = this.posts; @@ -7037,7 +6787,6 @@ }, onUpdate: function(e) { var fileCount, postCount, _ref; - if (e.detail[404]) { return; } @@ -7046,7 +6795,6 @@ }, update: function(postCount, fileCount) { var fileCountEl, postCountEl, thread; - thread = ThreadStats.thread, postCountEl = ThreadStats.postCountEl, fileCountEl = ThreadStats.fileCountEl; postCountEl.textContent = postCount; fileCountEl.textContent = fileCount; @@ -7073,7 +6821,6 @@ }, onThreadsLoad: function() { var page, pages, thread, _i, _j, _len, _len1, _ref; - if (!Conf["Page Count in Stats"]) { return; } @@ -7101,7 +6848,6 @@ init: function() { var checked, conf, el, input, name, sc, settings, subEntries, _ref, _this = this; - if (g.VIEW !== 'thread' || !Conf['Thread Updater']) { return; } @@ -7252,7 +6998,6 @@ }, interval: function() { var val; - val = +this.value; if (val < 1) { val = 1; @@ -7262,7 +7007,6 @@ }, load: function() { var klass, req, text, _ref; - req = ThreadUpdater.req; switch (req.status) { case 200: @@ -7306,7 +7050,6 @@ }, getInterval: function() { var i, j; - i = ThreadUpdater.interval; j = Math.min(ThreadUpdater.outdateCount, 10); if (!d.hidden) { @@ -7316,14 +7059,12 @@ }, intervalShortcut: function() { var settings; - Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=Interval]', settings).focus(); }, set: function(name, text, klass) { var el, node; - el = ThreadUpdater[name]; if (node = el.firstChild) { node.data = text; @@ -7336,7 +7077,6 @@ }, timeout: function() { var n; - ThreadUpdater.timeoutID = setTimeout(ThreadUpdater.timeout, 1000); if (!(n = --ThreadUpdater.seconds)) { return ThreadUpdater.update(); @@ -7349,7 +7089,6 @@ }, update: function() { var url; - if (!ThreadUpdater.online) { return; } @@ -7374,7 +7113,6 @@ }, updateThreadStatus: function(title, OP) { var icon, message, root, titleLC; - titleLC = title.toLowerCase(); if (ThreadUpdater.thread["is" + title] === !!OP[titleLC]) { return; @@ -7401,7 +7139,6 @@ }, parse: function(postObjects) { var ID, OP, count, deletedFiles, deletedPosts, files, index, key, node, num, post, postObject, posts, root, scroll, _i, _len, _ref; - OP = postObjects[0]; Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler; ThreadUpdater.updateThreadStatus('Sticky', OP); @@ -7487,7 +7224,6 @@ } $.queueTask(function() { var length, threadID; - threadID = ThreadUpdater.thread.ID; length = $$('.thread > .postContainer', ThreadUpdater.root).length; return Fourchan.parseThread(threadID, length - count, length); @@ -7508,7 +7244,6 @@ ThreadWatcher = { init: function() { var sc; - if (!Conf['Thread Watcher']) { return; } @@ -7542,7 +7277,6 @@ node: function() { var favicon, _this = this; - favicon = $.el('a', { className: 'watch-thread-link', href: 'javascript:;' @@ -7562,7 +7296,6 @@ }, refresh: function(watched) { var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1; - if (!watched) { $.get('WatchedThreads', {}, function(item) { return ThreadWatcher.refresh(item['WatchedThreads']); @@ -7611,13 +7344,11 @@ }, x: function() { var thread; - thread = this.nextElementSibling.pathname.split('/'); return ThreadWatcher.unwatch(thread[1], thread[3]); }, post: function(e) { var board, postID, threadID, _ref; - _ref = e.detail, board = _ref.board, postID = _ref.postID, threadID = _ref.threadID; if (postID === threadID) { if (Conf['Auto Watch']) { @@ -7638,7 +7369,6 @@ unwatch: function(board, threadID) { return $.get('WatchedThreads', {}, function(item) { var watched; - watched = item['WatchedThreads']; delete watched[board][threadID]; if (!Object.keys(watched[board]).length) { @@ -7651,7 +7381,6 @@ watch: function(thread) { return $.get('WatchedThreads', {}, function(item) { var watched, _name; - watched = item['WatchedThreads']; watched[_name = thread.board] || (watched[_name] = {}); watched[thread.board][thread] = { @@ -7697,7 +7426,6 @@ }, ready: function() { var ID, post, posts, _ref; - $.off(d, '4chanXInitFinished', Unread.ready); posts = []; _ref = Unread.thread.posts; @@ -7714,7 +7442,6 @@ }, scroll: function() { var checkPosition, hash, onload, post, posts, prevID, root; - if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } @@ -7746,7 +7473,6 @@ } checkPosition = function(target) { var height, top, _ref; - _ref = target.getBoundingClientRect(), top = _ref.top, height = _ref.height; return top + height - doc.clientHeight > 0; }; @@ -7754,7 +7480,6 @@ }, sync: function() { var lastReadPost; - lastReadPost = Unread.db.get({ boardID: Unread.thread.board.ID, threadID: Unread.thread.ID, @@ -7771,7 +7496,6 @@ }, addPosts: function(posts) { var ID, data, post, _i, _len, _ref; - for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; ID = post.ID; @@ -7799,7 +7523,6 @@ }, addPostQuotingYou: function(post) { var quotelink, _i, _len, _ref; - if (!QR.db) { return; } @@ -7820,7 +7543,6 @@ }, readSinglePost: function(post) { var i; - if ((i = Unread.posts.indexOf(post)) === -1) { return; } @@ -7836,7 +7558,6 @@ }, readArray: function(arr) { var i, post, _i, _len; - for (i = _i = 0, _len = arr.length; _i < _len; i = ++_i) { post = arr[i]; if (post.ID > Unread.lastReadPost) { @@ -7847,7 +7568,6 @@ }, read: $.debounce(50, function(e) { var ID, bottom, height, i, post, posts, read; - if (d.hidden || !Unread.posts.length) { return; } @@ -7881,7 +7601,6 @@ }), setLine: function(force) { var post, root; - if (!(d.hidden || force === true)) { return; } @@ -7896,7 +7615,6 @@ }, update: function() { var count; - count = Unread.posts.length; if (Conf['Unread Count']) { d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); @@ -7915,7 +7633,6 @@ file: {}, init: function() { var archive, arr, boardID, data, id, name, type, _i, _len, _ref, _ref1, _ref2, _ref3; - _ref = Conf['selectedArchives']; for (boardID in _ref) { data = _ref[boardID]; @@ -8042,7 +7759,6 @@ }, to: function(dest, data) { var archive; - archive = (dest === 'search' ? Redirect.thread : Redirect[dest])[data.boardID]; if (!archive) { return ''; @@ -8051,7 +7767,6 @@ }, protocol: function(archive) { var protocol; - protocol = location.protocol; if (!archive[protocol.slice(0, -1)]) { protocol = protocol === 'https:' ? 'http:' : 'https:'; @@ -8060,7 +7775,6 @@ }, thread: function(archive, _arg) { var boardID, path, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; if (archive.software === 'foolfuuka') { @@ -8073,7 +7787,6 @@ }, post: function(archive, _arg) { var boardID, postID, protocol; - boardID = _arg.boardID, postID = _arg.postID; protocol = Redirect.protocol(archive); if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { @@ -8083,13 +7796,11 @@ }, file: function(archive, _arg) { var boardID, filename; - boardID = _arg.boardID, filename = _arg.filename; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; }, search: function(archive, _arg) { var boardID, path, type, value; - boardID = _arg.boardID, type = _arg.type, value = _arg.value; type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; value = encodeURIComponent(value); @@ -8108,7 +7819,6 @@ }, setup: function() { var btn, entry, psa; - $.off(d, '4chanXInitFinished', PSAHiding.setup); if (!(psa = $.id('globalMessage'))) { $.rmClass(doc, 'hide-announcement'); @@ -8137,7 +7847,6 @@ $.on(btn, 'click', PSAHiding.toggle); $.get('hiddenPSA', 0, function(_arg) { var hiddenPSA; - hiddenPSA = _arg.hiddenPSA; PSAHiding.sync(hiddenPSA); $.before(psa, btn); @@ -8147,7 +7856,6 @@ }, toggle: function(e) { var UTC; - if ($.hasClass(this, 'hide-announcement')) { UTC = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', UTC); @@ -8159,7 +7867,6 @@ }, sync: function(UTC) { var hr, psa; - psa = $.id('globalMessage'); psa.hidden = PSAHiding.btn.hidden = UTC && UTC >= +psa.dataset.utc ? true : false; if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') { @@ -8171,7 +7878,6 @@ CatalogLinks = { init: function() { var el, input; - if (!Conf['Catalog Links']) { return; } @@ -8195,14 +7901,12 @@ }, toggle: function() { var useCatalog; - $.event('CloseMenu'); $.set('Header catalog links', useCatalog = this.checked); return CatalogLinks.set(useCatalog); }, set: function(useCatalog) { var a, board, path, _i, _len, _ref; - path = useCatalog ? 'catalog' : ''; _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -8236,7 +7940,6 @@ }, node: function(post) { var str, uid; - if (!(uid = $('.hand', this.nodes.uniqueID))) { return; } @@ -8248,7 +7951,6 @@ ids: {}, compute: function(str) { var hash, rgb; - hash = this.hash(str); rgb = [(hash >> 24) & 0xFF, (hash >> 16) & 0xFF, (hash >> 8) & 0xFF]; rgb[3] = ((rgb[0] * 0.299) + (rgb[1] * 0.587) + (rgb[2] * 0.114)) > 125; @@ -8257,13 +7959,11 @@ }, apply: function() { var rgb; - rgb = IDColor.ids[this] || IDColor.compute(this); return ("background-color: rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "); color: ") + (rgb[3] ? "black; border-radius: 3px; padding: 0px 2px;" : "white; border-radius: 3px; padding: 0px 2px;"); }, hash: function(str) { var i, j, msg; - msg = 0; i = 0; j = str.length; @@ -8302,7 +8002,6 @@ Emoji = { init: function() { var css, icon, name, pos, _ref; - if (!Conf['Emoji']) { return; } @@ -8372,7 +8071,6 @@ }, node: function() { var a; - if (a = $('.abbr > a:not([onclick])', this.nodes.comment)) { return $.on(a, 'click', ExpandComment.cb); } @@ -8380,14 +8078,12 @@ callbacks: [], cb: function(e) { var post; - e.preventDefault(); post = Get.postFromNode(this); return ExpandComment.expand(post); }, expand: function(post) { var a; - if (post.nodes.longComment && !post.nodes.longComment.parentNode) { $.replace(post.nodes.shortComment, post.nodes.longComment); post.nodes.comment = post.nodes.longComment; @@ -8403,7 +8099,6 @@ }, contract: function(post) { var a; - if (!post.nodes.shortComment) { return; } @@ -8414,7 +8109,6 @@ }, parse: function(req, a, post) { var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - status = req.status; if (![200, 304].contains(status)) { a.textContent = "Error " + req.statusText + " (" + status + ")"; @@ -8471,7 +8165,6 @@ }, node: function() { var a, span; - if (!(span = $('.summary', this.OP.nodes.root.parentNode))) { return; } @@ -8485,13 +8178,11 @@ }, cbToggle: function() { var op; - op = Get.postFromRoot(this.previousElementSibling); return ExpandThread.toggle(op.thread); }, toggle: function(thread) { var a, inlined, num, post, replies, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - threadRoot = thread.OP.nodes.root.parentNode; a = $('.summary', threadRoot); switch (thread.isExpanded) { @@ -8560,7 +8251,6 @@ }, parse: function(req, thread, a) { var link, node, nodes, post, posts, replies, reply, spoilerRange, status, _i, _len; - if (a.textContent[0] === '+') { return; } @@ -8618,7 +8308,6 @@ }, createFunc: function(format) { var code; - code = format.replace(/%(.)/g, function(s, c) { if (c in FileInfo.formatters) { return "' + FileInfo.formatters." + c + ".call(post) + '"; @@ -8630,7 +8319,6 @@ }, convertUnit: function(size, unit) { var i; - if (unit === 'B') { return "" + (size.toFixed()) + " Bytes"; } @@ -8661,7 +8349,6 @@ }, n: function() { var fullname, shortname; - fullname = this.file.name; shortname = Build.shortFilename(this.file.name, this.isReply); if (fullname === shortname) { @@ -8705,7 +8392,6 @@ Fourchan = { init: function() { var board; - if (g.VIEW === 'catalog') { return; } @@ -8727,7 +8413,6 @@ }, code: function() { var pre, _i, _len, _ref; - if (this.isClone) { return; } @@ -8757,13 +8442,11 @@ Keybinds = { init: function() { var init; - if (g.VIEW === 'catalog' || !Conf['Keybinds']) { return; } init = function() { var node, _i, _len, _ref; - $.off(d, '4chanXInitFinished', init); $.on(d, 'keydown', Keybinds.keydown); _ref = $$('[accesskey]'); @@ -8776,7 +8459,6 @@ }, keydown: function(e) { var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len; - if (!(key = Keybinds.keyCode(e))) { return; } @@ -8951,7 +8633,6 @@ }, keyCode: function(e) { var kc, key; - key = (function() { switch (kc = e.keyCode) { case 8: @@ -9007,7 +8688,6 @@ }, tags: function(tag, ta) { var range, selEnd, selStart, value; - value = ta.value; selStart = ta.selectionStart; selEnd = ta.selectionEnd; @@ -9018,13 +8698,11 @@ }, sage: function() { var isSage; - isSage = /sage/i.test(QR.nodes.email.value); return QR.nodes.email.value = isSage ? "" : "sage"; }, img: function(thread, all) { var post; - if (all) { return ImageExpand.cb.toggleAll(); } else { @@ -9034,7 +8712,6 @@ }, open: function(thread, tab) { var url; - if (g.VIEW !== 'index') { return; } @@ -9047,7 +8724,6 @@ }, hl: function(delta, thread) { var axe, headRect, next, postEl, rect, replies, reply, root, topMargin, _i, _len; - if (!delta) { if (postEl = $('.reply.highlight', thread)) { $.rmClass(postEl, 'highlight'); @@ -9107,7 +8783,6 @@ Nav = { init: function() { var append, next, prev, span; - switch (g.VIEW) { case 'index': if (!Conf['Index Navigation']) { @@ -9158,7 +8833,6 @@ }, getThread: function(full) { var headRect, i, rect, thread, threads, topMargin, _i, _len; - if (Conf['Bottom header'] || !Conf['Fixed Header']) { topMargin = 0; } else { @@ -9184,7 +8858,6 @@ }, scroll: function(delta) { var i, rect, thread, threads, top, topMargin, _ref, _ref1; - _ref = Nav.getThread(true), threads = _ref[0], thread = _ref[1], i = _ref[2], rect = _ref[3], topMargin = _ref[4]; top = rect.top - topMargin; if (!((delta === -1 && Math.ceil(top) < 0) || (delta === +1 && top > 1))) { @@ -9210,7 +8883,6 @@ }, node: function() { var dateEl; - if (this.isClone) { return; } @@ -9220,7 +8892,6 @@ }, relative: function(diff, now, date) { var days, months, number, rounded, unit, years; - unit = (number = diff / $.DAY) >= 1 ? (years = now.getYear() - date.getYear(), months = now.getMonth() - date.getMonth(), days = now.getDate() - date.getDate(), years > 1 ? (number = years - (months < 0 || months === 0 && days < 0), 'year') : years === 1 && (months > 0 || months === 0 && days >= 0) ? (number = years, 'year') : (months = (months + 12) % 12) > 1 ? (number = months - (days < 0), 'month') : months === 1 && days >= 0 ? (number = months, 'month') : 'day') : (number = diff / $.HOUR) >= 1 ? 'hour' : (number = diff / $.MINUTE) >= 1 ? 'minute' : (number = Math.max(0, diff) / $.SECOND, 'second'); rounded = Math.round(number); if (rounded !== 1) { @@ -9231,7 +8902,6 @@ stale: [], flush: function() { var now, update, _i, _len, _ref; - if (d.hidden) { return; } @@ -9247,16 +8917,13 @@ }, setUpdate: function(post) { var markStale, setOwnTimeout, update; - setOwnTimeout = function(diff) { var delay; - delay = diff < $.MINUTE ? $.SECOND - (diff + $.SECOND / 2) % $.SECOND : diff < $.HOUR ? $.MINUTE - (diff + $.MINUTE / 2) % $.MINUTE : diff < $.DAY ? $.HOUR - (diff + $.HOUR / 2) % $.HOUR : $.DAY - (diff + $.DAY / 2) % $.DAY; return setTimeout(markStale, delay); }; update = function(now) { var date, diff, relative, singlePost, _i, _len, _ref; - date = post.info.date; diff = now - date; relative = RelativeDates.relative(diff, now, date); @@ -9297,7 +8964,6 @@ }, node: function(post) { var spoiler, spoilers, _i, _len; - spoilers = $$('s', this.nodes.comment); for (_i = 0, _len = spoilers.length; _i < _len; _i++) { spoiler = spoilers[_i]; @@ -9317,7 +8983,6 @@ }, ready: function() { var field; - field = $.id('recaptcha_response_field'); $.on(field, 'keydown', function(e) { if (e.keyCode === 8 && !field.value) { @@ -9326,7 +8991,6 @@ }); return $.on($('form'), 'submit', function(e) { var response; - e.preventDefault(); response = field.value.trim(); if (!/\s/.test(response)) { @@ -9340,7 +9004,6 @@ Sauce = { init: function() { var err, link, links, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Sauce']) { return; } @@ -9372,7 +9035,6 @@ }, createSauceLink: function(link) { var m, text; - link = link.replace(/%(T?URL|MD5|board)/ig, function(parameter) { switch (parameter) { case '%TURL': @@ -9393,7 +9055,6 @@ }, node: function() { var link, nodes, _i, _len, _ref; - if (this.isClone || !this.file) { return; } @@ -9426,7 +9087,6 @@ }, createFunc: function(format) { var code; - code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { return "' + Time.formatters." + c + ".call(date) + '"; @@ -9511,7 +9171,6 @@ Settings = { init: function() { var link, settings; - link = $.el('a', { className: 'settings-link', textContent: 'Settings', @@ -9521,7 +9180,6 @@ Header.addShortcut(link); $.get('previousversion', null, function(item) { var changelog, el, previous; - if (previous = item['previousversion']) { if (previous === g.VERSION) { return; @@ -9559,7 +9217,6 @@ }, open: function(openSection) { var dialog, html, link, links, overlay, section, sectionToOpen, _i, _len, _ref; - $.off(d, '4chanXInitFinished', Settings.open); if (Settings.dialog) { return; @@ -9612,7 +9269,6 @@ sections: [], addSection: function(title, open) { var hyphenatedTitle, _ref; - if (typeof title !== 'string') { _ref = title.detail, title = _ref.title, open = _ref.open; } @@ -9625,7 +9281,6 @@ }, openSection: function() { var section, selected; - if (selected = $('.tab-selected', Settings.dialog)) { $.rmClass(selected, 'tab-selected'); } @@ -9639,7 +9294,6 @@ }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; - items = {}; inputs = {}; _ref = Config.main; @@ -9664,7 +9318,6 @@ } $.get(items, function(items) { var val; - for (key in items) { val = items[key]; inputs[key].checked = val; @@ -9679,7 +9332,6 @@ boards: {} }, function(item) { var ID, board, thread, _ref1; - _ref1 = item.hiddenThreads.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9694,7 +9346,6 @@ boards: {} }, function(item) { var ID, board, post, thread, _ref1; - _ref1 = item.hiddenPosts.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9714,7 +9365,6 @@ boards: {} }, function(item) { var boardID; - for (boardID in item.hiddenThreads.boards) { localStorage.removeItem("4chan-hide-t-" + boardID); } @@ -9725,7 +9375,6 @@ }, "export": function(now, data) { var a, db, _i, _len; - if (typeof now !== 'number') { now = Date.now(); data = { @@ -9760,7 +9409,6 @@ }, onImport: function() { var file, output, reader; - if (!(file = this.files[0])) { return; } @@ -9772,7 +9420,6 @@ reader = new FileReader(); reader.onload = function(e) { var data, err; - try { data = JSON.parse(e.target.result); Settings.loadSettings(data); @@ -9789,7 +9436,6 @@ }, loadSettings: function(data) { var key, val, version, _ref; - version = data.version.split('.'); if (version[0] === '2') { data = Settings.convertSettings(data, { @@ -9879,7 +9525,6 @@ }, convertSettings: function(data, map) { var newKey, prevKey; - for (prevKey in map) { newKey = map[prevKey]; if (newKey) { @@ -9891,7 +9536,6 @@ }, filter: function(section) { var select; - section.innerHTML = "
"; select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -9899,7 +9543,6 @@ }, selectFilter: function() { var div, name, ta; - div = this.nextElementSibling; if ((name = this.value) !== 'guide') { $.rmAll(div); @@ -9919,7 +9562,6 @@ }, sauce: function(section) { var ta; - section.innerHTML = "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
"; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -9929,7 +9571,6 @@ }, advanced: function(section) { var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; - section.innerHTML = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

\n One item per line.
\n Items will be added in the relevant input's auto-completion list.
\n Password items will always be used, since there is no password input.
\n Lines starting with a # will be ignored.\n

Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; inputs = {}; @@ -9949,7 +9590,6 @@ $.on(ta, 'change', $.cb.value); $.get(items, function(items) { var key, val; - for (key in items) { val = items[key]; if (['emojiPos'].contains(key)) { @@ -10020,7 +9660,6 @@ }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var option, selectedArchives, type; - selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; @@ -10035,7 +9674,6 @@ }, addArchiveCell: function(boardID, data, type) { var archive, i, length, options, select, td; - length = data[type].length; td = $.el('td', { className: 'archive-cell' @@ -10065,10 +9703,8 @@ }, saveSelectedArchive: function() { var _this = this; - return $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var selectedArchives, _name; - selectedArchives = _arg.selectedArchives; (selectedArchives[_name = _this.dataset.boardid] || (selectedArchives[_name] = {}))[_this.dataset.type] = _this.value; return $.set('selectedArchives', selectedArchives); @@ -10079,7 +9715,6 @@ }, time: function() { var funk; - funk = Time.createFunc(this.value); return this.nextElementSibling.textContent = funk(Time, new Date()); }, @@ -10088,7 +9723,6 @@ }, fileInfo: function() { var data, funk; - data = { isReply: true, file: { @@ -10127,7 +9761,6 @@ }, keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; - section.innerHTML = "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
"; tbody = $('tbody', section); items = {}; @@ -10148,7 +9781,6 @@ } return $.get(items, function(items) { var val; - for (key in items) { val = items[key]; inputs[key].value = val; @@ -10157,7 +9789,6 @@ }, keybind: function(e) { var key; - if (e.keyCode === 9) { return; } @@ -10174,10 +9805,8 @@ Main = { init: function(items) { var db, flatten, _i, _len; - flatten = function(parent, obj) { var key, val; - if (obj instanceof Array) { Conf[parent] = obj[0]; } else if (typeof obj === 'object') { @@ -10201,13 +9830,11 @@ $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { var _ref; - return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Main.initStyle); }, initFeatures: function(items) { var init, pathname, _ref; - Conf = items; pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); @@ -10236,7 +9863,6 @@ case 'images.4chan.org': $.ready(function() { var URL; - if (Conf['404 Redirect'] && d.title === '4chan - 404 Not Found') { Redirect.init(); pathname = location.pathname.split('/'); @@ -10253,7 +9879,6 @@ } init = function(features) { var err, module, name; - for (name in features) { module = features[name]; try { @@ -10329,7 +9954,6 @@ }, initStyle: function() { var mainStyleSheet, observer, setStyle, style, styleSheets, _ref; - $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; @@ -10350,7 +9974,6 @@ styleSheets = $$('link[rel="alternate stylesheet"]', d.head); setStyle = function() { var styleSheet, _i, _len; - $.rmClass(doc, style); for (_i = 0, _len = styleSheets.length; _i < _len; _i++) { styleSheet = styleSheets[_i]; @@ -10377,7 +10000,6 @@ }, initReady: function() { var board, boardChild, err, errors, href, passLink, posts, styleSelector, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; - if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { @@ -10454,7 +10076,6 @@ }, callbackNodes: function(klass, nodes) { var callback, err, errors, i, len, node, _i, _len, _ref; - len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -10482,11 +10103,9 @@ }, callbackNodesDB: function(klass, nodes, cb) { var errors, func, i, len, node, queue, softTask; - queue = []; softTask = function() { var args, func, task; - task = queue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -10505,7 +10124,6 @@ errors = null; func = function(node, i) { var callback, err, _i, _len, _ref; - _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; @@ -10539,7 +10157,6 @@ }, addCallback: function(e) { var Klass, obj; - obj = e.detail; if (typeof obj.callback.name !== 'string') { throw new Error("Invalid callback name: " + obj.callback.name); @@ -10559,7 +10176,6 @@ }, message: function(e) { var el, version; - version = e.data.version; if (version && version !== g.VERSION) { el = $.el('span', { @@ -10570,14 +10186,12 @@ }, checkUpdate: function() { var now; - if (!(Conf['Check for Updates'] && Main.isThisPageLegit())) { return; } now = Date.now(); return $.get('lastchecked', 0, function(_arg) { var lastchecked; - lastchecked = _arg.lastchecked; if (lastchecked > now - $.DAY) { return; @@ -10593,7 +10207,6 @@ }, handleErrors: function(errors) { var div, error, logs, _i, _len; - if (!(errors instanceof Array)) { error = errors; } else if (errors.length === 1) { @@ -10608,7 +10221,6 @@ }); $.on(div.lastElementChild, 'click', function() { var _ref; - return _ref = this.textContent === 'show' ? ['hide', false] : ['show', true], this.textContent = _ref[0], logs.hidden = _ref[1], _ref; }); logs = $.el('div', { @@ -10622,7 +10234,6 @@ }, parseError: function(data) { var error, message; - Main.logError(data); message = $.el('div', { textContent: data.message @@ -10639,7 +10250,6 @@ }, isThisPageLegit: function() { var _ref; - if (!('thisPageIsLegit' in Main)) { Main.thisPageIsLegit = location.hostname === 'boards.4chan.org' && !$('link[href*="favicon-status.ico"]', d.head) && ((_ref = d.title) !== '4chan - Temporarily Offline' && _ref !== '4chan - Error'); } diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 1580b7d54..e337b38be 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.25 - 2013-08-04 +* 4chan X - Version 1.2.25 - 2013-08-11 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -337,7 +337,6 @@ Array.prototype.add = function(object, position) { var keep; - keep = this.slice(position); this.length = position; this.push(object); @@ -350,7 +349,6 @@ Array.prototype.indexOf = function(object) { var i; - i = this.length; while (i--) { if (this[i] === object) { @@ -362,7 +360,6 @@ Array.prototype.pushArrays = function() { var arg, args, _i, _len; - args = arguments; for (_i = 0, _len = args.length; _i < _len; _i++) { arg = args[_i]; @@ -373,7 +370,6 @@ Array.prototype.remove = function(object) { var index; - if ((index = this.indexOf(object)) > -1) { return this.splice(index, 1); } else { @@ -390,7 +386,6 @@ $.extend = function(object, properties) { var key, val; - for (key in properties) { val = properties[key]; if (!properties.hasOwnProperty(key)) { @@ -408,7 +403,6 @@ $.ready = function(fc) { var cb, _ref; - if ((_ref = d.readyState) === 'interactive' || _ref === 'complete') { $.queueTask(fc); return; @@ -422,7 +416,6 @@ $.formData = function(form) { var fd, key, val; - if (form instanceof HTMLFormElement) { return new FormData(form); } @@ -443,7 +436,6 @@ $.ajax = function(url, callbacks, opts) { var cred, err, form, headers, key, r, sync, type, upCallbacks, val; - if (opts == null) { opts = {}; } @@ -469,11 +461,9 @@ $.cache = (function() { var reqs; - reqs = {}; return function(url, cb) { var err, req, rm; - if (req = reqs[url]) { if (req.readyState === 4) { cb.call(req, req.evt); @@ -489,7 +479,6 @@ req = $.ajax(url, { onload: function(e) { var _i, _len, _ref; - _ref = this.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { cb = _ref[_i]; @@ -531,7 +520,6 @@ $.addStyle = function(css, id) { var style; - style = $.el('style', { id: id, textContent: css @@ -578,7 +566,6 @@ } else { return function(el) { var _ref; - return (_ref = el.parentNode) != null ? _ref.removeChild(el) : void 0; }; } @@ -586,7 +573,6 @@ $.rmAll = function(root) { var node; - while (node = root.firstChild) { root.removeChild(node); } @@ -602,7 +588,6 @@ $.nodes = function(nodes) { var frag, node, _i, _len; - if (!(nodes instanceof Array)) { return nodes; } @@ -636,7 +621,6 @@ $.el = function(tag, properties) { var el; - el = d.createElement(tag); if (properties) { $.extend(el, properties); @@ -646,7 +630,6 @@ $.on = function(el, events, handler) { var event, _i, _len, _ref; - _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -656,7 +639,6 @@ $.off = function(el, events, handler) { var event, _i, _len, _ref; - _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -682,7 +664,6 @@ $.debounce = function(wait, fn) { var args, exec, lastCall, that, timeout; - lastCall = 0; timeout = null; that = null; @@ -704,11 +685,9 @@ $.queueTask = (function() { var execTask, taskChannel, taskQueue; - taskQueue = []; execTask = function() { var args, func, task; - task = taskQueue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -731,7 +710,6 @@ $.globalEval = function(code) { var script; - script = $.el('script', { textContent: code }); @@ -741,7 +719,6 @@ $.bytesToString = function(size) { var unit; - unit = 0; while (size >= 1024) { size /= 1024; @@ -760,7 +737,6 @@ $.sync = (function() { window.addEventListener('storage', function(e) { var cb; - if (cb = $.syncing[e.key]) { return cb(JSON.parse(e.newValue)); } @@ -772,7 +748,6 @@ $.item = function(key, val) { var item; - item = {}; item[key] = val; return item; @@ -780,7 +755,6 @@ $["delete"] = function(keys) { var key, _i, _len; - if (!(keys instanceof Array)) { keys = [keys]; } @@ -794,7 +768,6 @@ $.get = function(key, val, cb) { var items; - if (typeof cb === 'function') { items = $.item(key, val); } else { @@ -813,7 +786,6 @@ $.set = (function() { var set; - set = function(key, val) { key = g.NAMESPACE + key; val = JSON.stringify(val); @@ -824,7 +796,6 @@ }; return function(keys, val) { var key; - if (typeof keys === 'string') { set(keys, val); return; @@ -892,7 +863,6 @@ function Post(root, thread, board, that) { var alt, anchor, capcode, date, email, file, fileInfo, flag, info, name, post, size, subject, thumb, tripcode, uniqueID, unit; - this.thread = thread; this.board = board; if (that == null) { @@ -991,7 +961,6 @@ Post.prototype.parseComment = function() { var bq, data, i, node, nodes, text, _i, _len, _ref; - bq = this.nodes.comment.cloneNode(true); _ref = $$('.abbr, .capcodeReplies, .exif, b', bq); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1009,7 +978,6 @@ Post.prototype.parseQuotes = function() { var hash, pathname, quotelink, quotes, _i, _len, _ref; - quotes = {}; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1039,7 +1007,6 @@ Post.prototype.kill = function(file, now) { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; - now || (now = new Date()); if (file) { if (this.file.isDead) { @@ -1088,7 +1055,6 @@ Post.prototype.resurrect = function() { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; - delete this.isDead; delete this.timeOfDeath; $.rmClass(this.nodes.root, 'deleted-post'); @@ -1122,7 +1088,6 @@ Post.prototype.rmClone = function(index) { var clone, _i, _len, _ref; - this.clones.splice(index, 1); _ref = this.clones.slice(index); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1140,7 +1105,6 @@ function Clone(origin, context) { var file, index, info, inline, inlined, key, nodes, post, root, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; - this.origin = origin; this.context = context; _ref = ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']; @@ -1229,7 +1193,6 @@ function DataBoard(key, sync) { var init, _this = this; - this.key = key; this.data = Conf[key]; $.sync(key, this.onSync.bind(this)); @@ -1246,7 +1209,6 @@ DataBoard.prototype["delete"] = function(_arg) { var boardID, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; if (postID) { delete this.data.boards[boardID][threadID][postID]; @@ -1267,7 +1229,6 @@ DataBoard.prototype.deleteIfEmpty = function(_arg) { var boardID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID; if (threadID) { if (!Object.keys(this.data.boards[boardID][threadID]).length) { @@ -1283,7 +1244,6 @@ DataBoard.prototype.set = function(_arg) { var boardID, postID, threadID, val, _base, _base1, _base2; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, val = _arg.val; if (postID !== void 0) { ((_base = ((_base1 = this.data.boards)[boardID] || (_base1[boardID] = {})))[threadID] || (_base[threadID] = {}))[postID] = val; @@ -1297,7 +1257,6 @@ DataBoard.prototype.get = function(_arg) { var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { if (!threadID) { @@ -1321,7 +1280,6 @@ DataBoard.prototype.clean = function() { var boardID, now, val, _ref; - _ref = this.data.boards; for (boardID in _ref) { val = _ref[boardID]; @@ -1341,10 +1299,8 @@ DataBoard.prototype.ajaxClean = function(boardID) { var _this = this; - return $.cache("//api.4chan.org/" + boardID + "/threads.json", function(e) { var board, page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; - if (e.target.status === 404) { _this["delete"](boardID); } else if (e.target.status === 200) { @@ -1455,7 +1411,6 @@ init: function() { var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, _this = this; - this.menu = new UI.Menu('header'); this.menuButton = $.el('span', { className: 'menu-button', @@ -1539,7 +1494,6 @@ } $.asap((function() { var _ref; - return $.id('boardNavMobile') || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Header.setBoardList); $.prepend(d.body, _this.bar); @@ -1548,7 +1502,6 @@ }); return $.ready(function() { var a, cs; - _this.footer = $.id('boardNavDesktopFoot'); if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) { a.className = 'current'; @@ -1582,7 +1535,6 @@ }), setBoardList: function() { var a, boardList, btn, fourchannav, fullBoardList; - fourchannav = $.id('boardNavDesktop'); if (a = $("a[href*='/" + g.BOARD + "/']", fourchannav)) { a.className = 'current'; @@ -1604,7 +1556,6 @@ }, generateBoardList: function(text) { var as, list, nodes; - list = $('#custom-board-list', Header.bar); $.rmAll(list); if (!text) { @@ -1613,7 +1564,6 @@ as = $$('#full-board-list a', Header.bar); nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+")|\,"[^"]+[^"]"))*|[^\w@]+/g).map(function(t) { var a, board, m, _i, _len; - if (/^[^\w@]/.test(t)) { return $.tn(t); } @@ -1660,7 +1610,6 @@ }, toggleBoardList: function() { var bar, custom, full, showBoardList; - bar = Header.bar; custom = $('#custom-board-list', bar); full = $('#full-board-list', bar); @@ -1696,7 +1645,6 @@ }, toggleLinkJustify: function() { var centered; - $.event('CloseMenu'); centered = this.nodeName === 'INPUT' ? this.checked : void 0; Header.setLinkJustify(centered); @@ -1726,7 +1674,6 @@ }, toggleBarVisibility: function(e) { var hide, message; - if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -1743,7 +1690,6 @@ }, toggleFooterVisibility: function() { var hide, message; - $.event('CloseMenu'); hide = this.nodeName === 'INPUT' ? this.checked : !!Header.footer.hidden; Header.setFooterVisibility(hide); @@ -1753,7 +1699,6 @@ }, setCustomNav: function(show) { var btn, cust, full, _ref; - Header.customNavToggler.checked = show; cust = $('#custom-board-list', Header.bar); full = $('#full-board-list', Header.bar); @@ -1766,14 +1711,12 @@ }, editCustomNav: function() { var settings; - Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=boardnav]', settings).focus(); }, hashScroll: function() { var hash, post; - if (!((hash = this.location.hash.slice(1)) && (post = $.id(hash)))) { return; } @@ -1784,7 +1727,6 @@ }, scrollToPost: function(post) { var headRect, top; - top = post.getBoundingClientRect().top; if (Conf['Fixed Header'] && !Conf['Bottom Header']) { headRect = Header.bar.getBoundingClientRect(); @@ -1794,7 +1736,6 @@ }, addShortcut: function(el) { var shortcut; - shortcut = $.el('span', { className: 'shortcut fourchanx-link' }); @@ -1806,7 +1747,6 @@ }, createNotification: function(e) { var cb, content, lifetime, notif, type, _ref; - _ref = e.detail, type = _ref.type, content = _ref.content, lifetime = _ref.lifetime, cb = _ref.cb; notif = new Notification(type, content, lifetime); if (cb) { @@ -1819,7 +1759,6 @@ spoilerRange: {}, shortFilename: function(filename, isReply) { var threshold; - threshold = isReply ? 30 : 40; if (filename.length - 4 > threshold) { return "" + filename.slice(0, threshold - 5) + "(...)." + filename.slice(-3); @@ -1829,7 +1768,6 @@ }, postFromObject: function(data, boardID) { var o; - o = { postID: data.no, threadID: data.resto || data.no, @@ -1873,7 +1811,6 @@ */ var a, boardID, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; - postID = o.postID, threadID = o.threadID, boardID = o.boardID, name = o.name, capcode = o.capcode, tripcode = o.tripcode, uniqueID = o.uniqueID, email = o.email, subject = o.subject, flagCode = o.flagCode, flagName = o.flagName, date = o.date, dateUTC = o.dateUTC, isSticky = o.isSticky, isClosed = o.isClosed, comment = o.comment, file = o.file; isOP = postID === threadID; staticPath = '//static.4chan.org/image/'; @@ -1969,7 +1906,6 @@ Get = { threadExcerpt: function(thread) { var OP, excerpt, _ref; - OP = thread.OP; excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); if (excerpt.length > 70) { @@ -1982,7 +1918,6 @@ }, postFromRoot: function(root) { var boardID, index, link, post, postID; - link = $('a[title="Highlight this post"]', root); boardID = link.pathname.split('/')[1]; postID = link.hash.slice(2); @@ -2002,7 +1937,6 @@ }, postDataFromLink: function(link) { var boardID, path, postID, threadID; - if (link.hostname === 'boards.4chan.org') { path = link.pathname.split('/'); boardID = path[1]; @@ -2021,7 +1955,6 @@ }, allQuotelinksLinkingTo: function(post) { var ID, quote, quotedPost, quotelinks, quoterPost, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; - quotelinks = []; _ref = g.posts; for (ID in _ref) { @@ -2050,14 +1983,12 @@ } return quotelinks.filter(function(quotelink) { var boardID, postID, _ref4; - _ref4 = Get.postDataFromLink(quotelink), boardID = _ref4.boardID, postID = _ref4.postID; return boardID === post.board.ID && postID === post.ID; }); }, postClone: function(boardID, threadID, postID, root, context) { var post, url; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2078,7 +2009,6 @@ }, insert: function(post, root, context) { var clone, nodes; - if (!root.parentNode) { return; } @@ -2092,7 +2022,6 @@ }, fetchedPost: function(req, boardID, threadID, postID, root, context) { var board, post, posts, status, thread, url, _i, _len; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2142,7 +2071,6 @@ }, archivedPost: function(req, boardID, postID, root, context) { var board, bq, comment, data, o, post, thread, threadID, _ref; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2236,10 +2164,8 @@ UI = (function() { var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove; - dialog = function(id, position, html) { var child, el, move, _i, _len, _ref; - el = $.el('div', { className: 'dialog', innerHTML: html, @@ -2279,7 +2205,6 @@ Menu.prototype.makeMenu = function() { var menu; - menu = $.el('div', { className: 'dialog', id: 'menu', @@ -2294,7 +2219,6 @@ Menu.prototype.toggle = function(e, button, data) { var previousButton; - e.preventDefault(); e.stopPropagation(); if (currentMenu) { @@ -2312,7 +2236,6 @@ Menu.prototype.open = function(button, data) { var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2; - menu = this.makeMenu(); currentMenu = menu; lastToggledButton = button; @@ -2351,7 +2274,6 @@ Menu.prototype.insertEntry = function(entry, parent, data) { var subEntry, submenu, _i, _len, _ref; - if (typeof entry.open === 'function') { if (!entry.open(data)) { return; @@ -2385,7 +2307,6 @@ Menu.prototype.findNextEntry = function(entry, direction) { var entries; - entries = __slice.call(entry.parentNode.children); entries.sort(function(first, second) { return +(first.style.order || first.style.webkitOrder) - +(second.style.order || second.style.webkitOrder); @@ -2395,7 +2316,6 @@ Menu.prototype.keybinds = function(e) { var entry, next, nextPrev, subEntry, submenu; - entry = $('.focused', currentMenu); while (subEntry = $('.focused', entry)) { entry = subEntry; @@ -2441,7 +2361,6 @@ Menu.prototype.focus = function(entry) { var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; - while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2469,7 +2388,6 @@ Menu.prototype.addEntry = function(e) { var entry; - entry = e.detail; if (entry.type !== this.type) { return; @@ -2480,7 +2398,6 @@ Menu.prototype.parseEntry = function(entry) { var el, style, subEntries, subEntry, _i, _len; - el = entry.el, subEntries = entry.subEntries; $.addClass(el, 'entry'); $.on(el, 'focus mouseover', (function(e) { @@ -2504,7 +2421,6 @@ })(); dragstart = function(e) { var el, isTouching, o, rect, screenHeight, screenWidth, _ref; - if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -2543,7 +2459,6 @@ }; touchmove = function(e) { var touch, _i, _len, _ref; - _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2555,7 +2470,6 @@ }; drag = function(e) { var bottom, clientX, clientY, left, right, style, top; - clientX = e.clientX, clientY = e.clientY; left = clientX - this.dx; left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%'; @@ -2571,7 +2485,6 @@ }; touchend = function(e) { var touch, _i, _len, _ref; - _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2593,7 +2506,6 @@ }; hoverstart = function(_arg) { var asapTest, cb, el, endEvents, latestEvent, o, root; - root = _arg.root, el = _arg.el, latestEvent = _arg.latestEvent, endEvents = _arg.endEvents, asapTest = _arg.asapTest, cb = _arg.cb; o = { root: root, @@ -2622,7 +2534,6 @@ }; hover = function(e) { var clientX, clientY, height, left, right, style, top, _ref; - this.latestEvent = e; height = this.el.offsetHeight; clientX = e.clientX, clientY = e.clientY; @@ -2665,7 +2576,6 @@ }, node: function() { var email, name, tripcode, _ref; - if (this.info.capcode || this.isClone) { return; } @@ -2692,7 +2602,6 @@ filters: {}, init: function() { var boards, err, filter, hl, key, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4; - if (g.VIEW === 'catalog' || !Conf['Filter']) { return; } @@ -2729,7 +2638,6 @@ op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'yes'; stub = (function() { var _ref3; - switch ((_ref3 = filter.match(/stub:(yes|no)/)) != null ? _ref3[1] : void 0) { case 'yes': return true; @@ -2760,7 +2668,6 @@ }, createFilter: function(regexp, op, stub, hl, top) { var settings, test; - test = typeof regexp === 'string' ? function(value) { return regexp === value; } : function(value) { @@ -2784,7 +2691,6 @@ }, node: function() { var filter, firstThread, key, result, thisThread, value, _i, _len, _ref; - if (this.isClone) { return; } @@ -2896,7 +2802,6 @@ menu: { init: function() { var div, entry, type, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { return; } @@ -2922,7 +2827,6 @@ }, createSubEntry: function(text, type) { var el; - el = $.el('a', { href: 'javascript:;', textContent: text @@ -2933,7 +2837,6 @@ el: el, open: function(post) { var value; - value = Filter[type](post); return value !== false; } @@ -2941,7 +2844,6 @@ }, makeFilter: function() { var re, type, value; - type = this.dataset.type; value = Filter[type](Filter.menu.post); re = ['uniqueID', 'MD5'].contains(type) ? value : value.replace(/\/|\\|\^|\$|\n|\.|\(|\)|\{|\}|\[|\]|\?|\*|\+|\|/g, function(c) { @@ -2956,7 +2858,6 @@ re = ['uniqueID', 'MD5'].contains(type) ? "/" + re + "/" : "/^" + re + "$/"; return $.get(type, Conf[type], function(item) { var save, section, select, ta, tl; - save = item[type]; save = save ? "" + save + "\n" + re : re; $.set(type, save); @@ -2990,7 +2891,6 @@ }, node: function() { var data; - if (!this.isReply || this.isClone) { return; } @@ -3014,7 +2914,6 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub, replies, thisPost; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { return; } @@ -3085,7 +2984,6 @@ order: 20, open: function(post) { var data; - if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3117,7 +3015,6 @@ order: 15, open: function(post) { var data; - if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3134,7 +3031,6 @@ }, hide: function() { var makeStub, parent, post, replies, thisPost; - parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3153,7 +3049,6 @@ }, show: function() { var data, parent, post, replies, thisPost; - parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3177,7 +3072,6 @@ }, hideStub: function() { var post; - post = PostHiding.menu.post; post.nodes.root.hidden = true; $.event('CloseMenu'); @@ -3185,7 +3079,6 @@ }, makeButton: function(post, type) { var a; - a = $.el('a', { className: "" + type + "-reply-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3196,7 +3089,6 @@ }, saveHiddenState: function(post, isHiding, thisPost, makeStub, hideRecursively) { var data; - data = { boardID: post.board.ID, threadID: post.thread.ID, @@ -3215,7 +3107,6 @@ }, toggle: function() { var post; - post = Get.postFromNode(this); if (post.isHidden) { PostHiding.show(post); @@ -3226,7 +3117,6 @@ }, hide: function(post, makeStub, hideRecursively) { var a, postInfo, quotelink, _i, _len, _ref; - if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3264,7 +3154,6 @@ }, show: function(post, showRecursively) { var quotelink, _i, _len, _ref; - if (showRecursively == null) { showRecursively = Conf['Recursive Hiding']; } @@ -3300,7 +3189,6 @@ }, node: function() { var i, obj, quote, recursive, _i, _j, _len, _len1, _ref, _ref1; - if (this.isClone) { return; } @@ -3318,7 +3206,6 @@ }, add: function() { var args, obj, post, recursive, _base, _name; - recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; obj = (_base = Recursive.recursives)[_name = post.fullID] || (_base[_name] = { recursives: [], @@ -3329,7 +3216,6 @@ }, rm: function(recursive, post) { var i, obj, rec, _i, _len, _ref; - if (!(obj = Recursive.recursives[post.fullID])) { return; } @@ -3344,7 +3230,6 @@ }, apply: function() { var ID, args, fullID, post, recursive, _ref; - recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; fullID = post.fullID; _ref = g.posts; @@ -3371,7 +3256,6 @@ }, node: function() { var data; - if (data = ThreadHiding.db.get({ boardID: this.board.ID, threadID: this.ID @@ -3385,7 +3269,6 @@ }, syncCatalog: function() { var hiddenThreads, hiddenThreadsOnCatalog, threadID; - hiddenThreads = ThreadHiding.db.get({ boardID: g.BOARD.ID, defaultValue: {} @@ -3412,7 +3295,6 @@ cleanCatalog: function(hiddenThreadsOnCatalog) { return $.cache("//api.4chan.org/" + g.BOARD + "/threads.json", function() { var page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; - if (this.status !== 200) { return; } @@ -3438,7 +3320,6 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub; - if (g.VIEW !== 'index' || !Conf['Menu'] || !Conf['Thread Hiding Link']) { return; } @@ -3465,7 +3346,6 @@ order: 20, open: function(_arg) { var isReply, thread; - thread = _arg.thread, isReply = _arg.isReply; if (isReply || thread.isHidden) { return false; @@ -3487,7 +3367,6 @@ order: 15, open: function(_arg) { var isReply, thread; - thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3498,7 +3377,6 @@ }, hide: function() { var makeStub, thread; - makeStub = $('input', this.parentNode).checked; thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, makeStub); @@ -3507,7 +3385,6 @@ }, hideStub: function() { var thread; - thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, false); $.event('CloseMenu'); @@ -3515,7 +3392,6 @@ }, makeButton: function(thread, type) { var a; - a = $.el('a', { className: "" + type + "-thread-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3527,7 +3403,6 @@ }, saveHiddenState: function(thread, makeStub) { var hiddenThreadsOnCatalog; - hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem("4chan-hide-t-" + g.BOARD)) || {}; if (thread.isHidden) { ThreadHiding.db.set({ @@ -3560,7 +3435,6 @@ }, hide: function(thread, makeStub) { var OP, a, numReplies, opInfo, span, threadRoot; - if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3591,7 +3465,6 @@ }, show: function(thread) { var threadRoot; - if (thread.stub) { $.rm(thread.stub); delete thread.stub; @@ -3604,7 +3477,6 @@ QuoteBacklink = { init: function() { var format; - if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { return; } @@ -3622,7 +3494,6 @@ }, firstNode: function() { var a, clone, container, containers, frag, link, post, quote, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - if (this.isClone || !this.quotes.length) { return; } @@ -3660,7 +3531,6 @@ }, secondNode: function() { var container; - if (this.isClone && (this.origin.isReply || Conf['OP Backlinks'])) { this.nodes.backlinkContainer = $('.container', this.nodes.info); return; @@ -3674,7 +3544,6 @@ }, getContainer: function(id) { var _base; - return (_base = this.containers)[id] || (_base[id] = $.el('span', { className: 'container' })); @@ -3697,7 +3566,6 @@ }, node: function() { var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; - if (this.isClone && this.thread === this.context.thread) { return; } @@ -3733,7 +3601,6 @@ if (Conf['Quote Hash Navigation']) { this.node = function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3746,7 +3613,6 @@ } else { this.node = function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3770,7 +3636,6 @@ }, toggle: function(e) { var boardID, context, postID, threadID, _ref; - if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) { return; } @@ -3796,7 +3661,6 @@ }, add: function(quotelink, boardID, threadID, postID, context) { var inline, isBacklink, post, qroot, root; - isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, @@ -3821,7 +3685,6 @@ }, rm: function(quotelink, boardID, threadID, postID, context) { var el, inlined, isBacklink, post, qroot, root, _ref; - isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); @@ -3863,7 +3726,6 @@ }, node: function() { var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; - if (this.isClone && this.thread === this.context.thread) { return; } @@ -3906,7 +3768,6 @@ }, node: function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3915,7 +3776,6 @@ }, mouseover: function(e) { var boardID, clone, origin, post, postID, posts, qp, quote, quoterID, threadID, _i, _j, _len, _len1, _ref, _ref1; - if ($.hasClass(this, 'inlined')) { return; } @@ -3959,7 +3819,6 @@ }, mouseout: function() { var clone, post, root, _i, _len, _ref; - if (!(root = this.el.firstElementChild)) { return; } @@ -3989,7 +3848,6 @@ }, node: function() { var boardID, postID, quotelink, _i, _len, _ref, _ref1, _ref2; - if (this.isClone) { return; } @@ -4012,7 +3870,6 @@ QuoteThreading = { init: function() { var input; - if (!(Conf['Quote Threading'] && g.VIEW === 'thread')) { return; } @@ -4035,7 +3892,6 @@ }, setup: function() { var ID, post, posts; - $.off(d, '4chanXInitFinished', QuoteThreading.setup); posts = g.posts; for (ID in posts) { @@ -4048,7 +3904,6 @@ }, node: function() { var ID, fullID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _len; - if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) { return; } @@ -4078,7 +3933,6 @@ }, nodeinsert: function() { var bottom, height, posts, qpost, qroot, threadContainer, top, _ref; - posts = g.posts; qpost = posts[this.threaded]; delete this.threaded; @@ -4108,14 +3962,12 @@ }, toggle: function() { var container, containers, node, nodes, replies, reply, thread, _i, _j, _len, _len1; - thread = $('.thread'); replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread); QuoteThreading.enabled = this.checked; if (this.checked) { nodes = (function() { var _i, _len, _results; - _results = []; for (_i = 0, _len = replies.length; _i < _len; _i++) { reply = replies[_i]; @@ -4130,7 +3982,6 @@ } else { replies.sort(function(a, b) { var aID, bID; - aID = Number(a.id.slice(2)); bID = Number(b.id.slice(2)); return aID - bID; @@ -4146,7 +3997,6 @@ }, kb: function() { var control; - control = $.id('threadingControl'); return control.click(); } @@ -4173,7 +4023,6 @@ }, node: function() { var quotelink, _i, _len, _ref; - if (this.isClone) { return; } @@ -4209,7 +4058,6 @@ }, node: function() { var deadlink, _i, _len, _ref; - _ref = $$('.deadlink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; @@ -4224,7 +4072,6 @@ }, parseDeadlink: function(deadlink) { var a, boardID, m, post, postID, quote, quoteID, redirect, _ref; - if (deadlink.parentNode.className === 'prettyprint') { $.replace(deadlink, __slice.call(deadlink.childNodes)); return; @@ -4304,7 +4151,6 @@ cypher: $.el('div'), node: function() { var a, child, cypher, cypherText, data, embed, embedder, embeds, i, index, len, link, links, lookahead, name, next, node, nodes, snapshot, spoiler, text, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2; - if (this.isClone && Conf['Embedding']) { _ref = $$('.embedder', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -4389,7 +4235,6 @@ }, toggle: function() { var el, embed, style, type, url; - embed = this.previousElementSibling; if (this.className.contains("embedded")) { el = $.el('a', { @@ -4483,7 +4328,6 @@ style: 'height: auto; width: 500px; display: inline-block;', el: function() { var div; - div = $.el('div', { className: "soundcloud", name: "soundcloud" @@ -4509,7 +4353,6 @@ regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/, el: function() { var div; - return div = $.el('iframe', { src: "http://pastebin.com/embed_iframe.php?i=" + this.name }); @@ -4519,7 +4362,6 @@ regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function() { var div; - return div = $.el('iframe', { src: "http://www.purplegene.com/script?url=https://gist.github.com/" + this.name + ".js" }); @@ -4530,7 +4372,6 @@ }, text: function() { var file, response; - response = JSON.parse(this.responseText).files; for (file in response) { if (response.hasOwnProperty(file)) { @@ -4551,14 +4392,12 @@ }, embedder: function(a) { var callbacks, embed, key, match, service, titles, type, _ref; - if (!Conf['Link Title']) { return [a]; } titles = {}; callbacks = function() { var title; - return a.textContent = (function() { switch (this.status) { case 200: @@ -4600,7 +4439,6 @@ if (Conf['Link Title'] && (service = type.title)) { $.get('CachedTitles', {}, function(item) { var err, title; - titles = item['CachedTitles']; if (title = titles[match[1]]) { a.textContent = title[0]; @@ -4624,7 +4462,6 @@ QR = { init: function() { var sc; - if (!Conf['Quick Reply']) { return; } @@ -4671,7 +4508,6 @@ }, initReady: function() { var link; - QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; @@ -4691,13 +4527,11 @@ $.before($.id('postForm'), link); $.on(d, 'QRGetSelectedPost', function(_arg) { var cb; - cb = _arg.detail; return cb(QR.selected); }); $.on(d, 'QRAddPreSubmitHook', function(_arg) { var cb; - cb = _arg.detail; return QR.preSubmitHooks.push(cb); }); @@ -4726,7 +4560,6 @@ }, open: function() { var err; - if (QR.nodes) { QR.nodes.el.hidden = false; QR.unhide(); @@ -4745,7 +4578,6 @@ }, close: function() { var i, _i, _len, _ref; - if (QR.req) { QR.abort(); return; @@ -4792,7 +4624,6 @@ }, error: function(err) { var el; - QR.open(); if (typeof err === 'string') { el = $.tn(err); @@ -4820,7 +4651,6 @@ notifications: [], cleanNotifications: function() { var notification, _i, _len, _ref; - _ref = QR.notifications; for (_i = 0, _len = _ref.length; _i < _len; _i++) { notification = _ref[_i]; @@ -4830,7 +4660,6 @@ }, status: function() { var disabled, status, value; - if (!QR.nodes) { return; } @@ -4851,7 +4680,6 @@ QR.persona.getPassword(); return $.get('QR.personas', Conf['QR.personas'], function(_arg) { var arr, item, personas, type, types, _i, _len, _ref; - personas = _arg['QR.personas']; types = { name: [], @@ -4871,7 +4699,6 @@ }, parseItem: function(item, types) { var boards, match, type, val, _ref, _ref1; - if (item[0] === '#') { return; } @@ -4900,7 +4727,6 @@ }, loadPersonas: function(type, arr) { var list, val, _i, _len; - list = $("#list-" + type, QR.nodes.el); for (_i = 0, _len = arr.length; _i < _len; _i++) { val = arr[_i]; @@ -4914,7 +4740,6 @@ }, getPassword: function() { var input, m; - if (!QR.persona.pwd) { QR.persona.pwd = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : (input = $.id('postPassword')) ? input.value : $.id('delPassword').value; } @@ -4923,7 +4748,6 @@ get: function(cb) { return $.get('QR.persona', {}, function(_arg) { var persona; - persona = _arg['QR.persona']; return cb(persona); }); @@ -4931,7 +4755,6 @@ set: function(post) { return $.get('QR.persona', {}, function(_arg) { var persona; - persona = _arg['QR.persona']; persona = { name: post.name, @@ -4945,7 +4768,6 @@ cooldown: { init: function() { var board; - if (!Conf['Cooldown']) { return; } @@ -4987,7 +4809,6 @@ }, sync: function(cooldowns) { var id; - for (id in cooldowns) { QR.cooldown.cooldowns[id] = cooldowns[id]; } @@ -4995,7 +4816,6 @@ }, set: function(data) { var cooldown, delay, hasFile, isReply, isSage, post, req, start, type, upSpd; - if (!Conf['Cooldown']) { return; } @@ -5035,7 +4855,6 @@ }, count: function() { var cooldown, cooldowns, elapsed, hasFile, isReply, isSage, now, post, seconds, start, type, types, upSpd, upSpdAccuracy, update, _ref; - if (!Object.keys(QR.cooldown.cooldowns).length) { $["delete"]("" + g.BOARD + ".cooldown"); delete QR.cooldown.isCounting; @@ -5089,7 +4908,6 @@ }, quote: function(e) { var OP, caretPos, com, index, post, range, s, sel, selectionRoot, text, thread, _ref; - if (e != null) { e.preventDefault(); } @@ -5129,7 +4947,6 @@ }, characterCount: function() { var count, counter; - counter = QR.nodes.charCount; count = QR.nodes.com.textLength; counter.textContent = count; @@ -5138,7 +4955,6 @@ }, drag: function(e) { var toggle; - toggle = e.type === 'dragstart' ? $.off : $.on; toggle(d, 'dragover', QR.dragOver); return toggle(d, 'drop', QR.dropFile); @@ -5158,7 +4974,6 @@ }, paste: function(e) { var blob, files, item, _i, _len, _ref; - files = []; _ref = e.clipboardData.items; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -5186,7 +5001,6 @@ }, fileInput: function(files) { var file, length, max, post, _i, _len; - if (this instanceof Element) { files = __slice.call(this.files); QR.nodes.fileInput.value = null; @@ -5235,7 +5049,6 @@ function _Class(select) { var el, elm, event, prev, _i, _j, _len, _len1, _ref, _ref1, _this = this; - el = $.el('a', { className: 'qr-preview', draggable: true, @@ -5295,7 +5108,6 @@ _Class.prototype.rm = function() { var index; - $.rm(this.nodes.el); index = QR.posts.indexOf(this); if (QR.posts.length === 1) { @@ -5313,7 +5125,6 @@ _Class.prototype.lock = function(lock) { var name, _i, _len, _ref; - if (lock == null) { lock = true; } @@ -5338,7 +5149,6 @@ _Class.prototype.select = function() { var rectEl, rectList; - if (QR.selected) { QR.selected.nodes.el.id = null; QR.selected.forceSave(); @@ -5355,7 +5165,6 @@ _Class.prototype.load = function() { var name, _i, _len, _ref; - _ref = ['thread', 'name', 'email', 'sub', 'com']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; @@ -5367,7 +5176,6 @@ _Class.prototype.save = function(input) { var value, _ref; - if (input.type === 'checkbox') { this.spoiler = input.checked; return; @@ -5386,7 +5194,6 @@ _Class.prototype.forceSave = function() { var name, _i, _len, _ref; - if (this !== QR.selected) { return; } @@ -5418,7 +5225,6 @@ _Class.prototype.setThumbnail = function(fileURL) { var img, reader, _this = this; - if (!window.URL) { if (!fileURL) { reader = new FileReader(); @@ -5434,7 +5240,6 @@ img = $.el('img'); img.onload = function() { var applyBlob, cv, data, height, i, l, s, ui8a, width, _i; - s = 90 * 2; if (_this.file.type === 'image/gif') { s *= 3; @@ -5514,11 +5319,9 @@ _Class.prototype.pasteText = function(file) { var reader, _this = this; - reader = new FileReader(); reader.onload = function(e) { var text; - text = e.target.result; if (_this.com) { _this.com += "\n" + text; @@ -5556,7 +5359,6 @@ _Class.prototype.drop = function() { var el, index, newIndex, oldIndex, post; - el = $('.drag', this.parentNode); $.rmClass(el, 'drag'); $.rmClass(this, 'over'); @@ -5591,7 +5393,6 @@ ready: function() { var imgContainer, input, observer, setLifetime, _this = this; - setLifetime = function(e) { return _this.lifetime = e.detail; }; @@ -5633,7 +5434,6 @@ }); $.get('captchas', [], function(_arg) { var captchas; - captchas = _arg.captchas; return _this.sync(captchas); }); @@ -5650,7 +5450,6 @@ }, getOne: function() { var captcha, challenge, response; - this.clear(); if (captcha = this.captchas.shift()) { challenge = captcha.challenge, response = captcha.response; @@ -5675,7 +5474,6 @@ }, save: function() { var response; - if (!(response = this.nodes.input.value.trim())) { return; } @@ -5690,7 +5488,6 @@ }, clear: function() { var captcha, i, now, _i, _len, _ref; - now = Date.now(); _ref = this.captchas; for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { @@ -5708,7 +5505,6 @@ }, load: function() { var challenge; - if (!this.nodes.challenge.firstChild) { return; } @@ -5721,7 +5517,6 @@ }, count: function() { var count; - count = this.captchas.length; this.nodes.input.placeholder = (function() { switch (count) { @@ -5754,7 +5549,6 @@ }, dialog: function() { var dialog, elm, mimeTypes, name, nodes, thread, _i, _j, _len, _len1, _ref, _ref1; - dialog = UI.dialog('qr', 'top:0;right:0;', "
×
No selected file×+
"); QR.nodes = nodes = { el: dialog, @@ -5874,7 +5668,6 @@ preSubmitHooks: [], submit: function(e) { var callbacks, challenge, err, filetag, hook, opts, post, postData, response, textOnly, thread, threadID, _i, _len, _ref, _ref1; - if (e != null) { e.preventDefault(); } @@ -5960,7 +5753,7 @@ QR.cooldown.auto = false; QR.status(); return QR.error($.el('span', { - innerHTML: "4chan X encountered an error while posting. Please try again. \n[?]" + innerHTML: "4chan X encountered an error while posting. \n[Banned?] [More info]" })); } }; @@ -5987,7 +5780,6 @@ }, response: function() { var URL, ban, board, err, h1, isReply, m, post, postID, req, threadID, tmpDoc, _, _ref, _ref1; - req = QR.req; delete QR.req; post = QR.posts[0]; @@ -6090,7 +5882,6 @@ FappeTyme = { init: function() { var el, input; - if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { return; } @@ -6142,7 +5933,6 @@ }, node: function() { var thumb, _ref; - if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6167,7 +5957,6 @@ }, toggleAll: function() { var ID, file, func, post, _i, _len, _ref, _ref1; - $.event('CloseMenu'); if (ImageExpand.on = $.hasClass(ImageExpand.EAI, 'expand-all-shortcut')) { ImageExpand.EAI.className = 'contract-all-shortcut'; @@ -6201,7 +5990,6 @@ }, toggle: function(post) { var headRect, node, rect, root, thumb, top; - thumb = post.file.thumb; if (!(post.file.isExpanded || $.hasClass(thumb, 'expanding'))) { ImageExpand.expand(post); @@ -6246,7 +6034,6 @@ }, expand: function(post, src) { var img, thumb; - thumb = post.file.thumb; if (post.isHidden || post.file.isExpanded || $.hasClass(thumb, 'expanding')) { return; @@ -6274,7 +6061,6 @@ }, completeExpand: function(post) { var prev, thumb; - thumb = post.file.thumb; if (!$.hasClass(thumb, 'expanding')) { return; @@ -6288,7 +6074,6 @@ prev = post.nodes.root.getBoundingClientRect(); return $.queueTask(function() { var curr, root; - $.addClass(post.nodes.root, 'expanded-image'); $.rmClass(post.file.thumb, 'expanding'); if (!(prev.top + prev.height <= 0)) { @@ -6301,7 +6086,6 @@ }, error: function() { var URL, post, src, timeoutID; - post = Get.postFromNode(this); $.rm(this); delete post.file.fullImage; @@ -6327,7 +6111,6 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; - if (this.status !== 200) { return; } @@ -6351,7 +6134,6 @@ menu: { init: function() { var conf, createSubEntry, el, key, subEntries, _ref; - if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { return; } @@ -6375,7 +6157,6 @@ }, createSubEntry: function(type, config) { var input, label; - label = $.el('label', { innerHTML: " " + type }); @@ -6411,7 +6192,6 @@ }, node: function() { var _ref; - if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6419,7 +6199,6 @@ }, mouseover: function(e) { var el, post; - post = Get.postFromNode(this); el = $.el('img', { id: 'ihover', @@ -6441,7 +6220,6 @@ error: function() { var URL, post, src, timeoutID, _this = this; - if (!doc.contains(this)) { return; } @@ -6466,7 +6244,6 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; - if (this.status !== 200) { return; } @@ -6492,7 +6269,6 @@ ImageLoader = { init: function() { var prefetch; - if (g.VIEW === 'catalog') { return; } @@ -6519,7 +6295,6 @@ }, node: function() { var URL, img, string, style, thumb, type, _ref, _ref1; - if (this.isClone || this.isHidden || this.thread.isHidden || !((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6541,7 +6316,6 @@ }, toggle: function() { var enabled, id, post, _ref; - enabled = Conf['prefetch'] = this.checked; if (enabled) { _ref = g.threads["" + g.BOARD.ID + "." + g.THREADID].posts; @@ -6565,7 +6339,6 @@ }, node: function() { var thumb, _ref; - if (this.isClone || !((_ref = this.file) != null ? _ref.isSpoiler : void 0)) { return; } @@ -6578,7 +6351,6 @@ ArchiveLink = { init: function() { var div, entry, type, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { return; } @@ -6591,7 +6363,6 @@ order: 90, open: function(_arg) { var ID, board, thread; - ID = _arg.ID, thread = _arg.thread, board = _arg.board; return !!Redirect.to('thread', { postID: ID, @@ -6610,14 +6381,12 @@ }, createSubEntry: function(text, type) { var el, open; - el = $.el('a', { textContent: text, target: '_blank' }); open = type === 'post' ? function(_arg) { var ID, board, thread; - ID = _arg.ID, thread = _arg.thread, board = _arg.board; el.href = Redirect.to('thread', { postID: ID, @@ -6627,7 +6396,6 @@ return true; } : function(post) { var value; - value = Filter[type](post); if (!value) { return false; @@ -6650,7 +6418,6 @@ DeleteLink = { init: function() { var div, fileEl, fileEntry, postEl, postEntry; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { return; } @@ -6678,7 +6445,6 @@ el: fileEl, open: function(_arg) { var file; - file = _arg.file; if (!file || file.isDead) { return false; @@ -6694,7 +6460,6 @@ order: 40, open: function(post) { var node; - if (post.isDead || post.board.ID === 'q') { return false; } @@ -6709,7 +6474,6 @@ }, "delete": function() { var fileOnly, form, link, post; - post = DeleteLink.post; if (DeleteLink.cooldown.counting === post) { return; @@ -6738,7 +6502,6 @@ }, load: function(link, post, fileOnly, html) { var msg, s, tmpDoc; - tmpDoc = d.implementation.createHTMLDocument(''); tmpDoc.documentElement.innerHTML = html; if (tmpDoc.title === '4chan - Banned') { @@ -6761,7 +6524,6 @@ cooldown: { start: function(post, node) { var length, seconds, _ref; - if (!((_ref = QR.db) != null ? _ref.get({ boardID: post.board.ID, threadID: post.thread.ID, @@ -6795,7 +6557,6 @@ DownloadLink = { init: function() { var a; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { return; } @@ -6809,7 +6570,6 @@ order: 100, open: function(_arg) { var file; - file = _arg.file; if (!file) { return false; @@ -6835,7 +6595,6 @@ }, node: function() { var button; - button = Menu.makeButton(this); if (this.isClone) { $.replace($('.menu-button', this.nodes.info), button); @@ -6845,11 +6604,9 @@ }, makeButton: (function() { var a; - a = null; return function(post) { var clone; - a || (a = $.el('a', { className: 'menu-button fourchanx-link', innerHTML: '', @@ -6866,7 +6623,6 @@ })(), toggle: function(e) { var post; - post = this.dataset.clone ? Get.postFromNode(this) : g.posts[this.dataset.postid]; return Menu.menu.toggle(e, this, post); } @@ -6875,7 +6631,6 @@ ReportLink = { init: function() { var a; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { return; } @@ -6897,7 +6652,6 @@ }, report: function() { var id, post, set, url; - post = ReportLink.post; url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; id = Date.now(); @@ -6910,7 +6664,6 @@ init: function() { return $.ready(function() { var href; - Favicon.el = $('link[rel="shortcut icon"]', d.head); Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; @@ -6983,7 +6736,6 @@ init: function() { var sc, _this = this; - if (g.VIEW !== 'thread' || !Conf['Thread Stats']) { return; } @@ -7013,7 +6765,6 @@ }, node: function() { var ID, fileCount, post, postCount, _ref; - postCount = 0; fileCount = 0; _ref = this.posts; @@ -7031,7 +6782,6 @@ }, onUpdate: function(e) { var fileCount, postCount, _ref; - if (e.detail[404]) { return; } @@ -7040,7 +6790,6 @@ }, update: function(postCount, fileCount) { var fileCountEl, postCountEl, thread; - thread = ThreadStats.thread, postCountEl = ThreadStats.postCountEl, fileCountEl = ThreadStats.fileCountEl; postCountEl.textContent = postCount; fileCountEl.textContent = fileCount; @@ -7067,7 +6816,6 @@ }, onThreadsLoad: function() { var page, pages, thread, _i, _j, _len, _len1, _ref; - if (!Conf["Page Count in Stats"]) { return; } @@ -7095,7 +6843,6 @@ init: function() { var checked, conf, el, input, name, sc, settings, subEntries, _ref, _this = this; - if (g.VIEW !== 'thread' || !Conf['Thread Updater']) { return; } @@ -7246,7 +6993,6 @@ }, interval: function() { var val; - val = +this.value; if (val < 1) { val = 1; @@ -7256,7 +7002,6 @@ }, load: function() { var klass, req, text, _ref; - req = ThreadUpdater.req; switch (req.status) { case 200: @@ -7300,7 +7045,6 @@ }, getInterval: function() { var i, j; - i = ThreadUpdater.interval; j = Math.min(ThreadUpdater.outdateCount, 10); if (!d.hidden) { @@ -7310,14 +7054,12 @@ }, intervalShortcut: function() { var settings; - Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=Interval]', settings).focus(); }, set: function(name, text, klass) { var el, node; - el = ThreadUpdater[name]; if (node = el.firstChild) { node.data = text; @@ -7330,7 +7072,6 @@ }, timeout: function() { var n; - ThreadUpdater.timeoutID = setTimeout(ThreadUpdater.timeout, 1000); if (!(n = --ThreadUpdater.seconds)) { return ThreadUpdater.update(); @@ -7343,7 +7084,6 @@ }, update: function() { var url; - if (!ThreadUpdater.online) { return; } @@ -7368,7 +7108,6 @@ }, updateThreadStatus: function(title, OP) { var icon, message, root, titleLC; - titleLC = title.toLowerCase(); if (ThreadUpdater.thread["is" + title] === !!OP[titleLC]) { return; @@ -7395,7 +7134,6 @@ }, parse: function(postObjects) { var ID, OP, count, deletedFiles, deletedPosts, files, index, key, node, num, post, postObject, posts, root, scroll, _i, _len, _ref; - OP = postObjects[0]; Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler; ThreadUpdater.updateThreadStatus('Sticky', OP); @@ -7481,7 +7219,6 @@ } $.queueTask(function() { var length, threadID; - threadID = ThreadUpdater.thread.ID; length = $$('.thread > .postContainer', ThreadUpdater.root).length; return Fourchan.parseThread(threadID, length - count, length); @@ -7502,7 +7239,6 @@ ThreadWatcher = { init: function() { var sc; - if (!Conf['Thread Watcher']) { return; } @@ -7536,7 +7272,6 @@ node: function() { var favicon, _this = this; - favicon = $.el('a', { className: 'watch-thread-link', href: 'javascript:;' @@ -7556,7 +7291,6 @@ }, refresh: function(watched) { var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1; - if (!watched) { $.get('WatchedThreads', {}, function(item) { return ThreadWatcher.refresh(item['WatchedThreads']); @@ -7605,13 +7339,11 @@ }, x: function() { var thread; - thread = this.nextElementSibling.pathname.split('/'); return ThreadWatcher.unwatch(thread[1], thread[3]); }, post: function(e) { var board, postID, threadID, _ref; - _ref = e.detail, board = _ref.board, postID = _ref.postID, threadID = _ref.threadID; if (postID === threadID) { if (Conf['Auto Watch']) { @@ -7632,7 +7364,6 @@ unwatch: function(board, threadID) { return $.get('WatchedThreads', {}, function(item) { var watched; - watched = item['WatchedThreads']; delete watched[board][threadID]; if (!Object.keys(watched[board]).length) { @@ -7645,7 +7376,6 @@ watch: function(thread) { return $.get('WatchedThreads', {}, function(item) { var watched, _name; - watched = item['WatchedThreads']; watched[_name = thread.board] || (watched[_name] = {}); watched[thread.board][thread] = { @@ -7691,7 +7421,6 @@ }, ready: function() { var ID, post, posts, _ref; - $.off(d, '4chanXInitFinished', Unread.ready); posts = []; _ref = Unread.thread.posts; @@ -7708,7 +7437,6 @@ }, scroll: function() { var checkPosition, hash, onload, post, posts, prevID, root; - if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } @@ -7740,7 +7468,6 @@ } checkPosition = function(target) { var height, top, _ref; - _ref = target.getBoundingClientRect(), top = _ref.top, height = _ref.height; return top + height - doc.clientHeight > 0; }; @@ -7748,7 +7475,6 @@ }, sync: function() { var lastReadPost; - lastReadPost = Unread.db.get({ boardID: Unread.thread.board.ID, threadID: Unread.thread.ID, @@ -7765,7 +7491,6 @@ }, addPosts: function(posts) { var ID, data, post, _i, _len, _ref; - for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; ID = post.ID; @@ -7793,7 +7518,6 @@ }, addPostQuotingYou: function(post) { var quotelink, _i, _len, _ref; - if (!QR.db) { return; } @@ -7814,7 +7538,6 @@ }, readSinglePost: function(post) { var i; - if ((i = Unread.posts.indexOf(post)) === -1) { return; } @@ -7830,7 +7553,6 @@ }, readArray: function(arr) { var i, post, _i, _len; - for (i = _i = 0, _len = arr.length; _i < _len; i = ++_i) { post = arr[i]; if (post.ID > Unread.lastReadPost) { @@ -7841,7 +7563,6 @@ }, read: $.debounce(50, function(e) { var ID, bottom, height, i, post, posts, read; - if (d.hidden || !Unread.posts.length) { return; } @@ -7875,7 +7596,6 @@ }), setLine: function(force) { var post, root; - if (!(d.hidden || force === true)) { return; } @@ -7890,7 +7610,6 @@ }, update: function() { var count; - count = Unread.posts.length; if (Conf['Unread Count']) { d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); @@ -7909,7 +7628,6 @@ file: {}, init: function() { var archive, arr, boardID, data, id, name, type, _i, _len, _ref, _ref1, _ref2, _ref3; - _ref = Conf['selectedArchives']; for (boardID in _ref) { data = _ref[boardID]; @@ -8036,7 +7754,6 @@ }, to: function(dest, data) { var archive; - archive = (dest === 'search' ? Redirect.thread : Redirect[dest])[data.boardID]; if (!archive) { return ''; @@ -8045,7 +7762,6 @@ }, protocol: function(archive) { var protocol; - protocol = location.protocol; if (!archive[protocol.slice(0, -1)]) { protocol = protocol === 'https:' ? 'http:' : 'https:'; @@ -8054,7 +7770,6 @@ }, thread: function(archive, _arg) { var boardID, path, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; if (archive.software === 'foolfuuka') { @@ -8067,7 +7782,6 @@ }, post: function(archive, _arg) { var boardID, postID, protocol; - boardID = _arg.boardID, postID = _arg.postID; protocol = Redirect.protocol(archive); if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { @@ -8077,13 +7791,11 @@ }, file: function(archive, _arg) { var boardID, filename; - boardID = _arg.boardID, filename = _arg.filename; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; }, search: function(archive, _arg) { var boardID, path, type, value; - boardID = _arg.boardID, type = _arg.type, value = _arg.value; type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; value = encodeURIComponent(value); @@ -8102,7 +7814,6 @@ }, setup: function() { var btn, entry, psa; - $.off(d, '4chanXInitFinished', PSAHiding.setup); if (!(psa = $.id('globalMessage'))) { $.rmClass(doc, 'hide-announcement'); @@ -8131,7 +7842,6 @@ $.on(btn, 'click', PSAHiding.toggle); $.get('hiddenPSA', 0, function(_arg) { var hiddenPSA; - hiddenPSA = _arg.hiddenPSA; PSAHiding.sync(hiddenPSA); $.before(psa, btn); @@ -8141,7 +7851,6 @@ }, toggle: function(e) { var UTC; - if ($.hasClass(this, 'hide-announcement')) { UTC = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', UTC); @@ -8153,7 +7862,6 @@ }, sync: function(UTC) { var hr, psa; - psa = $.id('globalMessage'); psa.hidden = PSAHiding.btn.hidden = UTC && UTC >= +psa.dataset.utc ? true : false; if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') { @@ -8165,7 +7873,6 @@ CatalogLinks = { init: function() { var el, input; - if (!Conf['Catalog Links']) { return; } @@ -8189,14 +7896,12 @@ }, toggle: function() { var useCatalog; - $.event('CloseMenu'); $.set('Header catalog links', useCatalog = this.checked); return CatalogLinks.set(useCatalog); }, set: function(useCatalog) { var a, board, path, _i, _len, _ref; - path = useCatalog ? 'catalog' : ''; _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -8230,7 +7935,6 @@ }, node: function(post) { var str, uid; - if (!(uid = $('.hand', this.nodes.uniqueID))) { return; } @@ -8242,7 +7946,6 @@ ids: {}, compute: function(str) { var hash, rgb; - hash = this.hash(str); rgb = [(hash >> 24) & 0xFF, (hash >> 16) & 0xFF, (hash >> 8) & 0xFF]; rgb[3] = ((rgb[0] * 0.299) + (rgb[1] * 0.587) + (rgb[2] * 0.114)) > 125; @@ -8251,13 +7954,11 @@ }, apply: function() { var rgb; - rgb = IDColor.ids[this] || IDColor.compute(this); return ("background-color: rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "); color: ") + (rgb[3] ? "black; border-radius: 3px; padding: 0px 2px;" : "white; border-radius: 3px; padding: 0px 2px;"); }, hash: function(str) { var i, j, msg; - msg = 0; i = 0; j = str.length; @@ -8296,7 +7997,6 @@ Emoji = { init: function() { var css, icon, name, pos, _ref; - if (!Conf['Emoji']) { return; } @@ -8366,7 +8066,6 @@ }, node: function() { var a; - if (a = $('.abbr > a:not([onclick])', this.nodes.comment)) { return $.on(a, 'click', ExpandComment.cb); } @@ -8374,14 +8073,12 @@ callbacks: [], cb: function(e) { var post; - e.preventDefault(); post = Get.postFromNode(this); return ExpandComment.expand(post); }, expand: function(post) { var a; - if (post.nodes.longComment && !post.nodes.longComment.parentNode) { $.replace(post.nodes.shortComment, post.nodes.longComment); post.nodes.comment = post.nodes.longComment; @@ -8397,7 +8094,6 @@ }, contract: function(post) { var a; - if (!post.nodes.shortComment) { return; } @@ -8408,7 +8104,6 @@ }, parse: function(req, a, post) { var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - status = req.status; if (![200, 304].contains(status)) { a.textContent = "Error " + req.statusText + " (" + status + ")"; @@ -8465,7 +8160,6 @@ }, node: function() { var a, span; - if (!(span = $('.summary', this.OP.nodes.root.parentNode))) { return; } @@ -8479,13 +8173,11 @@ }, cbToggle: function() { var op; - op = Get.postFromRoot(this.previousElementSibling); return ExpandThread.toggle(op.thread); }, toggle: function(thread) { var a, inlined, num, post, replies, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - threadRoot = thread.OP.nodes.root.parentNode; a = $('.summary', threadRoot); switch (thread.isExpanded) { @@ -8554,7 +8246,6 @@ }, parse: function(req, thread, a) { var link, node, nodes, post, posts, replies, reply, spoilerRange, status, _i, _len; - if (a.textContent[0] === '+') { return; } @@ -8612,7 +8303,6 @@ }, createFunc: function(format) { var code; - code = format.replace(/%(.)/g, function(s, c) { if (c in FileInfo.formatters) { return "' + FileInfo.formatters." + c + ".call(post) + '"; @@ -8624,7 +8314,6 @@ }, convertUnit: function(size, unit) { var i; - if (unit === 'B') { return "" + (size.toFixed()) + " Bytes"; } @@ -8655,7 +8344,6 @@ }, n: function() { var fullname, shortname; - fullname = this.file.name; shortname = Build.shortFilename(this.file.name, this.isReply); if (fullname === shortname) { @@ -8699,7 +8387,6 @@ Fourchan = { init: function() { var board; - if (g.VIEW === 'catalog') { return; } @@ -8721,7 +8408,6 @@ }, code: function() { var pre, _i, _len, _ref; - if (this.isClone) { return; } @@ -8751,13 +8437,11 @@ Keybinds = { init: function() { var init; - if (g.VIEW === 'catalog' || !Conf['Keybinds']) { return; } init = function() { var node, _i, _len, _ref; - $.off(d, '4chanXInitFinished', init); $.on(d, 'keydown', Keybinds.keydown); _ref = $$('[accesskey]'); @@ -8770,7 +8454,6 @@ }, keydown: function(e) { var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len; - if (!(key = Keybinds.keyCode(e))) { return; } @@ -8945,7 +8628,6 @@ }, keyCode: function(e) { var kc, key; - key = (function() { switch (kc = e.keyCode) { case 8: @@ -9001,7 +8683,6 @@ }, tags: function(tag, ta) { var range, selEnd, selStart, value; - value = ta.value; selStart = ta.selectionStart; selEnd = ta.selectionEnd; @@ -9012,13 +8693,11 @@ }, sage: function() { var isSage; - isSage = /sage/i.test(QR.nodes.email.value); return QR.nodes.email.value = isSage ? "" : "sage"; }, img: function(thread, all) { var post; - if (all) { return ImageExpand.cb.toggleAll(); } else { @@ -9028,7 +8707,6 @@ }, open: function(thread, tab) { var url; - if (g.VIEW !== 'index') { return; } @@ -9041,7 +8719,6 @@ }, hl: function(delta, thread) { var axe, headRect, next, postEl, rect, replies, reply, root, topMargin, _i, _len; - if (!delta) { if (postEl = $('.reply.highlight', thread)) { $.rmClass(postEl, 'highlight'); @@ -9101,7 +8778,6 @@ Nav = { init: function() { var append, next, prev, span; - switch (g.VIEW) { case 'index': if (!Conf['Index Navigation']) { @@ -9152,7 +8828,6 @@ }, getThread: function(full) { var headRect, i, rect, thread, threads, topMargin, _i, _len; - if (Conf['Bottom header'] || !Conf['Fixed Header']) { topMargin = 0; } else { @@ -9178,7 +8853,6 @@ }, scroll: function(delta) { var i, rect, thread, threads, top, topMargin, _ref, _ref1; - _ref = Nav.getThread(true), threads = _ref[0], thread = _ref[1], i = _ref[2], rect = _ref[3], topMargin = _ref[4]; top = rect.top - topMargin; if (!((delta === -1 && Math.ceil(top) < 0) || (delta === +1 && top > 1))) { @@ -9204,7 +8878,6 @@ }, node: function() { var dateEl; - if (this.isClone) { return; } @@ -9214,7 +8887,6 @@ }, relative: function(diff, now, date) { var days, months, number, rounded, unit, years; - unit = (number = diff / $.DAY) >= 1 ? (years = now.getYear() - date.getYear(), months = now.getMonth() - date.getMonth(), days = now.getDate() - date.getDate(), years > 1 ? (number = years - (months < 0 || months === 0 && days < 0), 'year') : years === 1 && (months > 0 || months === 0 && days >= 0) ? (number = years, 'year') : (months = (months + 12) % 12) > 1 ? (number = months - (days < 0), 'month') : months === 1 && days >= 0 ? (number = months, 'month') : 'day') : (number = diff / $.HOUR) >= 1 ? 'hour' : (number = diff / $.MINUTE) >= 1 ? 'minute' : (number = Math.max(0, diff) / $.SECOND, 'second'); rounded = Math.round(number); if (rounded !== 1) { @@ -9225,7 +8897,6 @@ stale: [], flush: function() { var now, update, _i, _len, _ref; - if (d.hidden) { return; } @@ -9241,16 +8912,13 @@ }, setUpdate: function(post) { var markStale, setOwnTimeout, update; - setOwnTimeout = function(diff) { var delay; - delay = diff < $.MINUTE ? $.SECOND - (diff + $.SECOND / 2) % $.SECOND : diff < $.HOUR ? $.MINUTE - (diff + $.MINUTE / 2) % $.MINUTE : diff < $.DAY ? $.HOUR - (diff + $.HOUR / 2) % $.HOUR : $.DAY - (diff + $.DAY / 2) % $.DAY; return setTimeout(markStale, delay); }; update = function(now) { var date, diff, relative, singlePost, _i, _len, _ref; - date = post.info.date; diff = now - date; relative = RelativeDates.relative(diff, now, date); @@ -9291,7 +8959,6 @@ }, node: function(post) { var spoiler, spoilers, _i, _len; - spoilers = $$('s', this.nodes.comment); for (_i = 0, _len = spoilers.length; _i < _len; _i++) { spoiler = spoilers[_i]; @@ -9311,7 +8978,6 @@ }, ready: function() { var field; - field = $.id('recaptcha_response_field'); $.on(field, 'keydown', function(e) { if (e.keyCode === 8 && !field.value) { @@ -9320,7 +8986,6 @@ }); return $.on($('form'), 'submit', function(e) { var response; - e.preventDefault(); response = field.value.trim(); if (!/\s/.test(response)) { @@ -9334,7 +8999,6 @@ Sauce = { init: function() { var err, link, links, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Sauce']) { return; } @@ -9366,7 +9030,6 @@ }, createSauceLink: function(link) { var m, text; - link = link.replace(/%(T?URL|MD5|board)/ig, function(parameter) { switch (parameter) { case '%TURL': @@ -9387,7 +9050,6 @@ }, node: function() { var link, nodes, _i, _len, _ref; - if (this.isClone || !this.file) { return; } @@ -9420,7 +9082,6 @@ }, createFunc: function(format) { var code; - code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { return "' + Time.formatters." + c + ".call(date) + '"; @@ -9505,7 +9166,6 @@ Settings = { init: function() { var link, settings; - link = $.el('a', { className: 'settings-link', textContent: 'Settings', @@ -9515,7 +9175,6 @@ Header.addShortcut(link); $.get('previousversion', null, function(item) { var changelog, el, previous; - if (previous = item['previousversion']) { if (previous === g.VERSION) { return; @@ -9553,7 +9212,6 @@ }, open: function(openSection) { var dialog, html, link, links, overlay, section, sectionToOpen, _i, _len, _ref; - $.off(d, '4chanXInitFinished', Settings.open); if (Settings.dialog) { return; @@ -9606,7 +9264,6 @@ sections: [], addSection: function(title, open) { var hyphenatedTitle, _ref; - if (typeof title !== 'string') { _ref = title.detail, title = _ref.title, open = _ref.open; } @@ -9619,7 +9276,6 @@ }, openSection: function() { var section, selected; - if (selected = $('.tab-selected', Settings.dialog)) { $.rmClass(selected, 'tab-selected'); } @@ -9633,7 +9289,6 @@ }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; - items = {}; inputs = {}; _ref = Config.main; @@ -9658,7 +9313,6 @@ } $.get(items, function(items) { var val; - for (key in items) { val = items[key]; inputs[key].checked = val; @@ -9673,7 +9327,6 @@ boards: {} }, function(item) { var ID, board, thread, _ref1; - _ref1 = item.hiddenThreads.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9688,7 +9341,6 @@ boards: {} }, function(item) { var ID, board, post, thread, _ref1; - _ref1 = item.hiddenPosts.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9708,7 +9360,6 @@ boards: {} }, function(item) { var boardID; - for (boardID in item.hiddenThreads.boards) { localStorage.removeItem("4chan-hide-t-" + boardID); } @@ -9719,7 +9370,6 @@ }, "export": function(now, data) { var a, db, p, _i, _len; - if (typeof now !== 'number') { now = Date.now(); data = { @@ -9756,7 +9406,6 @@ }, onImport: function() { var file, output, reader; - if (!(file = this.files[0])) { return; } @@ -9768,7 +9417,6 @@ reader = new FileReader(); reader.onload = function(e) { var data, err; - try { data = JSON.parse(e.target.result); Settings.loadSettings(data); @@ -9785,7 +9433,6 @@ }, loadSettings: function(data) { var key, val, version, _ref; - version = data.version.split('.'); if (version[0] === '2') { data = Settings.convertSettings(data, { @@ -9875,7 +9522,6 @@ }, convertSettings: function(data, map) { var newKey, prevKey; - for (prevKey in map) { newKey = map[prevKey]; if (newKey) { @@ -9887,7 +9533,6 @@ }, filter: function(section) { var select; - section.innerHTML = "
"; select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -9895,7 +9540,6 @@ }, selectFilter: function() { var div, name, ta; - div = this.nextElementSibling; if ((name = this.value) !== 'guide') { $.rmAll(div); @@ -9915,7 +9559,6 @@ }, sauce: function(section) { var ta; - section.innerHTML = "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
"; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -9925,7 +9568,6 @@ }, advanced: function(section) { var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; - section.innerHTML = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

\n One item per line.
\n Items will be added in the relevant input's auto-completion list.
\n Password items will always be used, since there is no password input.
\n Lines starting with a # will be ignored.\n

Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; inputs = {}; @@ -9945,7 +9587,6 @@ $.on(ta, 'change', $.cb.value); $.get(items, function(items) { var key, val; - for (key in items) { val = items[key]; if (['emojiPos'].contains(key)) { @@ -10016,7 +9657,6 @@ }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var option, selectedArchives, type; - selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; @@ -10031,7 +9671,6 @@ }, addArchiveCell: function(boardID, data, type) { var archive, i, length, options, select, td; - length = data[type].length; td = $.el('td', { className: 'archive-cell' @@ -10061,10 +9700,8 @@ }, saveSelectedArchive: function() { var _this = this; - return $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var selectedArchives, _name; - selectedArchives = _arg.selectedArchives; (selectedArchives[_name = _this.dataset.boardid] || (selectedArchives[_name] = {}))[_this.dataset.type] = _this.value; return $.set('selectedArchives', selectedArchives); @@ -10075,7 +9712,6 @@ }, time: function() { var funk; - funk = Time.createFunc(this.value); return this.nextElementSibling.textContent = funk(Time, new Date()); }, @@ -10084,7 +9720,6 @@ }, fileInfo: function() { var data, funk; - data = { isReply: true, file: { @@ -10123,7 +9758,6 @@ }, keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; - section.innerHTML = "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
"; tbody = $('tbody', section); items = {}; @@ -10144,7 +9778,6 @@ } return $.get(items, function(items) { var val; - for (key in items) { val = items[key]; inputs[key].value = val; @@ -10153,7 +9786,6 @@ }, keybind: function(e) { var key; - if (e.keyCode === 9) { return; } @@ -10170,10 +9802,8 @@ Main = { init: function(items) { var db, flatten, _i, _len; - flatten = function(parent, obj) { var key, val; - if (obj instanceof Array) { Conf[parent] = obj[0]; } else if (typeof obj === 'object') { @@ -10197,13 +9827,11 @@ $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { var _ref; - return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Main.initStyle); }, initFeatures: function(items) { var init, pathname, _ref; - Conf = items; pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); @@ -10232,7 +9860,6 @@ case 'images.4chan.org': $.ready(function() { var URL; - if (Conf['404 Redirect'] && d.title === '4chan - 404 Not Found') { Redirect.init(); pathname = location.pathname.split('/'); @@ -10249,7 +9876,6 @@ } init = function(features) { var err, module, name; - for (name in features) { module = features[name]; try { @@ -10325,7 +9951,6 @@ }, initStyle: function() { var mainStyleSheet, observer, setStyle, style, styleSheets, _ref; - $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; @@ -10346,7 +9971,6 @@ styleSheets = $$('link[rel="alternate stylesheet"]', d.head); setStyle = function() { var styleSheet, _i, _len; - $.rmClass(doc, style); for (_i = 0, _len = styleSheets.length; _i < _len; _i++) { styleSheet = styleSheets[_i]; @@ -10373,7 +9997,6 @@ }, initReady: function() { var board, boardChild, err, errors, href, passLink, posts, styleSelector, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; - if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { @@ -10450,7 +10073,6 @@ }, callbackNodes: function(klass, nodes) { var callback, err, errors, i, len, node, _i, _len, _ref; - len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -10478,11 +10100,9 @@ }, callbackNodesDB: function(klass, nodes, cb) { var errors, func, i, len, node, queue, softTask; - queue = []; softTask = function() { var args, func, task; - task = queue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -10501,7 +10121,6 @@ errors = null; func = function(node, i) { var callback, err, _i, _len, _ref; - _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; @@ -10535,7 +10154,6 @@ }, addCallback: function(e) { var Klass, obj; - obj = e.detail; if (typeof obj.callback.name !== 'string') { throw new Error("Invalid callback name: " + obj.callback.name); @@ -10555,7 +10173,6 @@ }, message: function(e) { var el, version; - version = e.data.version; if (version && version !== g.VERSION) { el = $.el('span', { @@ -10566,14 +10183,12 @@ }, checkUpdate: function() { var now; - if (!(Conf['Check for Updates'] && Main.isThisPageLegit())) { return; } now = Date.now(); return $.get('lastchecked', 0, function(_arg) { var lastchecked; - lastchecked = _arg.lastchecked; if (lastchecked > now - $.DAY) { return; @@ -10589,7 +10204,6 @@ }, handleErrors: function(errors) { var div, error, logs, _i, _len; - if (!(errors instanceof Array)) { error = errors; } else if (errors.length === 1) { @@ -10604,7 +10218,6 @@ }); $.on(div.lastElementChild, 'click', function() { var _ref; - return _ref = this.textContent === 'show' ? ['hide', false] : ['show', true], this.textContent = _ref[0], logs.hidden = _ref[1], _ref; }); logs = $.el('div', { @@ -10618,7 +10231,6 @@ }, parseError: function(data) { var error, message; - Main.logError(data); message = $.el('div', { textContent: data.message @@ -10635,7 +10247,6 @@ }, isThisPageLegit: function() { var _ref; - if (!('thisPageIsLegit' in Main)) { Main.thisPageIsLegit = location.hostname === 'boards.4chan.org' && !$('link[href*="favicon-status.ico"]', d.head) && ((_ref = d.title) !== '4chan - Temporarily Offline' && _ref !== '4chan - Error'); } diff --git a/builds/crx/script.js b/builds/crx/script.js index dfc0591c9..e8caffd32 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.25 - 2013-08-04 +* 4chan X - Version 1.2.25 - 2013-08-11 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -317,7 +317,6 @@ Array.prototype.add = function(object, position) { var keep; - keep = this.slice(position); this.length = position; this.push(object); @@ -330,7 +329,6 @@ Array.prototype.indexOf = function(object) { var i; - i = this.length; while (i--) { if (this[i] === object) { @@ -342,7 +340,6 @@ Array.prototype.pushArrays = function() { var arg, args, _i, _len; - args = arguments; for (_i = 0, _len = args.length; _i < _len; _i++) { arg = args[_i]; @@ -353,7 +350,6 @@ Array.prototype.remove = function(object) { var index; - if ((index = this.indexOf(object)) > -1) { return this.splice(index, 1); } else { @@ -370,7 +366,6 @@ $.extend = function(object, properties) { var key, val; - for (key in properties) { val = properties[key]; if (!properties.hasOwnProperty(key)) { @@ -388,7 +383,6 @@ $.ready = function(fc) { var cb, _ref; - if ((_ref = d.readyState) === 'interactive' || _ref === 'complete') { $.queueTask(fc); return; @@ -402,7 +396,6 @@ $.formData = function(form) { var fd, key, val; - if (form instanceof HTMLFormElement) { return new FormData(form); } @@ -423,7 +416,6 @@ $.ajax = function(url, callbacks, opts) { var cred, err, form, headers, key, r, sync, type, upCallbacks, val; - if (opts == null) { opts = {}; } @@ -449,11 +441,9 @@ $.cache = (function() { var reqs; - reqs = {}; return function(url, cb) { var err, req, rm; - if (req = reqs[url]) { if (req.readyState === 4) { cb.call(req, req.evt); @@ -469,7 +459,6 @@ req = $.ajax(url, { onload: function(e) { var _i, _len, _ref; - _ref = this.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { cb = _ref[_i]; @@ -511,7 +500,6 @@ $.addStyle = function(css, id) { var style; - style = $.el('style', { id: id, textContent: css @@ -558,7 +546,6 @@ } else { return function(el) { var _ref; - return (_ref = el.parentNode) != null ? _ref.removeChild(el) : void 0; }; } @@ -566,7 +553,6 @@ $.rmAll = function(root) { var node; - while (node = root.firstChild) { root.removeChild(node); } @@ -582,7 +568,6 @@ $.nodes = function(nodes) { var frag, node, _i, _len; - if (!(nodes instanceof Array)) { return nodes; } @@ -616,7 +601,6 @@ $.el = function(tag, properties) { var el; - el = d.createElement(tag); if (properties) { $.extend(el, properties); @@ -626,7 +610,6 @@ $.on = function(el, events, handler) { var event, _i, _len, _ref; - _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -636,7 +619,6 @@ $.off = function(el, events, handler) { var event, _i, _len, _ref; - _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -660,7 +642,6 @@ $.debounce = function(wait, fn) { var args, exec, lastCall, that, timeout; - lastCall = 0; timeout = null; that = null; @@ -682,11 +663,9 @@ $.queueTask = (function() { var execTask, taskChannel, taskQueue; - taskQueue = []; execTask = function() { var args, func, task; - task = taskQueue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -709,7 +688,6 @@ $.globalEval = function(code) { var script; - script = $.el('script', { textContent: code }); @@ -719,7 +697,6 @@ $.bytesToString = function(size) { var unit; - unit = 0; while (size >= 1024) { size /= 1024; @@ -738,7 +715,6 @@ $.sync = (function() { chrome.storage.onChanged.addListener(function(changes) { var cb, key; - for (key in changes) { if (cb = $.syncing[key]) { cb(changes[key].newValue); @@ -752,7 +728,6 @@ $.item = function(key, val) { var item; - item = {}; item[key] = val; return item; @@ -766,7 +741,6 @@ $.get = function(key, val, cb) { var count, done, items, localItems, syncItems; - if (typeof cb === 'function') { items = $.item(key, val); } else { @@ -786,7 +760,6 @@ count = 0; done = function(item) { var lastError; - lastError = chrome.runtime.lastError; if (lastError) { c.error(lastError, lastError.message || 'No message.'); @@ -808,12 +781,10 @@ $.set = (function() { var items, localItems, set; - items = {}; localItems = {}; set = $.debounce($.SECOND, function() { var err, key, _i, _len, _ref; - _ref = $.localKeys; for (_i = 0, _len = _ref.length; _i < _len; _i++) { key = _ref[_i]; @@ -898,7 +869,6 @@ function Post(root, thread, board, that) { var alt, anchor, capcode, date, email, file, fileInfo, flag, info, name, post, size, subject, thumb, tripcode, uniqueID, unit; - this.thread = thread; this.board = board; if (that == null) { @@ -997,7 +967,6 @@ Post.prototype.parseComment = function() { var bq, data, i, node, nodes, text, _i, _len, _ref; - bq = this.nodes.comment.cloneNode(true); _ref = $$('.abbr, .capcodeReplies, .exif, b', bq); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1015,7 +984,6 @@ Post.prototype.parseQuotes = function() { var hash, pathname, quotelink, quotes, _i, _len, _ref; - quotes = {}; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1045,7 +1013,6 @@ Post.prototype.kill = function(file, now) { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; - now || (now = new Date()); if (file) { if (this.file.isDead) { @@ -1094,7 +1061,6 @@ Post.prototype.resurrect = function() { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; - delete this.isDead; delete this.timeOfDeath; $.rmClass(this.nodes.root, 'deleted-post'); @@ -1128,7 +1094,6 @@ Post.prototype.rmClone = function(index) { var clone, _i, _len, _ref; - this.clones.splice(index, 1); _ref = this.clones.slice(index); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1146,7 +1111,6 @@ function Clone(origin, context) { var file, index, info, inline, inlined, key, nodes, post, root, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; - this.origin = origin; this.context = context; _ref = ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']; @@ -1235,7 +1199,6 @@ function DataBoard(key, sync) { var init, _this = this; - this.key = key; this.data = Conf[key]; $.sync(key, this.onSync.bind(this)); @@ -1252,7 +1215,6 @@ DataBoard.prototype["delete"] = function(_arg) { var boardID, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; if (postID) { delete this.data.boards[boardID][threadID][postID]; @@ -1273,7 +1235,6 @@ DataBoard.prototype.deleteIfEmpty = function(_arg) { var boardID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID; if (threadID) { if (!Object.keys(this.data.boards[boardID][threadID]).length) { @@ -1289,7 +1250,6 @@ DataBoard.prototype.set = function(_arg) { var boardID, postID, threadID, val, _base, _base1, _base2; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, val = _arg.val; if (postID !== void 0) { ((_base = ((_base1 = this.data.boards)[boardID] || (_base1[boardID] = {})))[threadID] || (_base[threadID] = {}))[postID] = val; @@ -1303,7 +1263,6 @@ DataBoard.prototype.get = function(_arg) { var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { if (!threadID) { @@ -1327,7 +1286,6 @@ DataBoard.prototype.clean = function() { var boardID, now, val, _ref; - _ref = this.data.boards; for (boardID in _ref) { val = _ref[boardID]; @@ -1347,10 +1305,8 @@ DataBoard.prototype.ajaxClean = function(boardID) { var _this = this; - return $.cache("//api.4chan.org/" + boardID + "/threads.json", function(e) { var board, page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; - if (e.target.status === 404) { _this["delete"](boardID); } else if (e.target.status === 200) { @@ -1461,7 +1417,6 @@ init: function() { var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, _this = this; - this.menu = new UI.Menu('header'); this.menuButton = $.el('span', { className: 'menu-button', @@ -1545,7 +1500,6 @@ } $.asap((function() { var _ref; - return $.id('boardNavMobile') || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Header.setBoardList); $.prepend(d.body, _this.bar); @@ -1554,7 +1508,6 @@ }); return $.ready(function() { var a, cs; - _this.footer = $.id('boardNavDesktopFoot'); if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) { a.className = 'current'; @@ -1588,7 +1541,6 @@ }), setBoardList: function() { var a, boardList, btn, fourchannav, fullBoardList; - fourchannav = $.id('boardNavDesktop'); if (a = $("a[href*='/" + g.BOARD + "/']", fourchannav)) { a.className = 'current'; @@ -1610,7 +1562,6 @@ }, generateBoardList: function(text) { var as, list, nodes; - list = $('#custom-board-list', Header.bar); $.rmAll(list); if (!text) { @@ -1619,7 +1570,6 @@ as = $$('#full-board-list a', Header.bar); nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+")|\,"[^"]+[^"]"))*|[^\w@]+/g).map(function(t) { var a, board, m, _i, _len; - if (/^[^\w@]/.test(t)) { return $.tn(t); } @@ -1666,7 +1616,6 @@ }, toggleBoardList: function() { var bar, custom, full, showBoardList; - bar = Header.bar; custom = $('#custom-board-list', bar); full = $('#full-board-list', bar); @@ -1702,7 +1651,6 @@ }, toggleLinkJustify: function() { var centered; - $.event('CloseMenu'); centered = this.nodeName === 'INPUT' ? this.checked : void 0; Header.setLinkJustify(centered); @@ -1732,7 +1680,6 @@ }, toggleBarVisibility: function(e) { var hide, message; - if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -1749,7 +1696,6 @@ }, toggleFooterVisibility: function() { var hide, message; - $.event('CloseMenu'); hide = this.nodeName === 'INPUT' ? this.checked : !!Header.footer.hidden; Header.setFooterVisibility(hide); @@ -1759,7 +1705,6 @@ }, setCustomNav: function(show) { var btn, cust, full, _ref; - Header.customNavToggler.checked = show; cust = $('#custom-board-list', Header.bar); full = $('#full-board-list', Header.bar); @@ -1772,14 +1717,12 @@ }, editCustomNav: function() { var settings; - Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=boardnav]', settings).focus(); }, hashScroll: function() { var hash, post; - if (!((hash = this.location.hash.slice(1)) && (post = $.id(hash)))) { return; } @@ -1790,7 +1733,6 @@ }, scrollToPost: function(post) { var headRect, top; - top = post.getBoundingClientRect().top; if (Conf['Fixed Header'] && !Conf['Bottom Header']) { headRect = Header.bar.getBoundingClientRect(); @@ -1800,7 +1742,6 @@ }, addShortcut: function(el) { var shortcut; - shortcut = $.el('span', { className: 'shortcut fourchanx-link' }); @@ -1812,7 +1753,6 @@ }, createNotification: function(e) { var cb, content, lifetime, notif, type, _ref; - _ref = e.detail, type = _ref.type, content = _ref.content, lifetime = _ref.lifetime, cb = _ref.cb; notif = new Notification(type, content, lifetime); if (cb) { @@ -1825,7 +1765,6 @@ spoilerRange: {}, shortFilename: function(filename, isReply) { var threshold; - threshold = isReply ? 30 : 40; if (filename.length - 4 > threshold) { return "" + filename.slice(0, threshold - 5) + "(...)." + filename.slice(-3); @@ -1835,7 +1774,6 @@ }, postFromObject: function(data, boardID) { var o; - o = { postID: data.no, threadID: data.resto || data.no, @@ -1879,7 +1817,6 @@ */ var a, boardID, capcode, capcodeClass, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; - postID = o.postID, threadID = o.threadID, boardID = o.boardID, name = o.name, capcode = o.capcode, tripcode = o.tripcode, uniqueID = o.uniqueID, email = o.email, subject = o.subject, flagCode = o.flagCode, flagName = o.flagName, date = o.date, dateUTC = o.dateUTC, isSticky = o.isSticky, isClosed = o.isClosed, comment = o.comment, file = o.file; isOP = postID === threadID; staticPath = '//static.4chan.org/image/'; @@ -1975,7 +1912,6 @@ Get = { threadExcerpt: function(thread) { var OP, excerpt, _ref; - OP = thread.OP; excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); if (excerpt.length > 70) { @@ -1988,7 +1924,6 @@ }, postFromRoot: function(root) { var boardID, index, link, post, postID; - link = $('a[title="Highlight this post"]', root); boardID = link.pathname.split('/')[1]; postID = link.hash.slice(2); @@ -2008,7 +1943,6 @@ }, postDataFromLink: function(link) { var boardID, path, postID, threadID; - if (link.hostname === 'boards.4chan.org') { path = link.pathname.split('/'); boardID = path[1]; @@ -2027,7 +1961,6 @@ }, allQuotelinksLinkingTo: function(post) { var ID, quote, quotedPost, quotelinks, quoterPost, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; - quotelinks = []; _ref = g.posts; for (ID in _ref) { @@ -2056,14 +1989,12 @@ } return quotelinks.filter(function(quotelink) { var boardID, postID, _ref4; - _ref4 = Get.postDataFromLink(quotelink), boardID = _ref4.boardID, postID = _ref4.postID; return boardID === post.board.ID && postID === post.ID; }); }, postClone: function(boardID, threadID, postID, root, context) { var post, url; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2084,7 +2015,6 @@ }, insert: function(post, root, context) { var clone, nodes; - if (!root.parentNode) { return; } @@ -2098,7 +2028,6 @@ }, fetchedPost: function(req, boardID, threadID, postID, root, context) { var board, post, posts, status, thread, url, _i, _len; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2148,7 +2077,6 @@ }, archivedPost: function(req, boardID, postID, root, context) { var board, bq, comment, data, o, post, thread, threadID, _ref; - if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2242,10 +2170,8 @@ UI = (function() { var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove; - dialog = function(id, position, html) { var child, el, move, _i, _len, _ref; - el = $.el('div', { className: 'dialog', innerHTML: html, @@ -2285,7 +2211,6 @@ Menu.prototype.makeMenu = function() { var menu; - menu = $.el('div', { className: 'dialog', id: 'menu', @@ -2300,7 +2225,6 @@ Menu.prototype.toggle = function(e, button, data) { var previousButton; - e.preventDefault(); e.stopPropagation(); if (currentMenu) { @@ -2318,7 +2242,6 @@ Menu.prototype.open = function(button, data) { var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2; - menu = this.makeMenu(); currentMenu = menu; lastToggledButton = button; @@ -2357,7 +2280,6 @@ Menu.prototype.insertEntry = function(entry, parent, data) { var subEntry, submenu, _i, _len, _ref; - if (typeof entry.open === 'function') { if (!entry.open(data)) { return; @@ -2391,7 +2313,6 @@ Menu.prototype.findNextEntry = function(entry, direction) { var entries; - entries = __slice.call(entry.parentNode.children); entries.sort(function(first, second) { return +(first.style.order || first.style.webkitOrder) - +(second.style.order || second.style.webkitOrder); @@ -2401,7 +2322,6 @@ Menu.prototype.keybinds = function(e) { var entry, next, nextPrev, subEntry, submenu; - entry = $('.focused', currentMenu); while (subEntry = $('.focused', entry)) { entry = subEntry; @@ -2447,7 +2367,6 @@ Menu.prototype.focus = function(entry) { var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; - while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2475,7 +2394,6 @@ Menu.prototype.addEntry = function(e) { var entry; - entry = e.detail; if (entry.type !== this.type) { return; @@ -2486,7 +2404,6 @@ Menu.prototype.parseEntry = function(entry) { var el, style, subEntries, subEntry, _i, _len; - el = entry.el, subEntries = entry.subEntries; $.addClass(el, 'entry'); $.on(el, 'focus mouseover', (function(e) { @@ -2510,7 +2427,6 @@ })(); dragstart = function(e) { var el, isTouching, o, rect, screenHeight, screenWidth, _ref; - if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -2549,7 +2465,6 @@ }; touchmove = function(e) { var touch, _i, _len, _ref; - _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2561,7 +2476,6 @@ }; drag = function(e) { var bottom, clientX, clientY, left, right, style, top; - clientX = e.clientX, clientY = e.clientY; left = clientX - this.dx; left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%'; @@ -2577,7 +2491,6 @@ }; touchend = function(e) { var touch, _i, _len, _ref; - _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2599,7 +2512,6 @@ }; hoverstart = function(_arg) { var asapTest, cb, el, endEvents, latestEvent, o, root; - root = _arg.root, el = _arg.el, latestEvent = _arg.latestEvent, endEvents = _arg.endEvents, asapTest = _arg.asapTest, cb = _arg.cb; o = { root: root, @@ -2628,7 +2540,6 @@ }; hover = function(e) { var clientX, clientY, height, left, right, style, top, _ref; - this.latestEvent = e; height = this.el.offsetHeight; clientX = e.clientX, clientY = e.clientY; @@ -2671,7 +2582,6 @@ }, node: function() { var email, name, tripcode, _ref; - if (this.info.capcode || this.isClone) { return; } @@ -2698,7 +2608,6 @@ filters: {}, init: function() { var boards, err, filter, hl, key, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4; - if (g.VIEW === 'catalog' || !Conf['Filter']) { return; } @@ -2735,7 +2644,6 @@ op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'yes'; stub = (function() { var _ref3; - switch ((_ref3 = filter.match(/stub:(yes|no)/)) != null ? _ref3[1] : void 0) { case 'yes': return true; @@ -2766,7 +2674,6 @@ }, createFilter: function(regexp, op, stub, hl, top) { var settings, test; - test = typeof regexp === 'string' ? function(value) { return regexp === value; } : function(value) { @@ -2790,7 +2697,6 @@ }, node: function() { var filter, firstThread, key, result, thisThread, value, _i, _len, _ref; - if (this.isClone) { return; } @@ -2902,7 +2808,6 @@ menu: { init: function() { var div, entry, type, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { return; } @@ -2928,7 +2833,6 @@ }, createSubEntry: function(text, type) { var el; - el = $.el('a', { href: 'javascript:;', textContent: text @@ -2939,7 +2843,6 @@ el: el, open: function(post) { var value; - value = Filter[type](post); return value !== false; } @@ -2947,7 +2850,6 @@ }, makeFilter: function() { var re, type, value; - type = this.dataset.type; value = Filter[type](Filter.menu.post); re = ['uniqueID', 'MD5'].contains(type) ? value : value.replace(/\/|\\|\^|\$|\n|\.|\(|\)|\{|\}|\[|\]|\?|\*|\+|\|/g, function(c) { @@ -2962,7 +2864,6 @@ re = ['uniqueID', 'MD5'].contains(type) ? "/" + re + "/" : "/^" + re + "$/"; return $.get(type, Conf[type], function(item) { var save, section, select, ta, tl; - save = item[type]; save = save ? "" + save + "\n" + re : re; $.set(type, save); @@ -2996,7 +2897,6 @@ }, node: function() { var data; - if (!this.isReply || this.isClone) { return; } @@ -3020,7 +2920,6 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub, replies, thisPost; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { return; } @@ -3091,7 +2990,6 @@ order: 20, open: function(post) { var data; - if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3123,7 +3021,6 @@ order: 15, open: function(post) { var data; - if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3140,7 +3037,6 @@ }, hide: function() { var makeStub, parent, post, replies, thisPost; - parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3159,7 +3055,6 @@ }, show: function() { var data, parent, post, replies, thisPost; - parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3183,7 +3078,6 @@ }, hideStub: function() { var post; - post = PostHiding.menu.post; post.nodes.root.hidden = true; $.event('CloseMenu'); @@ -3191,7 +3085,6 @@ }, makeButton: function(post, type) { var a; - a = $.el('a', { className: "" + type + "-reply-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3202,7 +3095,6 @@ }, saveHiddenState: function(post, isHiding, thisPost, makeStub, hideRecursively) { var data; - data = { boardID: post.board.ID, threadID: post.thread.ID, @@ -3221,7 +3113,6 @@ }, toggle: function() { var post; - post = Get.postFromNode(this); if (post.isHidden) { PostHiding.show(post); @@ -3232,7 +3123,6 @@ }, hide: function(post, makeStub, hideRecursively) { var a, postInfo, quotelink, _i, _len, _ref; - if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3270,7 +3160,6 @@ }, show: function(post, showRecursively) { var quotelink, _i, _len, _ref; - if (showRecursively == null) { showRecursively = Conf['Recursive Hiding']; } @@ -3306,7 +3195,6 @@ }, node: function() { var i, obj, quote, recursive, _i, _j, _len, _len1, _ref, _ref1; - if (this.isClone) { return; } @@ -3324,7 +3212,6 @@ }, add: function() { var args, obj, post, recursive, _base, _name; - recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; obj = (_base = Recursive.recursives)[_name = post.fullID] || (_base[_name] = { recursives: [], @@ -3335,7 +3222,6 @@ }, rm: function(recursive, post) { var i, obj, rec, _i, _len, _ref; - if (!(obj = Recursive.recursives[post.fullID])) { return; } @@ -3350,7 +3236,6 @@ }, apply: function() { var ID, args, fullID, post, recursive, _ref; - recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; fullID = post.fullID; _ref = g.posts; @@ -3377,7 +3262,6 @@ }, node: function() { var data; - if (data = ThreadHiding.db.get({ boardID: this.board.ID, threadID: this.ID @@ -3391,7 +3275,6 @@ }, syncCatalog: function() { var hiddenThreads, hiddenThreadsOnCatalog, threadID; - hiddenThreads = ThreadHiding.db.get({ boardID: g.BOARD.ID, defaultValue: {} @@ -3418,7 +3301,6 @@ cleanCatalog: function(hiddenThreadsOnCatalog) { return $.cache("//api.4chan.org/" + g.BOARD + "/threads.json", function() { var page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; - if (this.status !== 200) { return; } @@ -3444,7 +3326,6 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub; - if (g.VIEW !== 'index' || !Conf['Menu'] || !Conf['Thread Hiding Link']) { return; } @@ -3471,7 +3352,6 @@ order: 20, open: function(_arg) { var isReply, thread; - thread = _arg.thread, isReply = _arg.isReply; if (isReply || thread.isHidden) { return false; @@ -3493,7 +3373,6 @@ order: 15, open: function(_arg) { var isReply, thread; - thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3504,7 +3383,6 @@ }, hide: function() { var makeStub, thread; - makeStub = $('input', this.parentNode).checked; thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, makeStub); @@ -3513,7 +3391,6 @@ }, hideStub: function() { var thread; - thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, false); $.event('CloseMenu'); @@ -3521,7 +3398,6 @@ }, makeButton: function(thread, type) { var a; - a = $.el('a', { className: "" + type + "-thread-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3533,7 +3409,6 @@ }, saveHiddenState: function(thread, makeStub) { var hiddenThreadsOnCatalog; - hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem("4chan-hide-t-" + g.BOARD)) || {}; if (thread.isHidden) { ThreadHiding.db.set({ @@ -3566,7 +3441,6 @@ }, hide: function(thread, makeStub) { var OP, a, numReplies, opInfo, span, threadRoot; - if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3597,7 +3471,6 @@ }, show: function(thread) { var threadRoot; - if (thread.stub) { $.rm(thread.stub); delete thread.stub; @@ -3610,7 +3483,6 @@ QuoteBacklink = { init: function() { var format; - if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { return; } @@ -3628,7 +3500,6 @@ }, firstNode: function() { var a, clone, container, containers, frag, link, post, quote, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - if (this.isClone || !this.quotes.length) { return; } @@ -3666,7 +3537,6 @@ }, secondNode: function() { var container; - if (this.isClone && (this.origin.isReply || Conf['OP Backlinks'])) { this.nodes.backlinkContainer = $('.container', this.nodes.info); return; @@ -3680,7 +3550,6 @@ }, getContainer: function(id) { var _base; - return (_base = this.containers)[id] || (_base[id] = $.el('span', { className: 'container' })); @@ -3703,7 +3572,6 @@ }, node: function() { var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; - if (this.isClone && this.thread === this.context.thread) { return; } @@ -3739,7 +3607,6 @@ if (Conf['Quote Hash Navigation']) { this.node = function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3752,7 +3619,6 @@ } else { this.node = function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3776,7 +3642,6 @@ }, toggle: function(e) { var boardID, context, postID, threadID, _ref; - if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) { return; } @@ -3802,7 +3667,6 @@ }, add: function(quotelink, boardID, threadID, postID, context) { var inline, isBacklink, post, qroot, root; - isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, @@ -3827,7 +3691,6 @@ }, rm: function(quotelink, boardID, threadID, postID, context) { var el, inlined, isBacklink, post, qroot, root, _ref; - isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); @@ -3869,7 +3732,6 @@ }, node: function() { var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; - if (this.isClone && this.thread === this.context.thread) { return; } @@ -3912,7 +3774,6 @@ }, node: function() { var link, _i, _len, _ref; - _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3921,7 +3782,6 @@ }, mouseover: function(e) { var boardID, clone, origin, post, postID, posts, qp, quote, quoterID, threadID, _i, _j, _len, _len1, _ref, _ref1; - if ($.hasClass(this, 'inlined')) { return; } @@ -3965,7 +3825,6 @@ }, mouseout: function() { var clone, post, root, _i, _len, _ref; - if (!(root = this.el.firstElementChild)) { return; } @@ -3995,7 +3854,6 @@ }, node: function() { var boardID, postID, quotelink, _i, _len, _ref, _ref1, _ref2; - if (this.isClone) { return; } @@ -4018,7 +3876,6 @@ QuoteThreading = { init: function() { var input; - if (!(Conf['Quote Threading'] && g.VIEW === 'thread')) { return; } @@ -4041,7 +3898,6 @@ }, setup: function() { var ID, post, posts; - $.off(d, '4chanXInitFinished', QuoteThreading.setup); posts = g.posts; for (ID in posts) { @@ -4054,7 +3910,6 @@ }, node: function() { var ID, fullID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _len; - if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) { return; } @@ -4084,7 +3939,6 @@ }, nodeinsert: function() { var bottom, height, posts, qpost, qroot, threadContainer, top, _ref; - posts = g.posts; qpost = posts[this.threaded]; delete this.threaded; @@ -4114,14 +3968,12 @@ }, toggle: function() { var container, containers, node, nodes, replies, reply, thread, _i, _j, _len, _len1; - thread = $('.thread'); replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread); QuoteThreading.enabled = this.checked; if (this.checked) { nodes = (function() { var _i, _len, _results; - _results = []; for (_i = 0, _len = replies.length; _i < _len; _i++) { reply = replies[_i]; @@ -4136,7 +3988,6 @@ } else { replies.sort(function(a, b) { var aID, bID; - aID = Number(a.id.slice(2)); bID = Number(b.id.slice(2)); return aID - bID; @@ -4152,7 +4003,6 @@ }, kb: function() { var control; - control = $.id('threadingControl'); return control.click(); } @@ -4179,7 +4029,6 @@ }, node: function() { var quotelink, _i, _len, _ref; - if (this.isClone) { return; } @@ -4215,7 +4064,6 @@ }, node: function() { var deadlink, _i, _len, _ref; - _ref = $$('.deadlink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; @@ -4230,7 +4078,6 @@ }, parseDeadlink: function(deadlink) { var a, boardID, m, post, postID, quote, quoteID, redirect, _ref; - if (deadlink.parentNode.className === 'prettyprint') { $.replace(deadlink, __slice.call(deadlink.childNodes)); return; @@ -4310,7 +4157,6 @@ cypher: $.el('div'), node: function() { var a, child, cypher, cypherText, data, embed, embedder, embeds, i, index, len, link, links, lookahead, name, next, node, nodes, snapshot, spoiler, text, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2; - if (this.isClone && Conf['Embedding']) { _ref = $$('.embedder', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -4395,7 +4241,6 @@ }, toggle: function() { var el, embed, style, type, url; - embed = this.previousElementSibling; if (this.className.contains("embedded")) { el = $.el('a', { @@ -4489,7 +4334,6 @@ style: 'height: auto; width: 500px; display: inline-block;', el: function() { var div; - div = $.el('div', { className: "soundcloud", name: "soundcloud" @@ -4515,7 +4359,6 @@ regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/, el: function() { var div; - return div = $.el('iframe', { src: "http://pastebin.com/embed_iframe.php?i=" + this.name }); @@ -4525,7 +4368,6 @@ regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function() { var div; - return div = $.el('iframe', { src: "http://www.purplegene.com/script?url=https://gist.github.com/" + this.name + ".js" }); @@ -4536,7 +4378,6 @@ }, text: function() { var file, response; - response = JSON.parse(this.responseText).files; for (file in response) { if (response.hasOwnProperty(file)) { @@ -4557,14 +4398,12 @@ }, embedder: function(a) { var callbacks, embed, key, match, service, titles, type, _ref; - if (!Conf['Link Title']) { return [a]; } titles = {}; callbacks = function() { var title; - return a.textContent = (function() { switch (this.status) { case 200: @@ -4606,7 +4445,6 @@ if (Conf['Link Title'] && (service = type.title)) { $.get('CachedTitles', {}, function(item) { var err, title; - titles = item['CachedTitles']; if (title = titles[match[1]]) { a.textContent = title[0]; @@ -4630,7 +4468,6 @@ QR = { init: function() { var sc; - if (!Conf['Quick Reply']) { return; } @@ -4677,7 +4514,6 @@ }, initReady: function() { var link; - QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; @@ -4697,13 +4533,11 @@ $.before($.id('postForm'), link); $.on(d, 'QRGetSelectedPost', function(_arg) { var cb; - cb = _arg.detail; return cb(QR.selected); }); $.on(d, 'QRAddPreSubmitHook', function(_arg) { var cb; - cb = _arg.detail; return QR.preSubmitHooks.push(cb); }); @@ -4733,7 +4567,6 @@ }, open: function() { var err; - if (QR.nodes) { QR.nodes.el.hidden = false; QR.unhide(); @@ -4752,7 +4585,6 @@ }, close: function() { var i, _i, _len, _ref; - if (QR.req) { QR.abort(); return; @@ -4799,7 +4631,6 @@ }, error: function(err) { var el; - QR.open(); if (typeof err === 'string') { el = $.tn(err); @@ -4827,7 +4658,6 @@ notifications: [], cleanNotifications: function() { var notification, _i, _len, _ref; - _ref = QR.notifications; for (_i = 0, _len = _ref.length; _i < _len; _i++) { notification = _ref[_i]; @@ -4837,7 +4667,6 @@ }, status: function() { var disabled, status, value; - if (!QR.nodes) { return; } @@ -4858,7 +4687,6 @@ QR.persona.getPassword(); return $.get('QR.personas', Conf['QR.personas'], function(_arg) { var arr, item, personas, type, types, _i, _len, _ref; - personas = _arg['QR.personas']; types = { name: [], @@ -4878,7 +4706,6 @@ }, parseItem: function(item, types) { var boards, match, type, val, _ref, _ref1; - if (item[0] === '#') { return; } @@ -4907,7 +4734,6 @@ }, loadPersonas: function(type, arr) { var list, val, _i, _len; - list = $("#list-" + type, QR.nodes.el); for (_i = 0, _len = arr.length; _i < _len; _i++) { val = arr[_i]; @@ -4921,7 +4747,6 @@ }, getPassword: function() { var input, m; - if (!QR.persona.pwd) { QR.persona.pwd = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : (input = $.id('postPassword')) ? input.value : $.id('delPassword').value; } @@ -4930,7 +4755,6 @@ get: function(cb) { return $.get('QR.persona', {}, function(_arg) { var persona; - persona = _arg['QR.persona']; return cb(persona); }); @@ -4938,7 +4762,6 @@ set: function(post) { return $.get('QR.persona', {}, function(_arg) { var persona; - persona = _arg['QR.persona']; persona = { name: post.name, @@ -4952,7 +4775,6 @@ cooldown: { init: function() { var board; - if (!Conf['Cooldown']) { return; } @@ -4994,7 +4816,6 @@ }, sync: function(cooldowns) { var id; - for (id in cooldowns) { QR.cooldown.cooldowns[id] = cooldowns[id]; } @@ -5002,7 +4823,6 @@ }, set: function(data) { var cooldown, delay, hasFile, isReply, isSage, post, req, start, type, upSpd; - if (!Conf['Cooldown']) { return; } @@ -5042,7 +4862,6 @@ }, count: function() { var cooldown, cooldowns, elapsed, hasFile, isReply, isSage, now, post, seconds, start, type, types, upSpd, upSpdAccuracy, update, _ref; - if (!Object.keys(QR.cooldown.cooldowns).length) { $["delete"]("" + g.BOARD + ".cooldown"); delete QR.cooldown.isCounting; @@ -5096,7 +4915,6 @@ }, quote: function(e) { var OP, caretPos, com, index, post, range, s, sel, selectionRoot, text, thread, _ref; - if (e != null) { e.preventDefault(); } @@ -5136,7 +4954,6 @@ }, characterCount: function() { var count, counter; - counter = QR.nodes.charCount; count = QR.nodes.com.textLength; counter.textContent = count; @@ -5145,7 +4962,6 @@ }, drag: function(e) { var toggle; - toggle = e.type === 'dragstart' ? $.off : $.on; toggle(d, 'dragover', QR.dragOver); return toggle(d, 'drop', QR.dropFile); @@ -5165,7 +4981,6 @@ }, paste: function(e) { var blob, files, item, _i, _len, _ref; - files = []; _ref = e.clipboardData.items; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -5193,7 +5008,6 @@ }, fileInput: function(files) { var file, length, max, post, _i, _len; - if (this instanceof Element) { files = __slice.call(this.files); QR.nodes.fileInput.value = null; @@ -5242,7 +5056,6 @@ function _Class(select) { var el, event, prev, _i, _len, _ref, _this = this; - el = $.el('a', { className: 'qr-preview', draggable: true, @@ -5296,7 +5109,6 @@ _Class.prototype.rm = function() { var index; - $.rm(this.nodes.el); index = QR.posts.indexOf(this); if (QR.posts.length === 1) { @@ -5314,7 +5126,6 @@ _Class.prototype.lock = function(lock) { var name, _i, _len, _ref; - if (lock == null) { lock = true; } @@ -5339,7 +5150,6 @@ _Class.prototype.select = function() { var rectEl, rectList; - if (QR.selected) { QR.selected.nodes.el.id = null; QR.selected.forceSave(); @@ -5356,7 +5166,6 @@ _Class.prototype.load = function() { var name, _i, _len, _ref; - _ref = ['thread', 'name', 'email', 'sub', 'com']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; @@ -5368,7 +5177,6 @@ _Class.prototype.save = function(input) { var value, _ref; - if (input.type === 'checkbox') { this.spoiler = input.checked; return; @@ -5387,7 +5195,6 @@ _Class.prototype.forceSave = function() { var name, _i, _len, _ref; - if (this !== QR.selected) { return; } @@ -5419,7 +5226,6 @@ _Class.prototype.setThumbnail = function(fileURL) { var img, reader, _this = this; - if (!window.URL) { if (!fileURL) { reader = new FileReader(); @@ -5435,7 +5241,6 @@ img = $.el('img'); img.onload = function() { var applyBlob, cv, data, height, i, l, s, ui8a, width, _i; - s = 90 * 2; if (_this.file.type === 'image/gif') { s *= 3; @@ -5515,11 +5320,9 @@ _Class.prototype.pasteText = function(file) { var reader, _this = this; - reader = new FileReader(); reader.onload = function(e) { var text; - text = e.target.result; if (_this.com) { _this.com += "\n" + text; @@ -5557,7 +5360,6 @@ _Class.prototype.drop = function() { var el, index, newIndex, oldIndex, post; - el = $('.drag', this.parentNode); $.rmClass(el, 'drag'); $.rmClass(this, 'over'); @@ -5592,7 +5394,6 @@ ready: function() { var imgContainer, input, observer, setLifetime, _this = this; - setLifetime = function(e) { return _this.lifetime = e.detail; }; @@ -5634,7 +5435,6 @@ }); $.get('captchas', [], function(_arg) { var captchas; - captchas = _arg.captchas; return _this.sync(captchas); }); @@ -5649,7 +5449,6 @@ }, getOne: function() { var captcha, challenge, response; - this.clear(); if (captcha = this.captchas.shift()) { challenge = captcha.challenge, response = captcha.response; @@ -5674,7 +5473,6 @@ }, save: function() { var response; - if (!(response = this.nodes.input.value.trim())) { return; } @@ -5689,7 +5487,6 @@ }, clear: function() { var captcha, i, now, _i, _len, _ref; - now = Date.now(); _ref = this.captchas; for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { @@ -5707,7 +5504,6 @@ }, load: function() { var challenge; - if (!this.nodes.challenge.firstChild) { return; } @@ -5720,7 +5516,6 @@ }, count: function() { var count; - count = this.captchas.length; this.nodes.input.placeholder = (function() { switch (count) { @@ -5753,7 +5548,6 @@ }, dialog: function() { var dialog, mimeTypes, name, nodes, thread, _i, _len, _ref; - dialog = UI.dialog('qr', 'top:0;right:0;', "
×
No selected file×+
"); QR.nodes = nodes = { el: dialog, @@ -5856,7 +5650,6 @@ preSubmitHooks: [], submit: function(e) { var callbacks, challenge, err, filetag, hook, opts, post, postData, response, textOnly, thread, threadID, _i, _len, _ref, _ref1; - if (e != null) { e.preventDefault(); } @@ -5942,7 +5735,7 @@ QR.cooldown.auto = false; QR.status(); return QR.error($.el('span', { - innerHTML: "4chan X encountered an error while posting. Please try again. \n[?]" + innerHTML: "4chan X encountered an error while posting. \n[Banned?] [More info]" })); } }; @@ -5969,7 +5762,6 @@ }, response: function() { var URL, ban, board, err, h1, isReply, m, post, postID, req, threadID, tmpDoc, _, _ref, _ref1; - req = QR.req; delete QR.req; post = QR.posts[0]; @@ -6072,7 +5864,6 @@ FappeTyme = { init: function() { var el, input; - if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { return; } @@ -6124,7 +5915,6 @@ }, node: function() { var thumb, _ref; - if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6149,7 +5939,6 @@ }, toggleAll: function() { var ID, file, func, post, _i, _len, _ref, _ref1; - $.event('CloseMenu'); if (ImageExpand.on = $.hasClass(ImageExpand.EAI, 'expand-all-shortcut')) { ImageExpand.EAI.className = 'contract-all-shortcut'; @@ -6183,7 +5972,6 @@ }, toggle: function(post) { var headRect, node, rect, root, thumb, top; - thumb = post.file.thumb; if (!(post.file.isExpanded || $.hasClass(thumb, 'expanding'))) { ImageExpand.expand(post); @@ -6228,7 +6016,6 @@ }, expand: function(post, src) { var img, thumb; - thumb = post.file.thumb; if (post.isHidden || post.file.isExpanded || $.hasClass(thumb, 'expanding')) { return; @@ -6256,7 +6043,6 @@ }, completeExpand: function(post) { var prev, thumb; - thumb = post.file.thumb; if (!$.hasClass(thumb, 'expanding')) { return; @@ -6270,7 +6056,6 @@ prev = post.nodes.root.getBoundingClientRect(); return $.queueTask(function() { var curr, root; - $.addClass(post.nodes.root, 'expanded-image'); $.rmClass(post.file.thumb, 'expanding'); if (!(prev.top + prev.height <= 0)) { @@ -6283,7 +6068,6 @@ }, error: function() { var URL, post, src, timeoutID; - post = Get.postFromNode(this); $.rm(this); delete post.file.fullImage; @@ -6309,7 +6093,6 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; - if (this.status !== 200) { return; } @@ -6333,7 +6116,6 @@ menu: { init: function() { var conf, createSubEntry, el, key, subEntries, _ref; - if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { return; } @@ -6357,7 +6139,6 @@ }, createSubEntry: function(type, config) { var input, label; - label = $.el('label', { innerHTML: " " + type }); @@ -6393,7 +6174,6 @@ }, node: function() { var _ref; - if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6401,7 +6181,6 @@ }, mouseover: function(e) { var el, post; - post = Get.postFromNode(this); el = $.el('img', { id: 'ihover', @@ -6423,7 +6202,6 @@ error: function() { var URL, post, src, timeoutID, _this = this; - if (!doc.contains(this)) { return; } @@ -6448,7 +6226,6 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; - if (this.status !== 200) { return; } @@ -6474,7 +6251,6 @@ ImageLoader = { init: function() { var prefetch; - if (g.VIEW === 'catalog') { return; } @@ -6501,7 +6277,6 @@ }, node: function() { var URL, img, string, style, thumb, type, _ref, _ref1; - if (this.isClone || this.isHidden || this.thread.isHidden || !((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6523,7 +6298,6 @@ }, toggle: function() { var enabled, id, post, _ref; - enabled = Conf['prefetch'] = this.checked; if (enabled) { _ref = g.threads["" + g.BOARD.ID + "." + g.THREADID].posts; @@ -6547,7 +6321,6 @@ }, node: function() { var thumb, _ref; - if (this.isClone || !((_ref = this.file) != null ? _ref.isSpoiler : void 0)) { return; } @@ -6560,7 +6333,6 @@ ArchiveLink = { init: function() { var div, entry, type, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { return; } @@ -6573,7 +6345,6 @@ order: 90, open: function(_arg) { var ID, board, thread; - ID = _arg.ID, thread = _arg.thread, board = _arg.board; return !!Redirect.to('thread', { postID: ID, @@ -6592,14 +6363,12 @@ }, createSubEntry: function(text, type) { var el, open; - el = $.el('a', { textContent: text, target: '_blank' }); open = type === 'post' ? function(_arg) { var ID, board, thread; - ID = _arg.ID, thread = _arg.thread, board = _arg.board; el.href = Redirect.to('thread', { postID: ID, @@ -6609,7 +6378,6 @@ return true; } : function(post) { var value; - value = Filter[type](post); if (!value) { return false; @@ -6632,7 +6400,6 @@ DeleteLink = { init: function() { var div, fileEl, fileEntry, postEl, postEntry; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { return; } @@ -6660,7 +6427,6 @@ el: fileEl, open: function(_arg) { var file; - file = _arg.file; if (!file || file.isDead) { return false; @@ -6676,7 +6442,6 @@ order: 40, open: function(post) { var node; - if (post.isDead || post.board.ID === 'q') { return false; } @@ -6691,7 +6456,6 @@ }, "delete": function() { var fileOnly, form, link, post; - post = DeleteLink.post; if (DeleteLink.cooldown.counting === post) { return; @@ -6720,7 +6484,6 @@ }, load: function(link, post, fileOnly, html) { var msg, s, tmpDoc; - tmpDoc = d.implementation.createHTMLDocument(''); tmpDoc.documentElement.innerHTML = html; if (tmpDoc.title === '4chan - Banned') { @@ -6743,7 +6506,6 @@ cooldown: { start: function(post, node) { var length, seconds, _ref; - if (!((_ref = QR.db) != null ? _ref.get({ boardID: post.board.ID, threadID: post.thread.ID, @@ -6777,7 +6539,6 @@ DownloadLink = { init: function() { var a; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { return; } @@ -6791,7 +6552,6 @@ order: 100, open: function(_arg) { var file; - file = _arg.file; if (!file) { return false; @@ -6817,7 +6577,6 @@ }, node: function() { var button; - button = Menu.makeButton(this); if (this.isClone) { $.replace($('.menu-button', this.nodes.info), button); @@ -6827,11 +6586,9 @@ }, makeButton: (function() { var a; - a = null; return function(post) { var clone; - a || (a = $.el('a', { className: 'menu-button fourchanx-link', innerHTML: '', @@ -6848,7 +6605,6 @@ })(), toggle: function(e) { var post; - post = this.dataset.clone ? Get.postFromNode(this) : g.posts[this.dataset.postid]; return Menu.menu.toggle(e, this, post); } @@ -6857,7 +6613,6 @@ ReportLink = { init: function() { var a; - if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { return; } @@ -6879,7 +6634,6 @@ }, report: function() { var id, post, set, url; - post = ReportLink.post; url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; id = Date.now(); @@ -6892,7 +6646,6 @@ init: function() { return $.ready(function() { var href; - Favicon.el = $('link[rel="shortcut icon"]', d.head); Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; @@ -6965,7 +6718,6 @@ init: function() { var sc, _this = this; - if (g.VIEW !== 'thread' || !Conf['Thread Stats']) { return; } @@ -6995,7 +6747,6 @@ }, node: function() { var ID, fileCount, post, postCount, _ref; - postCount = 0; fileCount = 0; _ref = this.posts; @@ -7013,7 +6764,6 @@ }, onUpdate: function(e) { var fileCount, postCount, _ref; - if (e.detail[404]) { return; } @@ -7022,7 +6772,6 @@ }, update: function(postCount, fileCount) { var fileCountEl, postCountEl, thread; - thread = ThreadStats.thread, postCountEl = ThreadStats.postCountEl, fileCountEl = ThreadStats.fileCountEl; postCountEl.textContent = postCount; fileCountEl.textContent = fileCount; @@ -7049,7 +6798,6 @@ }, onThreadsLoad: function() { var page, pages, thread, _i, _j, _len, _len1, _ref; - if (!Conf["Page Count in Stats"]) { return; } @@ -7077,7 +6825,6 @@ init: function() { var checked, conf, el, input, name, sc, settings, subEntries, _ref, _this = this; - if (g.VIEW !== 'thread' || !Conf['Thread Updater']) { return; } @@ -7228,7 +6975,6 @@ }, interval: function() { var val; - val = +this.value; if (val < 1) { val = 1; @@ -7238,7 +6984,6 @@ }, load: function() { var klass, req, text, _ref; - req = ThreadUpdater.req; switch (req.status) { case 200: @@ -7282,7 +7027,6 @@ }, getInterval: function() { var i, j; - i = ThreadUpdater.interval; j = Math.min(ThreadUpdater.outdateCount, 10); if (!d.hidden) { @@ -7292,14 +7036,12 @@ }, intervalShortcut: function() { var settings; - Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=Interval]', settings).focus(); }, set: function(name, text, klass) { var el, node; - el = ThreadUpdater[name]; if (node = el.firstChild) { node.data = text; @@ -7312,7 +7054,6 @@ }, timeout: function() { var n; - ThreadUpdater.timeoutID = setTimeout(ThreadUpdater.timeout, 1000); if (!(n = --ThreadUpdater.seconds)) { return ThreadUpdater.update(); @@ -7325,7 +7066,6 @@ }, update: function() { var url; - if (!ThreadUpdater.online) { return; } @@ -7350,7 +7090,6 @@ }, updateThreadStatus: function(title, OP) { var icon, message, root, titleLC; - titleLC = title.toLowerCase(); if (ThreadUpdater.thread["is" + title] === !!OP[titleLC]) { return; @@ -7377,7 +7116,6 @@ }, parse: function(postObjects) { var ID, OP, count, deletedFiles, deletedPosts, files, index, key, node, num, post, postObject, posts, root, scroll, _i, _len, _ref; - OP = postObjects[0]; Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler; ThreadUpdater.updateThreadStatus('Sticky', OP); @@ -7463,7 +7201,6 @@ } $.queueTask(function() { var length, threadID; - threadID = ThreadUpdater.thread.ID; length = $$('.thread > .postContainer', ThreadUpdater.root).length; return Fourchan.parseThread(threadID, length - count, length); @@ -7484,7 +7221,6 @@ ThreadWatcher = { init: function() { var sc; - if (!Conf['Thread Watcher']) { return; } @@ -7518,7 +7254,6 @@ node: function() { var favicon, _this = this; - favicon = $.el('a', { className: 'watch-thread-link', href: 'javascript:;' @@ -7538,7 +7273,6 @@ }, refresh: function(watched) { var ID, board, div, favicon, id, link, nodes, props, thread, x, _ref, _ref1; - if (!watched) { $.get('WatchedThreads', {}, function(item) { return ThreadWatcher.refresh(item['WatchedThreads']); @@ -7587,13 +7321,11 @@ }, x: function() { var thread; - thread = this.nextElementSibling.pathname.split('/'); return ThreadWatcher.unwatch(thread[1], thread[3]); }, post: function(e) { var board, postID, threadID, _ref; - _ref = e.detail, board = _ref.board, postID = _ref.postID, threadID = _ref.threadID; if (postID === threadID) { if (Conf['Auto Watch']) { @@ -7614,7 +7346,6 @@ unwatch: function(board, threadID) { return $.get('WatchedThreads', {}, function(item) { var watched; - watched = item['WatchedThreads']; delete watched[board][threadID]; if (!Object.keys(watched[board]).length) { @@ -7627,7 +7358,6 @@ watch: function(thread) { return $.get('WatchedThreads', {}, function(item) { var watched, _name; - watched = item['WatchedThreads']; watched[_name = thread.board] || (watched[_name] = {}); watched[thread.board][thread] = { @@ -7673,7 +7403,6 @@ }, ready: function() { var ID, post, posts, _ref; - $.off(d, '4chanXInitFinished', Unread.ready); posts = []; _ref = Unread.thread.posts; @@ -7690,7 +7419,6 @@ }, scroll: function() { var checkPosition, hash, onload, post, posts, prevID, root; - if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } @@ -7722,7 +7450,6 @@ } checkPosition = function(target) { var height, top, _ref; - _ref = target.getBoundingClientRect(), top = _ref.top, height = _ref.height; return top + height - doc.clientHeight > 0; }; @@ -7730,7 +7457,6 @@ }, sync: function() { var lastReadPost; - lastReadPost = Unread.db.get({ boardID: Unread.thread.board.ID, threadID: Unread.thread.ID, @@ -7747,7 +7473,6 @@ }, addPosts: function(posts) { var ID, data, post, _i, _len, _ref; - for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; ID = post.ID; @@ -7775,7 +7500,6 @@ }, addPostQuotingYou: function(post) { var quotelink, _i, _len, _ref; - if (!QR.db) { return; } @@ -7796,7 +7520,6 @@ }, readSinglePost: function(post) { var i; - if ((i = Unread.posts.indexOf(post)) === -1) { return; } @@ -7812,7 +7535,6 @@ }, readArray: function(arr) { var i, post, _i, _len; - for (i = _i = 0, _len = arr.length; _i < _len; i = ++_i) { post = arr[i]; if (post.ID > Unread.lastReadPost) { @@ -7823,7 +7545,6 @@ }, read: $.debounce(50, function(e) { var ID, bottom, height, i, post, posts, read; - if (d.hidden || !Unread.posts.length) { return; } @@ -7857,7 +7578,6 @@ }), setLine: function(force) { var post, root; - if (!(d.hidden || force === true)) { return; } @@ -7872,7 +7592,6 @@ }, update: function(dontrepeat) { var count; - count = Unread.posts.length; if (Conf['Unread Count']) { d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); @@ -7896,7 +7615,6 @@ file: {}, init: function() { var archive, arr, boardID, data, id, name, type, _i, _len, _ref, _ref1, _ref2, _ref3; - _ref = Conf['selectedArchives']; for (boardID in _ref) { data = _ref[boardID]; @@ -8023,7 +7741,6 @@ }, to: function(dest, data) { var archive; - archive = (dest === 'search' ? Redirect.thread : Redirect[dest])[data.boardID]; if (!archive) { return ''; @@ -8032,7 +7749,6 @@ }, protocol: function(archive) { var protocol; - protocol = location.protocol; if (!archive[protocol.slice(0, -1)]) { protocol = protocol === 'https:' ? 'http:' : 'https:'; @@ -8041,7 +7757,6 @@ }, thread: function(archive, _arg) { var boardID, path, postID, threadID; - boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; if (archive.software === 'foolfuuka') { @@ -8054,7 +7769,6 @@ }, post: function(archive, _arg) { var boardID, postID, protocol; - boardID = _arg.boardID, postID = _arg.postID; protocol = Redirect.protocol(archive); if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { @@ -8064,13 +7778,11 @@ }, file: function(archive, _arg) { var boardID, filename; - boardID = _arg.boardID, filename = _arg.filename; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; }, search: function(archive, _arg) { var boardID, path, type, value; - boardID = _arg.boardID, type = _arg.type, value = _arg.value; type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; value = encodeURIComponent(value); @@ -8089,7 +7801,6 @@ }, setup: function() { var btn, entry, psa; - $.off(d, '4chanXInitFinished', PSAHiding.setup); if (!(psa = $.id('globalMessage'))) { $.rmClass(doc, 'hide-announcement'); @@ -8118,7 +7829,6 @@ $.on(btn, 'click', PSAHiding.toggle); $.get('hiddenPSA', 0, function(_arg) { var hiddenPSA; - hiddenPSA = _arg.hiddenPSA; PSAHiding.sync(hiddenPSA); $.before(psa, btn); @@ -8128,7 +7838,6 @@ }, toggle: function(e) { var UTC; - if ($.hasClass(this, 'hide-announcement')) { UTC = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', UTC); @@ -8140,7 +7849,6 @@ }, sync: function(UTC) { var hr, psa; - psa = $.id('globalMessage'); psa.hidden = PSAHiding.btn.hidden = UTC && UTC >= +psa.dataset.utc ? true : false; if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') { @@ -8152,7 +7860,6 @@ CatalogLinks = { init: function() { var el, input; - if (!Conf['Catalog Links']) { return; } @@ -8176,14 +7883,12 @@ }, toggle: function() { var useCatalog; - $.event('CloseMenu'); $.set('Header catalog links', useCatalog = this.checked); return CatalogLinks.set(useCatalog); }, set: function(useCatalog) { var a, board, path, _i, _len, _ref; - path = useCatalog ? 'catalog' : ''; _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -8217,7 +7922,6 @@ }, node: function(post) { var str, uid; - if (!(uid = $('.hand', this.nodes.uniqueID))) { return; } @@ -8229,7 +7933,6 @@ ids: {}, compute: function(str) { var hash, rgb; - hash = this.hash(str); rgb = [(hash >> 24) & 0xFF, (hash >> 16) & 0xFF, (hash >> 8) & 0xFF]; rgb[3] = ((rgb[0] * 0.299) + (rgb[1] * 0.587) + (rgb[2] * 0.114)) > 125; @@ -8238,13 +7941,11 @@ }, apply: function() { var rgb; - rgb = IDColor.ids[this] || IDColor.compute(this); return ("background-color: rgb(" + rgb[0] + "," + rgb[1] + "," + rgb[2] + "); color: ") + (rgb[3] ? "black; border-radius: 3px; padding: 0px 2px;" : "white; border-radius: 3px; padding: 0px 2px;"); }, hash: function(str) { var i, j, msg; - msg = 0; i = 0; j = str.length; @@ -8283,7 +7984,6 @@ Emoji = { init: function() { var css, icon, name, pos, _ref; - if (!Conf['Emoji']) { return; } @@ -8353,7 +8053,6 @@ }, node: function() { var a; - if (a = $('.abbr > a:not([onclick])', this.nodes.comment)) { return $.on(a, 'click', ExpandComment.cb); } @@ -8361,14 +8060,12 @@ callbacks: [], cb: function(e) { var post; - e.preventDefault(); post = Get.postFromNode(this); return ExpandComment.expand(post); }, expand: function(post) { var a; - if (post.nodes.longComment && !post.nodes.longComment.parentNode) { $.replace(post.nodes.shortComment, post.nodes.longComment); post.nodes.comment = post.nodes.longComment; @@ -8384,7 +8081,6 @@ }, contract: function(post) { var a; - if (!post.nodes.shortComment) { return; } @@ -8395,7 +8091,6 @@ }, parse: function(req, a, post) { var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - status = req.status; if (![200, 304].contains(status)) { a.textContent = "Error " + req.statusText + " (" + status + ")"; @@ -8452,7 +8147,6 @@ }, node: function() { var a, span; - if (!(span = $('.summary', this.OP.nodes.root.parentNode))) { return; } @@ -8466,13 +8160,11 @@ }, cbToggle: function() { var op; - op = Get.postFromRoot(this.previousElementSibling); return ExpandThread.toggle(op.thread); }, toggle: function(thread) { var a, inlined, num, post, replies, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; - threadRoot = thread.OP.nodes.root.parentNode; a = $('.summary', threadRoot); switch (thread.isExpanded) { @@ -8541,7 +8233,6 @@ }, parse: function(req, thread, a) { var link, node, nodes, post, posts, replies, reply, spoilerRange, status, _i, _len; - if (a.textContent[0] === '+') { return; } @@ -8599,7 +8290,6 @@ }, createFunc: function(format) { var code; - code = format.replace(/%(.)/g, function(s, c) { if (c in FileInfo.formatters) { return "' + FileInfo.formatters." + c + ".call(post) + '"; @@ -8611,7 +8301,6 @@ }, convertUnit: function(size, unit) { var i; - if (unit === 'B') { return "" + (size.toFixed()) + " Bytes"; } @@ -8642,7 +8331,6 @@ }, n: function() { var fullname, shortname; - fullname = this.file.name; shortname = Build.shortFilename(this.file.name, this.isReply); if (fullname === shortname) { @@ -8686,7 +8374,6 @@ Fourchan = { init: function() { var board; - if (g.VIEW === 'catalog') { return; } @@ -8708,7 +8395,6 @@ }, code: function() { var pre, _i, _len, _ref; - if (this.isClone) { return; } @@ -8738,13 +8424,11 @@ Keybinds = { init: function() { var init; - if (g.VIEW === 'catalog' || !Conf['Keybinds']) { return; } init = function() { var node, _i, _len, _ref; - $.off(d, '4chanXInitFinished', init); $.on(d, 'keydown', Keybinds.keydown); _ref = $$('[accesskey]'); @@ -8757,7 +8441,6 @@ }, keydown: function(e) { var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len; - if (!(key = Keybinds.keyCode(e))) { return; } @@ -8932,7 +8615,6 @@ }, keyCode: function(e) { var kc, key; - key = (function() { switch (kc = e.keyCode) { case 8: @@ -8988,7 +8670,6 @@ }, tags: function(tag, ta) { var range, selEnd, selStart, value; - value = ta.value; selStart = ta.selectionStart; selEnd = ta.selectionEnd; @@ -8999,13 +8680,11 @@ }, sage: function() { var isSage; - isSage = /sage/i.test(QR.nodes.email.value); return QR.nodes.email.value = isSage ? "" : "sage"; }, img: function(thread, all) { var post; - if (all) { return ImageExpand.cb.toggleAll(); } else { @@ -9015,7 +8694,6 @@ }, open: function(thread, tab) { var url; - if (g.VIEW !== 'index') { return; } @@ -9028,7 +8706,6 @@ }, hl: function(delta, thread) { var axe, headRect, next, postEl, rect, replies, reply, root, topMargin, _i, _len; - if (!delta) { if (postEl = $('.reply.highlight', thread)) { $.rmClass(postEl, 'highlight'); @@ -9088,7 +8765,6 @@ Nav = { init: function() { var append, next, prev, span; - switch (g.VIEW) { case 'index': if (!Conf['Index Navigation']) { @@ -9139,7 +8815,6 @@ }, getThread: function(full) { var headRect, i, rect, thread, threads, topMargin, _i, _len; - if (Conf['Bottom header'] || !Conf['Fixed Header']) { topMargin = 0; } else { @@ -9165,7 +8840,6 @@ }, scroll: function(delta) { var i, rect, thread, threads, top, topMargin, _ref, _ref1; - _ref = Nav.getThread(true), threads = _ref[0], thread = _ref[1], i = _ref[2], rect = _ref[3], topMargin = _ref[4]; top = rect.top - topMargin; if (!((delta === -1 && Math.ceil(top) < 0) || (delta === +1 && top > 1))) { @@ -9191,7 +8865,6 @@ }, node: function() { var dateEl; - if (this.isClone) { return; } @@ -9201,7 +8874,6 @@ }, relative: function(diff, now, date) { var days, months, number, rounded, unit, years; - unit = (number = diff / $.DAY) >= 1 ? (years = now.getYear() - date.getYear(), months = now.getMonth() - date.getMonth(), days = now.getDate() - date.getDate(), years > 1 ? (number = years - (months < 0 || months === 0 && days < 0), 'year') : years === 1 && (months > 0 || months === 0 && days >= 0) ? (number = years, 'year') : (months = (months + 12) % 12) > 1 ? (number = months - (days < 0), 'month') : months === 1 && days >= 0 ? (number = months, 'month') : 'day') : (number = diff / $.HOUR) >= 1 ? 'hour' : (number = diff / $.MINUTE) >= 1 ? 'minute' : (number = Math.max(0, diff) / $.SECOND, 'second'); rounded = Math.round(number); if (rounded !== 1) { @@ -9212,7 +8884,6 @@ stale: [], flush: function() { var now, update, _i, _len, _ref; - if (d.hidden) { return; } @@ -9228,16 +8899,13 @@ }, setUpdate: function(post) { var markStale, setOwnTimeout, update; - setOwnTimeout = function(diff) { var delay; - delay = diff < $.MINUTE ? $.SECOND - (diff + $.SECOND / 2) % $.SECOND : diff < $.HOUR ? $.MINUTE - (diff + $.MINUTE / 2) % $.MINUTE : diff < $.DAY ? $.HOUR - (diff + $.HOUR / 2) % $.HOUR : $.DAY - (diff + $.DAY / 2) % $.DAY; return setTimeout(markStale, delay); }; update = function(now) { var date, diff, relative, singlePost, _i, _len, _ref; - date = post.info.date; diff = now - date; relative = RelativeDates.relative(diff, now, date); @@ -9278,7 +8946,6 @@ }, node: function(post) { var spoiler, spoilers, _i, _len; - spoilers = $$('s', this.nodes.comment); for (_i = 0, _len = spoilers.length; _i < _len; _i++) { spoiler = spoilers[_i]; @@ -9298,7 +8965,6 @@ }, ready: function() { var field; - field = $.id('recaptcha_response_field'); $.on(field, 'keydown', function(e) { if (e.keyCode === 8 && !field.value) { @@ -9307,7 +8973,6 @@ }); return $.on($('form'), 'submit', function(e) { var response; - e.preventDefault(); response = field.value.trim(); if (!/\s/.test(response)) { @@ -9321,7 +8986,6 @@ Sauce = { init: function() { var err, link, links, _i, _len, _ref; - if (g.VIEW === 'catalog' || !Conf['Sauce']) { return; } @@ -9353,7 +9017,6 @@ }, createSauceLink: function(link) { var m, text; - link = link.replace(/%(T?URL|MD5|board)/ig, function(parameter) { switch (parameter) { case '%TURL': @@ -9374,7 +9037,6 @@ }, node: function() { var link, nodes, _i, _len, _ref; - if (this.isClone || !this.file) { return; } @@ -9407,7 +9069,6 @@ }, createFunc: function(format) { var code; - code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { return "' + Time.formatters." + c + ".call(date) + '"; @@ -9492,7 +9153,6 @@ Settings = { init: function() { var link, settings; - link = $.el('a', { className: 'settings-link', textContent: 'Settings', @@ -9502,7 +9162,6 @@ Header.addShortcut(link); $.get('previousversion', null, function(item) { var changelog, el, previous; - if (previous = item['previousversion']) { if (previous === g.VERSION) { return; @@ -9540,7 +9199,6 @@ }, open: function(openSection) { var dialog, html, link, links, overlay, section, sectionToOpen, _i, _len, _ref; - $.off(d, '4chanXInitFinished', Settings.open); if (Settings.dialog) { return; @@ -9593,7 +9251,6 @@ sections: [], addSection: function(title, open) { var hyphenatedTitle, _ref; - if (typeof title !== 'string') { _ref = title.detail, title = _ref.title, open = _ref.open; } @@ -9606,7 +9263,6 @@ }, openSection: function() { var section, selected; - if (selected = $('.tab-selected', Settings.dialog)) { $.rmClass(selected, 'tab-selected'); } @@ -9620,7 +9276,6 @@ }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; - items = {}; inputs = {}; _ref = Config.main; @@ -9645,7 +9300,6 @@ } $.get(items, function(items) { var val; - for (key in items) { val = items[key]; inputs[key].checked = val; @@ -9660,7 +9314,6 @@ boards: {} }, function(item) { var ID, board, thread, _ref1; - _ref1 = item.hiddenThreads.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9675,7 +9328,6 @@ boards: {} }, function(item) { var ID, board, post, thread, _ref1; - _ref1 = item.hiddenPosts.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9695,7 +9347,6 @@ boards: {} }, function(item) { var boardID; - for (boardID in item.hiddenThreads.boards) { localStorage.removeItem("4chan-hide-t-" + boardID); } @@ -9706,7 +9357,6 @@ }, "export": function(now, data) { var a, db, _i, _len; - if (typeof now !== 'number') { now = Date.now(); data = { @@ -9741,7 +9391,6 @@ }, onImport: function() { var file, output, reader; - if (!(file = this.files[0])) { return; } @@ -9753,7 +9402,6 @@ reader = new FileReader(); reader.onload = function(e) { var data, err; - try { data = JSON.parse(e.target.result); Settings.loadSettings(data); @@ -9770,7 +9418,6 @@ }, loadSettings: function(data) { var key, val, version, _ref; - version = data.version.split('.'); if (version[0] === '2') { data = Settings.convertSettings(data, { @@ -9860,7 +9507,6 @@ }, convertSettings: function(data, map) { var newKey, prevKey; - for (prevKey in map) { newKey = map[prevKey]; if (newKey) { @@ -9872,7 +9518,6 @@ }, filter: function(section) { var select; - section.innerHTML = "
"; select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -9880,7 +9525,6 @@ }, selectFilter: function() { var div, name, ta; - div = this.nextElementSibling; if ((name = this.value) !== 'guide') { $.rmAll(div); @@ -9900,7 +9544,6 @@ }, sauce: function(section) { var ta; - section.innerHTML = "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
"; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -9910,7 +9553,6 @@ }, advanced: function(section) { var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; - section.innerHTML = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Time Formatting is disabled.
:
Supported format specifiers:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

\n One item per line.
\n Items will be added in the relevant input's auto-completion list.
\n Password items will always be used, since there is no password input.
\n Lines starting with a # will be ignored.\n

Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; inputs = {}; @@ -9930,7 +9572,6 @@ $.on(ta, 'change', $.cb.value); $.get(items, function(items) { var key, val; - for (key in items) { val = items[key]; if (['emojiPos'].contains(key)) { @@ -10001,7 +9642,6 @@ }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var option, selectedArchives, type; - selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; @@ -10016,7 +9656,6 @@ }, addArchiveCell: function(boardID, data, type) { var archive, i, length, options, select, td; - length = data[type].length; td = $.el('td', { className: 'archive-cell' @@ -10046,10 +9685,8 @@ }, saveSelectedArchive: function() { var _this = this; - return $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var selectedArchives, _name; - selectedArchives = _arg.selectedArchives; (selectedArchives[_name = _this.dataset.boardid] || (selectedArchives[_name] = {}))[_this.dataset.type] = _this.value; return $.set('selectedArchives', selectedArchives); @@ -10060,7 +9697,6 @@ }, time: function() { var funk; - funk = Time.createFunc(this.value); return this.nextElementSibling.textContent = funk(Time, new Date()); }, @@ -10069,7 +9705,6 @@ }, fileInfo: function() { var data, funk; - data = { isReply: true, file: { @@ -10108,7 +9743,6 @@ }, keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; - section.innerHTML = "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
"; tbody = $('tbody', section); items = {}; @@ -10129,7 +9763,6 @@ } return $.get(items, function(items) { var val; - for (key in items) { val = items[key]; inputs[key].value = val; @@ -10138,7 +9771,6 @@ }, keybind: function(e) { var key; - if (e.keyCode === 9) { return; } @@ -10155,10 +9787,8 @@ Main = { init: function(items) { var db, flatten, _i, _len; - flatten = function(parent, obj) { var key, val; - if (obj instanceof Array) { Conf[parent] = obj[0]; } else if (typeof obj === 'object') { @@ -10182,13 +9812,11 @@ $.on(d, '4chanMainInit', Main.initStyle); return $.asap((function() { var _ref; - return d.head && $('link[rel="shortcut icon"]', d.head) || ((_ref = d.readyState) === 'interactive' || _ref === 'complete'); }), Main.initStyle); }, initFeatures: function(items) { var init, pathname, _ref; - Conf = items; pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); @@ -10217,7 +9845,6 @@ case 'images.4chan.org': $.ready(function() { var URL; - if (Conf['404 Redirect'] && d.title === '4chan - 404 Not Found') { Redirect.init(); pathname = location.pathname.split('/'); @@ -10234,7 +9861,6 @@ } init = function(features) { var err, module, name; - for (name in features) { module = features[name]; try { @@ -10310,7 +9936,6 @@ }, initStyle: function() { var mainStyleSheet, observer, setStyle, style, styleSheets, _ref; - $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; @@ -10332,7 +9957,6 @@ styleSheets = $$('link[rel="alternate stylesheet"]', d.head); setStyle = function() { var styleSheet, _i, _len; - $.rmClass(doc, style); for (_i = 0, _len = styleSheets.length; _i < _len; _i++) { styleSheet = styleSheets[_i]; @@ -10359,7 +9983,6 @@ }, initReady: function() { var board, boardChild, err, errors, href, passLink, posts, styleSelector, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; - if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { @@ -10434,7 +10057,6 @@ }, callbackNodes: function(klass, nodes) { var callback, err, errors, i, len, node, _i, _len, _ref; - len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -10462,11 +10084,9 @@ }, callbackNodesDB: function(klass, nodes, cb) { var errors, func, i, len, node, queue, softTask; - queue = []; softTask = function() { var args, func, task; - task = queue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -10485,7 +10105,6 @@ errors = null; func = function(node, i) { var callback, err, _i, _len, _ref; - _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; @@ -10519,7 +10138,6 @@ }, addCallback: function(e) { var Klass, obj; - obj = e.detail; if (typeof obj.callback.name !== 'string') { throw new Error("Invalid callback name: " + obj.callback.name); @@ -10539,7 +10157,6 @@ }, handleErrors: function(errors) { var div, error, logs, _i, _len; - if (!(errors instanceof Array)) { error = errors; } else if (errors.length === 1) { @@ -10554,7 +10171,6 @@ }); $.on(div.lastElementChild, 'click', function() { var _ref; - return _ref = this.textContent === 'show' ? ['hide', false] : ['show', true], this.textContent = _ref[0], logs.hidden = _ref[1], _ref; }); logs = $.el('div', { @@ -10568,7 +10184,6 @@ }, parseError: function(data) { var error, message; - Main.logError(data); message = $.el('div', { textContent: data.message @@ -10585,7 +10200,6 @@ }, isThisPageLegit: function() { var _ref; - if (!('thisPageIsLegit' in Main)) { Main.thisPageIsLegit = location.hostname === 'boards.4chan.org' && !$('link[href*="favicon-status.ico"]', d.head) && ((_ref = d.title) !== '4chan - Temporarily Offline' && _ref !== '4chan - Error'); } diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee index 92860eb7c..59cfec1f0 100644 --- a/src/Posting/QuickReply.coffee +++ b/src/Posting/QuickReply.coffee @@ -1084,8 +1084,8 @@ QR = QR.status() QR.error $.el 'span', innerHTML: """ - 4chan X encountered an error while posting. Please try again. - [?] + 4chan X encountered an error while posting. + [Banned?] [More info] """ opts = cred: true From ca9b52258d56d634a81b246198c3732d7e41a57c Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Mon, 12 Aug 2013 00:11:38 -0700 Subject: [PATCH 02/72] Update changelog --- CHANGELOG.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5de52ae11..c16910dc3 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,19 @@ **MayhemYDG**: -- **New feature**: `Show Dice Roll` (with @carboncopy) - - Shows dice that were entered into the email field on /tg/. -- Fix impossibility to create new threads when in dead threads. +- Show dice rolls that were entered into the email field on /tg/. - Fix flag filtering on /sp/ and /int/. -- Update archives. (with @woxxy and @proplex) - Minor fixes. - Minor optimizations. +**seaweedchan**: +- Change new error message to link to ban page just in case + **Zixaphir**: - Linkifier Rewrite. -- Fix Quote Threading toggle. - Added Twitch.tv and Vine embedding (with @ihavenoface) - Keybinds to scroll to posts that quote you. - Minor optimizations. - Minor fixes. -**aeosynth**: -- Update Gruntfile.coffee. - ### v1.2.25 *2013-08-04* From 58d06b4db623b3f7a239d398adaa500496ba631b Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Mon, 12 Aug 2013 01:21:22 -0700 Subject: [PATCH 03/72] Remove some unwanted changes --- .gitignore | 3 +- Gruntfile.coffee | 18 +++--- LICENSE | 2 +- builds/4chan-X.user.js | 4 +- builds/crx/manifest.json | 3 +- builds/crx/script.js | 4 +- json/archives.json | 110 -------------------------------- src/General/meta/manifest.json | 3 +- src/Miscellaneous/Report.coffee | 2 +- 9 files changed, 17 insertions(+), 132 deletions(-) delete mode 100755 json/archives.json diff --git a/.gitignore b/.gitignore index 9373d85ca..3d8070a2c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,5 @@ node_modules/ *.db tmp-crx/ tmp-userscript/ -builds/4chan-X-Chrome.zip -builds/4chan-X-Opera.nex +builds/4chan-X.zip Gruntfile.js diff --git a/Gruntfile.coffee b/Gruntfile.coffee index bc8f3251b..146cf7480 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -168,10 +168,9 @@ module.exports = (grunt) -> grunt.registerTask 'release', [ 'build' + 'compress:crx' 'shell:commit' 'shell:push' - 'build-crx' - 'compress:crx' ] grunt.registerTask 'patch', [ 'bump' @@ -191,12 +190,11 @@ module.exports = (grunt) -> 'release' ] - grunt.registerTask 'updcl', 'Update the changelog', (headerLevel) -> - headerPrefix = new Array(+headerLevel + 1).join '#' - {version} = grunt.config 'pkg' - today = grunt.template.today 'yyyy-mm-dd' - changelog = grunt.file.read 'CHANGELOG.md' - - grunt.file.write 'CHANGELOG.md', "#{headerPrefix} #{version} - *#{today}*\n\n#{changelog}" - grunt.log.ok "Changelog updated for v#{version}." + grunt.registerTask 'updcl', 'Update the changelog', (i) -> + # i is the number of #s for markdown. + version = [] + version.length = +i + 1 + version = version.join('#') + ' v' + pkg.version + '\n*' + grunt.template.today('yyyy-mm-dd') + '*\n' + grunt.file.write 'CHANGELOG.md', version + '\n' + grunt.file.read('CHANGELOG.md') + grunt.log.ok 'Changelog updated for v' + pkg.version + '.' diff --git a/LICENSE b/LICENSE index d2ae960d0..468617e9f 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.25 - 2013-08-11 +* 4chan X - Version 1.2.25 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 6e5b6158b..48e699ae8 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.25 - 2013-08-11 +* 4chan X - Version 1.2.25 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -9238,7 +9238,7 @@ Report = { init: function() { - if (!(/report/.test(location.search) && !d.cookie.contains('pass_enabled=1'))) { + if (!/report/.test(location.search)) { return; } return $.asap((function() { diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json index c454f9717..3112aebc5 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -15,8 +15,7 @@ "run_at": "document_start" }], "homepage_url": "http://seaweedchan.github.io/4chan-x/", - "minimum_chrome_version": "27", - "minimum_opera_version": "15", + "minimum_chrome_version": "26", "permissions": [ "storage" ] diff --git a/builds/crx/script.js b/builds/crx/script.js index 3212c9033..c17fe44ba 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.25 - 2013-08-11 +* 4chan X - Version 1.2.25 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -9224,7 +9224,7 @@ Report = { init: function() { - if (!(/report/.test(location.search) && !d.cookie.contains('pass_enabled=1'))) { + if (!/report/.test(location.search)) { return; } return $.asap((function() { diff --git a/json/archives.json b/json/archives.json deleted file mode 100755 index 95ac1a37a..000000000 --- a/json/archives.json +++ /dev/null @@ -1,110 +0,0 @@ -[{ - "uid": 0, - "name": "Foolz", - "domain": "archive.foolz.us", - "http": true, - "https": true, - "software": "foolfuuka", - "boards": ["a", "co", "gd", "jp", "m", "q", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"], - "files": ["a", "gd", "jp", "m", "q", "tg", "vg", "vp", "vr", "wsg"] -}, { - "uid": 1, - "name": "NSFW Foolz", - "domain": "nsfw.foolz.us", - "http": true, - "https": true, - "software": "foolfuuka", - "boards": ["u"], - "files": ["u"] -}, { - "uid": 2, - "name": "The Dark Cave", - "domain": "archive.thedarkcave.org", - "http": true, - "https": true, - "software": "foolfuuka", - "boards": ["c", "int", "out", "po"], - "files": ["c", "po"] -}, { - "uid": 3, - "name": "4plebs", - "domain": "archive.4plebs.org", - "http": true, - "https": false, - "software": "foolfuuka", - "boards": ["hr", "tg", "tv", "x"], - "files": ["hr", "tg", "tv", "x"] -}, { - "uid": 4, - "name": "Nyafuu", - "domain": "archive.nyafuu.org", - "http": true, - "https": true, - "software": "foolfuuka", - "boards": ["c", "w", "wg"], - "files": ["c", "w", "wg"] -}, { - "uid": 11, - "name": "Foolz a Shit", - "domain": "archive.foolzashit.com", - "http": true, - "https": true, - "software": "foolfuuka", - "boards": ["adv", "asp", "cm", "e", "i", "lgbt", "n", "o", "p", "pol", "s", "s4s", "t", "trv", "y"], - "files": ["adv", "asp", "cm", "e", "i", "lgbt", "n", "o", "p", "s", "s4s", "t", "trv", "y"] -}, { - "uid": 12, - "name": "fap archive", - "domain": "fuuka.worldathleticproject.org", - "http": true, - "https": false, - "software": "foolfuuka", - "boards": ["b", "e", "h", "hc", "p", "s", "u"], - "files": ["b", "e", "h", "hc", "p", "s", "u"] -}, { - "uid": 7, - "name": "Install Gentoo", - "domain": "archive.installgentoo.net", - "http": false, - "https": true, - "software": "fuuka", - "boards": ["diy", "g", "sci"], - "files": [] -}, { - "uid": 8, - "name": "Rebecca Black Tech", - "domain": "rbt.asia", - "http": true, - "https": true, - "software": "fuuka", - "boards": ["cgl", "g", "mu", "w"], - "files": ["cgl", "g", "mu", "w"] -}, { - "uid": 9, - "name": "Heinessen", - "domain": "archive.heinessen.com", - "http": true, - "https": false, - "software": "fuuka", - "boards": ["an", "fit", "k", "mlp", "r9k", "toy"], - "files": ["an", "fit", "k", "r9k", "toy"] -}, { - "uid": 10, - "name": "warosu", - "domain": "fuuka.warosu.org", - "http": true, - "https": true, - "software": "fuuka", - "boards": ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "q", "tg", "vr"], - "files": ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "q", "tg", "vr"] -}, { - "uid": 13, - "name": "Foolz Beta", - "domain": "beta.foolz.us", - "http": true, - "https": true, - "withCredentials": true, - "software": "foolfuuka", - "boards": ["a", "co", "gd", "h", "jp", "m", "mlp", "q", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - "files": ["a", "gd", "h", "jp", "m", "q", "tg", "u", "vg", "vp", "vr", "wsg"] -}] diff --git a/src/General/meta/manifest.json b/src/General/meta/manifest.json index fb8cfba4e..b9793bda3 100755 --- a/src/General/meta/manifest.json +++ b/src/General/meta/manifest.json @@ -15,8 +15,7 @@ "run_at": "document_start" }], "homepage_url": "<%= meta.page %>", - "minimum_chrome_version": "27", - "minimum_opera_version": "15", + "minimum_chrome_version": "26", "permissions": [ "storage" ] diff --git a/src/Miscellaneous/Report.coffee b/src/Miscellaneous/Report.coffee index f0782aab5..109c55aa0 100755 --- a/src/Miscellaneous/Report.coffee +++ b/src/Miscellaneous/Report.coffee @@ -1,6 +1,6 @@ Report = init: -> - return unless /report/.test(location.search) and not d.cookie.contains 'pass_enabled=1' + return unless /report/.test(location.search) $.asap (-> $.id 'recaptcha_response_field'), Report.ready ready: -> field = $.id 'recaptcha_response_field' From caf7c67c6215f9f1ba633bda1b5e4c90b758248e Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Mon, 12 Aug 2013 01:29:44 -0700 Subject: [PATCH 04/72] Release 4chan X v1.2.26. --- CHANGELOG.md | 3 +++ Gruntfile.coffee | 15 +++++++++++---- LICENSE | 2 +- builds/4chan-X.meta.js | 2 +- builds/4chan-X.user.js | 6 +++--- builds/crx/manifest.json | 2 +- builds/crx/script.js | 4 ++-- latest.js | 2 +- package.json | 2 +- 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c16910dc3..12f2a96c0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### v1.2.26 +*2013-08-12* + **MayhemYDG**: - Show dice rolls that were entered into the email field on /tg/. - Fix flag filtering on /sp/ and /int/. diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 146cf7480..ac12b4958 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -1,5 +1,6 @@ module.exports = (grunt) -> + pkg = grunt.file.readJSON 'package.json' concatOptions = process: Object.create(null, data: get: -> grunt.config 'pkg' @@ -12,7 +13,7 @@ module.exports = (grunt) -> # Project configuration. grunt.initConfig - pkg: grunt.file.readJSON 'package.json' + pkg: pkg concat: coffee: options: concatOptions @@ -174,22 +175,28 @@ module.exports = (grunt) -> ] grunt.registerTask 'patch', [ 'bump' + 'reloadPkg' 'updcl:3' - 'release' ] grunt.registerTask 'minor', [ 'bump:minor' + 'reloadPkg' 'updcl:2' - 'release' ] grunt.registerTask 'major', [ 'bump:major' + 'reloadPkg' 'updcl:1' - 'release' ] + grunt.registerTask 'reloadPkg', 'Reload the package', -> + # Update the `pkg` object with the new version. + pkg = grunt.file.readJSON('package.json') + grunt.config.data.pkg = concatOptions.process.data = pkg + grunt.log.ok('pkg reloaded.') + grunt.registerTask 'updcl', 'Update the changelog', (i) -> # i is the number of #s for markdown. version = [] diff --git a/LICENSE b/LICENSE index 468617e9f..3437f4f80 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.25 - 2013-08-12 +* 4chan X - Version 1.2.26 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 6729e9eac..677c44d9b 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.2.25 +// @version 1.2.26 // @namespace 4chan-X // @description Cross-browser userscript for maximum lurking on 4chan. // @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 48e699ae8..50d9c8beb 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.2.25 +// @version 1.2.26 // @namespace 4chan-X // @description Cross-browser userscript for maximum lurking on 4chan. // @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.25 - 2013-08-12 +* 4chan X - Version 1.2.26 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -324,7 +324,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.25', + VERSION: '1.2.26', NAMESPACE: '4chan X.', boards: {}, threads: {}, diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json index 3112aebc5..0f12dca0a 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.2.25", + "version": "1.2.26", "manifest_version": 2, "description": "Cross-browser userscript for maximum lurking on 4chan.", "icons": { diff --git a/builds/crx/script.js b/builds/crx/script.js index c17fe44ba..d5f3d8d66 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.25 - 2013-08-12 +* 4chan X - Version 1.2.26 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -305,7 +305,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.25', + VERSION: '1.2.26', NAMESPACE: '4chan X.', boards: {}, threads: {}, diff --git a/latest.js b/latest.js index 45ec3a6f9..07573f3f3 100755 --- a/latest.js +++ b/latest.js @@ -1 +1 @@ -postMessage({version:'1.2.25'},'*') +postMessage({version:'1.2.26'},'*') diff --git a/package.json b/package.json index 49e729ff9..5bdf7b1a0 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.2.25", + "version": "1.2.26", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", From 570be575e64a6ea8ac7e06af82d50136681eb546 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Mon, 12 Aug 2013 01:39:20 -0700 Subject: [PATCH 05/72] Release 4chan X v1.2.27. --- CHANGELOG.md | 6 ++++++ LICENSE | 2 +- builds/4chan-X.meta.js | 2 +- builds/4chan-X.user.js | 8 ++++---- builds/crx/manifest.json | 2 +- builds/crx/script.js | 6 +++--- latest.js | 2 +- package.json | 2 +- src/Menu/Menu.coffee | 2 +- 9 files changed, 19 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12f2a96c0..67ef3bb20 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### v1.2.27 +*2013-08-12* + +**seaweedchan**: +- Fix minor class name change from last version's merge + ### v1.2.26 *2013-08-12* diff --git a/LICENSE b/LICENSE index 3437f4f80..90d0d3801 100755 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* 4chan X - Version 1.2.26 - 2013-08-12 +* 4chan X - Version 1.2.27 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js index 677c44d9b..9f7b6b329 100755 --- a/builds/4chan-X.meta.js +++ b/builds/4chan-X.meta.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 4chan X -// @version 1.2.26 +// @version 1.2.27 // @namespace 4chan-X // @description Cross-browser userscript for maximum lurking on 4chan. // @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 50d9c8beb..77d678b38 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1,7 +1,7 @@ // Generated by CoffeeScript // ==UserScript== // @name 4chan X -// @version 1.2.26 +// @version 1.2.27 // @namespace 4chan-X // @description Cross-browser userscript for maximum lurking on 4chan. // @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -19,7 +19,7 @@ // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // ==/UserScript== /* -* 4chan X - Version 1.2.26 - 2013-08-12 +* 4chan X - Version 1.2.27 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -324,7 +324,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.26', + VERSION: '1.2.27', NAMESPACE: '4chan X.', boards: {}, threads: {}, @@ -6792,7 +6792,7 @@ Menu = (function() { var a; a = $.el('a', { - className: 'menu-button brackets-wrap', + className: 'menu-button fourchanx-link', innerHTML: '', href: 'javascript:;' }); diff --git a/builds/crx/manifest.json b/builds/crx/manifest.json index 0f12dca0a..80d16a9ca 100755 --- a/builds/crx/manifest.json +++ b/builds/crx/manifest.json @@ -1,6 +1,6 @@ { "name": "4chan X", - "version": "1.2.26", + "version": "1.2.27", "manifest_version": 2, "description": "Cross-browser userscript for maximum lurking on 4chan.", "icons": { diff --git a/builds/crx/script.js b/builds/crx/script.js index d5f3d8d66..517371033 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* 4chan X - Version 1.2.26 - 2013-08-12 +* 4chan X - Version 1.2.27 - 2013-08-12 * * Licensed under the MIT license. * https://github.com/seaweedchan/4chan-x/blob/master/LICENSE @@ -305,7 +305,7 @@ doc = d.documentElement; g = { - VERSION: '1.2.26', + VERSION: '1.2.27', NAMESPACE: '4chan X.', boards: {}, threads: {}, @@ -6773,7 +6773,7 @@ Menu = (function() { var a; a = $.el('a', { - className: 'menu-button brackets-wrap', + className: 'menu-button fourchanx-link', innerHTML: '', href: 'javascript:;' }); diff --git a/latest.js b/latest.js index 07573f3f3..2a4cf0e2d 100755 --- a/latest.js +++ b/latest.js @@ -1 +1 @@ -postMessage({version:'1.2.26'},'*') +postMessage({version:'1.2.27'},'*') diff --git a/package.json b/package.json index 5bdf7b1a0..6013f209e 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "1.2.26", + "version": "1.2.27", "description": "Cross-browser userscript for maximum lurking on 4chan.", "meta": { "name": "4chan X", diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index 2d7076f1b..fd221d347 100755 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -1,6 +1,6 @@ Menu = do -> a = $.el 'a', - className: 'menu-button brackets-wrap' + className: 'menu-button fourchanx-link' innerHTML: '' href: 'javascript:;' From 168944277c503f112e2675301f21e1e3aff9e37e Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 03:03:50 +0200 Subject: [PATCH 06/72] 4chan X should attempt to handle this Chrome db corruption bug. This'll warn users about this bug and show them how to fix it. --- src/General/Main.coffee | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 039ad745d..60e4d026c 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -1,5 +1,5 @@ Main = - init: (items) -> + init: -> pathname = location.pathname.split '/' g.BOARD = new Board pathname[1] return if g.BOARD.ID in ['z', 'fk'] @@ -30,13 +30,25 @@ Main = Conf[db] = boards: {} Conf['selectedArchives'] = {} Conf['archives'] = Redirect.archives - $.get Conf, Main.initFeatures + $.get Conf, (items) -> + $.extend Conf, items + <% if (type === 'crx') { %> + unless items + new Notification 'error', $.el 'span', + innerHTML: """ + It seems like your <%= meta.name %> settings became corrupted due to a Chrome bug.
+ Unfortunately, you'll have to fix it yourself. + """ + # Track resolution of this bug. + Main.logError + message: 'Chrome Storage API bug' + error: new Error chrome.runtime.lastError.message or 'no lastError.message' + <% } %> + Main.initFeatures() $.on d, '4chanMainInit', Main.initStyle - initFeatures: (items) -> - Conf = items - + initFeatures: -> switch location.hostname when 'api.4chan.org' return From 87b8a3c9511f6dd2cba6735ae58e95f977bac0f3 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 03:10:01 +0200 Subject: [PATCH 07/72] Do not warn Firefox users about missing flexbox support anymore. 4chan X assumes Fx22+. --- src/General/Main.coffee | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 60e4d026c..f58223368 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -211,17 +211,6 @@ Main = catch err new Notification 'warning', 'Cookies need to be enabled on 4chan for <%= meta.name %> to properly function.', 30 - <% if (type === 'userscript') { %> - el = $.el 'span' - el.style.flex = 'test' - if el.style.flex is 'test' - el.innerHTML = """ - Firefox is not correctly set up and some <%= meta.name %> features will be displayed incorrectly.
- Follow the instructions of the install guide to fix it. - """ - new Notification 'warning', el, 30 - <% } %> - $.event '4chanXInitFinished' callbackNodes: (klass, nodes) -> From fb28d20870ea31b7cce4f849ba0420f17810afce Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 03:34:09 +0200 Subject: [PATCH 08/72] Shave a line by removing an useless check. --- src/General/Main.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/General/Main.coffee b/src/General/Main.coffee index f58223368..1456e4090 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -176,9 +176,8 @@ Main = location.replace href or "/#{g.BOARD}/" return - unless $.hasClass doc, 'fourchan-x' - # Something might have gone wrong! - Main.initStyle() + # Something might have gone wrong! + Main.initStyle() if board = $ '.board' threads = [] From e75ad405bf7e83e2fc2b6fe71a2dc987bc2ee928 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Tue, 13 Aug 2013 00:18:01 -0700 Subject: [PATCH 09/72] Revert class name changes --- builds/4chan-X.user.js | 7 +++---- builds/crx/script.js | 7 +++---- src/General/Settings.coffee | 1 - src/General/css/burichan.css | 2 +- src/General/css/futaba.css | 2 +- src/General/css/photon.css | 2 +- src/General/css/style.css | 6 +++--- src/General/css/tomorrow.css | 2 +- src/General/css/yotsuba-b.css | 2 +- src/General/css/yotsuba.css | 2 +- src/Monitoring/ThreadWatcher.coffee | 4 ++-- 11 files changed, 17 insertions(+), 20 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9173a2b0a..b2de42b15 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -7508,7 +7508,7 @@ node: function() { var toggler; toggler = $.el('img', { - className: 'watcher-toggler' + className: 'watch-thread-link' }); $.on(toggler, 'click', ThreadWatcher.cb.toggle); return $.before($('input', this.OP.nodes.post), toggler); @@ -7726,7 +7726,7 @@ _ref2 = g.BOARD.threads; for (threadID in _ref2) { thread = _ref2[threadID]; - toggler = $('.watcher-toggler', thread.OP.nodes.post); + toggler = $('.watch-thread-link', thread.OP.nodes.post); watched = ThreadWatcher.db.get({ boardID: thread.board.ID, threadID: threadID @@ -9732,7 +9732,6 @@ } return $.set({ archives: Conf['archives'], - lastarchivecheck: now, previousversion: g.VERSION }); }); @@ -10749,7 +10748,7 @@ } return Main.thisPageIsLegit; }, - css: "/* General */\n.dialog {\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder: 1px solid;\ndisplay: block;\npadding: 0;\n}\n.captcha-img,\n.field {\nbackground-color: #FFF;\nborder: 1px solid #CCC;\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\ncolor: #333;\nfont: 13px sans-serif;\noutline: none;\ntransition: color .25s, border-color .25s;\ntransition: color .25s, border-color .25s;\n}\n.field::-moz-placeholder,\n.field:hover::-moz-placeholder {\ncolor: #AAA !important;\nfont-size: 13px !important;\nopacity: 1.0 !important;\n}\n.captch-img:hover,\n.field:hover {\nborder-color: #999;\n}\n.field:hover, .field:focus {\ncolor: #000;\n}\n.field[disabled] {\nbackground-color: #F2F2F2;\ncolor: #888;\n}\n.move {\ncursor: move;\noverflow: hidden;\n}\nlabel,\n.watcher-toggler {\ncursor: pointer;\n}\na[href=\"javascript:;\"] {\ntext-decoration: none;\n}\n.warning {\ncolor: red;\n}\n#boardNavDesktop {\ndisplay: none !important;\n}\na {\noutline: none !important;\n}\n\n/* 4chan style fixes */\n.opContainer, .op {\ndisplay: block !important;\noverflow: visible !important;\n}\n[hidden] {\ndisplay: none !important;\n}\n\n/* fixed, z-index */\n#overlay,\n#fourchanx-settings,\n#qp, #ihover,\n#navlinks, .fixed #header-bar,\n:root.float #updater,\n:root.float #thread-stats,\n#qr {\nposition: fixed;\n}\n#fourchanx-settings {\nz-index: 999;\n}\n#overlay {\nz-index: 900;\n}\n#notifications {\nz-index: 70;\n}\n#qp, #ihover {\nz-index: 60;\n}\n#menu {\nz-index: 50;\n}\n#navlinks, #updater, #thread-stats {\nz-index: 40;\n}\n.fixed #header-bar.autohide {\nz-index: 35;\n}\n#qr {\nz-index: 30;\n}\n#thread-watcher {\nz-index: 8;\n}\n:root.fixed-watcher #thread-watcher {\nz-index: 20;\n}\n.fixed #header-bar {\nz-index: 10;\n}\n/* Header */\n.fixed.top body {\npadding-top: 2em;\n}\n.fixed.bottom body {\npadding-bottom: 2em;\n}\n.fixed #header-bar {\nright: 0;\nleft: 0;\npadding: 3px 4px 4px;\n}\n.fixed.top #header-bar {\ntop: 0;\n}\n.fixed.bottom #header-bar {\nbottom: 0;\n}\n#header-bar {\nborder-width: 0;\ntransition: all .1s .05s ease-in-out;\n}\n:root.centered-links #shortcuts {\nwidth: 300px;\ntext-align: right;\n}\n:root.centered-links #header-bar {\ntext-align: center;\n}\n:root.centered-links #custom-board-list {\nposition: relative;\nleft: 150px;\n}\n.fixed.top #header-bar {\nborder-bottom-width: 1px;\n}\n.fixed.bottom #header-bar {\nbox-shadow: 0 -1px 2px rgba(0, 0, 0, .15);\nborder-top-width: 1px;\n}\n.fixed.bottom #header-bar .menu-button i {\nborder-top: none;\nborder-bottom: 6px solid;\n}\n#board-list {\ntext-align: center;\n}\n.fixed #header-bar.autohide:not(:hover) {\nbox-shadow: none;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\nmargin-bottom: -1em;\n-webkit-transform: translateY(-100%);\ntransform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n-webkit-transform: translateY(100%);\ntransform: translateY(100%);\n}\n#scroll-marker {\nleft: 0;\nright: 0;\nheight: 10px;\nposition: absolute;\n}\n:root:not(.autohide) #scroll-marker {\npointer-events: none;\n}\n#header-bar #scroll-marker {\ndisplay: none;\n}\n.fixed #header-bar #scroll-marker {\ndisplay: block;\n}\n.fixed.top #header-bar #scroll-marker {\ntop: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\nbottom: 100%;\n}\n#header-bar a:not(.entry):not(.close) {\ntext-decoration: none;\npadding: 1px;\n}\n#header-bar input {\nmargin: 0;\nvertical-align: bottom;\n}\n#shortcuts:empty {\ndisplay: none;\n}\n.brackets-wrap::before {\ncontent: \"\\00a0[\";\n}\n.brackets-wrap::after {\ncontent: \"]\\00a0\";\n}\n.dead-thread,\n.disabled,\n.expand-all-shortcut {\nopacity: .45;\n}\n#shortcuts {\nfloat: right;\n}\n.shortcut {\nmargin-left: 3px;\n}\n#navbotright,\n#navtopright {\ndisplay: none;\n}\n#toggleMsgBtn {\ndisplay: none !important;\n}\n.current {\nfont-weight: bold;\n}\n/* 4chan X link brackets */\n.fourchanx-link::after {\ncontent: \"]\";\n}\n.fourchanx-link::before {\ncontent: \"[\";\n}\n/* Notifications */\n#notifications {\nposition: fixed;\ntop: 0;\nheight: 0;\ntext-align: center;\nright: 0;\nleft: 0;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar #notifications {\nposition: absolute;\ntop: 100%;\n}\n.notification {\ncolor: #FFF;\nfont-weight: 700;\ntext-shadow: 0 1px 2px rgba(0, 0, 0, .5);\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder-radius: 2px;\nmargin: 1px auto;\nwidth: 500px;\nmax-width: 100%;\nposition: relative;\ntransition: all .25s ease-in-out;\n}\n.notification.error {\nbackground-color: hsla(0, 100%, 38%, .9);\n}\n.notification.warning {\nbackground-color: hsla(36, 100%, 38%, .9);\n}\n.notification.info {\nbackground-color: hsla(200, 100%, 38%, .9);\n}\n.notification.success {\nbackground-color: hsla(104, 100%, 38%, .9);\n}\n.notification a {\ncolor: white;\n}\n.notification > .close {\npadding: 6px;\ntop: 0;\nright: 5px;\nposition: absolute;\n}\n.message {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\npadding: 6px 20px;\nmax-height: 200px;\nwidth: 100%;\noverflow: auto;\n}\n\n/* Settings */\n:root.fourchan-x body {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\n}\n#overlay {\nbackground-color: rgba(0, 0, 0, .5);\ntop: 0;\nleft: 0;\nheight: 100%;\nwidth: 100%;\n}\n#fourchanx-settings {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nbox-shadow: 0 0 15px rgba(0, 0, 0, .15);\nheight: 600px;\nmax-height: 100%;\nwidth: 900px;\nmax-width: 100%;\nmargin: auto;\npadding: 3px;\ntop: 50%;\nleft: 50%;\n-moz-transform: translate(-50%, -50%);\n-webkit-transform: translate(-50%, -50%);\ntransform: translate(-50%, -50%);\n}\n#fourchanx-settings > nav {\npadding: 2px 2px 0;\nheight: 15px;\n}\n#fourchanx-settings > nav a {\ntext-decoration: underline;\n}\n#fourchanx-settings > nav a.close {\ntext-decoration: none;\npadding: 2px;\n}\n.section-container {\noverflow: auto;\nposition: absolute;\ntop: 2.1em;\nright: 5px;\nbottom: 5px;\nleft: 5px;\npadding-right: 5px;\n}\n.sections-list {\npadding: 0 3px;\nfloat: left;\n}\n.credits {\nfloat: right;\n}\n.tab-selected {\nfont-weight: 700;\n}\n.section-sauce ul,\n.section-advanced ul {\nlist-style: none;\nmargin: 0;\n}\n.section-sauce ul {\npadding: 8px;\n}\n.section-advanced ul {\npadding: 0px;\n}\n.section-sauce li,\n.section-advanced li {\npadding-left: 4px;\n}\n.section-main label {\ntext-decoration: underline;\n}\n.section-filter ul {\npadding: 0;\n}\n.section-filter li {\nmargin: 10px 40px;\n}\n.section-filter textarea {\nheight: 500px;\n}\n.section-sauce textarea {\nheight: 350px;\n}\n.section-advanced .field[name=\"boardnav\"] {\nwidth: 100%;\n}\n.section-advanced textarea {\nheight: 150px;\n}\n.section-advanced .archive-cell {\nmin-width: 160px;\ntext-align: center;\n}\n.section-advanced #archive-board-select {\nposition: absolute;\n}\n.section-advanced .note {\nfont-size: 0.8em;\nfont-style: italic;\nmargin-left: 10px;\n}\n.section-advanced .note code {\nfont-style: normal;\nfont-size: 11px;\n}\n.section-keybinds .field {\nfont-family: monospace;\n} \n#fourchanx-settings fieldset {\nborder: 1px solid;\nborder-radius: 3px;\n}\n#fourchanx-settings legend {\nfont-weight: 700;\n}\n#fourchanx-settings textarea {\nfont-family: monospace;\nmin-width: 100%;\nmax-width: 100%;\n}\n#fourchanx-settings code {\ncolor: #000;\nbackground-color: #FFF;\npadding: 0 2px;\n}\n.unscroll {\noverflow: hidden;\n}\n\n/* Announcement Hiding */\n:root.hide-announcement #globalMessage {\ndisplay: none;\n}\na.hide-announcement {\nfloat: left;\n}\n\n/* Unread */\n#unread-line {\nmargin: 0;\nborder-color: rgb(255,0,0);\n}\n\n/* Thread Updater */\n#updater {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n#updater > .move {\npadding: 5px 3px 0px;\nmargin-bottom: -3px;\n}\n#updater > div:last-child {\ntext-align: center;\n}\n#updater input[type=number] {\nwidth: 4em;\n}\n:root.float #updater {\npadding: 0px 3px;\n}\n.new {\ncolor: limegreen;\n}\n#update-status.new {\nmargin-right: 5px;\n}\n#update-timer {\ncursor: pointer;\n}\n\n/* Thread Watcher */\n#thread-watcher {\nposition: absolute;\n}\n#thread-watcher {\npadding-bottom: 3px;\npadding-left: 3px;\noverflow: hidden;\nwhite-space: nowrap;\nmin-width: 136px;\nmax-height: 92%;\noverflow-y: auto;\n}\n#thread-watcher .menu-button {\nbottom: 1px;\n}\n:root.fixed-watcher #thread-watcher {\nposition: fixed;\n}\n:root:not(.fixed-watcher) #thread-watcher:not(:hover) {\nmax-height: 210px;\noverflow-y: hidden;\n}\n#thread-watcher > .move {\npadding-top: 3px;\n}\n#watched-threads > div {\nmax-width: 250px;\noverflow: hidden;\npadding-left: 3px;\npadding-right: 3px;\ntext-overflow: ellipsis;\n}\n#thread-watcher a {\ntext-decoration: none;\n}\n#thread-watcher .move>.close {\nposition: absolute;\nright: 0px;\ntop: 0px;\npadding: 0px 4px;\n}\n.watcher-toggler {\npadding-top: 18px;\nwidth: 18px;\nheight: 0px;\ndisplay: inline-block;\nbackground-repeat: no-repeat;\nopacity: 0.2;\nposition: relative;\ntop: 1px;\n}\n.watcher-toggler.watched {\nopacity: 1;\n}\n\n\n/* Thread Stats */\n#thread-stats {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n:root.float #post-count, :root.float #file-count {\npointer-events: none;\n}\n:root.float #thread-stats {\npadding: 0px 3px;\n}\n\n/* Quote */\n.deadlink {\ntext-decoration: none !important;\n}\n.backlink.deadlink:not(.forwardlink),\n.quotelink.deadlink:not(.forwardlink) {\ntext-decoration: underline !important;\n}\n.inlined {\nopacity: .5;\n}\n#qp input, .forwarded {\ndisplay: none;\n}\n.quotelink.forwardlink,\n.backlink.forwardlink {\ntext-decoration: none;\nborder-bottom: 1px dashed;\n}\n.filtered {\ntext-decoration: underline line-through;\n}\n:root.hide-backlinks .backlink.filtered {\ndisplay: none;\n}\n.inline {\nborder: 1px solid;\ndisplay: table;\nmargin: 2px 0;\n}\n.inline .post {\nborder: 0 !important;\nbackground-color: transparent !important;\ndisplay: table !important;\nmargin: 0 !important;\npadding: 1px 2px !important;\n}\n#qp > .opContainer::after {\ncontent: '';\nclear: both;\ndisplay: table;\n}\n#qp .post {\nborder: none;\nmargin: 0;\npadding: 2px 2px 5px;\n}\n#qp img {\nmax-height: 80vh;\nmax-width: 50vw;\n}\n.qphl {\noutline: 2px solid rgba(216, 94, 49, .7);\n}\n:root.highlight-own .yourPost > .reply,\n:root.highlight-you .quotesYou > .reply {\nborder-left: 2px solid rgba(221,0,0,.5);\n}\n/* Quote Threading */\n.threadContainer {\nmargin-left: 20px;\nborder-left: 1px solid rgba(128,128,128,.3);\n}\n.threadOP {\nclear: both;\n} \n\n/* File */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n:not(.expanded-image) > .post > .file > .fileThumb > .full-image {\ndisplay: none;\n}\n.expanding {\nopacity: .5;\n}\n:root.fit-height .full-image {\nmax-height: 100vh;\n}\n:root.fit-width .full-image {\nmax-width: 100%;\n}\n:root.gecko.fit-width .full-image {\nwidth: 100%;\n}\n#ihover {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nmax-height: 100%;\nmax-width: 75%;\npadding-bottom: 16px;\n}\n.fappeTyme .thread > .noFile,\n.fappeTyme .threadContainer > .noFile {\ndisplay: none;\n}\n\n/* Index/Reply Navigation */\n#navlinks {\nfont-size: 16px;\ntop: 25px;\nright: 10px;\n}\n\n/* Filter */\n.opContainer.filter-highlight {\nbox-shadow: inset 5px 0 rgba(255, 0, 0, .5);\n}\n.filter-highlight > .reply {\nbox-shadow: -5px 0 rgba(255, 0, 0, .5);\n}\n\n/* Spoiler text */\n:root.reveal-spoilers s {\ncolor: white !important;\n}\n\n/* Thread & Reply Hiding */\n.hide-thread-button,\n.hide-reply-button {\nfloat: left;\nmargin-right: 2px;\n}\n.stub ~ * {\ndisplay: none !important;\n}\n.stub input {\ndisplay: inline-block;\n}\n\n/* QR */\n:root.hide-original-post-form #postForm,\n:root.hide-original-post-form .postingMode,\n:root.hide-original-post-form #togglePostForm,\n#qr.autohide:not(.has-focus):not(:hover) > form,\n.postingMode ~ #qr select,\n#file-n-submit:not(.has-file) #qr-filerm {\ndisplay: none;\n}\n#qr select,\n#dump-button,\n.remove,\n.captcha-img {\ncursor: pointer;\n}\n#qr {\nz-index: 20;\nposition: fixed;\npadding: 1px;\nborder: 1px solid transparent;\nmin-width: 300px;\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nmargin-bottom: 1px;\n}\n#qr .close {\nfloat: right;\npadding: 0 3px;\n}\n#qr .warning {\nmin-height: 1.6em;\nvertical-align: middle;\npadding: 0 1px;\nborder-width: 1px;\nborder-style: solid;\n}\n.qr-link-container {\ntext-align: center;\n}\n.persona {\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-button {\nwidth: 10%;\nmargin: 0;\nmargin-right: 4px;\nfont: 13px sans-serif;\npadding: 1px 0px 2px;\nopacity: 0.6;\n}\n.persona .field:not(#dump) {\nwidth: 95px;\nmin-width: 33.3%;\nmax-width: 33.3%;\n}\n#qr textarea.field {\nheight: 14.8em;\nmin-height: 9em;\n}\n#qr.has-captcha textarea.field {\nheight: 9em;\n}\ninput.field.tripped:not(:hover):not(:focus) {\ncolor: transparent !important;\ntext-shadow: none !important;\n}\n#qr textarea {\nresize: both;\n}\n.captcha-img {\nmargin: 0px;\ntext-align: center;\nbackground-image: #fff;\nfont-size: 0px;\nmin-height: 59px;\nmin-width: 302px;\n}\n.captcha-input {\nwidth: 100%;\nmargin: 1px 0 0;\n}\n.captcha-input.error:focus {\nborder-color: rgb(255,0,0) !important;\n}\n.field {\n-moz-box-sizing: border-box;\nmargin: 0px;\npadding: 2px 4px 3px;\n}\n#qr textarea {\nmin-width: 100%;\n}\n#qr [type='submit'] {\nwidth: 25%;\nvertical-align: top;\n}\n:root.webkit #qr [type='submit'] {\nheight: 24px;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\ndisplay: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\ndisplay: inline-block;\npadding: 0px 4px;\nmargin-bottom: 2px;\noverflow: hidden;\ntext-overflow: ellipsis;\nmax-width: 88%;\n}\n#qr-no-file {\ncolor: #AAA;\n}\n#qr-filename-container {\n-moz-box-sizing: border-box;\ndisplay: inline-block;\nposition: relative;\nwidth: 100px;\nmin-width: 74.6%;\nmax-width: 74.6%;\nmargin-right: 0.4%;\nmargin-top: 1px;\noverflow: hidden;\npadding: 2px 1px 0;\nheight: 22px;\n}\n#qr-filename-container:hover {\ncursor: text;\n}\n#qr-extras-container {\nposition: absolute;\nright: 0px;\n}\n#qr-filerm {\nmargin-right: 2px;\nz-index: 2;\n}\n#file-n-submit {\nheight: 23px;\n}\n#qr input[type=file] {\nvisibility: hidden;\nposition: absolute;\n}\n/* Thread Select / Spoiler Label */\n#qr select {\nfloat: right;\n}\n#qr.has-spoiler .has-file #qr-spoiler-label {\nwidth: 6.7%;\nmin-width: 6.7%;\nmax-width: 6.7%;\ndisplay: inline-block;\ntext-align: center;\nvertical-align: top;\n}\n#qr.has-spoiler #file-n-submit:not(.has-file) #qr-spoiler-label {\ndisplay: none;\n}\n#qr.has-spoiler .has-file #qr-filename-container {\nmax-width: 67.9%;\nmin-width: 67.9%;\n}\n#qr-spoiler-label input {\nposition: relative;\ntop: 3px;\n}\n/* Dumping UI */\n.dump #dump-list-container {\ndisplay: block;\n}\n#dump-list-container {\ndisplay: none;\nposition: relative;\noverflow-y: hidden;\nmargin-top: 1px;\n}\n#dump-list {\noverflow-x: auto;\noverflow-y: hidden;\nwhite-space: nowrap;\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-list:hover {\noverflow-x: auto;\n}\n.qr-preview {\n-moz-box-sizing: border-box;\ncounter-increment: thumbnails;\ncursor: move;\ndisplay: inline-block;\nheight: 90px;\nwidth: 90px;\npadding: 2px;\nopacity: .5;\noverflow: hidden;\nposition: relative;\ntext-shadow: 0 1px 1px #000;\n-moz-transition: opacity .25s ease-in-out;\nvertical-align: top;\nbackground-size: cover;\n}\n.qr-preview:hover,\n.qr-preview:focus {\nopacity: .9;\n}\n.qr-preview::before {\ncontent: counter(thumbnails);\ncolor: #fff;\nposition: absolute;\ntop: 3px;\nright: 3px;\ntext-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\nopacity: 1;\n}\n.qr-preview.drag {\nbox-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\nborder-color: #fff;\n}\n.qr-preview > span {\ncolor: #fff;\n}\n.remove {\nbackground: none;\ncolor: #e00;\nfont-weight: 700;\npadding: 3px;\n}\na:only-of-type > .remove {\ndisplay: none;\n}\n.remove:hover::after {\ncontent: \" Remove\";\n}\n.qr-preview > label {\nbackground: rgba(0,0,0,.5);\ncolor: #fff;\nright: 0;\nbottom: 0;\nleft: 0;\nposition: absolute;\ntext-align: center;\n}\n.qr-preview > label > input {\nmargin: 0;\n}\n#add-post {\ncursor: pointer;\nfont-size: 2em;\nposition: absolute;\ntop: 50%;\nright: 10px;\n-moz-transform: translateY(-50%);\n}\n.textarea {\nposition: relative;\n}\n:root.webkit .textarea {\nmargin-bottom: -2px;\n}\n#char-count {\ncolor: #000;\nbackground: hsla(0, 0%, 100%, .5);\nfont-size: 8pt;\nposition: absolute;\nbottom: 1px;\nright: 1px;\npointer-events: none;\n}\n\n/* Menu */\n.menu-button {\ndisplay: inline-block;\nposition: relative;\ncursor: pointer;\n}\n.menu-button i {\nborder-top: 6px solid;\nborder-right: 4px solid transparent;\nborder-left: 4px solid transparent;\ndisplay: inline-block;\nmargin: 2px;\nvertical-align: middle;\n}\n#menu {\nposition: fixed;\noutline: none;\n}\n.entry {\nborder-bottom: 1px solid rgba(0,0,0,.25);\ncursor: pointer;\ndisplay: block;\noutline: none;\npadding: 3px 7px;\nposition: relative;\ntext-decoration: none;\nwhite-space: nowrap;\n}\n.left>.entry.has-submenu {\npadding-right: 17px !important;\n}\n.entry:last-child {\nborder-bottom: 0;\n}\n.has-submenu::after {\ncontent: \"\";\nborder-left: .5em solid;\nborder-top: .3em solid transparent;\nborder-bottom: .3em solid transparent;\ndisplay: inline-block;\nmargin: .3em;\nposition: absolute;\nright: 3px;\n}\n.left .has-submenu::after {\nborder-left: 0;\nborder-right: .5em solid;\n}\n.submenu {\ndisplay: none;\nposition: absolute;\nleft: 100%;\ntop: -1px;\n}\n.focused .submenu {\ndisplay: block;\n}\n.imp-exp-result {\nposition: absolute;\ntext-align: center;\nmargin: auto;\nright: 0px;\nleft: 0px;\nwidth: 200px;\n}\n.export, .import {\ncursor: pointer;\ntext-decoration: none !important;\n}\n/* Link Title Favicons */\n.linkify.YouTube {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAABIklEQVQoz53LvUrDUBjG8bOoOammSf1IoBSvoCB4JeIqOHgBLt6AIMRBBQelWurQ2kERnMRBsBUcIp5FJSBI5oQsJVkkUHh8W0o5nhaFHvjBgef/Mq+Q46RJBMkI/vE+aOus956tnEswIZe1LV0QyJ5sE2GzgZfVMtRNIdiDpccEssdlB1mW4bvTwdvWJtRdErM7U+8S/FJykCRJX5qm+KpVce8UMNLRLbulz4iSjTAMh6Iowsd5BeNadp3nUF0VlxAEwZBotXC0Usa4ll3meZdA1iguwvf9vpvDA2wvmKgYGtSud8suDB4TyGr2PF49D/vra9jRZ1BVdknMzgwuCGSnZEObwu6sBnVTCHZiaC7BhFx2PKdxUidiAH/4lLo9Mv0DELVs9qsOHXwAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vimeo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAASJJREFUOE9jYAAC7ln7/pODQXrBmq333PvPu/YaSRikB6QXbACpmmHqsRoAMll7+20UQ0H8tmuv/pdffPFfZtNNuByGASBFIPDh5x+4IV6HHoDFYGDJgw+YBoBMBUkgA5BtIKduuvvy//svX+FSB+88wTTAc+/t/83bj/0HScLA5BPXwc7lKJ36f+L6XXDxhUfOYxrAPWUnWKFp9UQUm3iWQxSDXAEDSX3zcIcB96wD/x+8eA1XDNKMHAYg20GW4Y0FkCIYAAUqzEBQOIBciRzlWKMxZelOlMCEcVxq+jHSC1YDJPs3YBgA8jey0/F6ARRwsFAHORukmat9NdbUijMpg/wKcrJodDFOzSBXwA3Alh9AToZFI7a8Asu98BxJbnYGAJb5vYLDANzSAAAAAElFTkSuQmCC') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.SoundCloud {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABsklEQVQ4y5WTy2pUQRCGv2rbzDjJeAlIBmOyipGIIJqFEBDElwh4yULGeRFXPoEIBl/AvQ/gC2RnxCAoxijiwks852S6+3dxzslcHJCpTXVX11/Xv0097gLPgVNMJxnQNfX4zsqleWbnpoMf/oa9d988MM9MC/rp+E0a+A0dsVobMNMCOO8B6McRoABJI+A6gJmN3D2A8jgEBCEkSEMBrcrsDAzDWWn3AjgKFaDMmgRqniGFgsaDp1jrLOngDf1XT1D+A1dFc4MKAkkiCVKjjVu7g9+4Rzx4i1u6hjXbuMWr0O5QPNvCu7IaCZwEKQukLGDrm5x8uI0tr6MkiGlkiv7yLfzN+6S5i6QsIMABkEfcxhbWWYMkVAOjxvYAjc3HNHrbKI9VBQBFwF25XQKSBjqIf1YBuAurEMrczgDygD6/x2LCpFLXLUyQ+PoldphhBhYfIX09XU1+Flaukz7uYqs3SHs7cG4BmTsmkBUF9mmXEwa28BNLPaQPLepuNcbGSWQquQC2/Kdcox1FUGkcB0ykck1nA2+wTzMs8stGnP4rbWGw74EuS/GFQWfK7/wF6P4F7fzIAYkdmdEAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.audio {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAitJREFUOE9jYCAWKJWwavr0KyXWb/FIbDtUFFyzJx6nVofE2Xo5nXsj0rqPNSR0nVkR2Hjmgmfd+U9Otdf+m5Vf/6+SfeU/R9ChVVgNYDRtlfJuuPA/rPfe/4QpD/6nznj0P27Kw/9unff/69Xf+69c/+C/SO7N/0z+OAxgMmmRCe++/r9i3ev/KWvf/vdY8PK/bt/9/wrNV3/IN5y/IVt1YqNg4pGTTP4HsbuA2bhZ2qvpyn+xjIObxAp3VwqlrgngLFyryVy5nhPmZJHANS2cwYexG8BmVC/pWn3hP4NZlzWuQDJI3dIiFnUUuwEsQAOcq87jNcC7fHeLUtJxHF4AGmBWeAavAWH1+1rUUk7giAWjOknllON4DXAs2NEiG4/DBQxAF/CFHfrPYI4jDFSLuJVjNrUJhB/B7gIGo1pJRt99GAZYJK7wLJ1z7Xzl4vu/7aqv/GRBj0bjqAX2qb0nJ7mXH17C4HcUxQA+hymWtSue/C5a9up/9Ozn/7Vr7v1nRY7GqMb91T3b3v6vWvPmf/S0p/9ZQk+DDLCBRSOz06Jqk+o7/21nvfqvsebDf7kZL/5zBaxphkezd+OFn7HzXvz3Wvjmv9a8N//5Ek//ZTBpVYUrMG2X5wjcdl68+uI/wa5Lr3hSNjczGFeywOVZ/bbcVGp//F9izfv/Ql03f3P4LC/HSEQquYwMFnUCDJ7dzBhyjGZNQpye89M5gpfnMvtNUyE2h4PUAQBovvT7lyNljwAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.LiveLeak {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAydJREFUOE9Nk1tIk2EYx79NyUNqTk0o6KYrnZeChodLDxfeZpCbJk4RXU5Nm7tYRYhiYXbQlaeGutyW2gxtpB1RIyKDEjKwA6Ti2dR5KNDn+fq/S6TBj/f93r3P732e53s/qfnkSdej4GB2SBLbwf+jmB+gUMgOheLg/z7EdCUnO6Ref392SpK8Hyh3I+gBwBo7lUp2xcbyQEoKD6alyQOpqd754/h4FjJXZCRJTl9ftmEzoK5/wdQJxPgkLY2WV1dpc2uLtnZ2eHNnhza3t2nd46GhjAzuValY6jx0iIfS03msoIDuQ9COQCtoUSjohU5HuwgaN5loeXycd3d3aW9vzwvW2K5SkdTi58fvzGb+3tdHFggA3QONEAzn59PvjQ1yqNX0zenkvX0B4ffWaGRraChJd/385JGqKvlzTw/fRqOaIGkEd1DjU52O/3g83BkTw5MOh7yJuUCUM2o0yi2hoSw1IIOhykr+YLNRHYKu4XQvyKA/N5c8yMCCDD7Z7bz26xcJ1rH2rKKCG0UJdRAMlJbyG6uVrkJQjWAB5tSbk0Nr2HwDgvcQiIYur6zQyvo6ucvLueHIEZKuQPBQr+dXra1kRuqXEOwFArtWSytra1QdFUVjNhvPLS3R3OIiLUDUD0F1WBhJJtwDW2Ehu5uaqBICI4IFlRB0QLCEzaboaHrd0cHzCBYsIIuesjK+LAQXkEFrXh676uupGCWcR6AeghLQptGQONUAwfOuLp6Zn6eZuTmaXVig7pISrhI90ENgQbdHhoep32JhFzLpu3WLio8epUYIfs7OUjF6UKJW88XERLqYkEBNej11oG8XhCAvMFAuOn5cNiclsTkhQTbhmpri4lgbEMANWi1DwC/xit3t7bK7rY0Fo4OD3G4wyEURESzloAdnceezlErK8vH5N4KzPj50PTOTfkxP0+THj/RlYoInJyZI8HVqim5qNFwQHk7SucBAPo2PKRMNPLM/4pnFszYkhJsNBu6uqWFHba1sr61lQSveQFZQkFx07BhJmhMnrLn4NLMPH/aSExR0QDbmWhwgyEapwDvXoDxdWBiXnjrV/Bdm2kYUxLwmEgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vocaroo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAw9JREFUOE9jYMABuMwYmCyTJKUCGlSnFSy02TTzeOyCiQcDViX26qVz2TAyYtWmEMwuoZ3M7V40LcB79pHkc0svpvzY8jD//87nxf+3Pyn8v/ZO8v+VNyP/2mZJumI1QCWSI8232Hjumitlfw5+qPp/9l8TCt76JP//xkdx/wsXWCzjtWFkwTCkbWFe9plPk/+ga4Txz/xt/D/hkN//gMXif21a+NbyWjIwoRiy6GDT5rP/mlFsPfyp5n/NpOj/22+0gMUXXIz/H7hC/L/bFKFbPDZMrHAD5H35OPt2J9zacDv/f3V7xv9FhwrBGubsT/1//Pjx/1GJ/mD+/nfl/1v3Ovy3KRJNQbHdOlXCvOO03/+pm1P/v3v37n90hhtYw9HPtf8Xb2v937cmHswHeWPRxYj/LvkK3igGKARwicTO07118H3V/5kbi/4vPZMJtK3s/6YH2f+Pfq1B8VbjWrdnMu5s4nAD9CNFhKwz5DTUvLl419zKvAcLtG1P84BRl/b/5M/6/6f/NPzf/qzo84yj0Uus0xUU4Zor54bm9+4OfZG02OCuoAMTb9ZkC9ull1Nvrr2Z+XvRpaRfc65H/68F+jl9svEhzyLFWoccWVc+eyTHq/twydjlKRln7jX9bNMkMJnbhoFRL1xCqmKx6/yi2fYXa/c5/e846PV/5fW0/7OPx/yfcjzop34ulxdGGvDuU8mMXaX507lBuiN6ueadmQeT/p/93vf/1O+G//sP5fw/eL3o/5JLif8zVxs+Tlir9S26UyeFQQvJGBE7FvaFZ9LfN+1y+WjbItSb3GmXvXd15v8zroH/HxgE/D+aGPx/18vi/z07PeZNPRKxe/Kh0Ae8toxscCO4zBkYXArk9C1SxJUYjBkYPPIVtbbuTftz3cz//2O9wP/75iSAXdO72/dt2HL5F6YlfBW4MiJYXMiBiW3t7azHBx+V/t89N+H/8a+1//e9K/9attDp5LQjYX8SuvVL8RoAkmxa65299Erq1FnHo0qrl7t4BddriIs4MrM3rfWcFd+pGwVSAwBZ0bKP8yrZPAAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.pastebin {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAtZJREFUOE+NU91LWmEc7sJtQew/2MUY7INg7CLY3W5GMHazyzEQo9UmfYxZTbAiVlgRqLMSZ+XnDC3z2+Y0+8JGakKZTtR0Tl2wtgtLLQh29cz3ZZ3h3Q68vOc95zzP73l+z+/U1f292O09DRxubxOH23P//1bvtQts3dPnry7LZnXJhcUl5Avf8dHtwY+fv2AyW5DOfIXFakMm+w0G4wISyRRm55TQG0y/Wzv6mikJ52Xf9TmVBoFAAD6fDwqFAqFQCJubmzCbzZiensbp6SmkUikikQi0Wi0kEgm6ewVaStDCfXPDandifn6egoaGhrCzswO1Wg2Hw4HBwUGk02kIBAL4/X4IhUJMTk6ii8dfYggy2RwymQzOz88Rj8dRLpexv7+PSqWCYDCIQqGAra0tJBIJrK2t0XdVAjNDEIl+wfj4OEqlEq2wt7dHrchkMmrBYDCAz+fTIjweD7FYrJbgIJOlgLOzM8jlcip1eXmZ2rFarVAqlRCLxcjlchCJRFRljYJYPAG32418Pg+n04lsNouVlRUcHh7C4/FQIOlHNBqlezgcJgQWxkIgGMbExASVNjY2hvX1dVo9mUzS5wREFLhcLrqTcw2B//M2RkdHodPp4PV6oVKpqH+SCom3v7+fNnF4eJiJusbCJ6+PviSyScakiaR5RIHRaKQpmEwmbAdCeD8zB6vdhebHT8SMhcUlC83bbrdTJRsbG3RwiCVCRNJJpDIoVeNNJJJQzKryV+rrmxiCtyNCCmaz2VhdXQWXy6XDpNfrodFoYLXZUTw+pk222Z3lW3ca26rgSwzBwqIZAwMDlITMAVEwNTVFR5fEJpK8Qyp1AJvDVbrTeLenCmxgfiZ22+urCtWHyu7uLp2wVCpFKx0dHaFYLOLk5KT6Y9kgk89kb95ubK0BX7A8a+1qannRLeW0daj/rU51S3tn9dypfvDw0QiLxbpX/Z7FVK7e/AEj4Wf24/2f5AAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.gist {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNqUkzuIE1EUhv955MnsbB6r4kYQLUQQFncV3SnCIqJsoWGDYOGjsIiCtY2Kla1sjLBIsFFcXJC1kaSwENQmXUQSRSUSjCQSTCbkbR4z47lXEgtBNwcu3DNzvvO8R8jlcj7LshKmaWqYQERRTAmCcEru9/sJr9er0QF92BJMAVGr1TQ6CeZAc7lcGAwGkyQAxpTLZU0eDoc8crfbRTgcRjAYRCQSYSmi1WpxY7fbjU6ng1gshmaziXg8zhnGIpVKWbquW9ls1mLZsaMoiqWq6lgnBxY55He/328Vi0XOMFZmqVMD4fF4QBAajcY48khY9JE4HA4enTGMFVkaTHmy+ZzD/5NSqYSNB484w1h55ODO3TVu4FXcWDywl24Cmp0e1WBhyuWELAtIf/qKUrWOONmev3Lpt4NRCXq1gplpBS/v3cDc0nGg9h1o1ZkfwO4Atu1B8cM7HLt8k37V/y5B2b4bJxf2Y+7oEbyJrkMvUjki0YYJ03LidfQxAt4dOHdCw5RdGZcgGobBlQtnV/BDr1GfDai7ZiHZZRi9PoY/e5SCCTUwC9gk1GmMh5YWOcNYkR4Sv1y9uAJbYB82N57h4OnDmN7phjQ0qUkWRJuB+TMaPn/5iFfvv+Ha7eucYey4iWw8q6tRJJNJ3Fp7ClUawEkViBTfkCR0YUNTVHD/4Tpm/P4/U2CeKpUKfD4fJDIMhUKEhP45St50XedZyLQY6Xw+v8AUemVb2oNqtYpCocCWKi2TLLfb7ReZTGZ+kmUi7i2VvfxLgAEAZChMriPcl+IAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.image {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAs5JREFUOE+lk/tvi1EYx98/xT8gW4REIpGFMEQWl2FiM9ZMZhm2xRAyOsmujFFmdFRHu0tWm87UypxStr69zPauN5e5rHVp3IYhbOvHy+wHEQlxkm+ek+d8nm9OznkeSfrfldmgJC7QyUlTymsJTfuTZ25z4HdWYwyLreYhtpgekGPw0+kKvo1Eo+IXRSIiEhkWZuc9tqnsJD9EqTUopCxjSGTpB0iueczSo1HyW8cpsExQ1DbxI2pt45j9cXpexul4FEd79RnZphAa/SD7WvuFtO6UItbU9LC+YQxNI2w0wwYT5LRAdhOU3oBTIXC9gXP3oUSGgz2vST3gYHejR0jptT1C332f8yrUEYHrz8CgxDnpm6DKCUfc0KnmXa/AEVPPwnDcD0cvetA2uYRk67Ive/lpjO7YBO1PPuF8Df3vwf4cbNE4tqdw7YVq8HYyHx6FvhE1hkMEg8HDUqvFkjT4aIjMqkqyqkswDSrcfBfH+Q561YLAZ/B+BLda6FXlU/cPv0AoEPhuoP1h4Av7Wbh9E/Py15NWWUjeSR3nZDfeN+N0DY9hG/7K1eGP3P0S5/EYRFUF/IOTBrUXHPm9fT6mr1xEwupkZqxbzLyiDJYUZ5NSnkdqdSHpxyrYdFpPgdmAsdfJwPMI/Yr65bf7tZLGGBQ7DNdJWFtIYvoOZmbuZE7OXpIKKli86zAr9p9gTVktWTVnKTI2U95uRWe3U2IJUDbVB5p6hVm5x5m9Vc/cnedZUNzC8lILaQesZBy6hEZ3maKzgvJWFzVWD9XtXvVGQbSWASFtMATVRlJIKbOTWtlJXaeXepuPM1f6MNp9GLt8mLvvYLmp0OhQ2Fwvk6m7xaqDTvY0eYWUVtcnllXfYlGpnfklVuraHHg8HjxuN+6fktUHlWWZPaZeUo/ILK0UKttBcbNbSB9GP0yLxWJJUxoZGUn80zD9C/vXQ/4NHY10h3M1zmQAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.InstallGentoo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAklJREFUOE9jYEAAASBTCorZkcSRmTjVCDLziCwG4hfM3EIvGNm44oC6WNEM4WXi5FsEkmfhFX3BxMmfAJSHW9Qr55Px3aZp3X/btq3/hQydPzKysMcCFbBBDeFj4uBdqBJR/gskb1W34j+PmulLoJwbzBJJoMm7dNO7/ntMP/XfpW/v//SKvk+7tl7fvXfTpx5pCdWVSiHFv1wnHQbLi9sE/Wdk5SwBauaCGQB3gUPb5v+7Lr/8/+fvr/9fv/z+f+Pyr/9bV735l9Wy/79Dx/b/Nk0bsLoAHgbeAVHv/v77/f8f0IB7N7+cu3DuecK54z9+7lzz639e9pK/7HwSWMMA5BJwCJeXtOm/fvVj1fcfv369f//92cN7X6ZcPvf9x6Htv//vXP3r/+T245UEYgpskPTNq08LgN749/PH7/93rv/6f/rw7//nj//4f+bU0zQcUQwWBkdVbGz62y+fv3wHeeXrlz//H9798//qpY//M3KqfzGxc8djiWKwZnBUuWQ2/fr46fv/P39+///x/ff/d69//z97+s7fyMb5/+y7d2GLYriDZikFF/1qXXXj/4Pbv/8/f/jn/5MH316/eP6jVlBAaIt6VO1/jxmn/zv27P7Pp2HxEajLD90ra9Sj6/979O37X73w0n+vqOL/0lJyMVBFq0EGgDSD0oKAlu1/oHg4ugGzVCKqfouYuL1Xj676Iajr8AnJFricGqYc3Bw+Zi6BVUxsXLHAdL6QiYMPFNrwpIxHDsUhgtAMAopKDjQn4pPDF7P45QC4hSmc1eX8WgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n\n/* General */\n:root.yotsuba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.yotsuba #header-bar, :root.yotsuba #notifications {\nfont-size: 9pt;\ncolor: #B86;\n}\n:root.yotsuba #header-bar a, :root.yotsuba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.yotsuba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.yotsuba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.yotsuba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba #menu {\ncolor: #800000;\n}\n:root.yotsuba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 10pt;\n}\n:root.yotsuba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.yotsuba-b .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.yotsuba-b #header-bar, :root.yotsuba-b #notifications {\nfont-size: 9pt;\ncolor: #89A;\n}\n:root.yotsuba-b #header-bar a, :root.yotsuba-b #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.yotsuba-b #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.yotsuba-b .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.yotsuba-b .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba-b #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba-b #menu {\ncolor: #000;\n}\n:root.yotsuba-b .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 10pt;\n}\n:root.yotsuba-b .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba-b .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.futaba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.futaba #header-bar, :root.futaba #notifications {\nfont-size: 11pt;\ncolor: #B86;\n}\n:root.futaba #header-bar a, :root.futaba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.futaba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.futaba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.futaba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.futaba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.futaba #menu {\ncolor: #800000;\n}\n:root.futaba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 12pt;\n}\n:root.futaba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.futaba .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.burichan .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.burichan #header-bar, :root.burichan #header-bar #notifications {\nfont-size: 11pt;\ncolor: #89A;\n}\n:root.burichan #header-bar a, :root.burichan #header-bar #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.burichan #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.burichan .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.burichan .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.burichan #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.burichan #menu {\ncolor: #000000;\n}\n:root.burichan .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 12pt;\n}\n:root.burichan .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.burichan .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.tomorrow .dialog {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n\n/* Header */\n:root.tomorrow #header-bar, :root.tomorrow #notifications {\nfont-size: 9pt;\ncolor: #C5C8C6;\n}\n:root.tomorrow #header-bar a, :root.tomorrow #notifications a {\ncolor: #81A2BE;\n}\n\n/* Settings */\n:root.tomorrow #fourchanx-settings fieldset {\nborder-color: #111;\n}\n\n/* Quote */\n:root.tomorrow .backlink.deadlink {\ncolor: #81A2BE !important;\n}\n:root.tomorrow .inline {\nborder-color: #111;\nbackground-color: rgba(0, 0, 0, .14);\n}\n\n/* QR */\n.tomorrow #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n:root.tomorrow .qr-preview {\nbackground-color: rgba(255, 255, 255, .15);\n}\n:root.tomorrow #qr .field {\nbackground-color: rgb(26, 27, 29);\ncolor: rgb(197,200,198);\nborder-color: rgb(40, 41, 42);\n}\n:root.tomorrow #qr .field:focus {\nborder-color: rgb(129, 162, 190) !important;\nbackground-color: rgb(30,32,36);\n}\n\n/* Menu */\n:root.tomorrow #menu {\ncolor: #C5C8C6;\n}\n:root.tomorrow .entry {\nborder-bottom: 1px solid #111;\nfont-size: 10pt;\n}\n:root.tomorrow .focused.entry {\nbackground: rgba(0, 0, 0, .33);\n}\n\n/* Watcher Favicon */\n:root.tomorrow .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.photon .dialog {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.photon #header-bar, :root.photon #notifications {\nfont-size: 9pt;\ncolor: #333;\n}\n:root.photon #header-bar a, :root.photon #notifications a {\ncolor: #FF6600;\n}\n\n/* Settings */\n:root.photon #fourchanx-settings fieldset {\nborder-color: #CCC;\n}\n\n/* Quote */\n:root.photon .backlink.deadlink {\ncolor: #F60 !important;\n}\n:root.photon .inline {\nborder-color: #CCC;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.photon #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.photon #menu {\ncolor: #333;\n}\n:root.photon .entry {\nborder-bottom: 1px solid #CCC;\nfont-size: 10pt;\n}\n:root.photon .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.photon .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n" + css: "/* General */\n.dialog {\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder: 1px solid;\ndisplay: block;\npadding: 0;\n}\n.captcha-img,\n.field {\nbackground-color: #FFF;\nborder: 1px solid #CCC;\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\ncolor: #333;\nfont: 13px sans-serif;\noutline: none;\ntransition: color .25s, border-color .25s;\ntransition: color .25s, border-color .25s;\n}\n.field::-moz-placeholder,\n.field:hover::-moz-placeholder {\ncolor: #AAA !important;\nfont-size: 13px !important;\nopacity: 1.0 !important;\n}\n.captch-img:hover,\n.field:hover {\nborder-color: #999;\n}\n.field:hover, .field:focus {\ncolor: #000;\n}\n.field[disabled] {\nbackground-color: #F2F2F2;\ncolor: #888;\n}\n.move {\ncursor: move;\noverflow: hidden;\n}\nlabel,\n.watch-thread-link {\ncursor: pointer;\n}\na[href=\"javascript:;\"] {\ntext-decoration: none;\n}\n.warning {\ncolor: red;\n}\n#boardNavDesktop {\ndisplay: none !important;\n}\na {\noutline: none !important;\n}\n\n/* 4chan style fixes */\n.opContainer, .op {\ndisplay: block !important;\noverflow: visible !important;\n}\n[hidden] {\ndisplay: none !important;\n}\n\n/* fixed, z-index */\n#overlay,\n#fourchanx-settings,\n#qp, #ihover,\n#navlinks, .fixed #header-bar,\n:root.float #updater,\n:root.float #thread-stats,\n#qr {\nposition: fixed;\n}\n#fourchanx-settings {\nz-index: 999;\n}\n#overlay {\nz-index: 900;\n}\n#notifications {\nz-index: 70;\n}\n#qp, #ihover {\nz-index: 60;\n}\n#menu {\nz-index: 50;\n}\n#navlinks, #updater, #thread-stats {\nz-index: 40;\n}\n.fixed #header-bar.autohide {\nz-index: 35;\n}\n#qr {\nz-index: 30;\n}\n#thread-watcher {\nz-index: 8;\n}\n:root.fixed-watcher #thread-watcher {\nz-index: 20;\n}\n.fixed #header-bar {\nz-index: 10;\n}\n/* Header */\n.fixed.top body {\npadding-top: 2em;\n}\n.fixed.bottom body {\npadding-bottom: 2em;\n}\n.fixed #header-bar {\nright: 0;\nleft: 0;\npadding: 3px 4px 4px;\n}\n.fixed.top #header-bar {\ntop: 0;\n}\n.fixed.bottom #header-bar {\nbottom: 0;\n}\n#header-bar {\nborder-width: 0;\ntransition: all .1s .05s ease-in-out;\n}\n:root.centered-links #shortcuts {\nwidth: 300px;\ntext-align: right;\n}\n:root.centered-links #header-bar {\ntext-align: center;\n}\n:root.centered-links #custom-board-list {\nposition: relative;\nleft: 150px;\n}\n.fixed.top #header-bar {\nborder-bottom-width: 1px;\n}\n.fixed.bottom #header-bar {\nbox-shadow: 0 -1px 2px rgba(0, 0, 0, .15);\nborder-top-width: 1px;\n}\n.fixed.bottom #header-bar .menu-button i {\nborder-top: none;\nborder-bottom: 6px solid;\n}\n#board-list {\ntext-align: center;\n}\n.fixed #header-bar.autohide:not(:hover) {\nbox-shadow: none;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\nmargin-bottom: -1em;\n-webkit-transform: translateY(-100%);\ntransform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n-webkit-transform: translateY(100%);\ntransform: translateY(100%);\n}\n#scroll-marker {\nleft: 0;\nright: 0;\nheight: 10px;\nposition: absolute;\n}\n:root:not(.autohide) #scroll-marker {\npointer-events: none;\n}\n#header-bar #scroll-marker {\ndisplay: none;\n}\n.fixed #header-bar #scroll-marker {\ndisplay: block;\n}\n.fixed.top #header-bar #scroll-marker {\ntop: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\nbottom: 100%;\n}\n#header-bar a:not(.entry):not(.close) {\ntext-decoration: none;\npadding: 1px;\n}\n#header-bar input {\nmargin: 0;\nvertical-align: bottom;\n}\n#shortcuts:empty {\ndisplay: none;\n}\n.brackets-wrap::before {\ncontent: \"\\00a0[\";\n}\n.brackets-wrap::after {\ncontent: \"]\\00a0\";\n}\n.dead-thread,\n.disabled,\n.expand-all-shortcut {\nopacity: .45;\n}\n#shortcuts {\nfloat: right;\n}\n.shortcut {\nmargin-left: 3px;\n}\n#navbotright,\n#navtopright {\ndisplay: none;\n}\n#toggleMsgBtn {\ndisplay: none !important;\n}\n.current {\nfont-weight: bold;\n}\n/* 4chan X link brackets */\n.fourchanx-link::after {\ncontent: \"]\";\n}\n.fourchanx-link::before {\ncontent: \"[\";\n}\n/* Notifications */\n#notifications {\nposition: fixed;\ntop: 0;\nheight: 0;\ntext-align: center;\nright: 0;\nleft: 0;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar #notifications {\nposition: absolute;\ntop: 100%;\n}\n.notification {\ncolor: #FFF;\nfont-weight: 700;\ntext-shadow: 0 1px 2px rgba(0, 0, 0, .5);\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder-radius: 2px;\nmargin: 1px auto;\nwidth: 500px;\nmax-width: 100%;\nposition: relative;\ntransition: all .25s ease-in-out;\n}\n.notification.error {\nbackground-color: hsla(0, 100%, 38%, .9);\n}\n.notification.warning {\nbackground-color: hsla(36, 100%, 38%, .9);\n}\n.notification.info {\nbackground-color: hsla(200, 100%, 38%, .9);\n}\n.notification.success {\nbackground-color: hsla(104, 100%, 38%, .9);\n}\n.notification a {\ncolor: white;\n}\n.notification > .close {\npadding: 6px;\ntop: 0;\nright: 5px;\nposition: absolute;\n}\n.message {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\npadding: 6px 20px;\nmax-height: 200px;\nwidth: 100%;\noverflow: auto;\n}\n\n/* Settings */\n:root.fourchan-x body {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\n}\n#overlay {\nbackground-color: rgba(0, 0, 0, .5);\ntop: 0;\nleft: 0;\nheight: 100%;\nwidth: 100%;\n}\n#fourchanx-settings {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nbox-shadow: 0 0 15px rgba(0, 0, 0, .15);\nheight: 600px;\nmax-height: 100%;\nwidth: 900px;\nmax-width: 100%;\nmargin: auto;\npadding: 3px;\ntop: 50%;\nleft: 50%;\n-moz-transform: translate(-50%, -50%);\n-webkit-transform: translate(-50%, -50%);\ntransform: translate(-50%, -50%);\n}\n#fourchanx-settings > nav {\npadding: 2px 2px 0;\nheight: 15px;\n}\n#fourchanx-settings > nav a {\ntext-decoration: underline;\n}\n#fourchanx-settings > nav a.close {\ntext-decoration: none;\npadding: 2px;\n}\n.section-container {\noverflow: auto;\nposition: absolute;\ntop: 2.1em;\nright: 5px;\nbottom: 5px;\nleft: 5px;\npadding-right: 5px;\n}\n.sections-list {\npadding: 0 3px;\nfloat: left;\n}\n.credits {\nfloat: right;\n}\n.tab-selected {\nfont-weight: 700;\n}\n.section-sauce ul,\n.section-advanced ul {\nlist-style: none;\nmargin: 0;\n}\n.section-sauce ul {\npadding: 8px;\n}\n.section-advanced ul {\npadding: 0px;\n}\n.section-sauce li,\n.section-advanced li {\npadding-left: 4px;\n}\n.section-main label {\ntext-decoration: underline;\n}\n.section-filter ul {\npadding: 0;\n}\n.section-filter li {\nmargin: 10px 40px;\n}\n.section-filter textarea {\nheight: 500px;\n}\n.section-sauce textarea {\nheight: 350px;\n}\n.section-advanced .field[name=\"boardnav\"] {\nwidth: 100%;\n}\n.section-advanced textarea {\nheight: 150px;\n}\n.section-advanced .archive-cell {\nmin-width: 160px;\ntext-align: center;\n}\n.section-advanced #archive-board-select {\nposition: absolute;\n}\n.section-advanced .note {\nfont-size: 0.8em;\nfont-style: italic;\nmargin-left: 10px;\n}\n.section-advanced .note code {\nfont-style: normal;\nfont-size: 11px;\n}\n.section-keybinds .field {\nfont-family: monospace;\n} \n#fourchanx-settings fieldset {\nborder: 1px solid;\nborder-radius: 3px;\n}\n#fourchanx-settings legend {\nfont-weight: 700;\n}\n#fourchanx-settings textarea {\nfont-family: monospace;\nmin-width: 100%;\nmax-width: 100%;\n}\n#fourchanx-settings code {\ncolor: #000;\nbackground-color: #FFF;\npadding: 0 2px;\n}\n.unscroll {\noverflow: hidden;\n}\n\n/* Announcement Hiding */\n:root.hide-announcement #globalMessage {\ndisplay: none;\n}\na.hide-announcement {\nfloat: left;\n}\n\n/* Unread */\n#unread-line {\nmargin: 0;\nborder-color: rgb(255,0,0);\n}\n\n/* Thread Updater */\n#updater {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n#updater > .move {\npadding: 5px 3px 0px;\nmargin-bottom: -3px;\n}\n#updater > div:last-child {\ntext-align: center;\n}\n#updater input[type=number] {\nwidth: 4em;\n}\n:root.float #updater {\npadding: 0px 3px;\n}\n.new {\ncolor: limegreen;\n}\n#update-status.new {\nmargin-right: 5px;\n}\n#update-timer {\ncursor: pointer;\n}\n\n/* Thread Watcher */\n#thread-watcher {\nposition: absolute;\n}\n#thread-watcher {\npadding-bottom: 3px;\npadding-left: 3px;\noverflow: hidden;\nwhite-space: nowrap;\nmin-width: 136px;\nmax-height: 92%;\noverflow-y: auto;\n}\n#thread-watcher .menu-button {\nbottom: 1px;\n}\n:root.fixed-watcher #thread-watcher {\nposition: fixed;\n}\n:root:not(.fixed-watcher) #thread-watcher:not(:hover) {\nmax-height: 210px;\noverflow-y: hidden;\n}\n#thread-watcher > .move {\npadding-top: 3px;\n}\n#watched-threads > div {\nmax-width: 250px;\noverflow: hidden;\npadding-left: 3px;\npadding-right: 3px;\ntext-overflow: ellipsis;\n}\n#thread-watcher a {\ntext-decoration: none;\n}\n#thread-watcher .move>.close {\nposition: absolute;\nright: 0px;\ntop: 0px;\npadding: 0px 4px;\n}\n.watch-thread-link {\npadding-top: 18px;\nwidth: 18px;\nheight: 0px;\ndisplay: inline-block;\nbackground-repeat: no-repeat;\nopacity: 0.2;\nposition: relative;\ntop: 1px;\n}\n.watch-thread-link.watched {\nopacity: 1;\n}\n\n\n/* Thread Stats */\n#thread-stats {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n:root.float #post-count, :root.float #file-count {\npointer-events: none;\n}\n:root.float #thread-stats {\npadding: 0px 3px;\n}\n\n/* Quote */\n.deadlink {\ntext-decoration: none !important;\n}\n.backlink.deadlink:not(.forwardlink),\n.quotelink.deadlink:not(.forwardlink) {\ntext-decoration: underline !important;\n}\n.inlined {\nopacity: .5;\n}\n#qp input, .forwarded {\ndisplay: none;\n}\n.quotelink.forwardlink,\n.backlink.forwardlink {\ntext-decoration: none;\nborder-bottom: 1px dashed;\n}\n.filtered {\ntext-decoration: underline line-through;\n}\n:root.hide-backlinks .backlink.filtered {\ndisplay: none;\n}\n.inline {\nborder: 1px solid;\ndisplay: table;\nmargin: 2px 0;\n}\n.inline .post {\nborder: 0 !important;\nbackground-color: transparent !important;\ndisplay: table !important;\nmargin: 0 !important;\npadding: 1px 2px !important;\n}\n#qp > .opContainer::after {\ncontent: '';\nclear: both;\ndisplay: table;\n}\n#qp .post {\nborder: none;\nmargin: 0;\npadding: 2px 2px 5px;\n}\n#qp img {\nmax-height: 80vh;\nmax-width: 50vw;\n}\n.qphl {\noutline: 2px solid rgba(216, 94, 49, .7);\n}\n:root.highlight-own .yourPost > .reply,\n:root.highlight-you .quotesYou > .reply {\nborder-left: 2px solid rgba(221,0,0,.5);\n}\n/* Quote Threading */\n.threadContainer {\nmargin-left: 20px;\nborder-left: 1px solid rgba(128,128,128,.3);\n}\n.threadOP {\nclear: both;\n} \n\n/* File */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n:not(.expanded-image) > .post > .file > .fileThumb > .full-image {\ndisplay: none;\n}\n.expanding {\nopacity: .5;\n}\n:root.fit-height .full-image {\nmax-height: 100vh;\n}\n:root.fit-width .full-image {\nmax-width: 100%;\n}\n:root.gecko.fit-width .full-image {\nwidth: 100%;\n}\n#ihover {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nmax-height: 100%;\nmax-width: 75%;\npadding-bottom: 16px;\n}\n.fappeTyme .thread > .noFile,\n.fappeTyme .threadContainer > .noFile {\ndisplay: none;\n}\n\n/* Index/Reply Navigation */\n#navlinks {\nfont-size: 16px;\ntop: 25px;\nright: 10px;\n}\n\n/* Filter */\n.opContainer.filter-highlight {\nbox-shadow: inset 5px 0 rgba(255, 0, 0, .5);\n}\n.filter-highlight > .reply {\nbox-shadow: -5px 0 rgba(255, 0, 0, .5);\n}\n\n/* Spoiler text */\n:root.reveal-spoilers s {\ncolor: white !important;\n}\n\n/* Thread & Reply Hiding */\n.hide-thread-button,\n.hide-reply-button {\nfloat: left;\nmargin-right: 2px;\n}\n.stub ~ * {\ndisplay: none !important;\n}\n.stub input {\ndisplay: inline-block;\n}\n\n/* QR */\n:root.hide-original-post-form #postForm,\n:root.hide-original-post-form .postingMode,\n:root.hide-original-post-form #togglePostForm,\n#qr.autohide:not(.has-focus):not(:hover) > form,\n.postingMode ~ #qr select,\n#file-n-submit:not(.has-file) #qr-filerm {\ndisplay: none;\n}\n#qr select,\n#dump-button,\n.remove,\n.captcha-img {\ncursor: pointer;\n}\n#qr {\nz-index: 20;\nposition: fixed;\npadding: 1px;\nborder: 1px solid transparent;\nmin-width: 300px;\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nmargin-bottom: 1px;\n}\n#qr .close {\nfloat: right;\npadding: 0 3px;\n}\n#qr .warning {\nmin-height: 1.6em;\nvertical-align: middle;\npadding: 0 1px;\nborder-width: 1px;\nborder-style: solid;\n}\n.qr-link-container {\ntext-align: center;\n}\n.persona {\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-button {\nwidth: 10%;\nmargin: 0;\nmargin-right: 4px;\nfont: 13px sans-serif;\npadding: 1px 0px 2px;\nopacity: 0.6;\n}\n.persona .field:not(#dump) {\nwidth: 95px;\nmin-width: 33.3%;\nmax-width: 33.3%;\n}\n#qr textarea.field {\nheight: 14.8em;\nmin-height: 9em;\n}\n#qr.has-captcha textarea.field {\nheight: 9em;\n}\ninput.field.tripped:not(:hover):not(:focus) {\ncolor: transparent !important;\ntext-shadow: none !important;\n}\n#qr textarea {\nresize: both;\n}\n.captcha-img {\nmargin: 0px;\ntext-align: center;\nbackground-image: #fff;\nfont-size: 0px;\nmin-height: 59px;\nmin-width: 302px;\n}\n.captcha-input {\nwidth: 100%;\nmargin: 1px 0 0;\n}\n.captcha-input.error:focus {\nborder-color: rgb(255,0,0) !important;\n}\n.field {\n-moz-box-sizing: border-box;\nmargin: 0px;\npadding: 2px 4px 3px;\n}\n#qr textarea {\nmin-width: 100%;\n}\n#qr [type='submit'] {\nwidth: 25%;\nvertical-align: top;\n}\n:root.webkit #qr [type='submit'] {\nheight: 24px;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\ndisplay: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\ndisplay: inline-block;\npadding: 0px 4px;\nmargin-bottom: 2px;\noverflow: hidden;\ntext-overflow: ellipsis;\nmax-width: 88%;\n}\n#qr-no-file {\ncolor: #AAA;\n}\n#qr-filename-container {\n-moz-box-sizing: border-box;\ndisplay: inline-block;\nposition: relative;\nwidth: 100px;\nmin-width: 74.6%;\nmax-width: 74.6%;\nmargin-right: 0.4%;\nmargin-top: 1px;\noverflow: hidden;\npadding: 2px 1px 0;\nheight: 22px;\n}\n#qr-filename-container:hover {\ncursor: text;\n}\n#qr-extras-container {\nposition: absolute;\nright: 0px;\n}\n#qr-filerm {\nmargin-right: 2px;\nz-index: 2;\n}\n#file-n-submit {\nheight: 23px;\n}\n#qr input[type=file] {\nvisibility: hidden;\nposition: absolute;\n}\n/* Thread Select / Spoiler Label */\n#qr select {\nfloat: right;\n}\n#qr.has-spoiler .has-file #qr-spoiler-label {\nwidth: 6.7%;\nmin-width: 6.7%;\nmax-width: 6.7%;\ndisplay: inline-block;\ntext-align: center;\nvertical-align: top;\n}\n#qr.has-spoiler #file-n-submit:not(.has-file) #qr-spoiler-label {\ndisplay: none;\n}\n#qr.has-spoiler .has-file #qr-filename-container {\nmax-width: 67.9%;\nmin-width: 67.9%;\n}\n#qr-spoiler-label input {\nposition: relative;\ntop: 3px;\n}\n/* Dumping UI */\n.dump #dump-list-container {\ndisplay: block;\n}\n#dump-list-container {\ndisplay: none;\nposition: relative;\noverflow-y: hidden;\nmargin-top: 1px;\n}\n#dump-list {\noverflow-x: auto;\noverflow-y: hidden;\nwhite-space: nowrap;\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-list:hover {\noverflow-x: auto;\n}\n.qr-preview {\n-moz-box-sizing: border-box;\ncounter-increment: thumbnails;\ncursor: move;\ndisplay: inline-block;\nheight: 90px;\nwidth: 90px;\npadding: 2px;\nopacity: .5;\noverflow: hidden;\nposition: relative;\ntext-shadow: 0 1px 1px #000;\n-moz-transition: opacity .25s ease-in-out;\nvertical-align: top;\nbackground-size: cover;\n}\n.qr-preview:hover,\n.qr-preview:focus {\nopacity: .9;\n}\n.qr-preview::before {\ncontent: counter(thumbnails);\ncolor: #fff;\nposition: absolute;\ntop: 3px;\nright: 3px;\ntext-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\nopacity: 1;\n}\n.qr-preview.drag {\nbox-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\nborder-color: #fff;\n}\n.qr-preview > span {\ncolor: #fff;\n}\n.remove {\nbackground: none;\ncolor: #e00;\nfont-weight: 700;\npadding: 3px;\n}\na:only-of-type > .remove {\ndisplay: none;\n}\n.remove:hover::after {\ncontent: \" Remove\";\n}\n.qr-preview > label {\nbackground: rgba(0,0,0,.5);\ncolor: #fff;\nright: 0;\nbottom: 0;\nleft: 0;\nposition: absolute;\ntext-align: center;\n}\n.qr-preview > label > input {\nmargin: 0;\n}\n#add-post {\ncursor: pointer;\nfont-size: 2em;\nposition: absolute;\ntop: 50%;\nright: 10px;\n-moz-transform: translateY(-50%);\n}\n.textarea {\nposition: relative;\n}\n:root.webkit .textarea {\nmargin-bottom: -2px;\n}\n#char-count {\ncolor: #000;\nbackground: hsla(0, 0%, 100%, .5);\nfont-size: 8pt;\nposition: absolute;\nbottom: 1px;\nright: 1px;\npointer-events: none;\n}\n\n/* Menu */\n.menu-button {\ndisplay: inline-block;\nposition: relative;\ncursor: pointer;\n}\n.menu-button i {\nborder-top: 6px solid;\nborder-right: 4px solid transparent;\nborder-left: 4px solid transparent;\ndisplay: inline-block;\nmargin: 2px;\nvertical-align: middle;\n}\n#menu {\nposition: fixed;\noutline: none;\n}\n.entry {\nborder-bottom: 1px solid rgba(0,0,0,.25);\ncursor: pointer;\ndisplay: block;\noutline: none;\npadding: 3px 7px;\nposition: relative;\ntext-decoration: none;\nwhite-space: nowrap;\n}\n.left>.entry.has-submenu {\npadding-right: 17px !important;\n}\n.entry:last-child {\nborder-bottom: 0;\n}\n.has-submenu::after {\ncontent: \"\";\nborder-left: .5em solid;\nborder-top: .3em solid transparent;\nborder-bottom: .3em solid transparent;\ndisplay: inline-block;\nmargin: .3em;\nposition: absolute;\nright: 3px;\n}\n.left .has-submenu::after {\nborder-left: 0;\nborder-right: .5em solid;\n}\n.submenu {\ndisplay: none;\nposition: absolute;\nleft: 100%;\ntop: -1px;\n}\n.focused .submenu {\ndisplay: block;\n}\n.imp-exp-result {\nposition: absolute;\ntext-align: center;\nmargin: auto;\nright: 0px;\nleft: 0px;\nwidth: 200px;\n}\n.export, .import {\ncursor: pointer;\ntext-decoration: none !important;\n}\n/* Link Title Favicons */\n.linkify.YouTube {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAABIklEQVQoz53LvUrDUBjG8bOoOammSf1IoBSvoCB4JeIqOHgBLt6AIMRBBQelWurQ2kERnMRBsBUcIp5FJSBI5oQsJVkkUHh8W0o5nhaFHvjBgef/Mq+Q46RJBMkI/vE+aOus956tnEswIZe1LV0QyJ5sE2GzgZfVMtRNIdiDpccEssdlB1mW4bvTwdvWJtRdErM7U+8S/FJykCRJX5qm+KpVce8UMNLRLbulz4iSjTAMh6Iowsd5BeNadp3nUF0VlxAEwZBotXC0Usa4ll3meZdA1iguwvf9vpvDA2wvmKgYGtSud8suDB4TyGr2PF49D/vra9jRZ1BVdknMzgwuCGSnZEObwu6sBnVTCHZiaC7BhFx2PKdxUidiAH/4lLo9Mv0DELVs9qsOHXwAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vimeo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAASJJREFUOE9jYAAC7ln7/pODQXrBmq333PvPu/YaSRikB6QXbACpmmHqsRoAMll7+20UQ0H8tmuv/pdffPFfZtNNuByGASBFIPDh5x+4IV6HHoDFYGDJgw+YBoBMBUkgA5BtIKduuvvy//svX+FSB+88wTTAc+/t/83bj/0HScLA5BPXwc7lKJ36f+L6XXDxhUfOYxrAPWUnWKFp9UQUm3iWQxSDXAEDSX3zcIcB96wD/x+8eA1XDNKMHAYg20GW4Y0FkCIYAAUqzEBQOIBciRzlWKMxZelOlMCEcVxq+jHSC1YDJPs3YBgA8jey0/F6ARRwsFAHORukmat9NdbUijMpg/wKcrJodDFOzSBXwA3Alh9AToZFI7a8Asu98BxJbnYGAJb5vYLDANzSAAAAAElFTkSuQmCC') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.SoundCloud {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABsklEQVQ4y5WTy2pUQRCGv2rbzDjJeAlIBmOyipGIIJqFEBDElwh4yULGeRFXPoEIBl/AvQ/gC2RnxCAoxijiwks852S6+3dxzslcHJCpTXVX11/Xv0097gLPgVNMJxnQNfX4zsqleWbnpoMf/oa9d988MM9MC/rp+E0a+A0dsVobMNMCOO8B6McRoABJI+A6gJmN3D2A8jgEBCEkSEMBrcrsDAzDWWn3AjgKFaDMmgRqniGFgsaDp1jrLOngDf1XT1D+A1dFc4MKAkkiCVKjjVu7g9+4Rzx4i1u6hjXbuMWr0O5QPNvCu7IaCZwEKQukLGDrm5x8uI0tr6MkiGlkiv7yLfzN+6S5i6QsIMABkEfcxhbWWYMkVAOjxvYAjc3HNHrbKI9VBQBFwF25XQKSBjqIf1YBuAurEMrczgDygD6/x2LCpFLXLUyQ+PoldphhBhYfIX09XU1+Flaukz7uYqs3SHs7cG4BmTsmkBUF9mmXEwa28BNLPaQPLepuNcbGSWQquQC2/Kdcox1FUGkcB0ykck1nA2+wTzMs8stGnP4rbWGw74EuS/GFQWfK7/wF6P4F7fzIAYkdmdEAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.audio {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAitJREFUOE9jYCAWKJWwavr0KyXWb/FIbDtUFFyzJx6nVofE2Xo5nXsj0rqPNSR0nVkR2Hjmgmfd+U9Otdf+m5Vf/6+SfeU/R9ChVVgNYDRtlfJuuPA/rPfe/4QpD/6nznj0P27Kw/9unff/69Xf+69c/+C/SO7N/0z+OAxgMmmRCe++/r9i3ev/KWvf/vdY8PK/bt/9/wrNV3/IN5y/IVt1YqNg4pGTTP4HsbuA2bhZ2qvpyn+xjIObxAp3VwqlrgngLFyryVy5nhPmZJHANS2cwYexG8BmVC/pWn3hP4NZlzWuQDJI3dIiFnUUuwEsQAOcq87jNcC7fHeLUtJxHF4AGmBWeAavAWH1+1rUUk7giAWjOknllON4DXAs2NEiG4/DBQxAF/CFHfrPYI4jDFSLuJVjNrUJhB/B7gIGo1pJRt99GAZYJK7wLJ1z7Xzl4vu/7aqv/GRBj0bjqAX2qb0nJ7mXH17C4HcUxQA+hymWtSue/C5a9up/9Ozn/7Vr7v1nRY7GqMb91T3b3v6vWvPmf/S0p/9ZQk+DDLCBRSOz06Jqk+o7/21nvfqvsebDf7kZL/5zBaxphkezd+OFn7HzXvz3Wvjmv9a8N//5Ek//ZTBpVYUrMG2X5wjcdl68+uI/wa5Lr3hSNjczGFeywOVZ/bbcVGp//F9izfv/Ql03f3P4LC/HSEQquYwMFnUCDJ7dzBhyjGZNQpye89M5gpfnMvtNUyE2h4PUAQBovvT7lyNljwAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.LiveLeak {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAydJREFUOE9Nk1tIk2EYx79NyUNqTk0o6KYrnZeChodLDxfeZpCbJk4RXU5Nm7tYRYhiYXbQlaeGutyW2gxtpB1RIyKDEjKwA6Ti2dR5KNDn+fq/S6TBj/f93r3P732e53s/qfnkSdej4GB2SBLbwf+jmB+gUMgOheLg/z7EdCUnO6Ref392SpK8Hyh3I+gBwBo7lUp2xcbyQEoKD6alyQOpqd754/h4FjJXZCRJTl9ftmEzoK5/wdQJxPgkLY2WV1dpc2uLtnZ2eHNnhza3t2nd46GhjAzuValY6jx0iIfS03msoIDuQ9COQCtoUSjohU5HuwgaN5loeXycd3d3aW9vzwvW2K5SkdTi58fvzGb+3tdHFggA3QONEAzn59PvjQ1yqNX0zenkvX0B4ffWaGRraChJd/385JGqKvlzTw/fRqOaIGkEd1DjU52O/3g83BkTw5MOh7yJuUCUM2o0yi2hoSw1IIOhykr+YLNRHYKu4XQvyKA/N5c8yMCCDD7Z7bz26xcJ1rH2rKKCG0UJdRAMlJbyG6uVrkJQjWAB5tSbk0Nr2HwDgvcQiIYur6zQyvo6ucvLueHIEZKuQPBQr+dXra1kRuqXEOwFArtWSytra1QdFUVjNhvPLS3R3OIiLUDUD0F1WBhJJtwDW2Ehu5uaqBICI4IFlRB0QLCEzaboaHrd0cHzCBYsIIuesjK+LAQXkEFrXh676uupGCWcR6AeghLQptGQONUAwfOuLp6Zn6eZuTmaXVig7pISrhI90ENgQbdHhoep32JhFzLpu3WLio8epUYIfs7OUjF6UKJW88XERLqYkEBNej11oG8XhCAvMFAuOn5cNiclsTkhQTbhmpri4lgbEMANWi1DwC/xit3t7bK7rY0Fo4OD3G4wyEURESzloAdnceezlErK8vH5N4KzPj50PTOTfkxP0+THj/RlYoInJyZI8HVqim5qNFwQHk7SucBAPo2PKRMNPLM/4pnFszYkhJsNBu6uqWFHba1sr61lQSveQFZQkFx07BhJmhMnrLn4NLMPH/aSExR0QDbmWhwgyEapwDvXoDxdWBiXnjrV/Bdm2kYUxLwmEgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vocaroo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAw9JREFUOE9jYMABuMwYmCyTJKUCGlSnFSy02TTzeOyCiQcDViX26qVz2TAyYtWmEMwuoZ3M7V40LcB79pHkc0svpvzY8jD//87nxf+3Pyn8v/ZO8v+VNyP/2mZJumI1QCWSI8232Hjumitlfw5+qPp/9l8TCt76JP//xkdx/wsXWCzjtWFkwTCkbWFe9plPk/+ga4Txz/xt/D/hkN//gMXif21a+NbyWjIwoRiy6GDT5rP/mlFsPfyp5n/NpOj/22+0gMUXXIz/H7hC/L/bFKFbPDZMrHAD5H35OPt2J9zacDv/f3V7xv9FhwrBGubsT/1//Pjx/1GJ/mD+/nfl/1v3Ovy3KRJNQbHdOlXCvOO03/+pm1P/v3v37n90hhtYw9HPtf8Xb2v937cmHswHeWPRxYj/LvkK3igGKARwicTO07118H3V/5kbi/4vPZMJtK3s/6YH2f+Pfq1B8VbjWrdnMu5s4nAD9CNFhKwz5DTUvLl419zKvAcLtG1P84BRl/b/5M/6/6f/NPzf/qzo84yj0Uus0xUU4Zor54bm9+4OfZG02OCuoAMTb9ZkC9ull1Nvrr2Z+XvRpaRfc65H/68F+jl9svEhzyLFWoccWVc+eyTHq/twydjlKRln7jX9bNMkMJnbhoFRL1xCqmKx6/yi2fYXa/c5/e846PV/5fW0/7OPx/yfcjzop34ulxdGGvDuU8mMXaX507lBuiN6ueadmQeT/p/93vf/1O+G//sP5fw/eL3o/5JLif8zVxs+Tlir9S26UyeFQQvJGBE7FvaFZ9LfN+1y+WjbItSb3GmXvXd15v8zroH/HxgE/D+aGPx/18vi/z07PeZNPRKxe/Kh0Ae8toxscCO4zBkYXArk9C1SxJUYjBkYPPIVtbbuTftz3cz//2O9wP/75iSAXdO72/dt2HL5F6YlfBW4MiJYXMiBiW3t7azHBx+V/t89N+H/8a+1//e9K/9attDp5LQjYX8SuvVL8RoAkmxa65299Erq1FnHo0qrl7t4BddriIs4MrM3rfWcFd+pGwVSAwBZ0bKP8yrZPAAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.pastebin {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAtZJREFUOE+NU91LWmEc7sJtQew/2MUY7INg7CLY3W5GMHazyzEQo9UmfYxZTbAiVlgRqLMSZ+XnDC3z2+Y0+8JGakKZTtR0Tl2wtgtLLQh29cz3ZZ3h3Q68vOc95zzP73l+z+/U1f292O09DRxubxOH23P//1bvtQts3dPnry7LZnXJhcUl5Avf8dHtwY+fv2AyW5DOfIXFakMm+w0G4wISyRRm55TQG0y/Wzv6mikJ52Xf9TmVBoFAAD6fDwqFAqFQCJubmzCbzZiensbp6SmkUikikQi0Wi0kEgm6ewVaStDCfXPDandifn6egoaGhrCzswO1Wg2Hw4HBwUGk02kIBAL4/X4IhUJMTk6ii8dfYggy2RwymQzOz88Rj8dRLpexv7+PSqWCYDCIQqGAra0tJBIJrK2t0XdVAjNDEIl+wfj4OEqlEq2wt7dHrchkMmrBYDCAz+fTIjweD7FYrJbgIJOlgLOzM8jlcip1eXmZ2rFarVAqlRCLxcjlchCJRFRljYJYPAG32418Pg+n04lsNouVlRUcHh7C4/FQIOlHNBqlezgcJgQWxkIgGMbExASVNjY2hvX1dVo9mUzS5wREFLhcLrqTcw2B//M2RkdHodPp4PV6oVKpqH+SCom3v7+fNnF4eJiJusbCJ6+PviSyScakiaR5RIHRaKQpmEwmbAdCeD8zB6vdhebHT8SMhcUlC83bbrdTJRsbG3RwiCVCRNJJpDIoVeNNJJJQzKryV+rrmxiCtyNCCmaz2VhdXQWXy6XDpNfrodFoYLXZUTw+pk222Z3lW3ca26rgSwzBwqIZAwMDlITMAVEwNTVFR5fEJpK8Qyp1AJvDVbrTeLenCmxgfiZ22+urCtWHyu7uLp2wVCpFKx0dHaFYLOLk5KT6Y9kgk89kb95ubK0BX7A8a+1qannRLeW0daj/rU51S3tn9dypfvDw0QiLxbpX/Z7FVK7e/AEj4Wf24/2f5AAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.gist {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNqUkzuIE1EUhv955MnsbB6r4kYQLUQQFncV3SnCIqJsoWGDYOGjsIiCtY2Kla1sjLBIsFFcXJC1kaSwENQmXUQSRSUSjCQSTCbkbR4z47lXEgtBNwcu3DNzvvO8R8jlcj7LshKmaWqYQERRTAmCcEru9/sJr9er0QF92BJMAVGr1TQ6CeZAc7lcGAwGkyQAxpTLZU0eDoc8crfbRTgcRjAYRCQSYSmi1WpxY7fbjU6ng1gshmaziXg8zhnGIpVKWbquW9ls1mLZsaMoiqWq6lgnBxY55He/328Vi0XOMFZmqVMD4fF4QBAajcY48khY9JE4HA4enTGMFVkaTHmy+ZzD/5NSqYSNB484w1h55ODO3TVu4FXcWDywl24Cmp0e1WBhyuWELAtIf/qKUrWOONmev3Lpt4NRCXq1gplpBS/v3cDc0nGg9h1o1ZkfwO4Atu1B8cM7HLt8k37V/y5B2b4bJxf2Y+7oEbyJrkMvUjki0YYJ03LidfQxAt4dOHdCw5RdGZcgGobBlQtnV/BDr1GfDai7ZiHZZRi9PoY/e5SCCTUwC9gk1GmMh5YWOcNYkR4Sv1y9uAJbYB82N57h4OnDmN7phjQ0qUkWRJuB+TMaPn/5iFfvv+Ha7eucYey4iWw8q6tRJJNJ3Fp7ClUawEkViBTfkCR0YUNTVHD/4Tpm/P4/U2CeKpUKfD4fJDIMhUKEhP45St50XedZyLQY6Xw+v8AUemVb2oNqtYpCocCWKi2TLLfb7ReZTGZ+kmUi7i2VvfxLgAEAZChMriPcl+IAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.image {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAs5JREFUOE+lk/tvi1EYx98/xT8gW4REIpGFMEQWl2FiM9ZMZhm2xRAyOsmujFFmdFRHu0tWm87UypxStr69zPauN5e5rHVp3IYhbOvHy+wHEQlxkm+ek+d8nm9OznkeSfrfldmgJC7QyUlTymsJTfuTZ25z4HdWYwyLreYhtpgekGPw0+kKvo1Eo+IXRSIiEhkWZuc9tqnsJD9EqTUopCxjSGTpB0iueczSo1HyW8cpsExQ1DbxI2pt45j9cXpexul4FEd79RnZphAa/SD7WvuFtO6UItbU9LC+YQxNI2w0wwYT5LRAdhOU3oBTIXC9gXP3oUSGgz2vST3gYHejR0jptT1C332f8yrUEYHrz8CgxDnpm6DKCUfc0KnmXa/AEVPPwnDcD0cvetA2uYRk67Ive/lpjO7YBO1PPuF8Df3vwf4cbNE4tqdw7YVq8HYyHx6FvhE1hkMEg8HDUqvFkjT4aIjMqkqyqkswDSrcfBfH+Q561YLAZ/B+BLda6FXlU/cPv0AoEPhuoP1h4Av7Wbh9E/Py15NWWUjeSR3nZDfeN+N0DY9hG/7K1eGP3P0S5/EYRFUF/IOTBrUXHPm9fT6mr1xEwupkZqxbzLyiDJYUZ5NSnkdqdSHpxyrYdFpPgdmAsdfJwPMI/Yr65bf7tZLGGBQ7DNdJWFtIYvoOZmbuZE7OXpIKKli86zAr9p9gTVktWTVnKTI2U95uRWe3U2IJUDbVB5p6hVm5x5m9Vc/cnedZUNzC8lILaQesZBy6hEZ3maKzgvJWFzVWD9XtXvVGQbSWASFtMATVRlJIKbOTWtlJXaeXepuPM1f6MNp9GLt8mLvvYLmp0OhQ2Fwvk6m7xaqDTvY0eYWUVtcnllXfYlGpnfklVuraHHg8HjxuN+6fktUHlWWZPaZeUo/ILK0UKttBcbNbSB9GP0yLxWJJUxoZGUn80zD9C/vXQ/4NHY10h3M1zmQAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.InstallGentoo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAklJREFUOE9jYEAAASBTCorZkcSRmTjVCDLziCwG4hfM3EIvGNm44oC6WNEM4WXi5FsEkmfhFX3BxMmfAJSHW9Qr55Px3aZp3X/btq3/hQydPzKysMcCFbBBDeFj4uBdqBJR/gskb1W34j+PmulLoJwbzBJJoMm7dNO7/ntMP/XfpW/v//SKvk+7tl7fvXfTpx5pCdWVSiHFv1wnHQbLi9sE/Wdk5SwBauaCGQB3gUPb5v+7Lr/8/+fvr/9fv/z+f+Pyr/9bV735l9Wy/79Dx/b/Nk0bsLoAHgbeAVHv/v77/f8f0IB7N7+cu3DuecK54z9+7lzz639e9pK/7HwSWMMA5BJwCJeXtOm/fvVj1fcfv369f//92cN7X6ZcPvf9x6Htv//vXP3r/+T245UEYgpskPTNq08LgN749/PH7/93rv/6f/rw7//nj//4f+bU0zQcUQwWBkdVbGz62y+fv3wHeeXrlz//H9798//qpY//M3KqfzGxc8djiWKwZnBUuWQ2/fr46fv/P39+///x/ff/d69//z97+s7fyMb5/+y7d2GLYriDZikFF/1qXXXj/4Pbv/8/f/jn/5MH316/eP6jVlBAaIt6VO1/jxmn/zv27P7Pp2HxEajLD90ra9Sj6/979O37X73w0n+vqOL/0lJyMVBFq0EGgDSD0oKAlu1/oHg4ugGzVCKqfouYuL1Xj676Iajr8AnJFricGqYc3Bw+Zi6BVUxsXLHAdL6QiYMPFNrwpIxHDsUhgtAMAopKDjQn4pPDF7P45QC4hSmc1eX8WgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n\n/* General */\n:root.yotsuba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.yotsuba #header-bar, :root.yotsuba #notifications {\nfont-size: 9pt;\ncolor: #B86;\n}\n:root.yotsuba #header-bar a, :root.yotsuba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.yotsuba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.yotsuba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.yotsuba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba #menu {\ncolor: #800000;\n}\n:root.yotsuba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 10pt;\n}\n:root.yotsuba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.yotsuba-b .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.yotsuba-b #header-bar, :root.yotsuba-b #notifications {\nfont-size: 9pt;\ncolor: #89A;\n}\n:root.yotsuba-b #header-bar a, :root.yotsuba-b #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.yotsuba-b #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.yotsuba-b .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.yotsuba-b .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba-b #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba-b #menu {\ncolor: #000;\n}\n:root.yotsuba-b .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 10pt;\n}\n:root.yotsuba-b .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba-b .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.futaba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.futaba #header-bar, :root.futaba #notifications {\nfont-size: 11pt;\ncolor: #B86;\n}\n:root.futaba #header-bar a, :root.futaba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.futaba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.futaba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.futaba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.futaba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.futaba #menu {\ncolor: #800000;\n}\n:root.futaba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 12pt;\n}\n:root.futaba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.futaba .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.burichan .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.burichan #header-bar, :root.burichan #header-bar #notifications {\nfont-size: 11pt;\ncolor: #89A;\n}\n:root.burichan #header-bar a, :root.burichan #header-bar #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.burichan #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.burichan .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.burichan .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.burichan #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.burichan #menu {\ncolor: #000000;\n}\n:root.burichan .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 12pt;\n}\n:root.burichan .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.burichan .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.tomorrow .dialog {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n\n/* Header */\n:root.tomorrow #header-bar, :root.tomorrow #notifications {\nfont-size: 9pt;\ncolor: #C5C8C6;\n}\n:root.tomorrow #header-bar a, :root.tomorrow #notifications a {\ncolor: #81A2BE;\n}\n\n/* Settings */\n:root.tomorrow #fourchanx-settings fieldset {\nborder-color: #111;\n}\n\n/* Quote */\n:root.tomorrow .backlink.deadlink {\ncolor: #81A2BE !important;\n}\n:root.tomorrow .inline {\nborder-color: #111;\nbackground-color: rgba(0, 0, 0, .14);\n}\n\n/* QR */\n.tomorrow #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n:root.tomorrow .qr-preview {\nbackground-color: rgba(255, 255, 255, .15);\n}\n:root.tomorrow #qr .field {\nbackground-color: rgb(26, 27, 29);\ncolor: rgb(197,200,198);\nborder-color: rgb(40, 41, 42);\n}\n:root.tomorrow #qr .field:focus {\nborder-color: rgb(129, 162, 190) !important;\nbackground-color: rgb(30,32,36);\n}\n\n/* Menu */\n:root.tomorrow #menu {\ncolor: #C5C8C6;\n}\n:root.tomorrow .entry {\nborder-bottom: 1px solid #111;\nfont-size: 10pt;\n}\n:root.tomorrow .focused.entry {\nbackground: rgba(0, 0, 0, .33);\n}\n\n/* Watcher Favicon */\n:root.tomorrow .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.photon .dialog {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.photon #header-bar, :root.photon #notifications {\nfont-size: 9pt;\ncolor: #333;\n}\n:root.photon #header-bar a, :root.photon #notifications a {\ncolor: #FF6600;\n}\n\n/* Settings */\n:root.photon #fourchanx-settings fieldset {\nborder-color: #CCC;\n}\n\n/* Quote */\n:root.photon .backlink.deadlink {\ncolor: #F60 !important;\n}\n:root.photon .inline {\nborder-color: #CCC;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.photon #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.photon #menu {\ncolor: #333;\n}\n:root.photon .entry {\nborder-bottom: 1px solid #CCC;\nfont-size: 10pt;\n}\n:root.photon .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.photon .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n" }; Main.init(); diff --git a/builds/crx/script.js b/builds/crx/script.js index f046693a8..fc21d7fa3 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -7490,7 +7490,7 @@ node: function() { var toggler; toggler = $.el('img', { - className: 'watcher-toggler' + className: 'watch-thread-link' }); $.on(toggler, 'click', ThreadWatcher.cb.toggle); return $.before($('input', this.OP.nodes.post), toggler); @@ -7708,7 +7708,7 @@ _ref2 = g.BOARD.threads; for (threadID in _ref2) { thread = _ref2[threadID]; - toggler = $('.watcher-toggler', thread.OP.nodes.post); + toggler = $('.watch-thread-link', thread.OP.nodes.post); watched = ThreadWatcher.db.get({ boardID: thread.board.ID, threadID: threadID @@ -9719,7 +9719,6 @@ } return $.set({ archives: Conf['archives'], - lastarchivecheck: now, previousversion: g.VERSION }); }); @@ -10734,7 +10733,7 @@ } return Main.thisPageIsLegit; }, - css: "/* General */\n.dialog {\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder: 1px solid;\ndisplay: block;\npadding: 0;\n}\n.captcha-img,\n.field {\nbackground-color: #FFF;\nborder: 1px solid #CCC;\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\ncolor: #333;\nfont: 13px sans-serif;\noutline: none;\ntransition: color .25s, border-color .25s;\ntransition: color .25s, border-color .25s;\n}\n.field::-moz-placeholder,\n.field:hover::-moz-placeholder {\ncolor: #AAA !important;\nfont-size: 13px !important;\nopacity: 1.0 !important;\n}\n.captch-img:hover,\n.field:hover {\nborder-color: #999;\n}\n.field:hover, .field:focus {\ncolor: #000;\n}\n.field[disabled] {\nbackground-color: #F2F2F2;\ncolor: #888;\n}\n.move {\ncursor: move;\noverflow: hidden;\n}\nlabel,\n.watcher-toggler {\ncursor: pointer;\n}\na[href=\"javascript:;\"] {\ntext-decoration: none;\n}\n.warning {\ncolor: red;\n}\n#boardNavDesktop {\ndisplay: none !important;\n}\na {\noutline: none !important;\n}\n\n/* 4chan style fixes */\n.opContainer, .op {\ndisplay: block !important;\noverflow: visible !important;\n}\n[hidden] {\ndisplay: none !important;\n}\n\n/* fixed, z-index */\n#overlay,\n#fourchanx-settings,\n#qp, #ihover,\n#navlinks, .fixed #header-bar,\n:root.float #updater,\n:root.float #thread-stats,\n#qr {\nposition: fixed;\n}\n#fourchanx-settings {\nz-index: 999;\n}\n#overlay {\nz-index: 900;\n}\n#notifications {\nz-index: 70;\n}\n#qp, #ihover {\nz-index: 60;\n}\n#menu {\nz-index: 50;\n}\n#navlinks, #updater, #thread-stats {\nz-index: 40;\n}\n.fixed #header-bar.autohide {\nz-index: 35;\n}\n#qr {\nz-index: 30;\n}\n#thread-watcher {\nz-index: 8;\n}\n:root.fixed-watcher #thread-watcher {\nz-index: 20;\n}\n.fixed #header-bar {\nz-index: 10;\n}\n/* Header */\n.fixed.top body {\npadding-top: 2em;\n}\n.fixed.bottom body {\npadding-bottom: 2em;\n}\n.fixed #header-bar {\nright: 0;\nleft: 0;\npadding: 3px 4px 4px;\n}\n.fixed.top #header-bar {\ntop: 0;\n}\n.fixed.bottom #header-bar {\nbottom: 0;\n}\n#header-bar {\nborder-width: 0;\ntransition: all .1s .05s ease-in-out;\n}\n:root.centered-links #shortcuts {\nwidth: 300px;\ntext-align: right;\n}\n:root.centered-links #header-bar {\ntext-align: center;\n}\n:root.centered-links #custom-board-list {\nposition: relative;\nleft: 150px;\n}\n.fixed.top #header-bar {\nborder-bottom-width: 1px;\n}\n.fixed.bottom #header-bar {\nbox-shadow: 0 -1px 2px rgba(0, 0, 0, .15);\nborder-top-width: 1px;\n}\n.fixed.bottom #header-bar .menu-button i {\nborder-top: none;\nborder-bottom: 6px solid;\n}\n#board-list {\ntext-align: center;\n}\n.fixed #header-bar.autohide:not(:hover) {\nbox-shadow: none;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\nmargin-bottom: -1em;\n-webkit-transform: translateY(-100%);\ntransform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n-webkit-transform: translateY(100%);\ntransform: translateY(100%);\n}\n#scroll-marker {\nleft: 0;\nright: 0;\nheight: 10px;\nposition: absolute;\n}\n:root:not(.autohide) #scroll-marker {\npointer-events: none;\n}\n#header-bar #scroll-marker {\ndisplay: none;\n}\n.fixed #header-bar #scroll-marker {\ndisplay: block;\n}\n.fixed.top #header-bar #scroll-marker {\ntop: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\nbottom: 100%;\n}\n#header-bar a:not(.entry):not(.close) {\ntext-decoration: none;\npadding: 1px;\n}\n#header-bar input {\nmargin: 0;\nvertical-align: bottom;\n}\n#shortcuts:empty {\ndisplay: none;\n}\n.brackets-wrap::before {\ncontent: \"\\00a0[\";\n}\n.brackets-wrap::after {\ncontent: \"]\\00a0\";\n}\n.dead-thread,\n.disabled,\n.expand-all-shortcut {\nopacity: .45;\n}\n#shortcuts {\nfloat: right;\n}\n.shortcut {\nmargin-left: 3px;\n}\n#navbotright,\n#navtopright {\ndisplay: none;\n}\n#toggleMsgBtn {\ndisplay: none !important;\n}\n.current {\nfont-weight: bold;\n}\n/* 4chan X link brackets */\n.fourchanx-link::after {\ncontent: \"]\";\n}\n.fourchanx-link::before {\ncontent: \"[\";\n}\n/* Notifications */\n#notifications {\nposition: fixed;\ntop: 0;\nheight: 0;\ntext-align: center;\nright: 0;\nleft: 0;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar #notifications {\nposition: absolute;\ntop: 100%;\n}\n.notification {\ncolor: #FFF;\nfont-weight: 700;\ntext-shadow: 0 1px 2px rgba(0, 0, 0, .5);\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder-radius: 2px;\nmargin: 1px auto;\nwidth: 500px;\nmax-width: 100%;\nposition: relative;\ntransition: all .25s ease-in-out;\n}\n.notification.error {\nbackground-color: hsla(0, 100%, 38%, .9);\n}\n.notification.warning {\nbackground-color: hsla(36, 100%, 38%, .9);\n}\n.notification.info {\nbackground-color: hsla(200, 100%, 38%, .9);\n}\n.notification.success {\nbackground-color: hsla(104, 100%, 38%, .9);\n}\n.notification a {\ncolor: white;\n}\n.notification > .close {\npadding: 6px;\ntop: 0;\nright: 5px;\nposition: absolute;\n}\n.message {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\npadding: 6px 20px;\nmax-height: 200px;\nwidth: 100%;\noverflow: auto;\n}\n\n/* Settings */\n:root.fourchan-x body {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\n}\n#overlay {\nbackground-color: rgba(0, 0, 0, .5);\ntop: 0;\nleft: 0;\nheight: 100%;\nwidth: 100%;\n}\n#fourchanx-settings {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nbox-shadow: 0 0 15px rgba(0, 0, 0, .15);\nheight: 600px;\nmax-height: 100%;\nwidth: 900px;\nmax-width: 100%;\nmargin: auto;\npadding: 3px;\ntop: 50%;\nleft: 50%;\n-moz-transform: translate(-50%, -50%);\n-webkit-transform: translate(-50%, -50%);\ntransform: translate(-50%, -50%);\n}\n#fourchanx-settings > nav {\npadding: 2px 2px 0;\nheight: 15px;\n}\n#fourchanx-settings > nav a {\ntext-decoration: underline;\n}\n#fourchanx-settings > nav a.close {\ntext-decoration: none;\npadding: 2px;\n}\n.section-container {\noverflow: auto;\nposition: absolute;\ntop: 2.1em;\nright: 5px;\nbottom: 5px;\nleft: 5px;\npadding-right: 5px;\n}\n.sections-list {\npadding: 0 3px;\nfloat: left;\n}\n.credits {\nfloat: right;\n}\n.tab-selected {\nfont-weight: 700;\n}\n.section-sauce ul,\n.section-advanced ul {\nlist-style: none;\nmargin: 0;\n}\n.section-sauce ul {\npadding: 8px;\n}\n.section-advanced ul {\npadding: 0px;\n}\n.section-sauce li,\n.section-advanced li {\npadding-left: 4px;\n}\n.section-main label {\ntext-decoration: underline;\n}\n.section-filter ul {\npadding: 0;\n}\n.section-filter li {\nmargin: 10px 40px;\n}\n.section-filter textarea {\nheight: 500px;\n}\n.section-sauce textarea {\nheight: 350px;\n}\n.section-advanced .field[name=\"boardnav\"] {\nwidth: 100%;\n}\n.section-advanced textarea {\nheight: 150px;\n}\n.section-advanced .archive-cell {\nmin-width: 160px;\ntext-align: center;\n}\n.section-advanced #archive-board-select {\nposition: absolute;\n}\n.section-advanced .note {\nfont-size: 0.8em;\nfont-style: italic;\nmargin-left: 10px;\n}\n.section-advanced .note code {\nfont-style: normal;\nfont-size: 11px;\n}\n.section-keybinds .field {\nfont-family: monospace;\n} \n#fourchanx-settings fieldset {\nborder: 1px solid;\nborder-radius: 3px;\n}\n#fourchanx-settings legend {\nfont-weight: 700;\n}\n#fourchanx-settings textarea {\nfont-family: monospace;\nmin-width: 100%;\nmax-width: 100%;\n}\n#fourchanx-settings code {\ncolor: #000;\nbackground-color: #FFF;\npadding: 0 2px;\n}\n.unscroll {\noverflow: hidden;\n}\n\n/* Announcement Hiding */\n:root.hide-announcement #globalMessage {\ndisplay: none;\n}\na.hide-announcement {\nfloat: left;\n}\n\n/* Unread */\n#unread-line {\nmargin: 0;\nborder-color: rgb(255,0,0);\n}\n\n/* Thread Updater */\n#updater {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n#updater > .move {\npadding: 5px 3px 0px;\nmargin-bottom: -3px;\n}\n#updater > div:last-child {\ntext-align: center;\n}\n#updater input[type=number] {\nwidth: 4em;\n}\n:root.float #updater {\npadding: 0px 3px;\n}\n.new {\ncolor: limegreen;\n}\n#update-status.new {\nmargin-right: 5px;\n}\n#update-timer {\ncursor: pointer;\n}\n\n/* Thread Watcher */\n#thread-watcher {\nposition: absolute;\n}\n#thread-watcher {\npadding-bottom: 3px;\npadding-left: 3px;\noverflow: hidden;\nwhite-space: nowrap;\nmin-width: 136px;\nmax-height: 92%;\noverflow-y: auto;\n}\n#thread-watcher .menu-button {\nbottom: 1px;\n}\n:root.fixed-watcher #thread-watcher {\nposition: fixed;\n}\n:root:not(.fixed-watcher) #thread-watcher:not(:hover) {\nmax-height: 210px;\noverflow-y: hidden;\n}\n#thread-watcher > .move {\npadding-top: 3px;\n}\n#watched-threads > div {\nmax-width: 250px;\noverflow: hidden;\npadding-left: 3px;\npadding-right: 3px;\ntext-overflow: ellipsis;\n}\n#thread-watcher a {\ntext-decoration: none;\n}\n#thread-watcher .move>.close {\nposition: absolute;\nright: 0px;\ntop: 0px;\npadding: 0px 4px;\n}\n.watcher-toggler {\npadding-top: 18px;\nwidth: 18px;\nheight: 0px;\ndisplay: inline-block;\nbackground-repeat: no-repeat;\nopacity: 0.2;\nposition: relative;\ntop: 1px;\n}\n.watcher-toggler.watched {\nopacity: 1;\n}\n\n\n/* Thread Stats */\n#thread-stats {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n:root.float #post-count, :root.float #file-count {\npointer-events: none;\n}\n:root.float #thread-stats {\npadding: 0px 3px;\n}\n\n/* Quote */\n.deadlink {\ntext-decoration: none !important;\n}\n.backlink.deadlink:not(.forwardlink),\n.quotelink.deadlink:not(.forwardlink) {\ntext-decoration: underline !important;\n}\n.inlined {\nopacity: .5;\n}\n#qp input, .forwarded {\ndisplay: none;\n}\n.quotelink.forwardlink,\n.backlink.forwardlink {\ntext-decoration: none;\nborder-bottom: 1px dashed;\n}\n.filtered {\ntext-decoration: underline line-through;\n}\n:root.hide-backlinks .backlink.filtered {\ndisplay: none;\n}\n.inline {\nborder: 1px solid;\ndisplay: table;\nmargin: 2px 0;\n}\n.inline .post {\nborder: 0 !important;\nbackground-color: transparent !important;\ndisplay: table !important;\nmargin: 0 !important;\npadding: 1px 2px !important;\n}\n#qp > .opContainer::after {\ncontent: '';\nclear: both;\ndisplay: table;\n}\n#qp .post {\nborder: none;\nmargin: 0;\npadding: 2px 2px 5px;\n}\n#qp img {\nmax-height: 80vh;\nmax-width: 50vw;\n}\n.qphl {\noutline: 2px solid rgba(216, 94, 49, .7);\n}\n:root.highlight-own .yourPost > .reply,\n:root.highlight-you .quotesYou > .reply {\nborder-left: 2px solid rgba(221,0,0,.5);\n}\n/* Quote Threading */\n.threadContainer {\nmargin-left: 20px;\nborder-left: 1px solid rgba(128,128,128,.3);\n}\n.threadOP {\nclear: both;\n} \n\n/* File */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n:not(.expanded-image) > .post > .file > .fileThumb > .full-image {\ndisplay: none;\n}\n.expanding {\nopacity: .5;\n}\n:root.fit-height .full-image {\nmax-height: 100vh;\n}\n:root.fit-width .full-image {\nmax-width: 100%;\n}\n:root.gecko.fit-width .full-image {\nwidth: 100%;\n}\n#ihover {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nmax-height: 100%;\nmax-width: 75%;\npadding-bottom: 16px;\n}\n.fappeTyme .thread > .noFile,\n.fappeTyme .threadContainer > .noFile {\ndisplay: none;\n}\n\n/* Index/Reply Navigation */\n#navlinks {\nfont-size: 16px;\ntop: 25px;\nright: 10px;\n}\n\n/* Filter */\n.opContainer.filter-highlight {\nbox-shadow: inset 5px 0 rgba(255, 0, 0, .5);\n}\n.filter-highlight > .reply {\nbox-shadow: -5px 0 rgba(255, 0, 0, .5);\n}\n\n/* Spoiler text */\n:root.reveal-spoilers s {\ncolor: white !important;\n}\n\n/* Thread & Reply Hiding */\n.hide-thread-button,\n.hide-reply-button {\nfloat: left;\nmargin-right: 2px;\n}\n.stub ~ * {\ndisplay: none !important;\n}\n.stub input {\ndisplay: inline-block;\n}\n\n/* QR */\n:root.hide-original-post-form #postForm,\n:root.hide-original-post-form .postingMode,\n:root.hide-original-post-form #togglePostForm,\n#qr.autohide:not(.has-focus):not(:hover) > form,\n.postingMode ~ #qr select,\n#file-n-submit:not(.has-file) #qr-filerm {\ndisplay: none;\n}\n#qr select,\n#dump-button,\n.remove,\n.captcha-img {\ncursor: pointer;\n}\n#qr {\nz-index: 20;\nposition: fixed;\npadding: 1px;\nborder: 1px solid transparent;\nmin-width: 300px;\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nmargin-bottom: 1px;\n}\n#qr .close {\nfloat: right;\npadding: 0 3px;\n}\n#qr .warning {\nmin-height: 1.6em;\nvertical-align: middle;\npadding: 0 1px;\nborder-width: 1px;\nborder-style: solid;\n}\n.qr-link-container {\ntext-align: center;\n}\n.persona {\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-button {\nwidth: 10%;\nmargin: 0;\nmargin-right: 4px;\nfont: 13px sans-serif;\npadding: 1px 0px 2px;\nopacity: 0.6;\n}\n.persona .field:not(#dump) {\nwidth: 95px;\nmin-width: 33.3%;\nmax-width: 33.3%;\n}\n#qr textarea.field {\nheight: 14.8em;\nmin-height: 9em;\n}\n#qr.has-captcha textarea.field {\nheight: 9em;\n}\ninput.field.tripped:not(:hover):not(:focus) {\ncolor: transparent !important;\ntext-shadow: none !important;\n}\n#qr textarea {\nresize: both;\n}\n.captcha-img {\nmargin: 0px;\ntext-align: center;\nbackground-image: #fff;\nfont-size: 0px;\nmin-height: 59px;\nmin-width: 302px;\n}\n.captcha-input {\nwidth: 100%;\nmargin: 1px 0 0;\n}\n.captcha-input.error:focus {\nborder-color: rgb(255,0,0) !important;\n}\n.field {\n-moz-box-sizing: border-box;\nmargin: 0px;\npadding: 2px 4px 3px;\n}\n#qr textarea {\nmin-width: 100%;\n}\n#qr [type='submit'] {\nwidth: 25%;\nvertical-align: top;\n}\n:root.webkit #qr [type='submit'] {\nheight: 24px;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\ndisplay: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\ndisplay: inline-block;\npadding: 0px 4px;\nmargin-bottom: 2px;\noverflow: hidden;\ntext-overflow: ellipsis;\nmax-width: 88%;\n}\n#qr-no-file {\ncolor: #AAA;\n}\n#qr-filename-container {\n-moz-box-sizing: border-box;\ndisplay: inline-block;\nposition: relative;\nwidth: 100px;\nmin-width: 74.6%;\nmax-width: 74.6%;\nmargin-right: 0.4%;\nmargin-top: 1px;\noverflow: hidden;\npadding: 2px 1px 0;\nheight: 22px;\n}\n#qr-filename-container:hover {\ncursor: text;\n}\n#qr-extras-container {\nposition: absolute;\nright: 0px;\n}\n#qr-filerm {\nmargin-right: 2px;\nz-index: 2;\n}\n#file-n-submit {\nheight: 23px;\n}\n#qr input[type=file] {\nvisibility: hidden;\nposition: absolute;\n}\n/* Thread Select / Spoiler Label */\n#qr select {\nfloat: right;\n}\n#qr.has-spoiler .has-file #qr-spoiler-label {\nwidth: 6.7%;\nmin-width: 6.7%;\nmax-width: 6.7%;\ndisplay: inline-block;\ntext-align: center;\nvertical-align: top;\n}\n#qr.has-spoiler #file-n-submit:not(.has-file) #qr-spoiler-label {\ndisplay: none;\n}\n#qr.has-spoiler .has-file #qr-filename-container {\nmax-width: 67.9%;\nmin-width: 67.9%;\n}\n#qr-spoiler-label input {\nposition: relative;\ntop: 3px;\n}\n/* Dumping UI */\n.dump #dump-list-container {\ndisplay: block;\n}\n#dump-list-container {\ndisplay: none;\nposition: relative;\noverflow-y: hidden;\nmargin-top: 1px;\n}\n#dump-list {\noverflow-x: auto;\noverflow-y: hidden;\nwhite-space: nowrap;\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-list:hover {\noverflow-x: auto;\n}\n.qr-preview {\n-moz-box-sizing: border-box;\ncounter-increment: thumbnails;\ncursor: move;\ndisplay: inline-block;\nheight: 90px;\nwidth: 90px;\npadding: 2px;\nopacity: .5;\noverflow: hidden;\nposition: relative;\ntext-shadow: 0 1px 1px #000;\n-moz-transition: opacity .25s ease-in-out;\nvertical-align: top;\nbackground-size: cover;\n}\n.qr-preview:hover,\n.qr-preview:focus {\nopacity: .9;\n}\n.qr-preview::before {\ncontent: counter(thumbnails);\ncolor: #fff;\nposition: absolute;\ntop: 3px;\nright: 3px;\ntext-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\nopacity: 1;\n}\n.qr-preview.drag {\nbox-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\nborder-color: #fff;\n}\n.qr-preview > span {\ncolor: #fff;\n}\n.remove {\nbackground: none;\ncolor: #e00;\nfont-weight: 700;\npadding: 3px;\n}\na:only-of-type > .remove {\ndisplay: none;\n}\n.remove:hover::after {\ncontent: \" Remove\";\n}\n.qr-preview > label {\nbackground: rgba(0,0,0,.5);\ncolor: #fff;\nright: 0;\nbottom: 0;\nleft: 0;\nposition: absolute;\ntext-align: center;\n}\n.qr-preview > label > input {\nmargin: 0;\n}\n#add-post {\ncursor: pointer;\nfont-size: 2em;\nposition: absolute;\ntop: 50%;\nright: 10px;\n-moz-transform: translateY(-50%);\n}\n.textarea {\nposition: relative;\n}\n:root.webkit .textarea {\nmargin-bottom: -2px;\n}\n#char-count {\ncolor: #000;\nbackground: hsla(0, 0%, 100%, .5);\nfont-size: 8pt;\nposition: absolute;\nbottom: 1px;\nright: 1px;\npointer-events: none;\n}\n\n/* Menu */\n.menu-button {\ndisplay: inline-block;\nposition: relative;\ncursor: pointer;\n}\n.menu-button i {\nborder-top: 6px solid;\nborder-right: 4px solid transparent;\nborder-left: 4px solid transparent;\ndisplay: inline-block;\nmargin: 2px;\nvertical-align: middle;\n}\n#menu {\nposition: fixed;\noutline: none;\n}\n.entry {\nborder-bottom: 1px solid rgba(0,0,0,.25);\ncursor: pointer;\ndisplay: block;\noutline: none;\npadding: 3px 7px;\nposition: relative;\ntext-decoration: none;\nwhite-space: nowrap;\n}\n.left>.entry.has-submenu {\npadding-right: 17px !important;\n}\n.entry:last-child {\nborder-bottom: 0;\n}\n.has-submenu::after {\ncontent: \"\";\nborder-left: .5em solid;\nborder-top: .3em solid transparent;\nborder-bottom: .3em solid transparent;\ndisplay: inline-block;\nmargin: .3em;\nposition: absolute;\nright: 3px;\n}\n.left .has-submenu::after {\nborder-left: 0;\nborder-right: .5em solid;\n}\n.submenu {\ndisplay: none;\nposition: absolute;\nleft: 100%;\ntop: -1px;\n}\n.focused .submenu {\ndisplay: block;\n}\n.imp-exp-result {\nposition: absolute;\ntext-align: center;\nmargin: auto;\nright: 0px;\nleft: 0px;\nwidth: 200px;\n}\n.export, .import {\ncursor: pointer;\ntext-decoration: none !important;\n}\n/* Link Title Favicons */\n.linkify.YouTube {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAABIklEQVQoz53LvUrDUBjG8bOoOammSf1IoBSvoCB4JeIqOHgBLt6AIMRBBQelWurQ2kERnMRBsBUcIp5FJSBI5oQsJVkkUHh8W0o5nhaFHvjBgef/Mq+Q46RJBMkI/vE+aOus956tnEswIZe1LV0QyJ5sE2GzgZfVMtRNIdiDpccEssdlB1mW4bvTwdvWJtRdErM7U+8S/FJykCRJX5qm+KpVce8UMNLRLbulz4iSjTAMh6Iowsd5BeNadp3nUF0VlxAEwZBotXC0Usa4ll3meZdA1iguwvf9vpvDA2wvmKgYGtSud8suDB4TyGr2PF49D/vra9jRZ1BVdknMzgwuCGSnZEObwu6sBnVTCHZiaC7BhFx2PKdxUidiAH/4lLo9Mv0DELVs9qsOHXwAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vimeo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAASJJREFUOE9jYAAC7ln7/pODQXrBmq333PvPu/YaSRikB6QXbACpmmHqsRoAMll7+20UQ0H8tmuv/pdffPFfZtNNuByGASBFIPDh5x+4IV6HHoDFYGDJgw+YBoBMBUkgA5BtIKduuvvy//svX+FSB+88wTTAc+/t/83bj/0HScLA5BPXwc7lKJ36f+L6XXDxhUfOYxrAPWUnWKFp9UQUm3iWQxSDXAEDSX3zcIcB96wD/x+8eA1XDNKMHAYg20GW4Y0FkCIYAAUqzEBQOIBciRzlWKMxZelOlMCEcVxq+jHSC1YDJPs3YBgA8jey0/F6ARRwsFAHORukmat9NdbUijMpg/wKcrJodDFOzSBXwA3Alh9AToZFI7a8Asu98BxJbnYGAJb5vYLDANzSAAAAAElFTkSuQmCC') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.SoundCloud {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABsklEQVQ4y5WTy2pUQRCGv2rbzDjJeAlIBmOyipGIIJqFEBDElwh4yULGeRFXPoEIBl/AvQ/gC2RnxCAoxijiwks852S6+3dxzslcHJCpTXVX11/Xv0097gLPgVNMJxnQNfX4zsqleWbnpoMf/oa9d988MM9MC/rp+E0a+A0dsVobMNMCOO8B6McRoABJI+A6gJmN3D2A8jgEBCEkSEMBrcrsDAzDWWn3AjgKFaDMmgRqniGFgsaDp1jrLOngDf1XT1D+A1dFc4MKAkkiCVKjjVu7g9+4Rzx4i1u6hjXbuMWr0O5QPNvCu7IaCZwEKQukLGDrm5x8uI0tr6MkiGlkiv7yLfzN+6S5i6QsIMABkEfcxhbWWYMkVAOjxvYAjc3HNHrbKI9VBQBFwF25XQKSBjqIf1YBuAurEMrczgDygD6/x2LCpFLXLUyQ+PoldphhBhYfIX09XU1+Flaukz7uYqs3SHs7cG4BmTsmkBUF9mmXEwa28BNLPaQPLepuNcbGSWQquQC2/Kdcox1FUGkcB0ykck1nA2+wTzMs8stGnP4rbWGw74EuS/GFQWfK7/wF6P4F7fzIAYkdmdEAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.audio {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAitJREFUOE9jYCAWKJWwavr0KyXWb/FIbDtUFFyzJx6nVofE2Xo5nXsj0rqPNSR0nVkR2Hjmgmfd+U9Otdf+m5Vf/6+SfeU/R9ChVVgNYDRtlfJuuPA/rPfe/4QpD/6nznj0P27Kw/9unff/69Xf+69c/+C/SO7N/0z+OAxgMmmRCe++/r9i3ev/KWvf/vdY8PK/bt/9/wrNV3/IN5y/IVt1YqNg4pGTTP4HsbuA2bhZ2qvpyn+xjIObxAp3VwqlrgngLFyryVy5nhPmZJHANS2cwYexG8BmVC/pWn3hP4NZlzWuQDJI3dIiFnUUuwEsQAOcq87jNcC7fHeLUtJxHF4AGmBWeAavAWH1+1rUUk7giAWjOknllON4DXAs2NEiG4/DBQxAF/CFHfrPYI4jDFSLuJVjNrUJhB/B7gIGo1pJRt99GAZYJK7wLJ1z7Xzl4vu/7aqv/GRBj0bjqAX2qb0nJ7mXH17C4HcUxQA+hymWtSue/C5a9up/9Ozn/7Vr7v1nRY7GqMb91T3b3v6vWvPmf/S0p/9ZQk+DDLCBRSOz06Jqk+o7/21nvfqvsebDf7kZL/5zBaxphkezd+OFn7HzXvz3Wvjmv9a8N//5Ek//ZTBpVYUrMG2X5wjcdl68+uI/wa5Lr3hSNjczGFeywOVZ/bbcVGp//F9izfv/Ql03f3P4LC/HSEQquYwMFnUCDJ7dzBhyjGZNQpye89M5gpfnMvtNUyE2h4PUAQBovvT7lyNljwAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.LiveLeak {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAydJREFUOE9Nk1tIk2EYx79NyUNqTk0o6KYrnZeChodLDxfeZpCbJk4RXU5Nm7tYRYhiYXbQlaeGutyW2gxtpB1RIyKDEjKwA6Ti2dR5KNDn+fq/S6TBj/f93r3P732e53s/qfnkSdej4GB2SBLbwf+jmB+gUMgOheLg/z7EdCUnO6Ref392SpK8Hyh3I+gBwBo7lUp2xcbyQEoKD6alyQOpqd754/h4FjJXZCRJTl9ftmEzoK5/wdQJxPgkLY2WV1dpc2uLtnZ2eHNnhza3t2nd46GhjAzuValY6jx0iIfS03msoIDuQ9COQCtoUSjohU5HuwgaN5loeXycd3d3aW9vzwvW2K5SkdTi58fvzGb+3tdHFggA3QONEAzn59PvjQ1yqNX0zenkvX0B4ffWaGRraChJd/385JGqKvlzTw/fRqOaIGkEd1DjU52O/3g83BkTw5MOh7yJuUCUM2o0yi2hoSw1IIOhykr+YLNRHYKu4XQvyKA/N5c8yMCCDD7Z7bz26xcJ1rH2rKKCG0UJdRAMlJbyG6uVrkJQjWAB5tSbk0Nr2HwDgvcQiIYur6zQyvo6ucvLueHIEZKuQPBQr+dXra1kRuqXEOwFArtWSytra1QdFUVjNhvPLS3R3OIiLUDUD0F1WBhJJtwDW2Ehu5uaqBICI4IFlRB0QLCEzaboaHrd0cHzCBYsIIuesjK+LAQXkEFrXh676uupGCWcR6AeghLQptGQONUAwfOuLp6Zn6eZuTmaXVig7pISrhI90ENgQbdHhoep32JhFzLpu3WLio8epUYIfs7OUjF6UKJW88XERLqYkEBNej11oG8XhCAvMFAuOn5cNiclsTkhQTbhmpri4lgbEMANWi1DwC/xit3t7bK7rY0Fo4OD3G4wyEURESzloAdnceezlErK8vH5N4KzPj50PTOTfkxP0+THj/RlYoInJyZI8HVqim5qNFwQHk7SucBAPo2PKRMNPLM/4pnFszYkhJsNBu6uqWFHba1sr61lQSveQFZQkFx07BhJmhMnrLn4NLMPH/aSExR0QDbmWhwgyEapwDvXoDxdWBiXnjrV/Bdm2kYUxLwmEgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vocaroo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAw9JREFUOE9jYMABuMwYmCyTJKUCGlSnFSy02TTzeOyCiQcDViX26qVz2TAyYtWmEMwuoZ3M7V40LcB79pHkc0svpvzY8jD//87nxf+3Pyn8v/ZO8v+VNyP/2mZJumI1QCWSI8232Hjumitlfw5+qPp/9l8TCt76JP//xkdx/wsXWCzjtWFkwTCkbWFe9plPk/+ga4Txz/xt/D/hkN//gMXif21a+NbyWjIwoRiy6GDT5rP/mlFsPfyp5n/NpOj/22+0gMUXXIz/H7hC/L/bFKFbPDZMrHAD5H35OPt2J9zacDv/f3V7xv9FhwrBGubsT/1//Pjx/1GJ/mD+/nfl/1v3Ovy3KRJNQbHdOlXCvOO03/+pm1P/v3v37n90hhtYw9HPtf8Xb2v937cmHswHeWPRxYj/LvkK3igGKARwicTO07118H3V/5kbi/4vPZMJtK3s/6YH2f+Pfq1B8VbjWrdnMu5s4nAD9CNFhKwz5DTUvLl419zKvAcLtG1P84BRl/b/5M/6/6f/NPzf/qzo84yj0Uus0xUU4Zor54bm9+4OfZG02OCuoAMTb9ZkC9ull1Nvrr2Z+XvRpaRfc65H/68F+jl9svEhzyLFWoccWVc+eyTHq/twydjlKRln7jX9bNMkMJnbhoFRL1xCqmKx6/yi2fYXa/c5/e846PV/5fW0/7OPx/yfcjzop34ulxdGGvDuU8mMXaX507lBuiN6ueadmQeT/p/93vf/1O+G//sP5fw/eL3o/5JLif8zVxs+Tlir9S26UyeFQQvJGBE7FvaFZ9LfN+1y+WjbItSb3GmXvXd15v8zroH/HxgE/D+aGPx/18vi/z07PeZNPRKxe/Kh0Ae8toxscCO4zBkYXArk9C1SxJUYjBkYPPIVtbbuTftz3cz//2O9wP/75iSAXdO72/dt2HL5F6YlfBW4MiJYXMiBiW3t7azHBx+V/t89N+H/8a+1//e9K/9attDp5LQjYX8SuvVL8RoAkmxa65299Erq1FnHo0qrl7t4BddriIs4MrM3rfWcFd+pGwVSAwBZ0bKP8yrZPAAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.pastebin {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAtZJREFUOE+NU91LWmEc7sJtQew/2MUY7INg7CLY3W5GMHazyzEQo9UmfYxZTbAiVlgRqLMSZ+XnDC3z2+Y0+8JGakKZTtR0Tl2wtgtLLQh29cz3ZZ3h3Q68vOc95zzP73l+z+/U1f292O09DRxubxOH23P//1bvtQts3dPnry7LZnXJhcUl5Avf8dHtwY+fv2AyW5DOfIXFakMm+w0G4wISyRRm55TQG0y/Wzv6mikJ52Xf9TmVBoFAAD6fDwqFAqFQCJubmzCbzZiensbp6SmkUikikQi0Wi0kEgm6ewVaStDCfXPDandifn6egoaGhrCzswO1Wg2Hw4HBwUGk02kIBAL4/X4IhUJMTk6ii8dfYggy2RwymQzOz88Rj8dRLpexv7+PSqWCYDCIQqGAra0tJBIJrK2t0XdVAjNDEIl+wfj4OEqlEq2wt7dHrchkMmrBYDCAz+fTIjweD7FYrJbgIJOlgLOzM8jlcip1eXmZ2rFarVAqlRCLxcjlchCJRFRljYJYPAG32418Pg+n04lsNouVlRUcHh7C4/FQIOlHNBqlezgcJgQWxkIgGMbExASVNjY2hvX1dVo9mUzS5wREFLhcLrqTcw2B//M2RkdHodPp4PV6oVKpqH+SCom3v7+fNnF4eJiJusbCJ6+PviSyScakiaR5RIHRaKQpmEwmbAdCeD8zB6vdhebHT8SMhcUlC83bbrdTJRsbG3RwiCVCRNJJpDIoVeNNJJJQzKryV+rrmxiCtyNCCmaz2VhdXQWXy6XDpNfrodFoYLXZUTw+pk222Z3lW3ca26rgSwzBwqIZAwMDlITMAVEwNTVFR5fEJpK8Qyp1AJvDVbrTeLenCmxgfiZ22+urCtWHyu7uLp2wVCpFKx0dHaFYLOLk5KT6Y9kgk89kb95ubK0BX7A8a+1qannRLeW0daj/rU51S3tn9dypfvDw0QiLxbpX/Z7FVK7e/AEj4Wf24/2f5AAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.gist {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNqUkzuIE1EUhv955MnsbB6r4kYQLUQQFncV3SnCIqJsoWGDYOGjsIiCtY2Kla1sjLBIsFFcXJC1kaSwENQmXUQSRSUSjCQSTCbkbR4z47lXEgtBNwcu3DNzvvO8R8jlcj7LshKmaWqYQERRTAmCcEru9/sJr9er0QF92BJMAVGr1TQ6CeZAc7lcGAwGkyQAxpTLZU0eDoc8crfbRTgcRjAYRCQSYSmi1WpxY7fbjU6ng1gshmaziXg8zhnGIpVKWbquW9ls1mLZsaMoiqWq6lgnBxY55He/328Vi0XOMFZmqVMD4fF4QBAajcY48khY9JE4HA4enTGMFVkaTHmy+ZzD/5NSqYSNB484w1h55ODO3TVu4FXcWDywl24Cmp0e1WBhyuWELAtIf/qKUrWOONmev3Lpt4NRCXq1gplpBS/v3cDc0nGg9h1o1ZkfwO4Atu1B8cM7HLt8k37V/y5B2b4bJxf2Y+7oEbyJrkMvUjki0YYJ03LidfQxAt4dOHdCw5RdGZcgGobBlQtnV/BDr1GfDai7ZiHZZRi9PoY/e5SCCTUwC9gk1GmMh5YWOcNYkR4Sv1y9uAJbYB82N57h4OnDmN7phjQ0qUkWRJuB+TMaPn/5iFfvv+Ha7eucYey4iWw8q6tRJJNJ3Fp7ClUawEkViBTfkCR0YUNTVHD/4Tpm/P4/U2CeKpUKfD4fJDIMhUKEhP45St50XedZyLQY6Xw+v8AUemVb2oNqtYpCocCWKi2TLLfb7ReZTGZ+kmUi7i2VvfxLgAEAZChMriPcl+IAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.image {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAs5JREFUOE+lk/tvi1EYx98/xT8gW4REIpGFMEQWl2FiM9ZMZhm2xRAyOsmujFFmdFRHu0tWm87UypxStr69zPauN5e5rHVp3IYhbOvHy+wHEQlxkm+ek+d8nm9OznkeSfrfldmgJC7QyUlTymsJTfuTZ25z4HdWYwyLreYhtpgekGPw0+kKvo1Eo+IXRSIiEhkWZuc9tqnsJD9EqTUopCxjSGTpB0iueczSo1HyW8cpsExQ1DbxI2pt45j9cXpexul4FEd79RnZphAa/SD7WvuFtO6UItbU9LC+YQxNI2w0wwYT5LRAdhOU3oBTIXC9gXP3oUSGgz2vST3gYHejR0jptT1C332f8yrUEYHrz8CgxDnpm6DKCUfc0KnmXa/AEVPPwnDcD0cvetA2uYRk67Ive/lpjO7YBO1PPuF8Df3vwf4cbNE4tqdw7YVq8HYyHx6FvhE1hkMEg8HDUqvFkjT4aIjMqkqyqkswDSrcfBfH+Q561YLAZ/B+BLda6FXlU/cPv0AoEPhuoP1h4Av7Wbh9E/Py15NWWUjeSR3nZDfeN+N0DY9hG/7K1eGP3P0S5/EYRFUF/IOTBrUXHPm9fT6mr1xEwupkZqxbzLyiDJYUZ5NSnkdqdSHpxyrYdFpPgdmAsdfJwPMI/Yr65bf7tZLGGBQ7DNdJWFtIYvoOZmbuZE7OXpIKKli86zAr9p9gTVktWTVnKTI2U95uRWe3U2IJUDbVB5p6hVm5x5m9Vc/cnedZUNzC8lILaQesZBy6hEZ3maKzgvJWFzVWD9XtXvVGQbSWASFtMATVRlJIKbOTWtlJXaeXepuPM1f6MNp9GLt8mLvvYLmp0OhQ2Fwvk6m7xaqDTvY0eYWUVtcnllXfYlGpnfklVuraHHg8HjxuN+6fktUHlWWZPaZeUo/ILK0UKttBcbNbSB9GP0yLxWJJUxoZGUn80zD9C/vXQ/4NHY10h3M1zmQAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.InstallGentoo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAklJREFUOE9jYEAAASBTCorZkcSRmTjVCDLziCwG4hfM3EIvGNm44oC6WNEM4WXi5FsEkmfhFX3BxMmfAJSHW9Qr55Px3aZp3X/btq3/hQydPzKysMcCFbBBDeFj4uBdqBJR/gskb1W34j+PmulLoJwbzBJJoMm7dNO7/ntMP/XfpW/v//SKvk+7tl7fvXfTpx5pCdWVSiHFv1wnHQbLi9sE/Wdk5SwBauaCGQB3gUPb5v+7Lr/8/+fvr/9fv/z+f+Pyr/9bV735l9Wy/79Dx/b/Nk0bsLoAHgbeAVHv/v77/f8f0IB7N7+cu3DuecK54z9+7lzz639e9pK/7HwSWMMA5BJwCJeXtOm/fvVj1fcfv369f//92cN7X6ZcPvf9x6Htv//vXP3r/+T245UEYgpskPTNq08LgN749/PH7/93rv/6f/rw7//nj//4f+bU0zQcUQwWBkdVbGz62y+fv3wHeeXrlz//H9798//qpY//M3KqfzGxc8djiWKwZnBUuWQ2/fr46fv/P39+///x/ff/d69//z97+s7fyMb5/+y7d2GLYriDZikFF/1qXXXj/4Pbv/8/f/jn/5MH316/eP6jVlBAaIt6VO1/jxmn/zv27P7Pp2HxEajLD90ra9Sj6/979O37X73w0n+vqOL/0lJyMVBFq0EGgDSD0oKAlu1/oHg4ugGzVCKqfouYuL1Xj676Iajr8AnJFricGqYc3Bw+Zi6BVUxsXLHAdL6QiYMPFNrwpIxHDsUhgtAMAopKDjQn4pPDF7P45QC4hSmc1eX8WgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n\n/* General */\n:root.yotsuba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.yotsuba #header-bar, :root.yotsuba #notifications {\nfont-size: 9pt;\ncolor: #B86;\n}\n:root.yotsuba #header-bar a, :root.yotsuba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.yotsuba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.yotsuba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.yotsuba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba #menu {\ncolor: #800000;\n}\n:root.yotsuba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 10pt;\n}\n:root.yotsuba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.yotsuba-b .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.yotsuba-b #header-bar, :root.yotsuba-b #notifications {\nfont-size: 9pt;\ncolor: #89A;\n}\n:root.yotsuba-b #header-bar a, :root.yotsuba-b #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.yotsuba-b #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.yotsuba-b .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.yotsuba-b .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba-b #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba-b #menu {\ncolor: #000;\n}\n:root.yotsuba-b .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 10pt;\n}\n:root.yotsuba-b .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba-b .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.futaba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.futaba #header-bar, :root.futaba #notifications {\nfont-size: 11pt;\ncolor: #B86;\n}\n:root.futaba #header-bar a, :root.futaba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.futaba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.futaba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.futaba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.futaba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.futaba #menu {\ncolor: #800000;\n}\n:root.futaba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 12pt;\n}\n:root.futaba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.futaba .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.burichan .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.burichan #header-bar, :root.burichan #header-bar #notifications {\nfont-size: 11pt;\ncolor: #89A;\n}\n:root.burichan #header-bar a, :root.burichan #header-bar #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.burichan #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.burichan .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.burichan .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.burichan #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.burichan #menu {\ncolor: #000000;\n}\n:root.burichan .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 12pt;\n}\n:root.burichan .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.burichan .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.tomorrow .dialog {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n\n/* Header */\n:root.tomorrow #header-bar, :root.tomorrow #notifications {\nfont-size: 9pt;\ncolor: #C5C8C6;\n}\n:root.tomorrow #header-bar a, :root.tomorrow #notifications a {\ncolor: #81A2BE;\n}\n\n/* Settings */\n:root.tomorrow #fourchanx-settings fieldset {\nborder-color: #111;\n}\n\n/* Quote */\n:root.tomorrow .backlink.deadlink {\ncolor: #81A2BE !important;\n}\n:root.tomorrow .inline {\nborder-color: #111;\nbackground-color: rgba(0, 0, 0, .14);\n}\n\n/* QR */\n.tomorrow #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n:root.tomorrow .qr-preview {\nbackground-color: rgba(255, 255, 255, .15);\n}\n:root.tomorrow #qr .field {\nbackground-color: rgb(26, 27, 29);\ncolor: rgb(197,200,198);\nborder-color: rgb(40, 41, 42);\n}\n:root.tomorrow #qr .field:focus {\nborder-color: rgb(129, 162, 190) !important;\nbackground-color: rgb(30,32,36);\n}\n\n/* Menu */\n:root.tomorrow #menu {\ncolor: #C5C8C6;\n}\n:root.tomorrow .entry {\nborder-bottom: 1px solid #111;\nfont-size: 10pt;\n}\n:root.tomorrow .focused.entry {\nbackground: rgba(0, 0, 0, .33);\n}\n\n/* Watcher Favicon */\n:root.tomorrow .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.photon .dialog {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.photon #header-bar, :root.photon #notifications {\nfont-size: 9pt;\ncolor: #333;\n}\n:root.photon #header-bar a, :root.photon #notifications a {\ncolor: #FF6600;\n}\n\n/* Settings */\n:root.photon #fourchanx-settings fieldset {\nborder-color: #CCC;\n}\n\n/* Quote */\n:root.photon .backlink.deadlink {\ncolor: #F60 !important;\n}\n:root.photon .inline {\nborder-color: #CCC;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.photon #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.photon #menu {\ncolor: #333;\n}\n:root.photon .entry {\nborder-bottom: 1px solid #CCC;\nfont-size: 10pt;\n}\n:root.photon .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.photon .watcher-toggler\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n" + css: "/* General */\n.dialog {\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder: 1px solid;\ndisplay: block;\npadding: 0;\n}\n.captcha-img,\n.field {\nbackground-color: #FFF;\nborder: 1px solid #CCC;\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\ncolor: #333;\nfont: 13px sans-serif;\noutline: none;\ntransition: color .25s, border-color .25s;\ntransition: color .25s, border-color .25s;\n}\n.field::-moz-placeholder,\n.field:hover::-moz-placeholder {\ncolor: #AAA !important;\nfont-size: 13px !important;\nopacity: 1.0 !important;\n}\n.captch-img:hover,\n.field:hover {\nborder-color: #999;\n}\n.field:hover, .field:focus {\ncolor: #000;\n}\n.field[disabled] {\nbackground-color: #F2F2F2;\ncolor: #888;\n}\n.move {\ncursor: move;\noverflow: hidden;\n}\nlabel,\n.watch-thread-link {\ncursor: pointer;\n}\na[href=\"javascript:;\"] {\ntext-decoration: none;\n}\n.warning {\ncolor: red;\n}\n#boardNavDesktop {\ndisplay: none !important;\n}\na {\noutline: none !important;\n}\n\n/* 4chan style fixes */\n.opContainer, .op {\ndisplay: block !important;\noverflow: visible !important;\n}\n[hidden] {\ndisplay: none !important;\n}\n\n/* fixed, z-index */\n#overlay,\n#fourchanx-settings,\n#qp, #ihover,\n#navlinks, .fixed #header-bar,\n:root.float #updater,\n:root.float #thread-stats,\n#qr {\nposition: fixed;\n}\n#fourchanx-settings {\nz-index: 999;\n}\n#overlay {\nz-index: 900;\n}\n#notifications {\nz-index: 70;\n}\n#qp, #ihover {\nz-index: 60;\n}\n#menu {\nz-index: 50;\n}\n#navlinks, #updater, #thread-stats {\nz-index: 40;\n}\n.fixed #header-bar.autohide {\nz-index: 35;\n}\n#qr {\nz-index: 30;\n}\n#thread-watcher {\nz-index: 8;\n}\n:root.fixed-watcher #thread-watcher {\nz-index: 20;\n}\n.fixed #header-bar {\nz-index: 10;\n}\n/* Header */\n.fixed.top body {\npadding-top: 2em;\n}\n.fixed.bottom body {\npadding-bottom: 2em;\n}\n.fixed #header-bar {\nright: 0;\nleft: 0;\npadding: 3px 4px 4px;\n}\n.fixed.top #header-bar {\ntop: 0;\n}\n.fixed.bottom #header-bar {\nbottom: 0;\n}\n#header-bar {\nborder-width: 0;\ntransition: all .1s .05s ease-in-out;\n}\n:root.centered-links #shortcuts {\nwidth: 300px;\ntext-align: right;\n}\n:root.centered-links #header-bar {\ntext-align: center;\n}\n:root.centered-links #custom-board-list {\nposition: relative;\nleft: 150px;\n}\n.fixed.top #header-bar {\nborder-bottom-width: 1px;\n}\n.fixed.bottom #header-bar {\nbox-shadow: 0 -1px 2px rgba(0, 0, 0, .15);\nborder-top-width: 1px;\n}\n.fixed.bottom #header-bar .menu-button i {\nborder-top: none;\nborder-bottom: 6px solid;\n}\n#board-list {\ntext-align: center;\n}\n.fixed #header-bar.autohide:not(:hover) {\nbox-shadow: none;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar.autohide:not(:hover) {\nmargin-bottom: -1em;\n-webkit-transform: translateY(-100%);\ntransform: translateY(-100%);\n}\n.fixed.bottom #header-bar.autohide:not(:hover) {\n-webkit-transform: translateY(100%);\ntransform: translateY(100%);\n}\n#scroll-marker {\nleft: 0;\nright: 0;\nheight: 10px;\nposition: absolute;\n}\n:root:not(.autohide) #scroll-marker {\npointer-events: none;\n}\n#header-bar #scroll-marker {\ndisplay: none;\n}\n.fixed #header-bar #scroll-marker {\ndisplay: block;\n}\n.fixed.top #header-bar #scroll-marker {\ntop: 100%;\n}\n.fixed.bottom #header-bar #scroll-marker {\nbottom: 100%;\n}\n#header-bar a:not(.entry):not(.close) {\ntext-decoration: none;\npadding: 1px;\n}\n#header-bar input {\nmargin: 0;\nvertical-align: bottom;\n}\n#shortcuts:empty {\ndisplay: none;\n}\n.brackets-wrap::before {\ncontent: \"\\00a0[\";\n}\n.brackets-wrap::after {\ncontent: \"]\\00a0\";\n}\n.dead-thread,\n.disabled,\n.expand-all-shortcut {\nopacity: .45;\n}\n#shortcuts {\nfloat: right;\n}\n.shortcut {\nmargin-left: 3px;\n}\n#navbotright,\n#navtopright {\ndisplay: none;\n}\n#toggleMsgBtn {\ndisplay: none !important;\n}\n.current {\nfont-weight: bold;\n}\n/* 4chan X link brackets */\n.fourchanx-link::after {\ncontent: \"]\";\n}\n.fourchanx-link::before {\ncontent: \"[\";\n}\n/* Notifications */\n#notifications {\nposition: fixed;\ntop: 0;\nheight: 0;\ntext-align: center;\nright: 0;\nleft: 0;\ntransition: all .8s .6s cubic-bezier(.55, .055, .675, .19);\n}\n.fixed.top #header-bar #notifications {\nposition: absolute;\ntop: 100%;\n}\n.notification {\ncolor: #FFF;\nfont-weight: 700;\ntext-shadow: 0 1px 2px rgba(0, 0, 0, .5);\nbox-shadow: 0 1px 2px rgba(0, 0, 0, .15);\nborder-radius: 2px;\nmargin: 1px auto;\nwidth: 500px;\nmax-width: 100%;\nposition: relative;\ntransition: all .25s ease-in-out;\n}\n.notification.error {\nbackground-color: hsla(0, 100%, 38%, .9);\n}\n.notification.warning {\nbackground-color: hsla(36, 100%, 38%, .9);\n}\n.notification.info {\nbackground-color: hsla(200, 100%, 38%, .9);\n}\n.notification.success {\nbackground-color: hsla(104, 100%, 38%, .9);\n}\n.notification a {\ncolor: white;\n}\n.notification > .close {\npadding: 6px;\ntop: 0;\nright: 5px;\nposition: absolute;\n}\n.message {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\npadding: 6px 20px;\nmax-height: 200px;\nwidth: 100%;\noverflow: auto;\n}\n\n/* Settings */\n:root.fourchan-x body {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\n}\n#overlay {\nbackground-color: rgba(0, 0, 0, .5);\ntop: 0;\nleft: 0;\nheight: 100%;\nwidth: 100%;\n}\n#fourchanx-settings {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nbox-shadow: 0 0 15px rgba(0, 0, 0, .15);\nheight: 600px;\nmax-height: 100%;\nwidth: 900px;\nmax-width: 100%;\nmargin: auto;\npadding: 3px;\ntop: 50%;\nleft: 50%;\n-moz-transform: translate(-50%, -50%);\n-webkit-transform: translate(-50%, -50%);\ntransform: translate(-50%, -50%);\n}\n#fourchanx-settings > nav {\npadding: 2px 2px 0;\nheight: 15px;\n}\n#fourchanx-settings > nav a {\ntext-decoration: underline;\n}\n#fourchanx-settings > nav a.close {\ntext-decoration: none;\npadding: 2px;\n}\n.section-container {\noverflow: auto;\nposition: absolute;\ntop: 2.1em;\nright: 5px;\nbottom: 5px;\nleft: 5px;\npadding-right: 5px;\n}\n.sections-list {\npadding: 0 3px;\nfloat: left;\n}\n.credits {\nfloat: right;\n}\n.tab-selected {\nfont-weight: 700;\n}\n.section-sauce ul,\n.section-advanced ul {\nlist-style: none;\nmargin: 0;\n}\n.section-sauce ul {\npadding: 8px;\n}\n.section-advanced ul {\npadding: 0px;\n}\n.section-sauce li,\n.section-advanced li {\npadding-left: 4px;\n}\n.section-main label {\ntext-decoration: underline;\n}\n.section-filter ul {\npadding: 0;\n}\n.section-filter li {\nmargin: 10px 40px;\n}\n.section-filter textarea {\nheight: 500px;\n}\n.section-sauce textarea {\nheight: 350px;\n}\n.section-advanced .field[name=\"boardnav\"] {\nwidth: 100%;\n}\n.section-advanced textarea {\nheight: 150px;\n}\n.section-advanced .archive-cell {\nmin-width: 160px;\ntext-align: center;\n}\n.section-advanced #archive-board-select {\nposition: absolute;\n}\n.section-advanced .note {\nfont-size: 0.8em;\nfont-style: italic;\nmargin-left: 10px;\n}\n.section-advanced .note code {\nfont-style: normal;\nfont-size: 11px;\n}\n.section-keybinds .field {\nfont-family: monospace;\n} \n#fourchanx-settings fieldset {\nborder: 1px solid;\nborder-radius: 3px;\n}\n#fourchanx-settings legend {\nfont-weight: 700;\n}\n#fourchanx-settings textarea {\nfont-family: monospace;\nmin-width: 100%;\nmax-width: 100%;\n}\n#fourchanx-settings code {\ncolor: #000;\nbackground-color: #FFF;\npadding: 0 2px;\n}\n.unscroll {\noverflow: hidden;\n}\n\n/* Announcement Hiding */\n:root.hide-announcement #globalMessage {\ndisplay: none;\n}\na.hide-announcement {\nfloat: left;\n}\n\n/* Unread */\n#unread-line {\nmargin: 0;\nborder-color: rgb(255,0,0);\n}\n\n/* Thread Updater */\n#updater {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n#updater > .move {\npadding: 5px 3px 0px;\nmargin-bottom: -3px;\n}\n#updater > div:last-child {\ntext-align: center;\n}\n#updater input[type=number] {\nwidth: 4em;\n}\n:root.float #updater {\npadding: 0px 3px;\n}\n.new {\ncolor: limegreen;\n}\n#update-status.new {\nmargin-right: 5px;\n}\n#update-timer {\ncursor: pointer;\n}\n\n/* Thread Watcher */\n#thread-watcher {\nposition: absolute;\n}\n#thread-watcher {\npadding-bottom: 3px;\npadding-left: 3px;\noverflow: hidden;\nwhite-space: nowrap;\nmin-width: 136px;\nmax-height: 92%;\noverflow-y: auto;\n}\n#thread-watcher .menu-button {\nbottom: 1px;\n}\n:root.fixed-watcher #thread-watcher {\nposition: fixed;\n}\n:root:not(.fixed-watcher) #thread-watcher:not(:hover) {\nmax-height: 210px;\noverflow-y: hidden;\n}\n#thread-watcher > .move {\npadding-top: 3px;\n}\n#watched-threads > div {\nmax-width: 250px;\noverflow: hidden;\npadding-left: 3px;\npadding-right: 3px;\ntext-overflow: ellipsis;\n}\n#thread-watcher a {\ntext-decoration: none;\n}\n#thread-watcher .move>.close {\nposition: absolute;\nright: 0px;\ntop: 0px;\npadding: 0px 4px;\n}\n.watch-thread-link {\npadding-top: 18px;\nwidth: 18px;\nheight: 0px;\ndisplay: inline-block;\nbackground-repeat: no-repeat;\nopacity: 0.2;\nposition: relative;\ntop: 1px;\n}\n.watch-thread-link.watched {\nopacity: 1;\n}\n\n\n/* Thread Stats */\n#thread-stats {\nbackground: none;\nborder: none;\nbox-shadow: none;\n}\n:root.float #post-count, :root.float #file-count {\npointer-events: none;\n}\n:root.float #thread-stats {\npadding: 0px 3px;\n}\n\n/* Quote */\n.deadlink {\ntext-decoration: none !important;\n}\n.backlink.deadlink:not(.forwardlink),\n.quotelink.deadlink:not(.forwardlink) {\ntext-decoration: underline !important;\n}\n.inlined {\nopacity: .5;\n}\n#qp input, .forwarded {\ndisplay: none;\n}\n.quotelink.forwardlink,\n.backlink.forwardlink {\ntext-decoration: none;\nborder-bottom: 1px dashed;\n}\n.filtered {\ntext-decoration: underline line-through;\n}\n:root.hide-backlinks .backlink.filtered {\ndisplay: none;\n}\n.inline {\nborder: 1px solid;\ndisplay: table;\nmargin: 2px 0;\n}\n.inline .post {\nborder: 0 !important;\nbackground-color: transparent !important;\ndisplay: table !important;\nmargin: 0 !important;\npadding: 1px 2px !important;\n}\n#qp > .opContainer::after {\ncontent: '';\nclear: both;\ndisplay: table;\n}\n#qp .post {\nborder: none;\nmargin: 0;\npadding: 2px 2px 5px;\n}\n#qp img {\nmax-height: 80vh;\nmax-width: 50vw;\n}\n.qphl {\noutline: 2px solid rgba(216, 94, 49, .7);\n}\n:root.highlight-own .yourPost > .reply,\n:root.highlight-you .quotesYou > .reply {\nborder-left: 2px solid rgba(221,0,0,.5);\n}\n/* Quote Threading */\n.threadContainer {\nmargin-left: 20px;\nborder-left: 1px solid rgba(128,128,128,.3);\n}\n.threadOP {\nclear: both;\n} \n\n/* File */\n.fileText:hover .fntrunc,\n.fileText:not(:hover) .fnfull,\n.expanded-image > .post > .file > .fileThumb > img[data-md5],\n:not(.expanded-image) > .post > .file > .fileThumb > .full-image {\ndisplay: none;\n}\n.expanding {\nopacity: .5;\n}\n:root.fit-height .full-image {\nmax-height: 100vh;\n}\n:root.fit-width .full-image {\nmax-width: 100%;\n}\n:root.gecko.fit-width .full-image {\nwidth: 100%;\n}\n#ihover {\n-moz-box-sizing: border-box;\nbox-sizing: border-box;\nmax-height: 100%;\nmax-width: 75%;\npadding-bottom: 16px;\n}\n.fappeTyme .thread > .noFile,\n.fappeTyme .threadContainer > .noFile {\ndisplay: none;\n}\n\n/* Index/Reply Navigation */\n#navlinks {\nfont-size: 16px;\ntop: 25px;\nright: 10px;\n}\n\n/* Filter */\n.opContainer.filter-highlight {\nbox-shadow: inset 5px 0 rgba(255, 0, 0, .5);\n}\n.filter-highlight > .reply {\nbox-shadow: -5px 0 rgba(255, 0, 0, .5);\n}\n\n/* Spoiler text */\n:root.reveal-spoilers s {\ncolor: white !important;\n}\n\n/* Thread & Reply Hiding */\n.hide-thread-button,\n.hide-reply-button {\nfloat: left;\nmargin-right: 2px;\n}\n.stub ~ * {\ndisplay: none !important;\n}\n.stub input {\ndisplay: inline-block;\n}\n\n/* QR */\n:root.hide-original-post-form #postForm,\n:root.hide-original-post-form .postingMode,\n:root.hide-original-post-form #togglePostForm,\n#qr.autohide:not(.has-focus):not(:hover) > form,\n.postingMode ~ #qr select,\n#file-n-submit:not(.has-file) #qr-filerm {\ndisplay: none;\n}\n#qr select,\n#dump-button,\n.remove,\n.captcha-img {\ncursor: pointer;\n}\n#qr {\nz-index: 20;\nposition: fixed;\npadding: 1px;\nborder: 1px solid transparent;\nmin-width: 300px;\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nborder-radius: 3px 3px 0 0;\n}\n#qrtab {\nmargin-bottom: 1px;\n}\n#qr .close {\nfloat: right;\npadding: 0 3px;\n}\n#qr .warning {\nmin-height: 1.6em;\nvertical-align: middle;\npadding: 0 1px;\nborder-width: 1px;\nborder-style: solid;\n}\n.qr-link-container {\ntext-align: center;\n}\n.persona {\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-button {\nwidth: 10%;\nmargin: 0;\nmargin-right: 4px;\nfont: 13px sans-serif;\npadding: 1px 0px 2px;\nopacity: 0.6;\n}\n.persona .field:not(#dump) {\nwidth: 95px;\nmin-width: 33.3%;\nmax-width: 33.3%;\n}\n#qr textarea.field {\nheight: 14.8em;\nmin-height: 9em;\n}\n#qr.has-captcha textarea.field {\nheight: 9em;\n}\ninput.field.tripped:not(:hover):not(:focus) {\ncolor: transparent !important;\ntext-shadow: none !important;\n}\n#qr textarea {\nresize: both;\n}\n.captcha-img {\nmargin: 0px;\ntext-align: center;\nbackground-image: #fff;\nfont-size: 0px;\nmin-height: 59px;\nmin-width: 302px;\n}\n.captcha-input {\nwidth: 100%;\nmargin: 1px 0 0;\n}\n.captcha-input.error:focus {\nborder-color: rgb(255,0,0) !important;\n}\n.field {\n-moz-box-sizing: border-box;\nmargin: 0px;\npadding: 2px 4px 3px;\n}\n#qr textarea {\nmin-width: 100%;\n}\n#qr [type='submit'] {\nwidth: 25%;\nvertical-align: top;\n}\n:root.webkit #qr [type='submit'] {\nheight: 24px;\n}\n/* Fake File Input */\n#qr-filename,\n.has-file #qr-no-file {\ndisplay: none;\n}\n#qr-no-file,\n.has-file #qr-filename {\ndisplay: inline-block;\npadding: 0px 4px;\nmargin-bottom: 2px;\noverflow: hidden;\ntext-overflow: ellipsis;\nmax-width: 88%;\n}\n#qr-no-file {\ncolor: #AAA;\n}\n#qr-filename-container {\n-moz-box-sizing: border-box;\ndisplay: inline-block;\nposition: relative;\nwidth: 100px;\nmin-width: 74.6%;\nmax-width: 74.6%;\nmargin-right: 0.4%;\nmargin-top: 1px;\noverflow: hidden;\npadding: 2px 1px 0;\nheight: 22px;\n}\n#qr-filename-container:hover {\ncursor: text;\n}\n#qr-extras-container {\nposition: absolute;\nright: 0px;\n}\n#qr-filerm {\nmargin-right: 2px;\nz-index: 2;\n}\n#file-n-submit {\nheight: 23px;\n}\n#qr input[type=file] {\nvisibility: hidden;\nposition: absolute;\n}\n/* Thread Select / Spoiler Label */\n#qr select {\nfloat: right;\n}\n#qr.has-spoiler .has-file #qr-spoiler-label {\nwidth: 6.7%;\nmin-width: 6.7%;\nmax-width: 6.7%;\ndisplay: inline-block;\ntext-align: center;\nvertical-align: top;\n}\n#qr.has-spoiler #file-n-submit:not(.has-file) #qr-spoiler-label {\ndisplay: none;\n}\n#qr.has-spoiler .has-file #qr-filename-container {\nmax-width: 67.9%;\nmin-width: 67.9%;\n}\n#qr-spoiler-label input {\nposition: relative;\ntop: 3px;\n}\n/* Dumping UI */\n.dump #dump-list-container {\ndisplay: block;\n}\n#dump-list-container {\ndisplay: none;\nposition: relative;\noverflow-y: hidden;\nmargin-top: 1px;\n}\n#dump-list {\noverflow-x: auto;\noverflow-y: hidden;\nwhite-space: nowrap;\nwidth: 248px;\nmax-width: 100%;\nmin-width: 100%;\n}\n#dump-list:hover {\noverflow-x: auto;\n}\n.qr-preview {\n-moz-box-sizing: border-box;\ncounter-increment: thumbnails;\ncursor: move;\ndisplay: inline-block;\nheight: 90px;\nwidth: 90px;\npadding: 2px;\nopacity: .5;\noverflow: hidden;\nposition: relative;\ntext-shadow: 0 1px 1px #000;\n-moz-transition: opacity .25s ease-in-out;\nvertical-align: top;\nbackground-size: cover;\n}\n.qr-preview:hover,\n.qr-preview:focus {\nopacity: .9;\n}\n.qr-preview::before {\ncontent: counter(thumbnails);\ncolor: #fff;\nposition: absolute;\ntop: 3px;\nright: 3px;\ntext-shadow: 0 0 3px #000, 0 0 8px #000;\n}\n.qr-preview#selected {\nopacity: 1;\n}\n.qr-preview.drag {\nbox-shadow: 0 0 10px rgba(0,0,0,.5);\n}\n.qr-preview.over {\nborder-color: #fff;\n}\n.qr-preview > span {\ncolor: #fff;\n}\n.remove {\nbackground: none;\ncolor: #e00;\nfont-weight: 700;\npadding: 3px;\n}\na:only-of-type > .remove {\ndisplay: none;\n}\n.remove:hover::after {\ncontent: \" Remove\";\n}\n.qr-preview > label {\nbackground: rgba(0,0,0,.5);\ncolor: #fff;\nright: 0;\nbottom: 0;\nleft: 0;\nposition: absolute;\ntext-align: center;\n}\n.qr-preview > label > input {\nmargin: 0;\n}\n#add-post {\ncursor: pointer;\nfont-size: 2em;\nposition: absolute;\ntop: 50%;\nright: 10px;\n-moz-transform: translateY(-50%);\n}\n.textarea {\nposition: relative;\n}\n:root.webkit .textarea {\nmargin-bottom: -2px;\n}\n#char-count {\ncolor: #000;\nbackground: hsla(0, 0%, 100%, .5);\nfont-size: 8pt;\nposition: absolute;\nbottom: 1px;\nright: 1px;\npointer-events: none;\n}\n\n/* Menu */\n.menu-button {\ndisplay: inline-block;\nposition: relative;\ncursor: pointer;\n}\n.menu-button i {\nborder-top: 6px solid;\nborder-right: 4px solid transparent;\nborder-left: 4px solid transparent;\ndisplay: inline-block;\nmargin: 2px;\nvertical-align: middle;\n}\n#menu {\nposition: fixed;\noutline: none;\n}\n.entry {\nborder-bottom: 1px solid rgba(0,0,0,.25);\ncursor: pointer;\ndisplay: block;\noutline: none;\npadding: 3px 7px;\nposition: relative;\ntext-decoration: none;\nwhite-space: nowrap;\n}\n.left>.entry.has-submenu {\npadding-right: 17px !important;\n}\n.entry:last-child {\nborder-bottom: 0;\n}\n.has-submenu::after {\ncontent: \"\";\nborder-left: .5em solid;\nborder-top: .3em solid transparent;\nborder-bottom: .3em solid transparent;\ndisplay: inline-block;\nmargin: .3em;\nposition: absolute;\nright: 3px;\n}\n.left .has-submenu::after {\nborder-left: 0;\nborder-right: .5em solid;\n}\n.submenu {\ndisplay: none;\nposition: absolute;\nleft: 100%;\ntop: -1px;\n}\n.focused .submenu {\ndisplay: block;\n}\n.imp-exp-result {\nposition: absolute;\ntext-align: center;\nmargin: auto;\nright: 0px;\nleft: 0px;\nwidth: 200px;\n}\n.export, .import {\ncursor: pointer;\ntext-decoration: none !important;\n}\n/* Link Title Favicons */\n.linkify.YouTube {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAABIklEQVQoz53LvUrDUBjG8bOoOammSf1IoBSvoCB4JeIqOHgBLt6AIMRBBQelWurQ2kERnMRBsBUcIp5FJSBI5oQsJVkkUHh8W0o5nhaFHvjBgef/Mq+Q46RJBMkI/vE+aOus956tnEswIZe1LV0QyJ5sE2GzgZfVMtRNIdiDpccEssdlB1mW4bvTwdvWJtRdErM7U+8S/FJykCRJX5qm+KpVce8UMNLRLbulz4iSjTAMh6Iowsd5BeNadp3nUF0VlxAEwZBotXC0Usa4ll3meZdA1iguwvf9vpvDA2wvmKgYGtSud8suDB4TyGr2PF49D/vra9jRZ1BVdknMzgwuCGSnZEObwu6sBnVTCHZiaC7BhFx2PKdxUidiAH/4lLo9Mv0DELVs9qsOHXwAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vimeo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAASJJREFUOE9jYAAC7ln7/pODQXrBmq333PvPu/YaSRikB6QXbACpmmHqsRoAMll7+20UQ0H8tmuv/pdffPFfZtNNuByGASBFIPDh5x+4IV6HHoDFYGDJgw+YBoBMBUkgA5BtIKduuvvy//svX+FSB+88wTTAc+/t/83bj/0HScLA5BPXwc7lKJ36f+L6XXDxhUfOYxrAPWUnWKFp9UQUm3iWQxSDXAEDSX3zcIcB96wD/x+8eA1XDNKMHAYg20GW4Y0FkCIYAAUqzEBQOIBciRzlWKMxZelOlMCEcVxq+jHSC1YDJPs3YBgA8jey0/F6ARRwsFAHORukmat9NdbUijMpg/wKcrJodDFOzSBXwA3Alh9AToZFI7a8Asu98BxJbnYGAJb5vYLDANzSAAAAAElFTkSuQmCC') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.SoundCloud {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABsklEQVQ4y5WTy2pUQRCGv2rbzDjJeAlIBmOyipGIIJqFEBDElwh4yULGeRFXPoEIBl/AvQ/gC2RnxCAoxijiwks852S6+3dxzslcHJCpTXVX11/Xv0097gLPgVNMJxnQNfX4zsqleWbnpoMf/oa9d988MM9MC/rp+E0a+A0dsVobMNMCOO8B6McRoABJI+A6gJmN3D2A8jgEBCEkSEMBrcrsDAzDWWn3AjgKFaDMmgRqniGFgsaDp1jrLOngDf1XT1D+A1dFc4MKAkkiCVKjjVu7g9+4Rzx4i1u6hjXbuMWr0O5QPNvCu7IaCZwEKQukLGDrm5x8uI0tr6MkiGlkiv7yLfzN+6S5i6QsIMABkEfcxhbWWYMkVAOjxvYAjc3HNHrbKI9VBQBFwF25XQKSBjqIf1YBuAurEMrczgDygD6/x2LCpFLXLUyQ+PoldphhBhYfIX09XU1+Flaukz7uYqs3SHs7cG4BmTsmkBUF9mmXEwa28BNLPaQPLepuNcbGSWQquQC2/Kdcox1FUGkcB0ykck1nA2+wTzMs8stGnP4rbWGw74EuS/GFQWfK7/wF6P4F7fzIAYkdmdEAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.audio {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAitJREFUOE9jYCAWKJWwavr0KyXWb/FIbDtUFFyzJx6nVofE2Xo5nXsj0rqPNSR0nVkR2Hjmgmfd+U9Otdf+m5Vf/6+SfeU/R9ChVVgNYDRtlfJuuPA/rPfe/4QpD/6nznj0P27Kw/9unff/69Xf+69c/+C/SO7N/0z+OAxgMmmRCe++/r9i3ev/KWvf/vdY8PK/bt/9/wrNV3/IN5y/IVt1YqNg4pGTTP4HsbuA2bhZ2qvpyn+xjIObxAp3VwqlrgngLFyryVy5nhPmZJHANS2cwYexG8BmVC/pWn3hP4NZlzWuQDJI3dIiFnUUuwEsQAOcq87jNcC7fHeLUtJxHF4AGmBWeAavAWH1+1rUUk7giAWjOknllON4DXAs2NEiG4/DBQxAF/CFHfrPYI4jDFSLuJVjNrUJhB/B7gIGo1pJRt99GAZYJK7wLJ1z7Xzl4vu/7aqv/GRBj0bjqAX2qb0nJ7mXH17C4HcUxQA+hymWtSue/C5a9up/9Ozn/7Vr7v1nRY7GqMb91T3b3v6vWvPmf/S0p/9ZQk+DDLCBRSOz06Jqk+o7/21nvfqvsebDf7kZL/5zBaxphkezd+OFn7HzXvz3Wvjmv9a8N//5Ek//ZTBpVYUrMG2X5wjcdl68+uI/wa5Lr3hSNjczGFeywOVZ/bbcVGp//F9izfv/Ql03f3P4LC/HSEQquYwMFnUCDJ7dzBhyjGZNQpye89M5gpfnMvtNUyE2h4PUAQBovvT7lyNljwAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.LiveLeak {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAydJREFUOE9Nk1tIk2EYx79NyUNqTk0o6KYrnZeChodLDxfeZpCbJk4RXU5Nm7tYRYhiYXbQlaeGutyW2gxtpB1RIyKDEjKwA6Ti2dR5KNDn+fq/S6TBj/f93r3P732e53s/qfnkSdej4GB2SBLbwf+jmB+gUMgOheLg/z7EdCUnO6Ref392SpK8Hyh3I+gBwBo7lUp2xcbyQEoKD6alyQOpqd754/h4FjJXZCRJTl9ftmEzoK5/wdQJxPgkLY2WV1dpc2uLtnZ2eHNnhza3t2nd46GhjAzuValY6jx0iIfS03msoIDuQ9COQCtoUSjohU5HuwgaN5loeXycd3d3aW9vzwvW2K5SkdTi58fvzGb+3tdHFggA3QONEAzn59PvjQ1yqNX0zenkvX0B4ffWaGRraChJd/385JGqKvlzTw/fRqOaIGkEd1DjU52O/3g83BkTw5MOh7yJuUCUM2o0yi2hoSw1IIOhykr+YLNRHYKu4XQvyKA/N5c8yMCCDD7Z7bz26xcJ1rH2rKKCG0UJdRAMlJbyG6uVrkJQjWAB5tSbk0Nr2HwDgvcQiIYur6zQyvo6ucvLueHIEZKuQPBQr+dXra1kRuqXEOwFArtWSytra1QdFUVjNhvPLS3R3OIiLUDUD0F1WBhJJtwDW2Ehu5uaqBICI4IFlRB0QLCEzaboaHrd0cHzCBYsIIuesjK+LAQXkEFrXh676uupGCWcR6AeghLQptGQONUAwfOuLp6Zn6eZuTmaXVig7pISrhI90ENgQbdHhoep32JhFzLpu3WLio8epUYIfs7OUjF6UKJW88XERLqYkEBNej11oG8XhCAvMFAuOn5cNiclsTkhQTbhmpri4lgbEMANWi1DwC/xit3t7bK7rY0Fo4OD3G4wyEURESzloAdnceezlErK8vH5N4KzPj50PTOTfkxP0+THj/RlYoInJyZI8HVqim5qNFwQHk7SucBAPo2PKRMNPLM/4pnFszYkhJsNBu6uqWFHba1sr61lQSveQFZQkFx07BhJmhMnrLn4NLMPH/aSExR0QDbmWhwgyEapwDvXoDxdWBiXnjrV/Bdm2kYUxLwmEgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.Vocaroo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAw9JREFUOE9jYMABuMwYmCyTJKUCGlSnFSy02TTzeOyCiQcDViX26qVz2TAyYtWmEMwuoZ3M7V40LcB79pHkc0svpvzY8jD//87nxf+3Pyn8v/ZO8v+VNyP/2mZJumI1QCWSI8232Hjumitlfw5+qPp/9l8TCt76JP//xkdx/wsXWCzjtWFkwTCkbWFe9plPk/+ga4Txz/xt/D/hkN//gMXif21a+NbyWjIwoRiy6GDT5rP/mlFsPfyp5n/NpOj/22+0gMUXXIz/H7hC/L/bFKFbPDZMrHAD5H35OPt2J9zacDv/f3V7xv9FhwrBGubsT/1//Pjx/1GJ/mD+/nfl/1v3Ovy3KRJNQbHdOlXCvOO03/+pm1P/v3v37n90hhtYw9HPtf8Xb2v937cmHswHeWPRxYj/LvkK3igGKARwicTO07118H3V/5kbi/4vPZMJtK3s/6YH2f+Pfq1B8VbjWrdnMu5s4nAD9CNFhKwz5DTUvLl419zKvAcLtG1P84BRl/b/5M/6/6f/NPzf/qzo84yj0Uus0xUU4Zor54bm9+4OfZG02OCuoAMTb9ZkC9ull1Nvrr2Z+XvRpaRfc65H/68F+jl9svEhzyLFWoccWVc+eyTHq/twydjlKRln7jX9bNMkMJnbhoFRL1xCqmKx6/yi2fYXa/c5/e846PV/5fW0/7OPx/yfcjzop34ulxdGGvDuU8mMXaX507lBuiN6ueadmQeT/p/93vf/1O+G//sP5fw/eL3o/5JLif8zVxs+Tlir9S26UyeFQQvJGBE7FvaFZ9LfN+1y+WjbItSb3GmXvXd15v8zroH/HxgE/D+aGPx/18vi/z07PeZNPRKxe/Kh0Ae8toxscCO4zBkYXArk9C1SxJUYjBkYPPIVtbbuTftz3cz//2O9wP/75iSAXdO72/dt2HL5F6YlfBW4MiJYXMiBiW3t7azHBx+V/t89N+H/8a+1//e9K/9attDp5LQjYX8SuvVL8RoAkmxa65299Erq1FnHo0qrl7t4BddriIs4MrM3rfWcFd+pGwVSAwBZ0bKP8yrZPAAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.pastebin {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAtZJREFUOE+NU91LWmEc7sJtQew/2MUY7INg7CLY3W5GMHazyzEQo9UmfYxZTbAiVlgRqLMSZ+XnDC3z2+Y0+8JGakKZTtR0Tl2wtgtLLQh29cz3ZZ3h3Q68vOc95zzP73l+z+/U1f292O09DRxubxOH23P//1bvtQts3dPnry7LZnXJhcUl5Avf8dHtwY+fv2AyW5DOfIXFakMm+w0G4wISyRRm55TQG0y/Wzv6mikJ52Xf9TmVBoFAAD6fDwqFAqFQCJubmzCbzZiensbp6SmkUikikQi0Wi0kEgm6ewVaStDCfXPDandifn6egoaGhrCzswO1Wg2Hw4HBwUGk02kIBAL4/X4IhUJMTk6ii8dfYggy2RwymQzOz88Rj8dRLpexv7+PSqWCYDCIQqGAra0tJBIJrK2t0XdVAjNDEIl+wfj4OEqlEq2wt7dHrchkMmrBYDCAz+fTIjweD7FYrJbgIJOlgLOzM8jlcip1eXmZ2rFarVAqlRCLxcjlchCJRFRljYJYPAG32418Pg+n04lsNouVlRUcHh7C4/FQIOlHNBqlezgcJgQWxkIgGMbExASVNjY2hvX1dVo9mUzS5wREFLhcLrqTcw2B//M2RkdHodPp4PV6oVKpqH+SCom3v7+fNnF4eJiJusbCJ6+PviSyScakiaR5RIHRaKQpmEwmbAdCeD8zB6vdhebHT8SMhcUlC83bbrdTJRsbG3RwiCVCRNJJpDIoVeNNJJJQzKryV+rrmxiCtyNCCmaz2VhdXQWXy6XDpNfrodFoYLXZUTw+pk222Z3lW3ca26rgSwzBwqIZAwMDlITMAVEwNTVFR5fEJpK8Qyp1AJvDVbrTeLenCmxgfiZ22+urCtWHyu7uLp2wVCpFKx0dHaFYLOLk5KT6Y9kgk89kb95ubK0BX7A8a+1qannRLeW0daj/rU51S3tn9dypfvDw0QiLxbpX/Z7FVK7e/AEj4Wf24/2f5AAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.gist {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNqUkzuIE1EUhv955MnsbB6r4kYQLUQQFncV3SnCIqJsoWGDYOGjsIiCtY2Kla1sjLBIsFFcXJC1kaSwENQmXUQSRSUSjCQSTCbkbR4z47lXEgtBNwcu3DNzvvO8R8jlcj7LshKmaWqYQERRTAmCcEru9/sJr9er0QF92BJMAVGr1TQ6CeZAc7lcGAwGkyQAxpTLZU0eDoc8crfbRTgcRjAYRCQSYSmi1WpxY7fbjU6ng1gshmaziXg8zhnGIpVKWbquW9ls1mLZsaMoiqWq6lgnBxY55He/328Vi0XOMFZmqVMD4fF4QBAajcY48khY9JE4HA4enTGMFVkaTHmy+ZzD/5NSqYSNB484w1h55ODO3TVu4FXcWDywl24Cmp0e1WBhyuWELAtIf/qKUrWOONmev3Lpt4NRCXq1gplpBS/v3cDc0nGg9h1o1ZkfwO4Atu1B8cM7HLt8k37V/y5B2b4bJxf2Y+7oEbyJrkMvUjki0YYJ03LidfQxAt4dOHdCw5RdGZcgGobBlQtnV/BDr1GfDai7ZiHZZRi9PoY/e5SCCTUwC9gk1GmMh5YWOcNYkR4Sv1y9uAJbYB82N57h4OnDmN7phjQ0qUkWRJuB+TMaPn/5iFfvv+Ha7eucYey4iWw8q6tRJJNJ3Fp7ClUawEkViBTfkCR0YUNTVHD/4Tpm/P4/U2CeKpUKfD4fJDIMhUKEhP45St50XedZyLQY6Xw+v8AUemVb2oNqtYpCocCWKi2TLLfb7ReZTGZ+kmUi7i2VvfxLgAEAZChMriPcl+IAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.image {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAs5JREFUOE+lk/tvi1EYx98/xT8gW4REIpGFMEQWl2FiM9ZMZhm2xRAyOsmujFFmdFRHu0tWm87UypxStr69zPauN5e5rHVp3IYhbOvHy+wHEQlxkm+ek+d8nm9OznkeSfrfldmgJC7QyUlTymsJTfuTZ25z4HdWYwyLreYhtpgekGPw0+kKvo1Eo+IXRSIiEhkWZuc9tqnsJD9EqTUopCxjSGTpB0iueczSo1HyW8cpsExQ1DbxI2pt45j9cXpexul4FEd79RnZphAa/SD7WvuFtO6UItbU9LC+YQxNI2w0wwYT5LRAdhOU3oBTIXC9gXP3oUSGgz2vST3gYHejR0jptT1C332f8yrUEYHrz8CgxDnpm6DKCUfc0KnmXa/AEVPPwnDcD0cvetA2uYRk67Ive/lpjO7YBO1PPuF8Df3vwf4cbNE4tqdw7YVq8HYyHx6FvhE1hkMEg8HDUqvFkjT4aIjMqkqyqkswDSrcfBfH+Q561YLAZ/B+BLda6FXlU/cPv0AoEPhuoP1h4Av7Wbh9E/Py15NWWUjeSR3nZDfeN+N0DY9hG/7K1eGP3P0S5/EYRFUF/IOTBrUXHPm9fT6mr1xEwupkZqxbzLyiDJYUZ5NSnkdqdSHpxyrYdFpPgdmAsdfJwPMI/Yr65bf7tZLGGBQ7DNdJWFtIYvoOZmbuZE7OXpIKKli86zAr9p9gTVktWTVnKTI2U95uRWe3U2IJUDbVB5p6hVm5x5m9Vc/cnedZUNzC8lILaQesZBy6hEZ3maKzgvJWFzVWD9XtXvVGQbSWASFtMATVRlJIKbOTWtlJXaeXepuPM1f6MNp9GLt8mLvvYLmp0OhQ2Fwvk6m7xaqDTvY0eYWUVtcnllXfYlGpnfklVuraHHg8HjxuN+6fktUHlWWZPaZeUo/ILK0UKttBcbNbSB9GP0yLxWJJUxoZGUn80zD9C/vXQ/4NHY10h3M1zmQAAAAASUVORK5CYII=') center left no-repeat!important;\npadding-left: 18px;\n}\n.linkify.InstallGentoo {\nbackground: transparent url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAklJREFUOE9jYEAAASBTCorZkcSRmTjVCDLziCwG4hfM3EIvGNm44oC6WNEM4WXi5FsEkmfhFX3BxMmfAJSHW9Qr55Px3aZp3X/btq3/hQydPzKysMcCFbBBDeFj4uBdqBJR/gskb1W34j+PmulLoJwbzBJJoMm7dNO7/ntMP/XfpW/v//SKvk+7tl7fvXfTpx5pCdWVSiHFv1wnHQbLi9sE/Wdk5SwBauaCGQB3gUPb5v+7Lr/8/+fvr/9fv/z+f+Pyr/9bV735l9Wy/79Dx/b/Nk0bsLoAHgbeAVHv/v77/f8f0IB7N7+cu3DuecK54z9+7lzz639e9pK/7HwSWMMA5BJwCJeXtOm/fvVj1fcfv369f//92cN7X6ZcPvf9x6Htv//vXP3r/+T245UEYgpskPTNq08LgN749/PH7/93rv/6f/rw7//nj//4f+bU0zQcUQwWBkdVbGz62y+fv3wHeeXrlz//H9798//qpY//M3KqfzGxc8djiWKwZnBUuWQ2/fr46fv/P39+///x/ff/d69//z97+s7fyMb5/+y7d2GLYriDZikFF/1qXXXj/4Pbv/8/f/jn/5MH316/eP6jVlBAaIt6VO1/jxmn/zv27P7Pp2HxEajLD90ra9Sj6/979O37X73w0n+vqOL/0lJyMVBFq0EGgDSD0oKAlu1/oHg4ugGzVCKqfouYuL1Xj676Iajr8AnJFricGqYc3Bw+Zi6BVUxsXLHAdL6QiYMPFNrwpIxHDsUhgtAMAopKDjQn4pPDF7P45QC4hSmc1eX8WgAAAABJRU5ErkJggg==') center left no-repeat!important;\npadding-left: 18px;\n}\n\n/* General */\n:root.yotsuba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.yotsuba #header-bar, :root.yotsuba #notifications {\nfont-size: 9pt;\ncolor: #B86;\n}\n:root.yotsuba #header-bar a, :root.yotsuba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.yotsuba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.yotsuba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.yotsuba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.yotsuba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba #menu {\ncolor: #800000;\n}\n:root.yotsuba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 10pt;\n}\n:root.yotsuba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.yotsuba-b .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.yotsuba-b #header-bar, :root.yotsuba-b #notifications {\nfont-size: 9pt;\ncolor: #89A;\n}\n:root.yotsuba-b #header-bar a, :root.yotsuba-b #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.yotsuba-b #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.yotsuba-b .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.yotsuba-b .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.yotsuba-b #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.yotsuba-b .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.yotsuba-b #menu {\ncolor: #000;\n}\n:root.yotsuba-b .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 10pt;\n}\n:root.yotsuba-b .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.yotsuba-b .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.futaba .dialog {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.futaba #header-bar, :root.futaba #notifications {\nfont-size: 11pt;\ncolor: #B86;\n}\n:root.futaba #header-bar a, :root.futaba #notifications a {\ncolor: #800000;\n}\n\n/* Settings */\n:root.futaba #fourchanx-settings fieldset {\nborder-color: #D9BFB7;\n}\n\n/* Quote */\n:root.futaba .backlink.deadlink {\ncolor: #00E !important;\n}\n:root.futaba .inline {\nborder-color: #D9BFB7;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.futaba #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #F0E0D6;\nborder-color: #D9BFB7;\n}\n:root.futaba .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.futaba #menu {\ncolor: #800000;\n}\n:root.futaba .entry {\nborder-bottom: 1px solid #D9BFB7;\nfont-size: 12pt;\n}\n:root.futaba .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.futaba .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.burichan .dialog {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .field:focus {\nborder-color: #98E;\n}\n\n/* Header */\n:root.burichan #header-bar, :root.burichan #header-bar #notifications {\nfont-size: 11pt;\ncolor: #89A;\n}\n:root.burichan #header-bar a, :root.burichan #header-bar #notifications a {\ncolor: #34345C;\n}\n\n/* Settings */\n:root.burichan #fourchanx-settings fieldset {\nborder-color: #B7C5D9;\n}\n\n/* Quote */\n:root.burichan .backlink.deadlink {\ncolor: #34345C !important;\n}\n:root.burichan .inline {\nborder-color: #B7C5D9;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.burichan #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #D6DAF0;\nborder-color: #B7C5D9;\n}\n:root.burichan .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.burichan #menu {\ncolor: #000000;\n}\n:root.burichan .entry {\nborder-bottom: 1px solid #B7C5D9;\nfont-size: 12pt;\n}\n:root.burichan .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.burichan .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.tomorrow .dialog {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n\n/* Header */\n:root.tomorrow #header-bar, :root.tomorrow #notifications {\nfont-size: 9pt;\ncolor: #C5C8C6;\n}\n:root.tomorrow #header-bar a, :root.tomorrow #notifications a {\ncolor: #81A2BE;\n}\n\n/* Settings */\n:root.tomorrow #fourchanx-settings fieldset {\nborder-color: #111;\n}\n\n/* Quote */\n:root.tomorrow .backlink.deadlink {\ncolor: #81A2BE !important;\n}\n:root.tomorrow .inline {\nborder-color: #111;\nbackground-color: rgba(0, 0, 0, .14);\n}\n\n/* QR */\n.tomorrow #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #282A2E;\nborder-color: #111;\n}\n:root.tomorrow .qr-preview {\nbackground-color: rgba(255, 255, 255, .15);\n}\n:root.tomorrow #qr .field {\nbackground-color: rgb(26, 27, 29);\ncolor: rgb(197,200,198);\nborder-color: rgb(40, 41, 42);\n}\n:root.tomorrow #qr .field:focus {\nborder-color: rgb(129, 162, 190) !important;\nbackground-color: rgb(30,32,36);\n}\n\n/* Menu */\n:root.tomorrow #menu {\ncolor: #C5C8C6;\n}\n:root.tomorrow .entry {\nborder-bottom: 1px solid #111;\nfont-size: 10pt;\n}\n:root.tomorrow .focused.entry {\nbackground: rgba(0, 0, 0, .33);\n}\n\n/* Watcher Favicon */\n:root.tomorrow .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n\n/* General */\n:root.photon .dialog {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .field:focus {\nborder-color: #EA8;\n}\n\n/* Header */\n:root.photon #header-bar, :root.photon #notifications {\nfont-size: 9pt;\ncolor: #333;\n}\n:root.photon #header-bar a, :root.photon #notifications a {\ncolor: #FF6600;\n}\n\n/* Settings */\n:root.photon #fourchanx-settings fieldset {\nborder-color: #CCC;\n}\n\n/* Quote */\n:root.photon .backlink.deadlink {\ncolor: #F60 !important;\n}\n:root.photon .inline {\nborder-color: #CCC;\nbackground-color: rgba(255, 255, 255, .14);\n}\n\n/* QR */\n.photon #dump-list::-webkit-scrollbar-thumb {\nbackground-color: #DDD;\nborder-color: #CCC;\n}\n:root.photon .qr-preview {\nbackground-color: rgba(0, 0, 0, .15);\n}\n\n/* Menu */\n:root.photon #menu {\ncolor: #333;\n}\n:root.photon .entry {\nborder-bottom: 1px solid #CCC;\nfont-size: 10pt;\n}\n:root.photon .focused.entry {\nbackground: rgba(255, 255, 255, .33);\n}\n\n/* Watcher Favicon */\n:root.photon .watch-thread-link\n{\nbackground-image: url(\"data:image/svg+xml,\");\n}\n" }; Main.init(); diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index eaa4e908a..5d5192179 100755 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -22,7 +22,6 @@ Settings = $.on d, '4chanXInitFinished', Settings.open $.set archives: Conf['archives'] - lastarchivecheck: now previousversion: g.VERSION Settings.addSection 'Main', Settings.main diff --git a/src/General/css/burichan.css b/src/General/css/burichan.css index 917dea36c..6476a5539 100755 --- a/src/General/css/burichan.css +++ b/src/General/css/burichan.css @@ -52,7 +52,7 @@ } /* Watcher Favicon */ -:root.burichan .watcher-toggler +:root.burichan .watch-thread-link { background-image: url("data:image/svg+xml,"); } diff --git a/src/General/css/futaba.css b/src/General/css/futaba.css index 3a090155c..9b56af61a 100755 --- a/src/General/css/futaba.css +++ b/src/General/css/futaba.css @@ -52,7 +52,7 @@ } /* Watcher Favicon */ -:root.futaba .watcher-toggler +:root.futaba .watch-thread-link { background-image: url("data:image/svg+xml,"); } diff --git a/src/General/css/photon.css b/src/General/css/photon.css index 8eb680e14..7f2370192 100755 --- a/src/General/css/photon.css +++ b/src/General/css/photon.css @@ -52,7 +52,7 @@ } /* Watcher Favicon */ -:root.photon .watcher-toggler +:root.photon .watch-thread-link { background-image: url("data:image/svg+xml,"); } diff --git a/src/General/css/style.css b/src/General/css/style.css index 07884666f..131b4af14 100755 --- a/src/General/css/style.css +++ b/src/General/css/style.css @@ -39,7 +39,7 @@ overflow: hidden; } label, -.watcher-toggler { +.watch-thread-link { cursor: pointer; } a[href="javascript:;"] { @@ -508,7 +508,7 @@ a.hide-announcement { top: 0px; padding: 0px 4px; } -.watcher-toggler { +.watch-thread-link { padding-top: 18px; width: 18px; height: 0px; @@ -518,7 +518,7 @@ a.hide-announcement { position: relative; top: 1px; } -.watcher-toggler.watched { +.watch-thread-link.watched { opacity: 1; } diff --git a/src/General/css/tomorrow.css b/src/General/css/tomorrow.css index 343b62c60..6f8d64b49 100755 --- a/src/General/css/tomorrow.css +++ b/src/General/css/tomorrow.css @@ -58,7 +58,7 @@ } /* Watcher Favicon */ -:root.tomorrow .watcher-toggler +:root.tomorrow .watch-thread-link { background-image: url("data:image/svg+xml,"); } diff --git a/src/General/css/yotsuba-b.css b/src/General/css/yotsuba-b.css index 486554f35..d3bdd0234 100755 --- a/src/General/css/yotsuba-b.css +++ b/src/General/css/yotsuba-b.css @@ -52,7 +52,7 @@ } /* Watcher Favicon */ -:root.yotsuba-b .watcher-toggler +:root.yotsuba-b .watch-thread-link { background-image: url("data:image/svg+xml,"); } diff --git a/src/General/css/yotsuba.css b/src/General/css/yotsuba.css index 0cc6f5533..a06ab02fb 100755 --- a/src/General/css/yotsuba.css +++ b/src/General/css/yotsuba.css @@ -52,7 +52,7 @@ } /* Watcher Favicon */ -:root.yotsuba .watcher-toggler +:root.yotsuba .watch-thread-link { background-image: url("data:image/svg+xml,"); } diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index 9a48fa021..d36fdc5c7 100755 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -45,7 +45,7 @@ ThreadWatcher = node: -> toggler = $.el 'img', - className: 'watcher-toggler' + className: 'watch-thread-link' $.on toggler, 'click', ThreadWatcher.cb.toggle $.before $('input', @OP.nodes.post), toggler @@ -174,7 +174,7 @@ ThreadWatcher = $.add list, nodes for threadID, thread of g.BOARD.threads - toggler = $ '.watcher-toggler', thread.OP.nodes.post + toggler = $ '.watch-thread-link', thread.OP.nodes.post watched = ThreadWatcher.db.get {boardID: thread.board.ID, threadID} $[if watched then 'addClass' else 'rmClass'] toggler, 'watched' From eeb6ee22a4581160a5a43208abf88d55d98f5d33 Mon Sep 17 00:00:00 2001 From: seaweedchan Date: Tue, 13 Aug 2013 00:41:04 -0700 Subject: [PATCH 10/72] Remove redundancy --- builds/4chan-X.user.js | 20 +------------------- builds/crx/script.js | 20 +------------------- src/General/Main.coffee | 13 ------------- 3 files changed, 2 insertions(+), 51 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9e0fc2da3..74504016e 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -10339,25 +10339,7 @@ Main = { init: function() { - var db, flatten, pathname, _i, _len, _ref; - pathname = location.pathname.split('/'); - g.BOARD = new Board(pathname[1]); - if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { - return; - } - g.VIEW = (function() { - switch (pathname[2]) { - case 'res': - return 'thread'; - case 'catalog': - return 'catalog'; - default: - return 'index'; - } - })(); - if (g.VIEW === 'thread') { - g.THREADID = +pathname[3]; - } + var db, flatten, _i, _len; flatten = function(parent, obj) { var key, val; if (obj instanceof Array) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 9a24d2b99..bcabbb5ce 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -10324,25 +10324,7 @@ Main = { init: function() { - var db, flatten, pathname, _i, _len, _ref; - pathname = location.pathname.split('/'); - g.BOARD = new Board(pathname[1]); - if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { - return; - } - g.VIEW = (function() { - switch (pathname[2]) { - case 'res': - return 'thread'; - case 'catalog': - return 'catalog'; - default: - return 'index'; - } - })(); - if (g.VIEW === 'thread') { - g.THREADID = +pathname[3]; - } + var db, flatten, _i, _len; flatten = function(parent, obj) { var key, val; if (obj instanceof Array) { diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 996f17d97..000058db6 100755 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -1,18 +1,5 @@ Main = init: -> - pathname = location.pathname.split '/' - g.BOARD = new Board pathname[1] - return if g.BOARD.ID in ['z', 'fk'] - g.VIEW = - switch pathname[2] - when 'res' - 'thread' - when 'catalog' - 'catalog' - else - 'index' - if g.VIEW is 'thread' - g.THREADID = +pathname[3] # flatten Config into Conf # and get saved or default values flatten = (parent, obj) -> From f1cf1addfe0708aeaf59d545beda65d3dd011f20 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 12:56:21 +0200 Subject: [PATCH 11/72] Move the header menu button into the header shortcuts. --- css/style.css | 3 --- html/General/Header.html | 5 ----- src/General/Header.coffee | 15 ++++++++++++--- src/Images/ImageExpand.coffee | 2 +- src/Posting/QR.coffee | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/css/style.css b/css/style.css index 32819ef69..c597b6826 100644 --- a/css/style.css +++ b/css/style.css @@ -189,9 +189,6 @@ a[href="javascript:;"] { text-decoration: none; padding: 1px; } -#shortcuts:empty { - display: none; -} .shortcut:not(:last-child)::after { content: " / "; } diff --git a/html/General/Header.html b/html/General/Header.html index 9251d7ff3..2e0088f42 100644 --- a/html/General/Header.html +++ b/html/General/Header.html @@ -1,9 +1,4 @@
- - - - - diff --git a/src/General/Header.coffee b/src/General/Header.coffee index 47588d98c..efbc288fc 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -10,7 +10,12 @@ Header = @toggle = $ '#toggle-header-bar', @bar @menu = new UI.Menu 'header' - $.on $('.menu-button', @bar), 'click', @menuToggle + menuButton = $.el 'a', + className: 'menu-button' + innerHTML: '' + href: 'javascript:;' + $.on menuButton, 'click', @menuToggle + @addShortcut menuButton, 0 $.on @toggle, 'mousedown', @toggleBarVisibility $.on window, 'load hashchange', Header.hashScroll $.on d, 'CreateNotification', @createNotification @@ -247,11 +252,15 @@ Header = top -= headRect.top + headRect.height window.scrollBy 0, top - addShortcut: (el) -> + addShortcut: (el, index) -> shortcut = $.el 'span', className: 'shortcut' $.add shortcut, el - $.prepend $('#shortcuts', Header.bar), shortcut + shortcuts = $ '#shortcuts', Header.bar + nodes = [shortcuts.childNodes...] + nodes.splice index, 0, shortcut + $.add shortcuts, nodes + menuToggle: (e) -> Header.menu.toggle e, @, g diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index 6a3a06f20..cf28bef59 100644 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -8,7 +8,7 @@ ImageExpand = title: 'Expand All Images' href: 'javascript:;' $.on @EAI, 'click', ImageExpand.cb.toggleAll - Header.addShortcut @EAI + Header.addShortcut @EAI, 2 Post::callbacks.push name: 'Image Expansion' diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 791802066..7c6d0afdf 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -27,7 +27,7 @@ QR = $.event 'CloseMenu' QR.open() QR.nodes.com.focus() - Header.addShortcut sc + Header.addShortcut sc, 1 $.on d, 'QRGetSelectedPost', ({detail: cb}) -> cb QR.selected From 0ee17f32ce8dfc746de9b70d1d7e7bda0656aef4 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 13:53:15 +0200 Subject: [PATCH 12/72] Use classes to position menus and sub-menus. --- css/style.css | 24 ++++++++++++++++++++++++ src/General/UI.coffee | 42 ++++++++++++++++++++---------------------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/css/style.css b/css/style.css index c597b6826..e9777b123 100644 --- a/css/style.css +++ b/css/style.css @@ -885,6 +885,18 @@ a.hide-announcement { position: absolute; outline: none; } +#menu.top { + top: 100%; +} +#menu.bottom { + bottom: 100%; +} +#menu.left { + left: 0; +} +#menu.right { + right: 0; +} .entry { cursor: pointer; outline: none; @@ -921,6 +933,18 @@ a.hide-announcement { position: absolute; margin: -1px 0; } +.submenu.top { + top: 0; +} +.submenu.bottom { + bottom: 0; +} +.submenu.left { + left: 100%; +} +.submenu.right { + right: 100%; +} .entry input { margin: 0; } diff --git a/src/General/UI.coffee b/src/General/UI.coffee index 84bc40a08..7fb0abe2d 100644 --- a/src/General/UI.coffee +++ b/src/General/UI.coffee @@ -67,19 +67,18 @@ UI = do -> bLeft = window.scrollX + bRect.left cHeight = doc.clientHeight cWidth = doc.clientWidth - [top, bottom] = if bRect.top + bRect.height + mRect.height < cHeight - ['100%', null] + if bRect.top + bRect.height + mRect.height < cHeight + $.addClass menu, 'top' + $.rmClass menu, 'bottom' else - [null, '100%'] - [left, right] = if bRect.left + mRect.width < cWidth - ['0px', null] + $.addClass menu, 'bottom' + $.rmClass menu, 'top' + if bRect.left + mRect.width < cWidth + $.addClass menu, 'left' + $.rmClass menu, 'right' else - [null, '0px'] - {style} = menu - style.top = top - style.right = right - style.bottom = bottom - style.left = left + $.addClass menu, 'right' + $.rmClass menu, 'left' menu.focus() @@ -155,19 +154,18 @@ UI = do -> eRect = entry.getBoundingClientRect() cHeight = doc.clientHeight cWidth = doc.clientWidth - [top, bottom] = if eRect.top + sRect.height < cHeight - ['0px', 'auto'] + if eRect.top + sRect.height < cHeight + $.addClass submenu, 'top' + $.rmClass submenu, 'bottom' else - ['auto', '0px'] - [left, right] = if eRect.right + sRect.width < cWidth - ['100%', 'auto'] + $.addClass submenu, 'bottom' + $.rmClass submenu, 'top' + if eRect.right + sRect.width < cWidth + $.addClass submenu, 'left' + $.rmClass submenu, 'right' else - ['auto', '100%'] - {style} = submenu - style.top = top - style.bottom = bottom - style.left = left - style.right = right + $.addClass submenu, 'right' + $.rmClass submenu, 'left' addEntry: (e) -> entry = e.detail From 8ef04b655c3df0397ad58f162163959b754dd303 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 14:48:57 +0200 Subject: [PATCH 13/72] Don't show `(...)` when updating watched threads status and there's nothing to fetch. --- src/Monitoring/ThreadWatcher.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Monitoring/ThreadWatcher.coffee b/src/Monitoring/ThreadWatcher.coffee index ff36315c5..9465187ba 100644 --- a/src/Monitoring/ThreadWatcher.coffee +++ b/src/Monitoring/ThreadWatcher.coffee @@ -86,8 +86,9 @@ ThreadWatcher = fetched: 0 fetching: 0 fetchAllStatus: -> + return unless (threads = ThreadWatcher.getAll()).length ThreadWatcher.status.textContent = '...' - for thread in ThreadWatcher.getAll() + for thread in threads ThreadWatcher.fetchStatus thread return fetchStatus: ({boardID, threadID, data}) -> From 5afdca921cb6959aa50336ac7875dda187dffe73 Mon Sep 17 00:00:00 2001 From: Enzo Moretti Date: Tue, 13 Aug 2013 15:07:47 +0200 Subject: [PATCH 14/72] Adding /d/ to Foolz Beta --- json/archives.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json/archives.json b/json/archives.json index 647889b55..2f1ac503c 100644 --- a/json/archives.json +++ b/json/archives.json @@ -105,6 +105,6 @@ "https": true, "withCredentials": true, "software": "foolfuuka", - "boards": ["a", "co", "gd", "h", "jp", "m", "mlp", "q", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], - "files": ["a", "gd", "h", "jp", "m", "q", "tg", "u", "vg", "vp", "vr", "wsg"] + "boards": ["a", "co", "d", "gd", "h", "jp", "m", "mlp", "q", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"], + "files": ["a", "d", "gd", "h", "jp", "m", "q", "tg", "u", "vg", "vp", "vr", "wsg"] }] From 3581a235e75b4ee15177221596534af2bbada435 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 16:29:54 +0200 Subject: [PATCH 15/72] Fix post menus in stubs. Also removed some old arguments, fixed some semantics, added Get.threadFromNode, and used it. --- src/Filtering/PostHiding.coffee | 2 +- src/Filtering/ThreadHiding.coffee | 2 +- src/General/Get.coffee | 10 ++++++---- src/Menu/Menu.coffee | 20 ++++++++++++++------ src/Miscellaneous/ExpandThread.coffee | 2 +- src/Posting/QR.coffee | 2 +- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/Filtering/PostHiding.coffee b/src/Filtering/PostHiding.coffee index bfa586e50..74bef51d8 100644 --- a/src/Filtering/PostHiding.coffee +++ b/src/Filtering/PostHiding.coffee @@ -166,7 +166,7 @@ PostHiding = className: 'stub' $.add post.nodes.stub, a if Conf['Menu'] - $.add post.nodes.stub, [$.tn(' '), Menu.makeButton post] + $.add post.nodes.stub, [$.tn(' '), Menu.makeButton()] $.prepend post.nodes.root, post.nodes.stub show: (post, showRecursively=Conf['Recursive Hiding']) -> diff --git a/src/Filtering/ThreadHiding.coffee b/src/Filtering/ThreadHiding.coffee index 49d3607f3..65fd05f0a 100644 --- a/src/Filtering/ThreadHiding.coffee +++ b/src/Filtering/ThreadHiding.coffee @@ -151,7 +151,7 @@ ThreadHiding = className: 'stub' $.add thread.stub, a if Conf['Menu'] - $.add thread.stub, [$.tn(' '), Menu.makeButton OP] + $.add thread.stub, [$.tn(' '), Menu.makeButton()] $.prepend threadRoot, thread.stub show: (thread) -> diff --git a/src/General/Get.coffee b/src/General/Get.coffee index fe2a056b0..d5f2334a0 100644 --- a/src/General/Get.coffee +++ b/src/General/Get.coffee @@ -10,6 +10,8 @@ Get = "/#{thread.board}/ - #{excerpt}" threadFromRoot: (root) -> g.threads["#{g.BOARD}.#{root.id[1..]}"] + threadFromNode: (node) -> + Get.threadFromRoot $.x 'ancestor::div[@class="thread"]', node postFromRoot: (root) -> link = $ 'a[title="Highlight this post"]', root boardID = link.pathname.split('/')[1] @@ -17,10 +19,10 @@ Get = index = root.dataset.clone post = g.posts["#{boardID}.#{postID}"] if index then post.clones[index] else post - postFromNode: (root) -> - Get.postFromRoot $.x 'ancestor::div[contains(@class,"postContainer")][1]', root - contextFromNode: (quotelink) -> - Get.postFromRoot $.x 'ancestor::div[parent::div[@class="thread"]][1]', quotelink + postFromNode: (node) -> + Get.postFromRoot $.x 'ancestor::div[contains(@class,"postContainer")][1]', node + contextFromNode: (node) -> + Get.postFromRoot $.x 'ancestor::div[parent::div[@class="thread"]][1]', node postDataFromLink: (link) -> if link.hostname is 'boards.4chan.org' path = link.pathname.split '/' diff --git a/src/Menu/Menu.coffee b/src/Menu/Menu.coffee index 0c5bc4af9..94ed4896d 100644 --- a/src/Menu/Menu.coffee +++ b/src/Menu/Menu.coffee @@ -10,10 +10,10 @@ Menu = node: -> if @isClone button = $ '.menu-button', @nodes.info - else - button = Menu.makeButton @ - $.add @nodes.info, [$.tn('\u00A0'), button] - $.on button, 'click', Menu.toggle + $.on button, 'click', Menu.toggle + return + button = Menu.makeButton() + $.add @nodes.info, [$.tn('\u00A0'), button] makeButton: do -> a = null @@ -22,7 +22,15 @@ Menu = className: 'menu-button' innerHTML: '[]' href: 'javascript:;' - a.cloneNode true + button = a.cloneNode true + $.on button, 'click', Menu.toggle + button toggle: (e) -> - Menu.menu.toggle e, @, Get.postFromNode @ + try + # Posts, inlined posts, hidden replies. + post = Get.postFromNode @ + catch + # Hidden threads. + post = Get.threadFromNode(@).OP + Menu.menu.toggle e, @, post diff --git a/src/Miscellaneous/ExpandThread.coffee b/src/Miscellaneous/ExpandThread.coffee index c18bd8088..513a24368 100644 --- a/src/Miscellaneous/ExpandThread.coffee +++ b/src/Miscellaneous/ExpandThread.coffee @@ -23,7 +23,7 @@ ExpandThread = text.join(' ') + '.' cbToggle: -> - ExpandThread.toggle Get.threadFromRoot @parentNode + ExpandThread.toggle Get.threadFromNode @ toggle: (thread) -> threadRoot = thread.OP.nodes.root.parentNode diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 7c6d0afdf..88a226a9e 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -340,7 +340,7 @@ QR = $.addClass QR.nodes.el, 'dump' QR.cooldown.auto = true {com, thread} = QR.nodes - thread.value = Get.contextFromNode(@).thread unless com.value + thread.value = Get.threadFromNode @ unless com.value caretPos = com.selectionStart # Replace selection for text. From 3f1625f881899e995ab345bb877b92005477d294 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 16:52:38 +0200 Subject: [PATCH 16/72] Fix third level lists markdown in changelog. --- CHANGELOG.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 883682af1..b123a9807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ - It is now possible to open all watched threads via the `Open all threads` button in the Thread Watcher's menu. - Added the `Current Board` setting to switch between showing watched threads from the current board or all boards, disabled by default. - About dead (404'd) threads: - - Dead threads will be typographically indicated with a strikethrough. - - Dead threads will directly link to the corresponding archive when available. - - A button to prune all 404'd threads from the list is now available. - - Added the `Auto Prune` setting to automatically prune 404'd threads, disabled by default. +
    +
  • Dead threads will be typographically indicated with a strikethrough. +
  • Dead threads will directly link to the corresponding archive when available. +
  • A button to prune all 404'd threads from the list is now available. +
  • Added the `Auto Prune` setting to automatically prune 404'd threads, disabled by default. +
- The current thread is now highlighted in the list of watched threads. - Watching the current thread can be done in the Header's menu too. - Removed the `Check for Updates` setting: From 1c33b235d04e82e0be1a9783bf382cf256d6baf5 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 17:13:59 +0200 Subject: [PATCH 17/72] Release 4chan X v3.7.0. --- CHANGELOG.md | 2 ++ package.json | 2 +- src/General/Header.coffee | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b123a9807..3168af372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 3.7.0 - *2013-08-13* + - **Thread Watcher** improvements: - It is now possible to open all watched threads via the `Open all threads` button in the Thread Watcher's menu. - Added the `Current Board` setting to switch between showing watched threads from the current board or all boards, disabled by default. diff --git a/package.json b/package.json index 2f097642f..77c02c133 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "3.6.0", + "version": "3.7.0", "description": "Cross-browser extension for productive lurking on 4chan.", "meta": { "name": "4chan X", diff --git a/src/General/Header.coffee b/src/General/Header.coffee index efbc288fc..55210db34 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -261,7 +261,6 @@ Header = nodes.splice index, 0, shortcut $.add shortcuts, nodes - menuToggle: (e) -> Header.menu.toggle e, @, g From 2f13855508f14eba6c96e04345030a7bc7288de6 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 18:53:32 +0200 Subject: [PATCH 18/72] Fixed a typo in QuoteCT which erroneously reported quotelinks inside cross-board clones as cross-thread quotelinks. --- src/Quotelinks/QuoteCT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Quotelinks/QuoteCT.coffee b/src/Quotelinks/QuoteCT.coffee index effbd9da5..8dbce5916 100644 --- a/src/Quotelinks/QuoteCT.coffee +++ b/src/Quotelinks/QuoteCT.coffee @@ -20,6 +20,6 @@ QuoteCT = continue unless threadID # deadlink if @isClone quotelink.textContent = quotelink.textContent.replace QuoteCT.text, '' - if boardID is @board.ID and threadID isnt thread.ID + if boardID is board.ID and threadID isnt thread.ID $.add quotelink, $.tn QuoteCT.text return From 46c50baaba0b6c05beba7ae3be0b42d9bd12dbd5 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 18:56:10 +0200 Subject: [PATCH 19/72] Remove some useless code in QuoteCT. --- src/Quotelinks/QuoteCT.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Quotelinks/QuoteCT.coffee b/src/Quotelinks/QuoteCT.coffee index 8dbce5916..92cd9dcbc 100644 --- a/src/Quotelinks/QuoteCT.coffee +++ b/src/Quotelinks/QuoteCT.coffee @@ -10,12 +10,9 @@ QuoteCT = node: -> # Stop there if it's a clone of a post in the same thread. return if @isClone and @thread is @context.thread - # Stop there if there's no quotes in that post. - return unless (quotes = @quotes).length - {quotelinks} = @nodes {board, thread} = if @isClone then @context else @ - for quotelink in quotelinks + for quotelink in @nodes.quotelinks {boardID, threadID} = Get.postDataFromLink quotelink continue unless threadID # deadlink if @isClone From b7ddfa5c661d210749a626ae93331976e147d58c Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 19:10:57 +0200 Subject: [PATCH 20/72] Shave a line and move a few things around in QuoteOP. --- src/Quotelinks/QuoteOP.coffee | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Quotelinks/QuoteOP.coffee b/src/Quotelinks/QuoteOP.coffee index 281b0241f..4b39298a8 100644 --- a/src/Quotelinks/QuoteOP.coffee +++ b/src/Quotelinks/QuoteOP.coffee @@ -12,18 +12,17 @@ QuoteOP = return if @isClone and @thread is @context.thread # Stop there if there's no quotes in that post. return unless (quotes = @quotes).length - {quotelinks} = @nodes # rm (OP) from cross-thread quotes. if @isClone and @thread.fullID in quotes for quotelink in quotelinks quotelink.textContent = quotelink.textContent.replace QuoteOP.text, '' - op = (if @isClone then @context else @).thread.fullID + {fullID} = (if @isClone then @context else @).thread # add (OP) to quotes quoting this context's OP. - return unless op in quotes - for quotelink in quotelinks + return unless fullID in quotes + for quotelink in @nodes.quotelinks {boardID, postID} = Get.postDataFromLink quotelink - if "#{boardID}.#{postID}" is op + if "#{boardID}.#{postID}" is fullID $.add quotelink, $.tn QuoteOP.text return From 4c6323dc6ebb38fe3ab9e635e74b6f0464abb6b5 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 20:58:06 +0200 Subject: [PATCH 21/72] Fx <23 doesn't have HTMLCanvasElement? --- CHANGELOG.md | 2 ++ lib/polyfill.coffee | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3168af372..c60ac0cf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Fixed an error for Firefox <23 users. + ## 3.7.0 - *2013-08-13* - **Thread Watcher** improvements: diff --git a/lib/polyfill.coffee b/lib/polyfill.coffee index 3cec1905a..6bab699cb 100644 --- a/lib/polyfill.coffee +++ b/lib/polyfill.coffee @@ -1,7 +1,9 @@ Polyfill = init: -> + <% if (type === 'crx') { %> Polyfill.toBlob() Polyfill.visibility() + <% } %> toBlob: -> HTMLCanvasElement::toBlob or= (cb) -> data = atob @toDataURL()[22..] From e0a44bcb6908dcc85918ecba51d9fe5efdc80209 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 13 Aug 2013 20:58:29 +0200 Subject: [PATCH 22/72] Release 4chan X v3.7.1. --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c60ac0cf0..b42da98c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 3.7.1 - *2013-08-13* + - Fixed an error for Firefox <23 users. ## 3.7.0 - *2013-08-13* diff --git a/package.json b/package.json index 77c02c133..e3499da18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "4chan-X", - "version": "3.7.0", + "version": "3.7.1", "description": "Cross-browser extension for productive lurking on 4chan.", "meta": { "name": "4chan X", From f4e80537834662a03a509b7ca5bef663584dae18 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Tue, 13 Aug 2013 15:20:18 -0700 Subject: [PATCH 23/72] Prevent jp from matching jpg --- builds/4chan-X.user.js | 2 +- builds/crx/script.js | 2 +- src/Linkification/Linkify.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 110c6975b..bd5e373f4 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4425,7 +4425,7 @@ if (g.VIEW === 'catalog' || !Conf['Linkify']) { return; } - this.regString = /(?:[a-z][-\w]+:([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](com|net|org|jp|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi)|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i; + this.regString = /(?:[a-z][-\w]+:([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](com|net|org|co\.jp|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi)|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i; if (Conf['Comment Expansion']) { ExpandComment.callbacks.push(this.node); } diff --git a/builds/crx/script.js b/builds/crx/script.js index b198cb92b..166daccc8 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4431,7 +4431,7 @@ if (g.VIEW === 'catalog' || !Conf['Linkify']) { return; } - this.regString = /(?:[a-z][-\w]+:([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](com|net|org|jp|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi)|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i; + this.regString = /(?:[a-z][-\w]+:([a-z\d%\/])|www\d{0,3}[.]|[-a-z\d.]+[.](com|net|org|co\.jp|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi)|[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}|[-\w\d.@]+@[a-z\d.-]+\.[a-z\d])/i; if (Conf['Comment Expansion']) { ExpandComment.callbacks.push(this.node); } diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 35d722b47..7d1085aa8 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -14,7 +14,7 @@ Linkify = # This should account for virtually all links posted without www or http: # If it misses any, screw it. No, I will not add canv.as [-a-z\d.]+[.]( - com|net|org|jp|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi + com|net|org|co\.jp|uk|ru|be|tv|xxx|edu|gov|cd|es|de|se|tk|dk|io|fm|fi ) | # IPv4 Addresses From 368a5ee5c00646506488ca89fe37e708b3875fe0 Mon Sep 17 00:00:00 2001 From: Jordan Bates Date: Tue, 13 Aug 2013 15:20:20 -0700 Subject: [PATCH 24/72] Fix #141 --- builds/4chan-X.user.js | 412 ++++++++++++++++++++++++++++++- builds/crx/script.js | 412 ++++++++++++++++++++++++++++++- src/General/html/Build/post.html | 2 +- 3 files changed, 823 insertions(+), 3 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 167bcc7ea..c27d85178 100755 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -347,6 +347,7 @@ Array.prototype.indexOf = function(object) { var i; + i = this.length; while (i--) { if (this[i] === object) { @@ -365,6 +366,7 @@ $.extend = function(object, properties) { var key, val; + for (key in properties) { val = properties[key]; if (!properties.hasOwnProperty(key)) { @@ -382,6 +384,7 @@ $.ready = function(fc) { var cb; + if (d.readyState !== 'loading') { $.queueTask(fc); return; @@ -395,6 +398,7 @@ $.formData = function(form) { var fd, key, val; + if (form instanceof HTMLFormElement) { return new FormData(form); } @@ -414,6 +418,7 @@ $.extend = function(object, properties) { var key, val; + for (key in properties) { val = properties[key]; object[key] = val; @@ -422,9 +427,11 @@ $.ajax = (function() { var lastModified; + lastModified = {}; return function(url, options, extra) { var form, r, sync, type, upCallbacks, whenModified; + if (extra == null) { extra = {}; } @@ -447,9 +454,11 @@ $.cache = (function() { var reqs; + reqs = {}; return function(url, cb, options) { var err, req, rm; + if (req = reqs[url]) { if (req.readyState === 4) { cb.call(req, req.evt); @@ -469,6 +478,7 @@ } $.on(req, 'load', function(e) { var _i, _len, _ref; + _ref = this.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { cb = _ref[_i]; @@ -504,6 +514,7 @@ $.addStyle = function(css, id) { var style; + style = $.el('style', { id: id, textContent: css @@ -550,6 +561,7 @@ } else { return function(el) { var _ref; + return (_ref = el.parentNode) != null ? _ref.removeChild(el) : void 0; }; } @@ -557,6 +569,7 @@ $.rmAll = function(root) { var node; + while (node = root.firstChild) { root.removeChild(node); } @@ -572,6 +585,7 @@ $.nodes = function(nodes) { var frag, node, _i, _len; + if (!(nodes instanceof Array)) { return nodes; } @@ -605,6 +619,7 @@ $.el = function(tag, properties) { var el; + el = d.createElement(tag); if (properties) { $.extend(el, properties); @@ -614,6 +629,7 @@ $.on = function(el, events, handler) { var event, _i, _len, _ref; + _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -623,6 +639,7 @@ $.off = function(el, events, handler) { var event, _i, _len, _ref; + _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -644,6 +661,7 @@ $.debounce = function(wait, fn) { var args, exec, lastCall, that, timeout; + lastCall = 0; timeout = null; that = null; @@ -665,9 +683,11 @@ $.queueTask = (function() { var execTask, taskChannel, taskQueue; + taskQueue = []; execTask = function() { var args, func, task; + task = taskQueue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -690,6 +710,7 @@ $.globalEval = function(code) { var script; + script = $.el('script', { textContent: code }); @@ -699,6 +720,7 @@ $.bytesToString = function(size) { var unit; + unit = 0; while (size >= 1024) { size /= 1024; @@ -714,6 +736,7 @@ $.item = function(key, val) { var item; + item = {}; item[key] = val; return item; @@ -724,6 +747,7 @@ $.sync = (function() { $.on(window, 'storage', function(e) { var cb; + if (cb = $.syncing[e.key]) { return cb(JSON.parse(e.newValue)); } @@ -735,6 +759,7 @@ $["delete"] = function(keys) { var key, _i, _len; + if (!(keys instanceof Array)) { keys = [keys]; } @@ -748,6 +773,7 @@ $.get = function(key, val, cb) { var items; + if (typeof cb === 'function') { items = $.item(key, val); } else { @@ -766,6 +792,7 @@ $.set = (function() { var set; + set = function(key, val) { key = g.NAMESPACE + key; val = JSON.stringify(val); @@ -776,6 +803,7 @@ }; return function(keys, val) { var key; + if (typeof keys === 'string') { set(keys, val); return; @@ -843,6 +871,7 @@ function Post(root, thread, board, that) { var capcode, date, email, flag, info, name, post, subject, tripcode, uniqueID; + this.thread = thread; this.board = board; if (that == null) { @@ -918,6 +947,7 @@ Post.prototype.parseComment = function() { var bq, i, node, nodes, text; + bq = this.nodes.comment.cloneNode(true); nodes = $$('.abbr, .capcodeReplies, .exif, b', bq); i = 0; @@ -935,6 +965,7 @@ Post.prototype.parseQuotes = function() { var quotelink, _i, _len, _ref; + this.quotes = []; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -945,6 +976,7 @@ Post.prototype.parseQuote = function(quotelink) { var fullID, match; + if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/res\/\d+#p(\d+)$/))) { return; } @@ -960,6 +992,7 @@ Post.prototype.parseFile = function(that) { var alt, anchor, fileEl, fileInfo, size, thumb, unit; + if (!((fileEl = $('.file', this.nodes.post)) && (thumb = $('img[data-md5]', fileEl)))) { return; } @@ -990,6 +1023,7 @@ Post.prototype.kill = function(file, now) { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; + now || (now = new Date()); if (file) { if (this.file.isDead) { @@ -1038,6 +1072,7 @@ Post.prototype.resurrect = function() { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; + delete this.isDead; delete this.timeOfDeath; $.rmClass(this.nodes.root, 'deleted-post'); @@ -1071,6 +1106,7 @@ Post.prototype.rmClone = function(index) { var clone, _i, _len, _ref; + this.clones.splice(index, 1); _ref = this.clones.slice(index); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1088,6 +1124,7 @@ function Clone(origin, context) { var file, info, inline, inlined, key, nodes, post, root, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + this.origin = origin; this.context = context; _ref = ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']; @@ -1175,6 +1212,7 @@ function DataBoard(key, sync, dontClean) { var init, _this = this; + this.key = key; this.data = Conf[key]; $.sync(key, this.onSync.bind(this)); @@ -1197,6 +1235,7 @@ DataBoard.prototype["delete"] = function(_arg) { var boardID, postID, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; if (postID) { delete this.data.boards[boardID][threadID][postID]; @@ -1217,6 +1256,7 @@ DataBoard.prototype.deleteIfEmpty = function(_arg) { var boardID, threadID; + boardID = _arg.boardID, threadID = _arg.threadID; if (threadID) { if (!Object.keys(this.data.boards[boardID][threadID]).length) { @@ -1232,6 +1272,7 @@ DataBoard.prototype.set = function(_arg) { var boardID, postID, threadID, val, _base, _base1, _base2; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, val = _arg.val; if (postID !== void 0) { ((_base = ((_base1 = this.data.boards)[boardID] || (_base1[boardID] = {})))[threadID] || (_base[threadID] = {}))[postID] = val; @@ -1245,6 +1286,7 @@ DataBoard.prototype.get = function(_arg) { var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { if (!threadID) { @@ -1268,6 +1310,7 @@ DataBoard.prototype.clean = function() { var boardID, now, val, _ref; + _ref = this.data.boards; for (boardID in _ref) { val = _ref[boardID]; @@ -1287,8 +1330,10 @@ DataBoard.prototype.ajaxClean = function(boardID) { var _this = this; + return $.cache("//api.4chan.org/" + boardID + "/threads.json", function(e) { var board, page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; + if (e.target.status === 404) { _this["delete"](boardID); } else if (e.target.status === 200) { @@ -1376,8 +1421,10 @@ }, toBlob: function() { var _base; + return (_base = HTMLCanvasElement.prototype).toBlob || (_base.toBlob = function(cb) { var data, i, l, ui8a, _i; + data = atob(this.toDataURL().slice(22)); l = data.length; ui8a = new Uint8Array(l); @@ -1415,6 +1462,7 @@ init: function() { var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, _this = this; + this.menu = new UI.Menu('header'); this.menuButton = $.el('span', { className: 'menu-button', @@ -1505,6 +1553,7 @@ }); return $.ready(function() { var a, cs; + _this.footer = $.id('boardNavDesktopFoot'); if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) { a.className = 'current'; @@ -1538,6 +1587,7 @@ }), setBoardList: function() { var a, boardList, btn, fourchannav, fullBoardList; + fourchannav = $.id('boardNavDesktop'); if (a = $("a[href*='/" + g.BOARD + "/']", fourchannav)) { a.className = 'current'; @@ -1559,6 +1609,7 @@ }, generateBoardList: function(text) { var as, list, nodes; + list = $('#custom-board-list', Header.bar); $.rmAll(list); if (!text) { @@ -1567,6 +1618,7 @@ as = $$('#full-board-list a[title]', Header.bar); nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+")|\,"[^"]+[^"]"))*|[^\w@]+/g).map(function(t) { var a, board, m, _i, _len; + if (/^[^\w@]/.test(t)) { return $.tn(t); } @@ -1617,6 +1669,7 @@ }, toggleBoardList: function() { var bar, custom, full, showBoardList; + bar = Header.bar; custom = $('#custom-board-list', bar); full = $('#full-board-list', bar); @@ -1652,6 +1705,7 @@ }, toggleLinkJustify: function() { var centered; + $.event('CloseMenu'); centered = this.nodeName === 'INPUT' ? this.checked : void 0; Header.setLinkJustify(centered); @@ -1681,6 +1735,7 @@ }, toggleBarVisibility: function(e) { var hide, message; + if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -1697,6 +1752,7 @@ }, toggleFooterVisibility: function() { var hide, message; + $.event('CloseMenu'); hide = this.nodeName === 'INPUT' ? this.checked : !!Header.footer.hidden; Header.setFooterVisibility(hide); @@ -1706,6 +1762,7 @@ }, setCustomNav: function(show) { var btn, cust, full, _ref; + Header.customNavToggler.checked = show; cust = $('#custom-board-list', Header.bar); full = $('#full-board-list', Header.bar); @@ -1718,12 +1775,14 @@ }, editCustomNav: function() { var settings; + Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=boardnav]', settings).focus(); }, hashScroll: function() { var hash, post; + if (!((hash = this.location.hash.slice(1)) && (post = $.id(hash)))) { return; } @@ -1734,6 +1793,7 @@ }, scrollToPost: function(post) { var headRect, top; + top = post.getBoundingClientRect().top; if (Conf['Fixed Header'] && !Conf['Bottom Header']) { headRect = Header.bar.getBoundingClientRect(); @@ -1743,6 +1803,7 @@ }, addShortcut: function(el) { var shortcut; + shortcut = $.el('span', { className: 'shortcut fourchanx-link' }); @@ -1754,6 +1815,7 @@ }, createNotification: function(e) { var cb, content, lifetime, notif, type, _ref; + _ref = e.detail, type = _ref.type, content = _ref.content, lifetime = _ref.lifetime, cb = _ref.cb; notif = new Notification(type, content, lifetime); if (cb) { @@ -1766,6 +1828,7 @@ spoilerRange: {}, shortFilename: function(filename, isReply) { var threshold; + threshold = isReply ? 30 : 40; if (filename.length - 4 > threshold) { return "" + filename.slice(0, threshold - 5) + "(...)." + filename.slice(-3); @@ -1775,6 +1838,7 @@ }, postFromObject: function(data, boardID) { var o; + o = { postID: data.no, threadID: data.resto || data.no, @@ -1819,6 +1883,7 @@ */ var a, boardID, capcode, capcodeClass, capcodeReplies, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; + postID = o.postID, threadID = o.threadID, boardID = o.boardID, name = o.name, capcode = o.capcode, tripcode = o.tripcode, uniqueID = o.uniqueID, email = o.email, subject = o.subject, flagCode = o.flagCode, flagName = o.flagName, date = o.date, dateUTC = o.dateUTC, isSticky = o.isSticky, isClosed = o.isClosed, comment = o.comment, capcodeReplies = o.capcodeReplies, file = o.file; isOP = postID === threadID; staticPath = '//static.4chan.org/image/'; @@ -1896,7 +1961,7 @@ container = $.el('div', { id: "pc" + postID, className: "postContainer " + (isOP ? 'op' : 'reply') + "Container", - innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" + innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" }); _ref = $$('.quotelink', container); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1917,6 +1982,7 @@ }, capcodeReplies: function(_arg) { var array, boardID, bq, capcodeReplies, capcodeType, generateCapcodeReplies, html, root, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, bq = _arg.bq, root = _arg.root, capcodeReplies = _arg.capcodeReplies; if (!capcodeReplies) { return; @@ -1953,6 +2019,7 @@ Get = { threadExcerpt: function(thread) { var OP, excerpt, _ref; + OP = thread.OP; excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); if (excerpt.length > 70) { @@ -1965,6 +2032,7 @@ }, postFromRoot: function(root) { var boardID, index, link, post, postID; + link = $('a[title="Highlight this post"]', root); boardID = link.pathname.split('/')[1]; postID = link.hash.slice(2); @@ -1984,6 +2052,7 @@ }, postDataFromLink: function(link) { var boardID, path, postID, threadID, _ref; + if (link.hostname === 'boards.4chan.org') { path = link.pathname.split('/'); boardID = path[1]; @@ -2001,6 +2070,7 @@ }, allQuotelinksLinkingTo: function(post) { var ID, quote, quotedPost, quotelinks, quoterPost, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + quotelinks = []; _ref = g.posts; for (ID in _ref) { @@ -2029,12 +2099,14 @@ } return quotelinks.filter(function(quotelink) { var boardID, postID, _ref4; + _ref4 = Get.postDataFromLink(quotelink), boardID = _ref4.boardID, postID = _ref4.postID; return boardID === post.board.ID && postID === post.ID; }); }, postClone: function(boardID, threadID, postID, root, context) { var post, url; + if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2057,6 +2129,7 @@ }, insert: function(post, root, context) { var clone, nodes; + if (!root.parentNode) { return; } @@ -2070,6 +2143,7 @@ }, fetchedPost: function(req, boardID, threadID, postID, root, context) { var board, post, posts, status, thread, url, _i, _len; + if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2123,6 +2197,7 @@ }, archivedPost: function(req, boardID, postID, root, context) { var board, bq, comment, data, o, post, thread, threadID, _ref; + if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2217,8 +2292,10 @@ UI = (function() { var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove; + dialog = function(id, position, html) { var child, el, move, _i, _len, _ref; + el = $.el('div', { className: 'dialog', innerHTML: html, @@ -2258,6 +2335,7 @@ Menu.prototype.makeMenu = function() { var menu; + menu = $.el('div', { className: 'dialog', id: 'menu', @@ -2272,6 +2350,7 @@ Menu.prototype.toggle = function(e, button, data) { var previousButton; + e.preventDefault(); e.stopPropagation(); if (currentMenu) { @@ -2289,6 +2368,7 @@ Menu.prototype.open = function(button, data) { var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2; + menu = this.makeMenu(); currentMenu = menu; lastToggledButton = button; @@ -2327,6 +2407,7 @@ Menu.prototype.insertEntry = function(entry, parent, data) { var subEntry, submenu, _i, _len, _ref; + if (typeof entry.open === 'function') { if (!entry.open(data)) { return; @@ -2360,6 +2441,7 @@ Menu.prototype.findNextEntry = function(entry, direction) { var entries; + entries = __slice.call(entry.parentNode.children); entries.sort(function(first, second) { return +(first.style.order || first.style.webkitOrder) - +(second.style.order || second.style.webkitOrder); @@ -2369,6 +2451,7 @@ Menu.prototype.keybinds = function(e) { var entry, next, nextPrev, subEntry, submenu; + entry = $('.focused', currentMenu); while (subEntry = $('.focused', entry)) { entry = subEntry; @@ -2414,6 +2497,7 @@ Menu.prototype.focus = function(entry) { var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; + while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2441,6 +2525,7 @@ Menu.prototype.addEntry = function(e) { var entry; + entry = e.detail; if (entry.type !== this.type) { return; @@ -2451,6 +2536,7 @@ Menu.prototype.parseEntry = function(entry) { var el, style, subEntries, subEntry, _i, _len; + el = entry.el, subEntries = entry.subEntries; $.addClass(el, 'entry'); $.on(el, 'focus mouseover', (function(e) { @@ -2474,6 +2560,7 @@ })(); dragstart = function(e) { var el, isTouching, o, rect, screenHeight, screenWidth, _ref; + if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -2512,6 +2599,7 @@ }; touchmove = function(e) { var touch, _i, _len, _ref; + _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2523,6 +2611,7 @@ }; drag = function(e) { var bottom, clientX, clientY, left, right, style, top; + clientX = e.clientX, clientY = e.clientY; left = clientX - this.dx; left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%'; @@ -2538,6 +2627,7 @@ }; touchend = function(e) { var touch, _i, _len, _ref; + _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2559,6 +2649,7 @@ }; hoverstart = function(_arg) { var asapTest, cb, el, endEvents, latestEvent, o, root; + root = _arg.root, el = _arg.el, latestEvent = _arg.latestEvent, endEvents = _arg.endEvents, asapTest = _arg.asapTest, cb = _arg.cb; o = { root: root, @@ -2593,6 +2684,7 @@ }; hover = function(e) { var clientX, clientY, height, left, right, style, top, _ref; + this.latestEvent = e; height = this.el.offsetHeight; clientX = e.clientX, clientY = e.clientY; @@ -2636,6 +2728,7 @@ }, node: function() { var email, name, tripcode, _ref; + if (this.info.capcode || this.isClone) { return; } @@ -2662,6 +2755,7 @@ filters: {}, init: function() { var boards, err, filter, hl, key, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4; + if (g.VIEW === 'catalog' || !Conf['Filter']) { return; } @@ -2698,6 +2792,7 @@ op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'yes'; stub = (function() { var _ref3; + switch ((_ref3 = filter.match(/stub:(yes|no)/)) != null ? _ref3[1] : void 0) { case 'yes': return true; @@ -2728,6 +2823,7 @@ }, createFilter: function(regexp, op, stub, hl, top) { var settings, test; + test = typeof regexp === 'string' ? function(value) { return regexp === value; } : function(value) { @@ -2751,6 +2847,7 @@ }, node: function() { var filter, firstThread, key, result, thisThread, value, _i, _len, _ref; + if (this.isClone) { return; } @@ -2862,6 +2959,7 @@ menu: { init: function() { var div, entry, type, _i, _len, _ref; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { return; } @@ -2887,6 +2985,7 @@ }, createSubEntry: function(text, type) { var el; + el = $.el('a', { href: 'javascript:;', textContent: text @@ -2897,6 +2996,7 @@ el: el, open: function(post) { var value; + value = Filter[type](post); return value !== false; } @@ -2904,6 +3004,7 @@ }, makeFilter: function() { var re, type, value; + type = this.dataset.type; value = Filter[type](Filter.menu.post); re = ['uniqueID', 'MD5'].contains(type) ? value : value.replace(/\/|\\|\^|\$|\n|\.|\(|\)|\{|\}|\[|\]|\?|\*|\+|\|/g, function(c) { @@ -2918,6 +3019,7 @@ re = ['uniqueID', 'MD5'].contains(type) ? "/" + re + "/" : "/^" + re + "$/"; return $.get(type, Conf[type], function(item) { var save, section, select, ta, tl; + save = item[type]; save = save ? "" + save + "\n" + re : re; $.set(type, save); @@ -2951,6 +3053,7 @@ }, node: function() { var data; + if (!this.isReply || this.isClone) { return; } @@ -2974,6 +3077,7 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub, replies, thisPost; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { return; } @@ -3044,6 +3148,7 @@ order: 20, open: function(post) { var data; + if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3075,6 +3180,7 @@ order: 15, open: function(post) { var data; + if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3091,6 +3197,7 @@ }, hide: function() { var makeStub, parent, post, replies, thisPost; + parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3109,6 +3216,7 @@ }, show: function() { var data, parent, post, replies, thisPost; + parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3132,6 +3240,7 @@ }, hideStub: function() { var post; + post = PostHiding.menu.post; post.nodes.root.hidden = true; $.event('CloseMenu'); @@ -3139,6 +3248,7 @@ }, makeButton: function(post, type) { var a; + a = $.el('a', { className: "" + type + "-reply-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3149,6 +3259,7 @@ }, saveHiddenState: function(post, isHiding, thisPost, makeStub, hideRecursively) { var data; + data = { boardID: post.board.ID, threadID: post.thread.ID, @@ -3167,12 +3278,14 @@ }, toggle: function() { var post; + post = Get.postFromNode(this); PostHiding[(post.isHidden ? 'show' : 'hide')](post); return PostHiding.saveHiddenState(post, post.isHidden); }, hide: function(post, makeStub, hideRecursively) { var a, button, postInfo, quotelink, _i, _len, _ref; + if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3207,6 +3320,7 @@ }, show: function(post, showRecursively) { var quotelink, _i, _len, _ref; + if (showRecursively == null) { showRecursively = Conf['Recursive Hiding']; } @@ -3242,6 +3356,7 @@ }, node: function() { var i, obj, quote, recursive, _i, _j, _len, _len1, _ref, _ref1; + if (this.isClone) { return; } @@ -3259,6 +3374,7 @@ }, add: function() { var args, obj, post, recursive, _base, _name; + recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; obj = (_base = Recursive.recursives)[_name = post.fullID] || (_base[_name] = { recursives: [], @@ -3269,6 +3385,7 @@ }, rm: function(recursive, post) { var i, obj, rec, _i, _len, _ref; + if (!(obj = Recursive.recursives[post.fullID])) { return; } @@ -3283,6 +3400,7 @@ }, apply: function() { var ID, args, fullID, post, recursive, _ref; + recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; fullID = post.fullID; _ref = g.posts; @@ -3309,6 +3427,7 @@ }, node: function() { var data; + if (data = ThreadHiding.db.get({ boardID: this.board.ID, threadID: this.ID @@ -3322,6 +3441,7 @@ }, syncCatalog: function() { var hiddenThreads, hiddenThreadsOnCatalog, threadID; + hiddenThreads = ThreadHiding.db.get({ boardID: g.BOARD.ID, defaultValue: {} @@ -3348,6 +3468,7 @@ cleanCatalog: function(hiddenThreadsOnCatalog) { return $.cache("//api.4chan.org/" + g.BOARD + "/threads.json", function() { var page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; + if (this.status !== 200) { return; } @@ -3373,6 +3494,7 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub; + if (g.VIEW !== 'index' || !Conf['Menu'] || !Conf['Thread Hiding Link']) { return; } @@ -3394,6 +3516,7 @@ order: 20, open: function(_arg) { var isReply, thread; + thread = _arg.thread, isReply = _arg.isReply; if (isReply || thread.isHidden) { return false; @@ -3423,6 +3546,7 @@ order: 20, open: function(_arg) { var isReply, thread; + thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3442,6 +3566,7 @@ order: 15, open: function(_arg) { var isReply, thread; + thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3452,6 +3577,7 @@ }, hide: function() { var makeStub, thread; + makeStub = $('input', this.parentNode).checked; thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, makeStub); @@ -3460,6 +3586,7 @@ }, show: function() { var thread; + thread = ThreadHiding.menu.thread; ThreadHiding.show(thread); ThreadHiding.saveHiddenState(thread); @@ -3467,6 +3594,7 @@ }, hideStub: function() { var thread; + thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, false); $.event('CloseMenu'); @@ -3474,6 +3602,7 @@ }, makeButton: function(thread, type) { var a; + a = $.el('a', { className: "" + type + "-thread-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3485,6 +3614,7 @@ }, saveHiddenState: function(thread, makeStub) { var hiddenThreadsOnCatalog; + hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem("4chan-hide-t-" + g.BOARD)) || {}; if (thread.isHidden) { ThreadHiding.db.set({ @@ -3517,6 +3647,7 @@ }, hide: function(thread, makeStub) { var OP, a, button, numReplies, opInfo, span, threadRoot; + if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3540,6 +3671,7 @@ }, show: function(thread) { var threadRoot; + if (thread.stub) { $.rm(thread.stub); delete thread.stub; @@ -3552,6 +3684,7 @@ QuoteBacklink = { init: function() { var format; + if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { return; } @@ -3569,6 +3702,7 @@ }, firstNode: function() { var a, clone, container, containers, frag, link, post, quote, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; + if (this.isClone || !this.quotes.length) { return; } @@ -3606,6 +3740,7 @@ }, secondNode: function() { var container; + if (this.isClone && (this.origin.isReply || Conf['OP Backlinks'])) { this.nodes.backlinkContainer = $('.container', this.nodes.info); return; @@ -3619,6 +3754,7 @@ }, getContainer: function(id) { var _base; + return (_base = this.containers)[id] || (_base[id] = $.el('span', { className: 'container' })); @@ -3641,6 +3777,7 @@ }, node: function() { var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; + if (this.isClone && this.thread === this.context.thread) { return; } @@ -3673,6 +3810,7 @@ if (Conf['Quote Hash Navigation']) { this.node = function() { var link, _i, _len, _ref; + _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3685,6 +3823,7 @@ } else { this.node = function() { var link, _i, _len, _ref; + _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3711,6 +3850,7 @@ }, toggle: function(e) { var boardID, context, postID, threadID, _ref; + if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) { return; } @@ -3736,6 +3876,7 @@ }, add: function(quotelink, boardID, threadID, postID, context) { var inline, isBacklink, post, qroot, root; + isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, @@ -3760,6 +3901,7 @@ }, rm: function(quotelink, boardID, threadID, postID, context) { var el, inlined, isBacklink, post, qroot, root, _ref; + isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); @@ -3801,6 +3943,7 @@ }, node: function() { var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; + if (this.isClone && this.thread === this.context.thread) { return; } @@ -3843,6 +3986,7 @@ }, node: function() { var link, _i, _len, _ref; + _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3851,6 +3995,7 @@ }, mouseover: function(e) { var boardID, clone, origin, post, postID, posts, qp, quote, quoterID, threadID, _i, _j, _len, _len1, _ref, _ref1; + if ($.hasClass(this, 'inlined')) { return; } @@ -3894,6 +4039,7 @@ }, mouseout: function() { var clone, post, root, _i, _len, _ref; + if (!(root = this.el.firstElementChild)) { return; } @@ -3923,6 +4069,7 @@ }, node: function() { var boardID, postID, quotelink, _i, _len, _ref, _ref1, _ref2; + if (this.isClone) { return; } @@ -3945,6 +4092,7 @@ QuoteThreading = { init: function() { var input; + if (!(Conf['Quote Threading'] && g.VIEW === 'thread')) { return; } @@ -3967,6 +4115,7 @@ }, setup: function() { var ID, post, posts; + $.off(d, '4chanXInitFinished', QuoteThreading.setup); posts = g.posts; for (ID in posts) { @@ -3979,6 +4128,7 @@ }, node: function() { var ID, fullID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _len; + if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) { return; } @@ -4008,6 +4158,7 @@ }, nodeinsert: function() { var bottom, height, qpost, qroot, threadContainer, top, _ref; + qpost = g.posts[this.threaded]; delete this.threaded; delete this.cb; @@ -4036,6 +4187,7 @@ }, toggle: function() { var container, containers, node, post, replies, reply, thread, _i, _j, _k, _len, _len1, _len2, _ref; + thread = $('.thread'); replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread); QuoteThreading.enabled = this.checked; @@ -4052,6 +4204,7 @@ } else { replies.sort(function(a, b) { var aID, bID; + aID = Number(a.id.slice(2)); bID = Number(b.id.slice(2)); return aID - bID; @@ -4072,6 +4225,7 @@ }, kb: function() { var control; + control = $.id('threadingControl'); return control.click(); } @@ -4098,6 +4252,7 @@ }, node: function() { var quotelink, _i, _len, _ref; + if (this.isClone) { return; } @@ -4120,6 +4275,7 @@ cb: { seek: function(type) { var highlight, post, posts, result, str; + if (!(Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { return; } @@ -4175,6 +4331,7 @@ }, node: function() { var deadlink, _i, _len, _ref; + _ref = $$('.deadlink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; @@ -4189,6 +4346,7 @@ }, parseDeadlink: function(deadlink) { var a, boardID, m, post, postID, quote, quoteID, redirect, _ref; + if (deadlink.parentNode.className === 'prettyprint') { Quotify.fixDeadlink(deadlink); return; @@ -4281,6 +4439,7 @@ }, node: function() { var data, el, end, endNode, i, index, items, lIndex, length, link, links, node, range, result, saved, snapshot, space, test, text, _i, _len, _ref; + if (this.isClone) { if (Conf['Embedding']) { i = 0; @@ -4363,6 +4522,7 @@ }, makeRange: function(startNode, endNode, startOffset, endOffset) { var range; + range = document.createRange(); range.setStart(startNode, startOffset); range.setEnd(endNode, endOffset); @@ -4370,6 +4530,7 @@ }, makeLink: function(_arg) { var a, range, text; + range = _arg[0], text = _arg[1]; text; text = text.contains(':') ? text : (text.contains('@') ? 'mailto:' : 'http://') + text; @@ -4385,6 +4546,7 @@ }, services: function(link) { var href, key, match, type, _ref; + href = link.href; _ref = Linkify.types; for (key in _ref) { @@ -4397,6 +4559,7 @@ }, embed: function(data) { var embed, href, key, link, name, options, uid, value, _ref; + key = data[0], uid = data[1], options = data[2], link = data[3]; href = link.href; embed = $.el('a', { @@ -4425,6 +4588,7 @@ }, title: function(data) { var embed, err, key, link, options, service, title, titles, uid; + key = data[0], uid = data[1], options = data[2], link = data[3], embed = data[4]; if (!(service = Linkify.types[key].title)) { return; @@ -4461,18 +4625,21 @@ cb: { toggle: function() { var string, _ref; + _ref = $.hasClass(this, "embedded") ? ['unembed', '(embed)'] : ['embed', '(unembed)'], string = _ref[0], this.textContent = _ref[1]; $.replace(this.previousElementSibling, Linkify.cb[string](this)); return $.toggleClass(this, 'embedded'); }, embed: function(a) { var el, style, type; + el = (type = Linkify.types[a.dataset.key]).el(a); el.style.cssText = (style = type.style) ? style : "border: 0; width: 640px; height: 390px"; return el; }, unembed: function(a) { var el; + el = $.el('a', { rel: 'nofollow noreferrer', target: 'blank', @@ -4485,6 +4652,7 @@ }, title: function(response, data) { var embed, key, link, options, service, text, uid; + key = data[0], uid = data[1], options = data[2], link = data[3], embed = data[4]; service = Linkify.types[key].title; switch (response.status) { @@ -4524,6 +4692,7 @@ regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function(a) { var div; + return div = $.el('iframe', { src: "http://www.purplegene.com/script?url=https://gist.github.com/" + a.dataset.uid + ".js" }); @@ -4534,6 +4703,7 @@ }, text: function(_arg) { var file, files; + files = _arg.files; for (file in files) { if (files.hasOwnProperty(file)) { @@ -4581,6 +4751,7 @@ regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/, el: function(a) { var div; + return div = $.el('iframe', { src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid }); @@ -4591,6 +4762,7 @@ style: 'height: auto; width: 500px; display: inline-block;', el: function(a) { var div; + div = $.el('div', { className: "soundcloud", name: "soundcloud" @@ -4616,6 +4788,7 @@ style: "border: none; width: 640px; height: 360px;", el: function(a) { var channel, chapter, result, _; + if (result = /(\w+)\/(?:[a-z]\/)?(\d+)/i.exec(a.dataset.uid)) { _ = result[0], channel = result[1], chapter = result[2]; return $.el('object', { @@ -4687,6 +4860,7 @@ QR = { init: function() { var sc; + if (!Conf['Quick Reply']) { return; } @@ -4733,6 +4907,7 @@ }, initReady: function() { var link; + QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; @@ -4752,11 +4927,13 @@ $.before($.id('postForm'), link); $.on(d, 'QRGetSelectedPost', function(_arg) { var cb; + cb = _arg.detail; return cb(QR.selected); }); $.on(d, 'QRAddPreSubmitHook', function(_arg) { var cb; + cb = _arg.detail; return QR.preSubmitHooks.push(cb); }); @@ -4785,6 +4962,7 @@ }, open: function() { var err; + if (QR.nodes) { QR.nodes.el.hidden = false; QR.unhide(); @@ -4803,6 +4981,7 @@ }, close: function() { var post, _i, _len, _ref; + if (QR.req) { QR.abort(); return; @@ -4850,6 +5029,7 @@ }, error: function(err) { var el; + QR.open(); if (typeof err === 'string') { el = $.tn(err); @@ -4877,6 +5057,7 @@ notifications: [], cleanNotifications: function() { var notification, _i, _len, _ref; + _ref = QR.notifications; for (_i = 0, _len = _ref.length; _i < _len; _i++) { notification = _ref[_i]; @@ -4886,6 +5067,7 @@ }, status: function() { var disabled, status, thread, value; + if (!QR.nodes) { return; } @@ -4907,6 +5089,7 @@ QR.persona.getPassword(); return $.get('QR.personas', Conf['QR.personas'], function(_arg) { var arr, item, personas, type, types, _i, _len, _ref; + personas = _arg['QR.personas']; types = { name: [], @@ -4926,6 +5109,7 @@ }, parseItem: function(item, types) { var boards, match, type, val, _ref, _ref1; + if (item[0] === '#') { return; } @@ -4954,6 +5138,7 @@ }, loadPersonas: function(type, arr) { var list, val, _i, _len; + list = $("#list-" + type, QR.nodes.el); for (_i = 0, _len = arr.length; _i < _len; _i++) { val = arr[_i]; @@ -4966,6 +5151,7 @@ }, getPassword: function() { var input, m; + if (!QR.persona.pwd) { QR.persona.pwd = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : (input = $.id('postPassword')) ? input.value : $.id('delPassword').value; } @@ -4974,6 +5160,7 @@ get: function(cb) { return $.get('QR.persona', {}, function(_arg) { var persona; + persona = _arg['QR.persona']; return cb(persona); }); @@ -4981,6 +5168,7 @@ set: function(post) { return $.get('QR.persona', {}, function(_arg) { var persona; + persona = _arg['QR.persona']; persona = { name: post.name, @@ -4994,6 +5182,7 @@ cooldown: { init: function() { var board; + if (!Conf['Cooldown']) { return; } @@ -5035,6 +5224,7 @@ }, sync: function(cooldowns) { var id; + for (id in cooldowns) { QR.cooldown.cooldowns[id] = cooldowns[id]; } @@ -5042,6 +5232,7 @@ }, set: function(data) { var cooldown, delay, hasFile, isReply, isSage, post, req, start, type, upSpd; + if (!Conf['Cooldown']) { return; } @@ -5081,6 +5272,7 @@ }, count: function() { var cooldown, cooldowns, elapsed, hasFile, isReply, isSage, now, post, seconds, start, type, types, upSpd, upSpdAccuracy, update, _ref; + if (!Object.keys(QR.cooldown.cooldowns).length) { $["delete"]("" + g.BOARD + ".cooldown"); delete QR.cooldown.isCounting; @@ -5134,6 +5326,7 @@ }, quote: function(e) { var caretPos, com, index, post, range, s, sel, text, thread, _ref; + if (e != null) { e.preventDefault(); } @@ -5171,6 +5364,7 @@ }, characterCount: function() { var count, counter; + counter = QR.nodes.charCount; count = QR.nodes.com.textLength; counter.textContent = count; @@ -5179,6 +5373,7 @@ }, drag: function(e) { var toggle; + toggle = e.type === 'dragstart' ? $.off : $.on; toggle(d, 'dragover', QR.dragOver); return toggle(d, 'drop', QR.dropFile); @@ -5198,6 +5393,7 @@ }, paste: function(e) { var blob, files, item, _i, _len, _ref; + files = []; _ref = e.clipboardData.items; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -5225,6 +5421,7 @@ }, fileInput: function(files) { var file, length, max, post, _i, _len; + if (files instanceof Event) { files = __slice.call(this.files); QR.nodes.fileInput.value = null; @@ -5273,6 +5470,7 @@ function _Class(select) { var el, elm, event, prev, _i, _j, _len, _len1, _ref, _ref1, _this = this; + el = $.el('a', { className: 'qr-preview', draggable: true, @@ -5332,6 +5530,7 @@ _Class.prototype.rm = function() { var index; + this["delete"](); index = QR.posts.indexOf(this); if (QR.posts.length === 1) { @@ -5351,6 +5550,7 @@ _Class.prototype.lock = function(lock) { var name, _i, _len, _ref; + if (lock == null) { lock = true; } @@ -5375,6 +5575,7 @@ _Class.prototype.select = function() { var rectEl, rectList; + if (QR.selected) { QR.selected.nodes.el.id = null; QR.selected.forceSave(); @@ -5391,6 +5592,7 @@ _Class.prototype.load = function() { var name, _i, _len, _ref; + _ref = ['thread', 'name', 'email', 'sub', 'com']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; @@ -5402,6 +5604,7 @@ _Class.prototype.save = function(input) { var name, _ref; + if (input.type === 'checkbox') { this.spoiler = input.checked; return; @@ -5422,6 +5625,7 @@ _Class.prototype.forceSave = function() { var name, _i, _len, _ref; + if (this !== QR.selected) { return; } @@ -5451,9 +5655,11 @@ _Class.prototype.setThumbnail = function() { var fileURL, img, _this = this; + img = $.el('img'); img.onload = function() { var cv, height, s, width; + s = 90 * 2; if (_this.file.type === 'image/gif') { s *= 3; @@ -5511,9 +5717,11 @@ _Class.prototype.pasteText = function(file) { var reader, _this = this; + reader = new FileReader(); reader.onload = function(e) { var text; + text = e.target.result; if (_this.com) { _this.com += "\n" + text; @@ -5551,6 +5759,7 @@ _Class.prototype.drop = function() { var el, index, newIndex, oldIndex, post; + $.rmClass(this, 'over'); if (!this.draggable) { return; @@ -5585,6 +5794,7 @@ ready: function() { var imgContainer, input, setLifetime, _this = this; + setLifetime = function(e) { return _this.lifetime = e.detail; }; @@ -5621,6 +5831,7 @@ }); $.get('captchas', [], function(_arg) { var captchas; + captchas = _arg.captchas; return _this.sync(captchas); }); @@ -5637,6 +5848,7 @@ }, getOne: function() { var captcha, challenge, response; + this.clear(); if (captcha = this.captchas.shift()) { challenge = captcha.challenge, response = captcha.response; @@ -5661,6 +5873,7 @@ }, save: function() { var response; + if (!(response = this.nodes.input.value.trim())) { return; } @@ -5675,6 +5888,7 @@ }, clear: function() { var captcha, i, now, _i, _len, _ref; + now = Date.now(); _ref = this.captchas; for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { @@ -5692,6 +5906,7 @@ }, load: function() { var challenge; + if (!this.nodes.challenge.firstChild) { return; } @@ -5704,6 +5919,7 @@ }, count: function() { var count; + count = this.captchas.length; this.nodes.input.placeholder = (function() { switch (count) { @@ -5736,6 +5952,7 @@ }, dialog: function() { var dialog, elm, i, items, mimeTypes, name, nodes, thread; + dialog = UI.dialog('qr', 'top:0;right:0;', "
×
No selected file×+
"); QR.nodes = nodes = { el: dialog, @@ -5854,6 +6071,7 @@ preSubmitHooks: [], submit: function(e) { var challenge, err, extra, filetag, hook, options, post, postData, response, textOnly, thread, threadID, _i, _len, _ref, _ref1; + if (e != null) { e.preventDefault(); } @@ -5967,6 +6185,7 @@ }, response: function() { var URL, ban, board, err, h1, isReply, m, post, postID, req, resDoc, threadID, _, _ref, _ref1; + req = QR.req; delete QR.req; post = QR.posts[0]; @@ -6064,6 +6283,7 @@ FappeTyme = { init: function() { var el, input; + if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { return; } @@ -6115,6 +6335,7 @@ }, node: function() { var thumb, _ref; + if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6139,6 +6360,7 @@ }, toggleAll: function() { var ID, file, func, post, _i, _len, _ref, _ref1; + $.event('CloseMenu'); if (ImageExpand.on = $.hasClass(ImageExpand.EAI, 'expand-all-shortcut')) { ImageExpand.EAI.className = 'contract-all-shortcut'; @@ -6172,6 +6394,7 @@ }, toggle: function(post) { var headRect, rect, root, thumb, x, y; + thumb = post.file.thumb; if (!(post.file.isExpanded || $.hasClass(thumb, 'expanding'))) { ImageExpand.expand(post); @@ -6181,6 +6404,7 @@ root = post.nodes.root; rect = (Conf['Advance on contract'] ? (function() { var next; + next = root; while (next = $.x("following::div[contains(@class,'postContainer')][1]", next)) { if ($('.stub', next) || next.offsetHeight === 0) { @@ -6211,6 +6435,7 @@ }, expand: function(post, src) { var img, thumb; + thumb = post.file.thumb; if (post.isHidden || post.file.isExpanded || $.hasClass(thumb, 'expanding')) { return; @@ -6238,6 +6463,7 @@ }, completeExpand: function(post) { var prev, thumb; + thumb = post.file.thumb; if (!$.hasClass(thumb, 'expanding')) { return; @@ -6251,6 +6477,7 @@ prev = post.nodes.root.getBoundingClientRect(); return $.queueTask(function() { var curr; + $.addClass(post.nodes.root, 'expanded-image'); $.rmClass(post.file.thumb, 'expanding'); if (!(prev.top + prev.height <= 0)) { @@ -6262,6 +6489,7 @@ }, error: function() { var URL, post, src, timeoutID; + post = Get.postFromNode(this); $.rm(this); delete post.file.fullImage; @@ -6287,6 +6515,7 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; + if (this.status !== 200) { return; } @@ -6310,6 +6539,7 @@ menu: { init: function() { var conf, createSubEntry, el, name, subEntries, _ref; + if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { return; } @@ -6333,6 +6563,7 @@ }, createSubEntry: function(name, desc) { var input, label; + label = $.el('label', { innerHTML: " " + name, title: desc @@ -6366,6 +6597,7 @@ }, node: function() { var _ref; + if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6373,6 +6605,7 @@ }, mouseover: function(e) { var el, post; + post = Get.postFromNode(this); el = $.el('img', { id: 'ihover', @@ -6394,6 +6627,7 @@ error: function() { var URL, post, src, timeoutID, _this = this; + if (!doc.contains(this)) { return; } @@ -6418,6 +6652,7 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; + if (this.status !== 200) { return; } @@ -6443,6 +6678,7 @@ ImageLoader = { init: function() { var prefetch; + if (g.VIEW === 'catalog') { return; } @@ -6469,6 +6705,7 @@ }, node: function() { var URL, img, string, style, thumb, type, _ref, _ref1; + if (this.isClone || this.isHidden || this.thread.isHidden || !((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6490,6 +6727,7 @@ }, toggle: function() { var enabled, id, post, _ref; + enabled = Conf['prefetch'] = this.checked; if (enabled) { _ref = g.threads["" + g.BOARD.ID + "." + g.THREADID].posts; @@ -6513,6 +6751,7 @@ }, node: function() { var thumb, _ref; + if (this.isClone || !((_ref = this.file) != null ? _ref.isSpoiler : void 0)) { return; } @@ -6525,6 +6764,7 @@ Sauce = { init: function() { var err, link, links, _i, _len, _ref; + if (g.VIEW === 'catalog' || !Conf['Sauce']) { return; } @@ -6554,6 +6794,7 @@ }, createSauceLink: function(link) { var m, text; + link = link.replace(/%(T?URL|MD5|board)/ig, function(parameter) { switch (parameter) { case '%TURL': @@ -6574,6 +6815,7 @@ }, node: function() { var link, nodes, _i, _len, _ref; + if (this.isClone || !this.file) { return; } @@ -6590,6 +6832,7 @@ ArchiveLink = { init: function() { var div, entry, type, _i, _len, _ref; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { return; } @@ -6602,6 +6845,7 @@ order: 90, open: function(_arg) { var ID, board, thread; + ID = _arg.ID, thread = _arg.thread, board = _arg.board; return !!Redirect.to('thread', { postID: ID, @@ -6620,12 +6864,14 @@ }, createSubEntry: function(text, type) { var el, open; + el = $.el('a', { textContent: text, target: '_blank' }); open = type === 'post' ? function(_arg) { var ID, board, thread; + ID = _arg.ID, thread = _arg.thread, board = _arg.board; el.href = Redirect.to('thread', { postID: ID, @@ -6635,6 +6881,7 @@ return true; } : function(post) { var value; + value = Filter[type](post); if (!value) { return false; @@ -6657,6 +6904,7 @@ DeleteLink = { init: function() { var div, fileEl, fileEntry, postEl, postEntry; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { return; } @@ -6684,6 +6932,7 @@ el: fileEl, open: function(_arg) { var file; + file = _arg.file; if (!file || file.isDead) { return false; @@ -6699,6 +6948,7 @@ order: 40, open: function(post) { var node; + if (post.isDead || post.board.ID === 'q') { return false; } @@ -6713,6 +6963,7 @@ }, "delete": function() { var fileOnly, form, link, post; + post = DeleteLink.post; if (DeleteLink.cooldown.counting === post) { return; @@ -6742,6 +6993,7 @@ }, load: function(link, post, fileOnly, resDoc) { var msg, s; + if (resDoc.title === '4chan - Banned') { s = 'Banned!'; } else if (msg = resDoc.getElementById('errmsg')) { @@ -6762,6 +7014,7 @@ cooldown: { start: function(post, node) { var length, seconds, _ref; + if (!((_ref = QR.db) != null ? _ref.get({ boardID: post.board.ID, threadID: post.thread.ID, @@ -6795,6 +7048,7 @@ DownloadLink = { init: function() { var a; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { return; } @@ -6808,6 +7062,7 @@ order: 100, open: function(_arg) { var file; + file = _arg.file; if (!file) { return false; @@ -6822,6 +7077,7 @@ Menu = (function() { var a; + a = $.el('a', { className: 'menu-button fourchanx-link', innerHTML: '', @@ -6840,6 +7096,7 @@ }, node: function() { var button; + if (this.isClone) { button = $('.menu-button', this.nodes.info); } else { @@ -6850,6 +7107,7 @@ }, makeButton: function() { var el; + el = a.cloneNode(true); $.on(el, 'click', Menu.toggle); return el; @@ -6863,6 +7121,7 @@ ReportLink = { init: function() { var a; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { return; } @@ -6884,6 +7143,7 @@ }, report: function() { var id, post, set, url; + post = ReportLink.post; url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; id = Date.now(); @@ -6896,6 +7156,7 @@ init: function() { return $.ready(function() { var href; + Favicon.el = $('link[rel="shortcut icon"]', d.head); Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; @@ -6968,6 +7229,7 @@ init: function() { var sc, _this = this; + if (g.VIEW !== 'thread' || !Conf['Thread Stats']) { return; } @@ -6996,6 +7258,7 @@ }, node: function() { var ID, fileCount, post, postCount, _ref; + postCount = 0; fileCount = 0; _ref = this.posts; @@ -7013,6 +7276,7 @@ }, onUpdate: function(e) { var fileCount, postCount, _ref; + if (e.detail[404]) { return; } @@ -7021,6 +7285,7 @@ }, update: function(postCount, fileCount) { var fileCountEl, postCountEl, thread; + thread = ThreadStats.thread, postCountEl = ThreadStats.postCountEl, fileCountEl = ThreadStats.fileCountEl; postCountEl.textContent = postCount; fileCountEl.textContent = fileCount; @@ -7045,6 +7310,7 @@ }, onThreadsLoad: function() { var page, pages, thread, _i, _j, _len, _len1, _ref; + if (!(Conf["Page Count in Stats"] && this.status === 200)) { return; } @@ -7068,6 +7334,7 @@ init: function() { var checked, conf, el, input, name, sc, settings, subEntries, _ref, _this = this; + if (g.VIEW !== 'thread' || !Conf['Thread Updater']) { return; } @@ -7217,6 +7484,7 @@ }, interval: function() { var val; + val = +this.value; if (val < 1) { val = 1; @@ -7226,6 +7494,7 @@ }, load: function() { var klass, req, text, _ref; + req = ThreadUpdater.req; switch (req.status) { case 200: @@ -7258,6 +7527,7 @@ }, getInterval: function() { var i, j; + i = ThreadUpdater.interval; j = Math.min(ThreadUpdater.outdateCount, 10); if (!d.hidden) { @@ -7267,12 +7537,14 @@ }, intervalShortcut: function() { var settings; + Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=Interval]', settings).focus(); }, set: function(name, text, klass) { var el, node; + el = ThreadUpdater[name]; if (node = el.firstChild) { node.data = text; @@ -7285,6 +7557,7 @@ }, timeout: function() { var n; + ThreadUpdater.timeoutID = setTimeout(ThreadUpdater.timeout, 1000); if (!(n = --ThreadUpdater.seconds)) { return ThreadUpdater.update(); @@ -7297,6 +7570,7 @@ }, update: function() { var url; + if (!ThreadUpdater.online) { return; } @@ -7319,6 +7593,7 @@ }, updateThreadStatus: function(title, OP) { var icon, message, root, titleLC; + titleLC = title.toLowerCase(); if (ThreadUpdater.thread["is" + title] === !!OP[titleLC]) { return; @@ -7345,6 +7620,7 @@ }, parse: function(postObjects) { var ID, OP, count, deletedFiles, deletedPosts, files, index, key, node, num, post, postObject, posts, root, scroll, _i, _len, _ref; + OP = postObjects[0]; Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler; ThreadUpdater.updateThreadStatus('Sticky', OP); @@ -7430,6 +7706,7 @@ } $.queueTask(function() { var length, threadID; + threadID = ThreadUpdater.thread.ID; length = $$('.thread > .postContainer', ThreadUpdater.root).length; return Fourchan.parseThread(threadID, length - count, length); @@ -7450,6 +7727,7 @@ ThreadWatcher = { init: function() { var now, sc; + if (!Conf['Thread Watcher']) { return; } @@ -7482,6 +7760,7 @@ } $.get('WatchedThreads', null, function(_arg) { var WatchedThreads, boardID, data, threadID, threads, _ref; + WatchedThreads = _arg.WatchedThreads; if (!WatchedThreads) { return; @@ -7507,6 +7786,7 @@ }, node: function() { var toggler; + toggler = $.el('img', { className: 'watch-thread-link' }); @@ -7528,6 +7808,7 @@ } return $.get('AutoWatch', 0, function(_arg) { var AutoWatch, thread; + AutoWatch = _arg.AutoWatch; if (!(thread = g.BOARD.threads[AutoWatch])) { return; @@ -7543,6 +7824,7 @@ cb: { openAll: function() { var a, _i, _len, _ref; + if ($.hasClass(this, 'disabled')) { return; } @@ -7561,6 +7843,7 @@ }, pruneDeads: function() { var boardID, data, threadID, _i, _len, _ref, _ref1; + if ($.hasClass(this, 'disabled')) { return; } @@ -7584,11 +7867,13 @@ }, rm: function() { var boardID, threadID, _ref; + _ref = this.parentNode.dataset.fullID.split('.'), boardID = _ref[0], threadID = _ref[1]; return ThreadWatcher.rm(boardID, +threadID); }, post: function(e) { var board, postID, threadID, _ref; + _ref = e.detail, board = _ref.board, postID = _ref.postID, threadID = _ref.threadID; if (postID === threadID) { if (Conf['Auto Watch']) { @@ -7600,6 +7885,7 @@ }, threadUpdate: function(e) { var thread; + thread = e.detail.thread; if (!(e.detail[404] && ThreadWatcher.db.get({ boardID: thread.board.ID, @@ -7616,6 +7902,7 @@ }, fetchAllStatus: function() { var thread, _i, _len, _ref; + ThreadWatcher.status.textContent = '...'; _ref = ThreadWatcher.getAll(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -7625,6 +7912,7 @@ }, fetchStatus: function(_arg) { var boardID, data, fetchCount, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, data = _arg.data; if (data.isDead) { return; @@ -7634,6 +7922,7 @@ return $.ajax("//api.4chan.org/" + boardID + "/res/" + threadID + ".json", { onloadend: function() { var status; + fetchCount.fetched++; if (fetchCount.fetched === fetchCount.fetching) { fetchCount.fetched = 0; @@ -7664,6 +7953,7 @@ }, getAll: function() { var all, boardID, data, threadID, threads, _ref; + all = []; _ref = ThreadWatcher.db.data.boards; for (boardID in _ref) { @@ -7684,6 +7974,7 @@ }, makeLine: function(boardID, threadID, data) { var div, fullID, href, link, x; + x = $.el('a', { textContent: '×', href: 'javascript:;' @@ -7714,6 +8005,7 @@ }, refresh: function() { var boardID, data, list, nodes, refresher, thread, threadID, toggler, watched, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3; + nodes = []; _ref = ThreadWatcher.getAll(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -7741,6 +8033,7 @@ }, toggle: function(thread) { var boardID, threadID; + boardID = thread.board.ID; threadID = thread.ID; if (ThreadWatcher.db.get({ @@ -7754,6 +8047,7 @@ }, add: function(thread) { var boardID, data, threadID; + data = {}; boardID = thread.board.ID; threadID = thread.ID; @@ -7784,6 +8078,7 @@ }, convert: function(oldFormat) { var boardID, data, newFormat, threadID, threads; + newFormat = {}; for (boardID in oldFormat) { threads = oldFormat[boardID]; @@ -7800,6 +8095,7 @@ refreshers: [], init: function() { var menu; + if (!Conf['Thread Watcher']) { return; } @@ -7812,6 +8108,7 @@ }, addHeaderMenuEntry: function() { var entryEl; + if (g.VIEW !== 'thread') { return; } @@ -7828,6 +8125,7 @@ }); return this.refreshers.push(function() { var addClass, rmClass, text, _ref; + _ref = $('.current', ThreadWatcher.list) ? ['unwatch-thread', 'watch-thread', 'Unwatch thread'] : ['watch-thread', 'unwatch-thread', 'Watch thread'], addClass = _ref[0], rmClass = _ref[1], text = _ref[2]; $.addClass(entryEl, addClass); $.rmClass(entryEl, rmClass); @@ -7836,6 +8134,7 @@ }, addMenuEntries: function() { var cb, conf, entries, entry, name, refresh, subEntries, _i, _len, _ref, _ref1, _results; + entries = []; entries.push({ cb: ThreadWatcher.cb.openAll, @@ -7906,6 +8205,7 @@ }, createSubEntry: function(name, desc) { var entry, input; + entry = { type: 'thread watcher', el: $.el('label', { @@ -7957,6 +8257,7 @@ }, ready: function() { var ID, post, posts, _ref; + $.off(d, '4chanXInitFinished', Unread.ready); posts = []; _ref = Unread.thread.posts; @@ -7973,6 +8274,7 @@ }, scroll: function() { var checkPosition, hash, onload, post, posts, root; + if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } @@ -8002,6 +8304,7 @@ } checkPosition = function(target) { var height, top, _ref; + _ref = target.getBoundingClientRect(), top = _ref.top, height = _ref.height; return top + height - doc.clientHeight > 0; }; @@ -8009,6 +8312,7 @@ }, sync: function() { var lastReadPost; + lastReadPost = Unread.db.get({ boardID: Unread.thread.board.ID, threadID: Unread.thread.ID, @@ -8025,6 +8329,7 @@ }, addPosts: function(posts) { var ID, data, post, _i, _len; + for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; ID = post.ID; @@ -8052,6 +8357,7 @@ }, addPostQuotingYou: function(post) { var quotelink, _i, _len, _ref; + if (!QR.db) { return; } @@ -8072,6 +8378,7 @@ }, readSinglePost: function(post) { var i; + if ((i = Unread.posts.indexOf(post)) === -1) { return; } @@ -8087,6 +8394,7 @@ }, readArray: function(arr) { var i, post, _i, _len; + for (i = _i = 0, _len = arr.length; _i < _len; i = ++_i) { post = arr[i]; if (post.ID > Unread.lastReadPost) { @@ -8097,6 +8405,7 @@ }, read: $.debounce(50, function(e) { var ID, bottom, height, i, post, posts; + if (d.hidden || !Unread.posts.length) { return; } @@ -8152,6 +8461,7 @@ }), setLine: function(force) { var post, root; + if (!(d.hidden || force === true)) { return; } @@ -8166,6 +8476,7 @@ }, update: function() { var count; + count = Unread.posts.length; if (Conf['Unread Count']) { d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); @@ -8186,6 +8497,7 @@ }, init: function() { var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2; + _ref = Conf['selectedArchives']; for (boardID in _ref) { data = _ref[boardID]; @@ -8317,6 +8629,7 @@ }, to: function(dest, data) { var archive; + archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; if (!archive) { return ''; @@ -8325,6 +8638,7 @@ }, protocol: function(archive) { var protocol; + protocol = location.protocol; if (!archive[protocol.slice(0, -1)]) { protocol = protocol === 'https:' ? 'http:' : 'https:'; @@ -8333,6 +8647,7 @@ }, thread: function(archive, _arg) { var boardID, path, postID, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; if (archive.software === 'foolfuuka') { @@ -8345,6 +8660,7 @@ }, post: function(archive, _arg) { var URL, boardID, postID, protocol; + boardID = _arg.boardID, postID = _arg.postID; protocol = Redirect.protocol(archive); if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { @@ -8356,11 +8672,13 @@ }, file: function(archive, _arg) { var boardID, filename; + boardID = _arg.boardID, filename = _arg.filename; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; }, search: function(archive, _arg) { var boardID, path, type, value; + boardID = _arg.boardID, type = _arg.type, value = _arg.value; type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; value = encodeURIComponent(value); @@ -8379,6 +8697,7 @@ }, setup: function() { var btn, entry, psa; + $.off(d, '4chanXInitFinished', PSAHiding.setup); if (!(psa = $.id('globalMessage'))) { $.rmClass(doc, 'hide-announcement'); @@ -8407,6 +8726,7 @@ $.on(btn, 'click', PSAHiding.toggle); $.get('hiddenPSA', 0, function(_arg) { var hiddenPSA; + hiddenPSA = _arg.hiddenPSA; PSAHiding.sync(hiddenPSA); $.before(psa, btn); @@ -8416,6 +8736,7 @@ }, toggle: function(e) { var UTC; + if ($.hasClass(this, 'hide-announcement')) { UTC = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', UTC); @@ -8427,6 +8748,7 @@ }, sync: function(UTC) { var hr, psa; + psa = $.id('globalMessage'); psa.hidden = PSAHiding.btn.hidden = UTC && UTC >= +psa.dataset.utc ? true : false; if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') { @@ -8438,6 +8760,7 @@ CatalogLinks = { init: function() { var el, input; + if (!Conf['Catalog Links']) { return; } @@ -8461,12 +8784,14 @@ }, toggle: function() { var useCatalog; + $.event('CloseMenu'); $.set('Header catalog links', useCatalog = this.checked); return CatalogLinks.set(useCatalog); }, set: function(useCatalog) { var a, board, path, _i, _len, _ref; + path = useCatalog ? 'catalog' : ''; _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -8500,6 +8825,7 @@ }, node: function() { var str, uid; + str = this.info.uniqueID; uid = $('.hand', this.nodes.uniqueID); if (!(str && uid && uid.nodeName === 'SPAN')) { @@ -8510,6 +8836,7 @@ ids: {}, compute: function(str) { var hash, rgb; + hash = this.hash(str); rgb = [(hash >> 24) & 0xFF, (hash >> 16) & 0xFF, (hash >> 8) & 0xFF]; rgb[3] = ((rgb[0] * 0.299) + (rgb[1] * 0.587) + (rgb[2] * 0.114)) > 125; @@ -8521,6 +8848,7 @@ }, hash: function(str) { var i, j, msg; + msg = 0; i = 0; j = str.length; @@ -8568,6 +8896,7 @@ }, node: function() { var dicestats, roll, _ref; + if (this.isClone || !(dicestats = (_ref = this.info.email) != null ? _ref.match(/dice[+\s](\d+)d(\d+)/) : void 0)) { return; } @@ -8579,6 +8908,7 @@ Emoji = { init: function() { var css, icon, name, pos, _ref; + if (!Conf['Emoji']) { return; } @@ -8648,6 +8978,7 @@ }, node: function() { var a; + if (a = $('.abbr > a:not([onclick])', this.nodes.comment)) { return $.on(a, 'click', ExpandComment.cb); } @@ -8659,6 +8990,7 @@ }, expand: function(post) { var a; + if (post.nodes.longComment && !post.nodes.longComment.parentNode) { $.replace(post.nodes.shortComment, post.nodes.longComment); post.nodes.comment = post.nodes.longComment; @@ -8674,6 +9006,7 @@ }, contract: function(post) { var a; + if (!post.nodes.shortComment) { return; } @@ -8684,6 +9017,7 @@ }, parse: function(req, a, post) { var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; + status = req.status; if (![200, 304].contains(status)) { a.textContent = "Error " + req.statusText + " (" + status + ")"; @@ -8746,6 +9080,7 @@ }, node: function() { var a, files, posts, span, _ref; + if (!(span = $.x('following-sibling::span[contains(@class,"summary")][1]', this.OP.nodes.root))) { return; } @@ -8766,6 +9101,7 @@ }, toggle: function(thread) { var a, files, filesCount, inlined, num, post, posts, postsCount, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4; + threadRoot = thread.OP.nodes.root.parentNode; a = $('.summary', threadRoot); switch (thread.isExpanded) { @@ -8843,6 +9179,7 @@ }, parse: function(req, thread, a) { var filesCount, link, post, posts, postsCount, postsObj, postsRoot, reply, root, spoilerRange, _i, _len; + if (a.textContent[0] === '+') { return; } @@ -8906,6 +9243,7 @@ }, createFunc: function(format) { var code; + code = format.replace(/%(.)/g, function(s, c) { if (c in FileInfo.formatters) { return "' + FileInfo.formatters." + c + ".call(post) + '"; @@ -8917,6 +9255,7 @@ }, convertUnit: function(size, unit) { var i; + if (unit === 'B') { return "" + (size.toFixed()) + " Bytes"; } @@ -8947,6 +9286,7 @@ }, n: function() { var fullname, shortname; + fullname = this.file.name; shortname = Build.shortFilename(this.file.name, this.isReply); if (fullname === shortname) { @@ -8990,6 +9330,7 @@ Fourchan = { init: function() { var board; + if (g.VIEW === 'catalog') { return; } @@ -9011,6 +9352,7 @@ }, code: function() { var pre, _i, _len, _ref; + if (this.isClone) { return; } @@ -9040,11 +9382,13 @@ Keybinds = { init: function() { var init; + if (g.VIEW === 'catalog' || !Conf['Keybinds']) { return; } init = function() { var node, _i, _len, _ref; + $.off(d, '4chanXInitFinished', init); $.on(d, 'keydown', Keybinds.keydown); _ref = $$('[accesskey]'); @@ -9057,6 +9401,7 @@ }, keydown: function(e) { var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len; + if (!(key = Keybinds.keyCode(e))) { return; } @@ -9237,6 +9582,7 @@ }, keyCode: function(e) { var kc, key; + key = (function() { switch (kc = e.keyCode) { case 8: @@ -9292,6 +9638,7 @@ }, tags: function(tag, ta) { var range, selEnd, selStart, value; + value = ta.value; selStart = ta.selectionStart; selEnd = ta.selectionEnd; @@ -9302,11 +9649,13 @@ }, sage: function() { var isSage; + isSage = /sage/i.test(QR.nodes.email.value); return QR.nodes.email.value = isSage ? "" : "sage"; }, img: function(thread, all) { var post; + if (all) { return ImageExpand.cb.toggleAll(); } else { @@ -9316,6 +9665,7 @@ }, open: function(thread, tab) { var url; + if (g.VIEW !== 'index') { return; } @@ -9328,6 +9678,7 @@ }, hl: function(delta, thread) { var axe, headRect, next, postEl, rect, replies, reply, root, topMargin, _i, _len; + if (!delta) { if (postEl = $('.reply.highlight', thread)) { $.rmClass(postEl, 'highlight'); @@ -9387,6 +9738,7 @@ Nav = { init: function() { var append, next, prev, span; + switch (g.VIEW) { case 'index': if (!Conf['Index Navigation']) { @@ -9437,6 +9789,7 @@ }, getThread: function(full) { var headRect, i, rect, thread, threads, topMargin, _i, _len; + if (Conf['Bottom header'] || !Conf['Fixed Header']) { topMargin = 0; } else { @@ -9462,6 +9815,7 @@ }, scroll: function(delta) { var i, rect, thread, threads, top, topMargin, _ref, _ref1; + _ref = Nav.getThread(true), threads = _ref[0], thread = _ref[1], i = _ref[2], rect = _ref[3], topMargin = _ref[4]; top = rect.top - topMargin; if ((delta === -1 && top > -5) || (delta === +1 && top < 5)) { @@ -9486,6 +9840,7 @@ }, node: function() { var dateEl; + if (this.isClone) { return; } @@ -9495,6 +9850,7 @@ }, relative: function(diff, now, date) { var days, months, number, rounded, unit, years; + unit = (number = diff / $.DAY) >= 1 ? (years = now.getYear() - date.getYear(), months = now.getMonth() - date.getMonth(), days = now.getDate() - date.getDate(), years > 1 ? (number = years - (months < 0 || months === 0 && days < 0), 'year') : years === 1 && (months > 0 || months === 0 && days >= 0) ? (number = years, 'year') : (months = (months + 12) % 12) > 1 ? (number = months - (days < 0), 'month') : months === 1 && days >= 0 ? (number = months, 'month') : 'day') : (number = diff / $.HOUR) >= 1 ? 'hour' : (number = diff / $.MINUTE) >= 1 ? 'minute' : (number = Math.max(0, diff) / $.SECOND, 'second'); rounded = Math.round(number); if (rounded !== 1) { @@ -9505,6 +9861,7 @@ stale: [], flush: function() { var now, update, _i, _len, _ref; + if (d.hidden) { return; } @@ -9520,13 +9877,16 @@ }, setUpdate: function(post) { var markStale, setOwnTimeout, update; + setOwnTimeout = function(diff) { var delay; + delay = diff < $.MINUTE ? $.SECOND - (diff + $.SECOND / 2) % $.SECOND : diff < $.HOUR ? $.MINUTE - (diff + $.MINUTE / 2) % $.MINUTE : diff < $.DAY ? $.HOUR - (diff + $.HOUR / 2) % $.HOUR : $.DAY - (diff + $.DAY / 2) % $.DAY; return setTimeout(markStale, delay); }; update = function(now) { var date, diff, relative, singlePost, _i, _len, _ref; + date = post.info.date; diff = now - date; relative = RelativeDates.relative(diff, now, date); @@ -9567,6 +9927,7 @@ }, node: function(post) { var spoiler, spoilers, _i, _len; + spoilers = $$('s', this.nodes.comment); for (_i = 0, _len = spoilers.length; _i < _len; _i++) { spoiler = spoilers[_i]; @@ -9586,6 +9947,7 @@ }, ready: function() { var field; + field = $.id('recaptcha_response_field'); $.on(field, 'keydown', function(e) { if (e.keyCode === 8 && !field.value) { @@ -9594,6 +9956,7 @@ }); return $.on($('form'), 'submit', function(e) { var response; + e.preventDefault(); response = field.value.trim(); if (!/\s/.test(response)) { @@ -9623,6 +9986,7 @@ }, createFunc: function(format) { var code; + code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { return "' + Time.formatters." + c + ".call(date) + '"; @@ -9707,6 +10071,7 @@ Settings = { init: function() { var link, settings; + link = $.el('a', { className: 'settings-link', textContent: 'Settings', @@ -9716,6 +10081,7 @@ Header.addShortcut(link); $.get('previousversion', null, function(item) { var changelog, el, previous; + if (previous = item['previousversion']) { if (previous === g.VERSION) { return; @@ -9753,6 +10119,7 @@ }, open: function(openSection) { var dialog, html, link, links, overlay, section, sectionToOpen, _i, _len, _ref; + $.off(d, '4chanXInitFinished', Settings.open); if (Settings.dialog) { return; @@ -9805,6 +10172,7 @@ sections: [], addSection: function(title, open) { var hyphenatedTitle, _ref; + if (typeof title !== 'string') { _ref = title.detail, title = _ref.title, open = _ref.open; } @@ -9817,6 +10185,7 @@ }, openSection: function() { var section, selected; + if (selected = $('.tab-selected', Settings.dialog)) { $.rmClass(selected, 'tab-selected'); } @@ -9830,6 +10199,7 @@ }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; + items = {}; inputs = {}; _ref = Config.main; @@ -9854,6 +10224,7 @@ } $.get(items, function(items) { var val; + for (key in items) { val = items[key]; inputs[key].checked = val; @@ -9868,6 +10239,7 @@ boards: {} }, function(item) { var ID, board, thread, _ref1; + _ref1 = item.hiddenThreads.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9882,6 +10254,7 @@ boards: {} }, function(item) { var ID, board, post, thread, _ref1; + _ref1 = item.hiddenPosts.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9901,6 +10274,7 @@ boards: {} }, function(item) { var boardID; + for (boardID in item.hiddenThreads.boards) { localStorage.removeItem("4chan-hide-t-" + boardID); } @@ -9911,6 +10285,7 @@ }, "export": function(now, data) { var a, db, p, _i, _len; + if (typeof now !== 'number') { now = Date.now(); data = { @@ -9946,6 +10321,7 @@ }, onImport: function() { var file, output, reader; + if (!(file = this.files[0])) { return; } @@ -9957,6 +10333,7 @@ reader = new FileReader(); reader.onload = function(e) { var data, err; + try { data = JSON.parse(e.target.result); Settings.loadSettings(data); @@ -9973,6 +10350,7 @@ }, loadSettings: function(data) { var key, val, version, _ref; + version = data.version.split('.'); if (version[0] === '2') { data = Settings.convertSettings(data, { @@ -10060,6 +10438,7 @@ }, convertSettings: function(data, map) { var newKey, prevKey; + for (prevKey in map) { newKey = map[prevKey]; if (newKey) { @@ -10071,6 +10450,7 @@ }, filter: function(section) { var select; + section.innerHTML = "
"; select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -10078,6 +10458,7 @@ }, selectFilter: function() { var div, name, ta; + div = this.nextElementSibling; if ((name = this.value) !== 'guide') { $.rmAll(div); @@ -10097,6 +10478,7 @@ }, sauce: function(section) { var ta; + section.innerHTML = "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
    These parameters will be replaced by their corresponding values:\n
  • %TURL: Thumbnail URL.
  • %URL: Full image URL.
  • %MD5: MD5 hash.
  • %board: Current board.
"; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -10106,6 +10488,7 @@ }, advanced: function(section) { var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; + section.innerHTML = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Time Formatting is disabled.
:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

\n One item per line.
\n Items will be added in the relevant input's auto-completion list.
\n Password items will always be used, since there is no password input.
\n Lines starting with a # will be ignored.\n

    You can use these settings with each item, separate them with semicolons:\n
  • Possible items are: name, email, subject and password.
  • Wrap values of items with quotes, like this: email:\"sage\".
  • Force values as defaults with the always keyword, for example: email:\"sage\";always.
  • Select specific boards for an item, separated with commas, for example: email:\"sage\";boards:jp;always.
Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; inputs = {}; @@ -10125,6 +10508,7 @@ $.on(ta, 'change', $.cb.value); $.get(items, function(items) { var key, val; + for (key in items) { val = items[key]; if (['emojiPos'].contains(key)) { @@ -10195,6 +10579,7 @@ }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var option, selectedArchives, type; + selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; @@ -10209,6 +10594,7 @@ }, addArchiveCell: function(boardID, data, type) { var archive, i, length, options, select, td; + length = data[type].length; td = $.el('td', { className: 'archive-cell' @@ -10238,8 +10624,10 @@ }, saveSelectedArchive: function() { var _this = this; + return $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var selectedArchives, _name; + selectedArchives = _arg.selectedArchives; (selectedArchives[_name = _this.dataset.boardid] || (selectedArchives[_name] = {}))[_this.dataset.type] = _this.value; return $.set('selectedArchives', selectedArchives); @@ -10250,6 +10638,7 @@ }, time: function() { var funk; + funk = Time.createFunc(this.value); return this.nextElementSibling.textContent = funk(Time, new Date()); }, @@ -10258,6 +10647,7 @@ }, fileInfo: function() { var data, funk; + data = { isReply: true, file: { @@ -10296,6 +10686,7 @@ }, keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; + section.innerHTML = "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
"; tbody = $('tbody', section); items = {}; @@ -10316,6 +10707,7 @@ } return $.get(items, function(items) { var val; + for (key in items) { val = items[key]; inputs[key].value = val; @@ -10324,6 +10716,7 @@ }, keybind: function(e) { var key; + if (e.keyCode === 9) { return; } @@ -10340,8 +10733,10 @@ Main = { init: function() { var db, flatten, _i, _len; + flatten = function(parent, obj) { var key, val; + if (obj instanceof Array) { Conf[parent] = obj[0]; } else if (typeof obj === 'object') { @@ -10374,6 +10769,7 @@ }, initFeatures: function() { var init, pathname, _ref; + pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { @@ -10401,6 +10797,7 @@ case 'images.4chan.org': $.ready(function() { var URL; + if (Conf['404 Redirect'] && ['4chan - Temporarily Offline', '4chan - 404 Not Found'].contains(d.title)) { Redirect.init(); pathname = location.pathname.split('/'); @@ -10417,6 +10814,7 @@ } init = function(features) { var err, module, name; + for (name in features) { module = features[name]; try { @@ -10494,6 +10892,7 @@ }, initStyle: function() { var mainStyleSheet, setStyle, style, styleSheets, _ref; + $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; @@ -10514,6 +10913,7 @@ styleSheets = $$('link[rel="alternate stylesheet"]', d.head); setStyle = function() { var styleSheet, _i, _len; + $.rmClass(doc, style); for (_i = 0, _len = styleSheets.length; _i < _len; _i++) { styleSheet = styleSheets[_i]; @@ -10535,6 +10935,7 @@ }, initReady: function() { var board, err, errors, href, passLink, postRoot, posts, styleSelector, thread, threadRoot, threads, _i, _j, _len, _len1, _ref, _ref1; + if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { @@ -10601,6 +11002,7 @@ }, callbackNodes: function(klass, nodes) { var callback, err, errors, i, len, node, _i, _len, _ref; + len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -10628,9 +11030,11 @@ }, callbackNodesDB: function(klass, nodes, cb) { var errors, func, i, len, node, queue, softTask; + queue = []; softTask = function() { var args, func, task; + task = queue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -10649,6 +11053,7 @@ errors = null; func = function(node, i) { var callback, err, _i, _len, _ref; + _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; @@ -10682,6 +11087,7 @@ }, addCallback: function(e) { var Klass, obj; + obj = e.detail; if (typeof obj.callback.name !== 'string') { throw new Error("Invalid callback name: " + obj.callback.name); @@ -10701,6 +11107,7 @@ }, handleErrors: function(errors) { var div, error, logs, _i, _len; + if (!(errors instanceof Array)) { error = errors; } else if (errors.length === 1) { @@ -10715,6 +11122,7 @@ }); $.on(div.lastElementChild, 'click', function() { var _ref; + return _ref = this.textContent === 'show' ? ['hide', false] : ['show', true], this.textContent = _ref[0], logs.hidden = _ref[1], _ref; }); logs = $.el('div', { @@ -10728,6 +11136,7 @@ }, parseError: function(data) { var error, message; + Main.logError(data); message = $.el('div', { textContent: data.message @@ -10744,6 +11153,7 @@ }, isThisPageLegit: function() { var _ref; + if (!('thisPageIsLegit' in Main)) { Main.thisPageIsLegit = location.hostname === 'boards.4chan.org' && !$('link[href*="favicon-status.ico"]', d.head) && ((_ref = d.title) !== '4chan - Temporarily Offline' && _ref !== '4chan - Error' && _ref !== '504 Gateway Time-out'); } diff --git a/builds/crx/script.js b/builds/crx/script.js index 492147b3e..336d5766c 100755 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -329,6 +329,7 @@ Array.prototype.indexOf = function(object) { var i; + i = this.length; while (i--) { if (this[i] === object) { @@ -347,6 +348,7 @@ $.extend = function(object, properties) { var key, val; + for (key in properties) { val = properties[key]; if (!properties.hasOwnProperty(key)) { @@ -364,6 +366,7 @@ $.ready = function(fc) { var cb; + if (d.readyState !== 'loading') { $.queueTask(fc); return; @@ -377,6 +380,7 @@ $.formData = function(form) { var fd, key, val; + if (form instanceof HTMLFormElement) { return new FormData(form); } @@ -396,6 +400,7 @@ $.extend = function(object, properties) { var key, val; + for (key in properties) { val = properties[key]; object[key] = val; @@ -404,9 +409,11 @@ $.ajax = (function() { var lastModified; + lastModified = {}; return function(url, options, extra) { var form, r, sync, type, upCallbacks, whenModified; + if (extra == null) { extra = {}; } @@ -429,9 +436,11 @@ $.cache = (function() { var reqs; + reqs = {}; return function(url, cb, options) { var err, req, rm; + if (req = reqs[url]) { if (req.readyState === 4) { cb.call(req, req.evt); @@ -451,6 +460,7 @@ } $.on(req, 'load', function(e) { var _i, _len, _ref; + _ref = this.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { cb = _ref[_i]; @@ -486,6 +496,7 @@ $.addStyle = function(css, id) { var style; + style = $.el('style', { id: id, textContent: css @@ -532,6 +543,7 @@ } else { return function(el) { var _ref; + return (_ref = el.parentNode) != null ? _ref.removeChild(el) : void 0; }; } @@ -539,6 +551,7 @@ $.rmAll = function(root) { var node; + while (node = root.firstChild) { root.removeChild(node); } @@ -554,6 +567,7 @@ $.nodes = function(nodes) { var frag, node, _i, _len; + if (!(nodes instanceof Array)) { return nodes; } @@ -587,6 +601,7 @@ $.el = function(tag, properties) { var el; + el = d.createElement(tag); if (properties) { $.extend(el, properties); @@ -596,6 +611,7 @@ $.on = function(el, events, handler) { var event, _i, _len, _ref; + _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -605,6 +621,7 @@ $.off = function(el, events, handler) { var event, _i, _len, _ref; + _ref = events.split(' '); for (_i = 0, _len = _ref.length; _i < _len; _i++) { event = _ref[_i]; @@ -628,6 +645,7 @@ $.debounce = function(wait, fn) { var args, exec, lastCall, that, timeout; + lastCall = 0; timeout = null; that = null; @@ -649,9 +667,11 @@ $.queueTask = (function() { var execTask, taskChannel, taskQueue; + taskQueue = []; execTask = function() { var args, func, task; + task = taskQueue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -674,6 +694,7 @@ $.globalEval = function(code) { var script; + script = $.el('script', { textContent: code }); @@ -683,6 +704,7 @@ $.bytesToString = function(size) { var unit; + unit = 0; while (size >= 1024) { size /= 1024; @@ -698,6 +720,7 @@ $.item = function(key, val) { var item; + item = {}; item[key] = val; return item; @@ -708,6 +731,7 @@ $.sync = (function() { chrome.storage.onChanged.addListener(function(changes) { var cb, key; + for (key in changes) { if (cb = $.syncing[key]) { cb(changes[key].newValue); @@ -727,6 +751,7 @@ $.get = function(key, val, cb) { var count, done, items, localItems, syncItems; + if (typeof cb === 'function') { items = $.item(key, val); } else { @@ -746,6 +771,7 @@ count = 0; done = function(item) { var lastError; + lastError = chrome.runtime.lastError; if (lastError) { c.error(lastError, lastError.message || 'No message.'); @@ -767,10 +793,12 @@ $.set = (function() { var items, localItems, set; + items = {}; localItems = {}; set = $.debounce($.SECOND, function() { var err, key, _i, _len, _ref; + _ref = $.localKeys; for (_i = 0, _len = _ref.length; _i < _len; _i++) { key = _ref[_i]; @@ -855,6 +883,7 @@ function Post(root, thread, board, that) { var capcode, date, email, flag, info, name, post, subject, tripcode, uniqueID; + this.thread = thread; this.board = board; if (that == null) { @@ -930,6 +959,7 @@ Post.prototype.parseComment = function() { var bq, i, node, nodes, text; + bq = this.nodes.comment.cloneNode(true); nodes = $$('.abbr, .capcodeReplies, .exif, b', bq); i = 0; @@ -947,6 +977,7 @@ Post.prototype.parseQuotes = function() { var quotelink, _i, _len, _ref; + this.quotes = []; _ref = $$('.quotelink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -957,6 +988,7 @@ Post.prototype.parseQuote = function(quotelink) { var fullID, match; + if (!(match = quotelink.href.match(/boards\.4chan\.org\/([^\/]+)\/res\/\d+#p(\d+)$/))) { return; } @@ -972,6 +1004,7 @@ Post.prototype.parseFile = function(that) { var alt, anchor, fileEl, fileInfo, size, thumb, unit; + if (!((fileEl = $('.file', this.nodes.post)) && (thumb = $('img[data-md5]', fileEl)))) { return; } @@ -1003,6 +1036,7 @@ Post.prototype.kill = function(file, now) { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; + now || (now = new Date()); if (file) { if (this.file.isDead) { @@ -1051,6 +1085,7 @@ Post.prototype.resurrect = function() { var clone, quotelink, strong, _i, _j, _len, _len1, _ref, _ref1; + delete this.isDead; delete this.timeOfDeath; $.rmClass(this.nodes.root, 'deleted-post'); @@ -1084,6 +1119,7 @@ Post.prototype.rmClone = function(index) { var clone, _i, _len, _ref; + this.clones.splice(index, 1); _ref = this.clones.slice(index); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1101,6 +1137,7 @@ function Clone(origin, context) { var file, info, inline, inlined, key, nodes, post, root, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + this.origin = origin; this.context = context; _ref = ['ID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']; @@ -1188,6 +1225,7 @@ function DataBoard(key, sync, dontClean) { var init, _this = this; + this.key = key; this.data = Conf[key]; $.sync(key, this.onSync.bind(this)); @@ -1210,6 +1248,7 @@ DataBoard.prototype["delete"] = function(_arg) { var boardID, postID, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; if (postID) { delete this.data.boards[boardID][threadID][postID]; @@ -1230,6 +1269,7 @@ DataBoard.prototype.deleteIfEmpty = function(_arg) { var boardID, threadID; + boardID = _arg.boardID, threadID = _arg.threadID; if (threadID) { if (!Object.keys(this.data.boards[boardID][threadID]).length) { @@ -1245,6 +1285,7 @@ DataBoard.prototype.set = function(_arg) { var boardID, postID, threadID, val, _base, _base1, _base2; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, val = _arg.val; if (postID !== void 0) { ((_base = ((_base1 = this.data.boards)[boardID] || (_base1[boardID] = {})))[threadID] || (_base[threadID] = {}))[postID] = val; @@ -1258,6 +1299,7 @@ DataBoard.prototype.get = function(_arg) { var ID, board, boardID, defaultValue, postID, thread, threadID, val, _i, _len; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID, defaultValue = _arg.defaultValue; if (board = this.data.boards[boardID]) { if (!threadID) { @@ -1281,6 +1323,7 @@ DataBoard.prototype.clean = function() { var boardID, now, val, _ref; + _ref = this.data.boards; for (boardID in _ref) { val = _ref[boardID]; @@ -1300,8 +1343,10 @@ DataBoard.prototype.ajaxClean = function(boardID) { var _this = this; + return $.cache("//api.4chan.org/" + boardID + "/threads.json", function(e) { var board, page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; + if (e.target.status === 404) { _this["delete"](boardID); } else if (e.target.status === 200) { @@ -1389,8 +1434,10 @@ }, toBlob: function() { var _base; + return (_base = HTMLCanvasElement.prototype).toBlob || (_base.toBlob = function(cb) { var data, i, l, ui8a, _i; + data = atob(this.toDataURL().slice(22)); l = data.length; ui8a = new Uint8Array(l); @@ -1428,6 +1475,7 @@ init: function() { var barFixedToggler, barPositionToggler, customNavToggler, editCustomNav, footerToggler, headerToggler, linkJustifyToggler, _this = this; + this.menu = new UI.Menu('header'); this.menuButton = $.el('span', { className: 'menu-button', @@ -1518,6 +1566,7 @@ }); return $.ready(function() { var a, cs; + _this.footer = $.id('boardNavDesktopFoot'); if (a = $("a[href*='/" + g.BOARD + "/']", $.id('boardNavDesktopFoot'))) { a.className = 'current'; @@ -1551,6 +1600,7 @@ }), setBoardList: function() { var a, boardList, btn, fourchannav, fullBoardList; + fourchannav = $.id('boardNavDesktop'); if (a = $("a[href*='/" + g.BOARD + "/']", fourchannav)) { a.className = 'current'; @@ -1572,6 +1622,7 @@ }, generateBoardList: function(text) { var as, list, nodes; + list = $('#custom-board-list', Header.bar); $.rmAll(list); if (!text) { @@ -1580,6 +1631,7 @@ as = $$('#full-board-list a[title]', Header.bar); nodes = text.match(/[\w@]+((-(all|title|replace|full|index|catalog|url:"[^"]+[^"]"|text:"[^"]+")|\,"[^"]+[^"]"))*|[^\w@]+/g).map(function(t) { var a, board, m, _i, _len; + if (/^[^\w@]/.test(t)) { return $.tn(t); } @@ -1630,6 +1682,7 @@ }, toggleBoardList: function() { var bar, custom, full, showBoardList; + bar = Header.bar; custom = $('#custom-board-list', bar); full = $('#full-board-list', bar); @@ -1665,6 +1718,7 @@ }, toggleLinkJustify: function() { var centered; + $.event('CloseMenu'); centered = this.nodeName === 'INPUT' ? this.checked : void 0; Header.setLinkJustify(centered); @@ -1694,6 +1748,7 @@ }, toggleBarVisibility: function(e) { var hide, message; + if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -1710,6 +1765,7 @@ }, toggleFooterVisibility: function() { var hide, message; + $.event('CloseMenu'); hide = this.nodeName === 'INPUT' ? this.checked : !!Header.footer.hidden; Header.setFooterVisibility(hide); @@ -1719,6 +1775,7 @@ }, setCustomNav: function(show) { var btn, cust, full, _ref; + Header.customNavToggler.checked = show; cust = $('#custom-board-list', Header.bar); full = $('#full-board-list', Header.bar); @@ -1731,12 +1788,14 @@ }, editCustomNav: function() { var settings; + Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=boardnav]', settings).focus(); }, hashScroll: function() { var hash, post; + if (!((hash = this.location.hash.slice(1)) && (post = $.id(hash)))) { return; } @@ -1747,6 +1806,7 @@ }, scrollToPost: function(post) { var headRect, top; + top = post.getBoundingClientRect().top; if (Conf['Fixed Header'] && !Conf['Bottom Header']) { headRect = Header.bar.getBoundingClientRect(); @@ -1756,6 +1816,7 @@ }, addShortcut: function(el) { var shortcut; + shortcut = $.el('span', { className: 'shortcut fourchanx-link' }); @@ -1767,6 +1828,7 @@ }, createNotification: function(e) { var cb, content, lifetime, notif, type, _ref; + _ref = e.detail, type = _ref.type, content = _ref.content, lifetime = _ref.lifetime, cb = _ref.cb; notif = new Notification(type, content, lifetime); if (cb) { @@ -1779,6 +1841,7 @@ spoilerRange: {}, shortFilename: function(filename, isReply) { var threshold; + threshold = isReply ? 30 : 40; if (filename.length - 4 > threshold) { return "" + filename.slice(0, threshold - 5) + "(...)." + filename.slice(-3); @@ -1788,6 +1851,7 @@ }, postFromObject: function(data, boardID) { var o; + o = { postID: data.no, threadID: data.resto || data.no, @@ -1832,6 +1896,7 @@ */ var a, boardID, capcode, capcodeClass, capcodeReplies, capcodeStart, closed, comment, container, date, dateUTC, email, emailEnd, emailStart, ext, file, fileDims, fileHTML, fileInfo, fileSize, fileThumb, filename, flag, flagCode, flagName, href, imgSrc, isClosed, isOP, isSticky, name, postID, quote, shortFilename, spoilerRange, staticPath, sticky, subject, threadID, tripcode, uniqueID, userID, _i, _len, _ref; + postID = o.postID, threadID = o.threadID, boardID = o.boardID, name = o.name, capcode = o.capcode, tripcode = o.tripcode, uniqueID = o.uniqueID, email = o.email, subject = o.subject, flagCode = o.flagCode, flagName = o.flagName, date = o.date, dateUTC = o.dateUTC, isSticky = o.isSticky, isClosed = o.isClosed, comment = o.comment, capcodeReplies = o.capcodeReplies, file = o.file; isOP = postID === threadID; staticPath = '//static.4chan.org/image/'; @@ -1909,7 +1974,7 @@ container = $.el('div', { id: "pc" + postID, className: "postContainer " + (isOP ? 'op' : 'reply') + "Container", - innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" + innerHTML: "" + (isOP ? '' : "
>>
") + "
" + (isOP ? fileHTML : '') + "" + (isOP ? '' : fileHTML) + "
" + (comment || '') + "
" + " " + "
" }); _ref = $$('.quotelink', container); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -1930,6 +1995,7 @@ }, capcodeReplies: function(_arg) { var array, boardID, bq, capcodeReplies, capcodeType, generateCapcodeReplies, html, root, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, bq = _arg.bq, root = _arg.root, capcodeReplies = _arg.capcodeReplies; if (!capcodeReplies) { return; @@ -1966,6 +2032,7 @@ Get = { threadExcerpt: function(thread) { var OP, excerpt, _ref; + OP = thread.OP; excerpt = ((_ref = OP.info.subject) != null ? _ref.trim() : void 0) || OP.info.comment.replace(/\n+/g, ' // ') || Conf['Anonymize'] && 'Anonymous' || $('.nameBlock', OP.nodes.info).textContent.trim(); if (excerpt.length > 70) { @@ -1978,6 +2045,7 @@ }, postFromRoot: function(root) { var boardID, index, link, post, postID; + link = $('a[title="Highlight this post"]', root); boardID = link.pathname.split('/')[1]; postID = link.hash.slice(2); @@ -1997,6 +2065,7 @@ }, postDataFromLink: function(link) { var boardID, path, postID, threadID, _ref; + if (link.hostname === 'boards.4chan.org') { path = link.pathname.split('/'); boardID = path[1]; @@ -2014,6 +2083,7 @@ }, allQuotelinksLinkingTo: function(post) { var ID, quote, quotedPost, quotelinks, quoterPost, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3; + quotelinks = []; _ref = g.posts; for (ID in _ref) { @@ -2042,12 +2112,14 @@ } return quotelinks.filter(function(quotelink) { var boardID, postID, _ref4; + _ref4 = Get.postDataFromLink(quotelink), boardID = _ref4.boardID, postID = _ref4.postID; return boardID === post.board.ID && postID === post.ID; }); }, postClone: function(boardID, threadID, postID, root, context) { var post, url; + if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2070,6 +2142,7 @@ }, insert: function(post, root, context) { var clone, nodes; + if (!root.parentNode) { return; } @@ -2083,6 +2156,7 @@ }, fetchedPost: function(req, boardID, threadID, postID, root, context) { var board, post, posts, status, thread, url, _i, _len; + if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2136,6 +2210,7 @@ }, archivedPost: function(req, boardID, postID, root, context) { var board, bq, comment, data, o, post, thread, threadID, _ref; + if (post = g.posts["" + boardID + "." + postID]) { Get.insert(post, root, context); return; @@ -2230,8 +2305,10 @@ UI = (function() { var Menu, dialog, drag, dragend, dragstart, hover, hoverend, hoverstart, touchend, touchmove; + dialog = function(id, position, html) { var child, el, move, _i, _len, _ref; + el = $.el('div', { className: 'dialog', innerHTML: html, @@ -2271,6 +2348,7 @@ Menu.prototype.makeMenu = function() { var menu; + menu = $.el('div', { className: 'dialog', id: 'menu', @@ -2285,6 +2363,7 @@ Menu.prototype.toggle = function(e, button, data) { var previousButton; + e.preventDefault(); e.stopPropagation(); if (currentMenu) { @@ -2302,6 +2381,7 @@ Menu.prototype.open = function(button, data) { var bLeft, bRect, bTop, bottom, cHeight, cWidth, entry, left, mRect, menu, right, style, top, _i, _len, _ref, _ref1, _ref2; + menu = this.makeMenu(); currentMenu = menu; lastToggledButton = button; @@ -2340,6 +2420,7 @@ Menu.prototype.insertEntry = function(entry, parent, data) { var subEntry, submenu, _i, _len, _ref; + if (typeof entry.open === 'function') { if (!entry.open(data)) { return; @@ -2373,6 +2454,7 @@ Menu.prototype.findNextEntry = function(entry, direction) { var entries; + entries = __slice.call(entry.parentNode.children); entries.sort(function(first, second) { return +(first.style.order || first.style.webkitOrder) - +(second.style.order || second.style.webkitOrder); @@ -2382,6 +2464,7 @@ Menu.prototype.keybinds = function(e) { var entry, next, nextPrev, subEntry, submenu; + entry = $('.focused', currentMenu); while (subEntry = $('.focused', entry)) { entry = subEntry; @@ -2427,6 +2510,7 @@ Menu.prototype.focus = function(entry) { var bottom, cHeight, cWidth, eRect, focused, left, right, sRect, style, submenu, top, _i, _len, _ref, _ref1, _ref2; + while (focused = $.x('parent::*/child::*[contains(@class,"focused")]', entry)) { $.rmClass(focused, 'focused'); } @@ -2454,6 +2538,7 @@ Menu.prototype.addEntry = function(e) { var entry; + entry = e.detail; if (entry.type !== this.type) { return; @@ -2464,6 +2549,7 @@ Menu.prototype.parseEntry = function(entry) { var el, style, subEntries, subEntry, _i, _len; + el = entry.el, subEntries = entry.subEntries; $.addClass(el, 'entry'); $.on(el, 'focus mouseover', (function(e) { @@ -2487,6 +2573,7 @@ })(); dragstart = function(e) { var el, isTouching, o, rect, screenHeight, screenWidth, _ref; + if (e.type === 'mousedown' && e.button !== 0) { return; } @@ -2525,6 +2612,7 @@ }; touchmove = function(e) { var touch, _i, _len, _ref; + _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2536,6 +2624,7 @@ }; drag = function(e) { var bottom, clientX, clientY, left, right, style, top; + clientX = e.clientX, clientY = e.clientY; left = clientX - this.dx; left = left < 10 ? 0 : this.width - left < 10 ? null : left / this.screenWidth * 100 + '%'; @@ -2551,6 +2640,7 @@ }; touchend = function(e) { var touch, _i, _len, _ref; + _ref = e.changedTouches; for (_i = 0, _len = _ref.length; _i < _len; _i++) { touch = _ref[_i]; @@ -2572,6 +2662,7 @@ }; hoverstart = function(_arg) { var asapTest, cb, el, endEvents, latestEvent, o, root; + root = _arg.root, el = _arg.el, latestEvent = _arg.latestEvent, endEvents = _arg.endEvents, asapTest = _arg.asapTest, cb = _arg.cb; o = { root: root, @@ -2600,6 +2691,7 @@ }; hover = function(e) { var clientX, clientY, height, left, right, style, top, _ref; + this.latestEvent = e; height = this.el.offsetHeight; clientX = e.clientX, clientY = e.clientY; @@ -2642,6 +2734,7 @@ }, node: function() { var email, name, tripcode, _ref; + if (this.info.capcode || this.isClone) { return; } @@ -2668,6 +2761,7 @@ filters: {}, init: function() { var boards, err, filter, hl, key, op, regexp, stub, top, _i, _len, _ref, _ref1, _ref2, _ref3, _ref4; + if (g.VIEW === 'catalog' || !Conf['Filter']) { return; } @@ -2704,6 +2798,7 @@ op = ((_ref2 = filter.match(/[^t]op:(yes|no|only)/)) != null ? _ref2[1] : void 0) || 'yes'; stub = (function() { var _ref3; + switch ((_ref3 = filter.match(/stub:(yes|no)/)) != null ? _ref3[1] : void 0) { case 'yes': return true; @@ -2734,6 +2829,7 @@ }, createFilter: function(regexp, op, stub, hl, top) { var settings, test; + test = typeof regexp === 'string' ? function(value) { return regexp === value; } : function(value) { @@ -2757,6 +2853,7 @@ }, node: function() { var filter, firstThread, key, result, thisThread, value, _i, _len, _ref; + if (this.isClone) { return; } @@ -2868,6 +2965,7 @@ menu: { init: function() { var div, entry, type, _i, _len, _ref; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Filter']) { return; } @@ -2893,6 +2991,7 @@ }, createSubEntry: function(text, type) { var el; + el = $.el('a', { href: 'javascript:;', textContent: text @@ -2903,6 +3002,7 @@ el: el, open: function(post) { var value; + value = Filter[type](post); return value !== false; } @@ -2910,6 +3010,7 @@ }, makeFilter: function() { var re, type, value; + type = this.dataset.type; value = Filter[type](Filter.menu.post); re = ['uniqueID', 'MD5'].contains(type) ? value : value.replace(/\/|\\|\^|\$|\n|\.|\(|\)|\{|\}|\[|\]|\?|\*|\+|\|/g, function(c) { @@ -2924,6 +3025,7 @@ re = ['uniqueID', 'MD5'].contains(type) ? "/" + re + "/" : "/^" + re + "$/"; return $.get(type, Conf[type], function(item) { var save, section, select, ta, tl; + save = item[type]; save = save ? "" + save + "\n" + re : re; $.set(type, save); @@ -2957,6 +3059,7 @@ }, node: function() { var data; + if (!this.isReply || this.isClone) { return; } @@ -2980,6 +3083,7 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub, replies, thisPost; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Reply Hiding Link']) { return; } @@ -3050,6 +3154,7 @@ order: 20, open: function(post) { var data; + if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3081,6 +3186,7 @@ order: 15, open: function(post) { var data; + if (!post.isReply || post.isClone || !post.isHidden) { return false; } @@ -3097,6 +3203,7 @@ }, hide: function() { var makeStub, parent, post, replies, thisPost; + parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3115,6 +3222,7 @@ }, show: function() { var data, parent, post, replies, thisPost; + parent = this.parentNode; thisPost = $('input[name=thisPost]', parent).checked; replies = $('input[name=replies]', parent).checked; @@ -3138,6 +3246,7 @@ }, hideStub: function() { var post; + post = PostHiding.menu.post; post.nodes.root.hidden = true; $.event('CloseMenu'); @@ -3145,6 +3254,7 @@ }, makeButton: function(post, type) { var a; + a = $.el('a', { className: "" + type + "-reply-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3155,6 +3265,7 @@ }, saveHiddenState: function(post, isHiding, thisPost, makeStub, hideRecursively) { var data; + data = { boardID: post.board.ID, threadID: post.thread.ID, @@ -3173,12 +3284,14 @@ }, toggle: function() { var post; + post = Get.postFromNode(this); PostHiding[(post.isHidden ? 'show' : 'hide')](post); return PostHiding.saveHiddenState(post, post.isHidden); }, hide: function(post, makeStub, hideRecursively) { var a, button, postInfo, quotelink, _i, _len, _ref; + if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3213,6 +3326,7 @@ }, show: function(post, showRecursively) { var quotelink, _i, _len, _ref; + if (showRecursively == null) { showRecursively = Conf['Recursive Hiding']; } @@ -3248,6 +3362,7 @@ }, node: function() { var i, obj, quote, recursive, _i, _j, _len, _len1, _ref, _ref1; + if (this.isClone) { return; } @@ -3265,6 +3380,7 @@ }, add: function() { var args, obj, post, recursive, _base, _name; + recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; obj = (_base = Recursive.recursives)[_name = post.fullID] || (_base[_name] = { recursives: [], @@ -3275,6 +3391,7 @@ }, rm: function(recursive, post) { var i, obj, rec, _i, _len, _ref; + if (!(obj = Recursive.recursives[post.fullID])) { return; } @@ -3289,6 +3406,7 @@ }, apply: function() { var ID, args, fullID, post, recursive, _ref; + recursive = arguments[0], post = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : []; fullID = post.fullID; _ref = g.posts; @@ -3315,6 +3433,7 @@ }, node: function() { var data; + if (data = ThreadHiding.db.get({ boardID: this.board.ID, threadID: this.ID @@ -3328,6 +3447,7 @@ }, syncCatalog: function() { var hiddenThreads, hiddenThreadsOnCatalog, threadID; + hiddenThreads = ThreadHiding.db.get({ boardID: g.BOARD.ID, defaultValue: {} @@ -3354,6 +3474,7 @@ cleanCatalog: function(hiddenThreadsOnCatalog) { return $.cache("//api.4chan.org/" + g.BOARD + "/threads.json", function() { var page, thread, threads, _i, _j, _len, _len1, _ref, _ref1; + if (this.status !== 200) { return; } @@ -3379,6 +3500,7 @@ menu: { init: function() { var apply, div, hideStubLink, makeStub; + if (g.VIEW !== 'index' || !Conf['Menu'] || !Conf['Thread Hiding Link']) { return; } @@ -3400,6 +3522,7 @@ order: 20, open: function(_arg) { var isReply, thread; + thread = _arg.thread, isReply = _arg.isReply; if (isReply || thread.isHidden) { return false; @@ -3429,6 +3552,7 @@ order: 20, open: function(_arg) { var isReply, thread; + thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3448,6 +3572,7 @@ order: 15, open: function(_arg) { var isReply, thread; + thread = _arg.thread, isReply = _arg.isReply; if (isReply || !thread.isHidden) { return false; @@ -3458,6 +3583,7 @@ }, hide: function() { var makeStub, thread; + makeStub = $('input', this.parentNode).checked; thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, makeStub); @@ -3466,6 +3592,7 @@ }, show: function() { var thread; + thread = ThreadHiding.menu.thread; ThreadHiding.show(thread); ThreadHiding.saveHiddenState(thread); @@ -3473,6 +3600,7 @@ }, hideStub: function() { var thread; + thread = ThreadHiding.menu.thread; ThreadHiding.hide(thread, false); $.event('CloseMenu'); @@ -3480,6 +3608,7 @@ }, makeButton: function(thread, type) { var a; + a = $.el('a', { className: "" + type + "-thread-button", innerHTML: " " + (type === 'hide' ? '-' : '+') + " ", @@ -3491,6 +3620,7 @@ }, saveHiddenState: function(thread, makeStub) { var hiddenThreadsOnCatalog; + hiddenThreadsOnCatalog = JSON.parse(localStorage.getItem("4chan-hide-t-" + g.BOARD)) || {}; if (thread.isHidden) { ThreadHiding.db.set({ @@ -3523,6 +3653,7 @@ }, hide: function(thread, makeStub) { var OP, a, button, numReplies, opInfo, span, threadRoot; + if (makeStub == null) { makeStub = Conf['Stubs']; } @@ -3546,6 +3677,7 @@ }, show: function(thread) { var threadRoot; + if (thread.stub) { $.rm(thread.stub); delete thread.stub; @@ -3558,6 +3690,7 @@ QuoteBacklink = { init: function() { var format; + if (g.VIEW === 'catalog' || !Conf['Quote Backlinks']) { return; } @@ -3575,6 +3708,7 @@ }, firstNode: function() { var a, clone, container, containers, frag, link, post, quote, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; + if (this.isClone || !this.quotes.length) { return; } @@ -3612,6 +3746,7 @@ }, secondNode: function() { var container; + if (this.isClone && (this.origin.isReply || Conf['OP Backlinks'])) { this.nodes.backlinkContainer = $('.container', this.nodes.info); return; @@ -3625,6 +3760,7 @@ }, getContainer: function(id) { var _base; + return (_base = this.containers)[id] || (_base[id] = $.el('span', { className: 'container' })); @@ -3647,6 +3783,7 @@ }, node: function() { var board, boardID, quotelink, quotelinks, quotes, thread, threadID, _i, _len, _ref, _ref1; + if (this.isClone && this.thread === this.context.thread) { return; } @@ -3679,6 +3816,7 @@ if (Conf['Quote Hash Navigation']) { this.node = function() { var link, _i, _len, _ref; + _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3691,6 +3829,7 @@ } else { this.node = function() { var link, _i, _len, _ref; + _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3717,6 +3856,7 @@ }, toggle: function(e) { var boardID, context, postID, threadID, _ref; + if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || e.button !== 0) { return; } @@ -3742,6 +3882,7 @@ }, add: function(quotelink, boardID, threadID, postID, context) { var inline, isBacklink, post, qroot, root; + isBacklink = $.hasClass(quotelink, 'backlink'); inline = $.el('div', { id: "i" + postID, @@ -3766,6 +3907,7 @@ }, rm: function(quotelink, boardID, threadID, postID, context) { var el, inlined, isBacklink, post, qroot, root, _ref; + isBacklink = $.hasClass(quotelink, 'backlink'); root = QuoteInline.findRoot(quotelink, isBacklink); root = $.x("following-sibling::div[@id='i" + postID + "'][1]", root); @@ -3807,6 +3949,7 @@ }, node: function() { var boardID, op, postID, quotelink, quotelinks, quotes, _i, _j, _len, _len1, _ref; + if (this.isClone && this.thread === this.context.thread) { return; } @@ -3849,6 +3992,7 @@ }, node: function() { var link, _i, _len, _ref; + _ref = this.nodes.quotelinks.concat(__slice.call(this.nodes.backlinks)); for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; @@ -3857,6 +4001,7 @@ }, mouseover: function(e) { var boardID, clone, origin, post, postID, posts, qp, quote, quoterID, threadID, _i, _j, _len, _len1, _ref, _ref1; + if ($.hasClass(this, 'inlined')) { return; } @@ -3900,6 +4045,7 @@ }, mouseout: function() { var clone, post, root, _i, _len, _ref; + if (!(root = this.el.firstElementChild)) { return; } @@ -3929,6 +4075,7 @@ }, node: function() { var boardID, postID, quotelink, _i, _len, _ref, _ref1, _ref2; + if (this.isClone) { return; } @@ -3951,6 +4098,7 @@ QuoteThreading = { init: function() { var input; + if (!(Conf['Quote Threading'] && g.VIEW === 'thread')) { return; } @@ -3973,6 +4121,7 @@ }, setup: function() { var ID, post, posts; + $.off(d, '4chanXInitFinished', QuoteThreading.setup); posts = g.posts; for (ID in posts) { @@ -3985,6 +4134,7 @@ }, node: function() { var ID, fullID, keys, len, post, posts, qid, quote, quotes, uniq, _i, _len; + if (this.isClone || !QuoteThreading.enabled || this.thread.OP === this) { return; } @@ -4014,6 +4164,7 @@ }, nodeinsert: function() { var bottom, height, qpost, qroot, threadContainer, top, _ref; + qpost = g.posts[this.threaded]; delete this.threaded; delete this.cb; @@ -4042,6 +4193,7 @@ }, toggle: function() { var container, containers, node, post, replies, reply, thread, _i, _j, _k, _len, _len1, _len2, _ref; + thread = $('.thread'); replies = $$('.thread > .replyContainer, .threadContainer > .replyContainer', thread); QuoteThreading.enabled = this.checked; @@ -4058,6 +4210,7 @@ } else { replies.sort(function(a, b) { var aID, bID; + aID = Number(a.id.slice(2)); bID = Number(b.id.slice(2)); return aID - bID; @@ -4078,6 +4231,7 @@ }, kb: function() { var control; + control = $.id('threadingControl'); return control.click(); } @@ -4104,6 +4258,7 @@ }, node: function() { var quotelink, _i, _len, _ref; + if (this.isClone) { return; } @@ -4126,6 +4281,7 @@ cb: { seek: function(type) { var highlight, post, posts, result, str; + if (!(Conf['Mark Quotes of You'] && Conf['Quick Reply'])) { return; } @@ -4181,6 +4337,7 @@ }, node: function() { var deadlink, _i, _len, _ref; + _ref = $$('.deadlink', this.nodes.comment); for (_i = 0, _len = _ref.length; _i < _len; _i++) { deadlink = _ref[_i]; @@ -4195,6 +4352,7 @@ }, parseDeadlink: function(deadlink) { var a, boardID, m, post, postID, quote, quoteID, redirect, _ref; + if (deadlink.parentNode.className === 'prettyprint') { Quotify.fixDeadlink(deadlink); return; @@ -4287,6 +4445,7 @@ }, node: function() { var data, el, end, endNode, i, index, items, lIndex, length, link, links, node, range, result, saved, snapshot, space, test, text, _i, _len, _ref; + if (this.isClone) { if (Conf['Embedding']) { i = 0; @@ -4369,6 +4528,7 @@ }, makeRange: function(startNode, endNode, startOffset, endOffset) { var range; + range = document.createRange(); range.setStart(startNode, startOffset); range.setEnd(endNode, endOffset); @@ -4376,6 +4536,7 @@ }, makeLink: function(_arg) { var a, range, text; + range = _arg[0], text = _arg[1]; text; text = text.contains(':') ? text : (text.contains('@') ? 'mailto:' : 'http://') + text; @@ -4391,6 +4552,7 @@ }, services: function(link) { var href, key, match, type, _ref; + href = link.href; _ref = Linkify.types; for (key in _ref) { @@ -4403,6 +4565,7 @@ }, embed: function(data) { var embed, href, key, link, name, options, uid, value, _ref; + key = data[0], uid = data[1], options = data[2], link = data[3]; href = link.href; embed = $.el('a', { @@ -4431,6 +4594,7 @@ }, title: function(data) { var embed, err, key, link, options, service, title, titles, uid; + key = data[0], uid = data[1], options = data[2], link = data[3], embed = data[4]; if (!(service = Linkify.types[key].title)) { return; @@ -4467,18 +4631,21 @@ cb: { toggle: function() { var string, _ref; + _ref = $.hasClass(this, "embedded") ? ['unembed', '(embed)'] : ['embed', '(unembed)'], string = _ref[0], this.textContent = _ref[1]; $.replace(this.previousElementSibling, Linkify.cb[string](this)); return $.toggleClass(this, 'embedded'); }, embed: function(a) { var el, style, type; + el = (type = Linkify.types[a.dataset.key]).el(a); el.style.cssText = (style = type.style) ? style : "border: 0; width: 640px; height: 390px"; return el; }, unembed: function(a) { var el; + el = $.el('a', { rel: 'nofollow noreferrer', target: 'blank', @@ -4491,6 +4658,7 @@ }, title: function(response, data) { var embed, key, link, options, service, text, uid; + key = data[0], uid = data[1], options = data[2], link = data[3], embed = data[4]; service = Linkify.types[key].title; switch (response.status) { @@ -4530,6 +4698,7 @@ regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/, el: function(a) { var div; + return div = $.el('iframe', { src: "http://www.purplegene.com/script?url=https://gist.github.com/" + a.dataset.uid + ".js" }); @@ -4540,6 +4709,7 @@ }, text: function(_arg) { var file, files; + files = _arg.files; for (file in files) { if (files.hasOwnProperty(file)) { @@ -4587,6 +4757,7 @@ regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/, el: function(a) { var div; + return div = $.el('iframe', { src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid }); @@ -4597,6 +4768,7 @@ style: 'height: auto; width: 500px; display: inline-block;', el: function(a) { var div; + div = $.el('div', { className: "soundcloud", name: "soundcloud" @@ -4622,6 +4794,7 @@ style: "border: none; width: 640px; height: 360px;", el: function(a) { var channel, chapter, result, _; + if (result = /(\w+)\/(?:[a-z]\/)?(\d+)/i.exec(a.dataset.uid)) { _ = result[0], channel = result[1], chapter = result[2]; return $.el('object', { @@ -4693,6 +4866,7 @@ QR = { init: function() { var sc; + if (!Conf['Quick Reply']) { return; } @@ -4739,6 +4913,7 @@ }, initReady: function() { var link; + QR.postingIsEnabled = !!$.id('postForm'); if (!QR.postingIsEnabled) { return; @@ -4758,11 +4933,13 @@ $.before($.id('postForm'), link); $.on(d, 'QRGetSelectedPost', function(_arg) { var cb; + cb = _arg.detail; return cb(QR.selected); }); $.on(d, 'QRAddPreSubmitHook', function(_arg) { var cb; + cb = _arg.detail; return QR.preSubmitHooks.push(cb); }); @@ -4792,6 +4969,7 @@ }, open: function() { var err; + if (QR.nodes) { QR.nodes.el.hidden = false; QR.unhide(); @@ -4810,6 +4988,7 @@ }, close: function() { var post, _i, _len, _ref; + if (QR.req) { QR.abort(); return; @@ -4857,6 +5036,7 @@ }, error: function(err) { var el; + QR.open(); if (typeof err === 'string') { el = $.tn(err); @@ -4884,6 +5064,7 @@ notifications: [], cleanNotifications: function() { var notification, _i, _len, _ref; + _ref = QR.notifications; for (_i = 0, _len = _ref.length; _i < _len; _i++) { notification = _ref[_i]; @@ -4893,6 +5074,7 @@ }, status: function() { var disabled, status, thread, value; + if (!QR.nodes) { return; } @@ -4914,6 +5096,7 @@ QR.persona.getPassword(); return $.get('QR.personas', Conf['QR.personas'], function(_arg) { var arr, item, personas, type, types, _i, _len, _ref; + personas = _arg['QR.personas']; types = { name: [], @@ -4933,6 +5116,7 @@ }, parseItem: function(item, types) { var boards, match, type, val, _ref, _ref1; + if (item[0] === '#') { return; } @@ -4961,6 +5145,7 @@ }, loadPersonas: function(type, arr) { var list, val, _i, _len; + list = $("#list-" + type, QR.nodes.el); for (_i = 0, _len = arr.length; _i < _len; _i++) { val = arr[_i]; @@ -4973,6 +5158,7 @@ }, getPassword: function() { var input, m; + if (!QR.persona.pwd) { QR.persona.pwd = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : (input = $.id('postPassword')) ? input.value : $.id('delPassword').value; } @@ -4981,6 +5167,7 @@ get: function(cb) { return $.get('QR.persona', {}, function(_arg) { var persona; + persona = _arg['QR.persona']; return cb(persona); }); @@ -4988,6 +5175,7 @@ set: function(post) { return $.get('QR.persona', {}, function(_arg) { var persona; + persona = _arg['QR.persona']; persona = { name: post.name, @@ -5001,6 +5189,7 @@ cooldown: { init: function() { var board; + if (!Conf['Cooldown']) { return; } @@ -5042,6 +5231,7 @@ }, sync: function(cooldowns) { var id; + for (id in cooldowns) { QR.cooldown.cooldowns[id] = cooldowns[id]; } @@ -5049,6 +5239,7 @@ }, set: function(data) { var cooldown, delay, hasFile, isReply, isSage, post, req, start, type, upSpd; + if (!Conf['Cooldown']) { return; } @@ -5088,6 +5279,7 @@ }, count: function() { var cooldown, cooldowns, elapsed, hasFile, isReply, isSage, now, post, seconds, start, type, types, upSpd, upSpdAccuracy, update, _ref; + if (!Object.keys(QR.cooldown.cooldowns).length) { $["delete"]("" + g.BOARD + ".cooldown"); delete QR.cooldown.isCounting; @@ -5141,6 +5333,7 @@ }, quote: function(e) { var caretPos, com, index, post, range, s, sel, text, thread, _ref; + if (e != null) { e.preventDefault(); } @@ -5178,6 +5371,7 @@ }, characterCount: function() { var count, counter; + counter = QR.nodes.charCount; count = QR.nodes.com.textLength; counter.textContent = count; @@ -5186,6 +5380,7 @@ }, drag: function(e) { var toggle; + toggle = e.type === 'dragstart' ? $.off : $.on; toggle(d, 'dragover', QR.dragOver); return toggle(d, 'drop', QR.dropFile); @@ -5205,6 +5400,7 @@ }, paste: function(e) { var blob, files, item, _i, _len, _ref; + files = []; _ref = e.clipboardData.items; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -5232,6 +5428,7 @@ }, fileInput: function(files) { var file, length, max, post, _i, _len; + if (files instanceof Event) { files = __slice.call(this.files); QR.nodes.fileInput.value = null; @@ -5280,6 +5477,7 @@ function _Class(select) { var el, event, prev, _i, _len, _ref, _this = this; + el = $.el('a', { className: 'qr-preview', draggable: true, @@ -5333,6 +5531,7 @@ _Class.prototype.rm = function() { var index; + this["delete"](); index = QR.posts.indexOf(this); if (QR.posts.length === 1) { @@ -5352,6 +5551,7 @@ _Class.prototype.lock = function(lock) { var name, _i, _len, _ref; + if (lock == null) { lock = true; } @@ -5376,6 +5576,7 @@ _Class.prototype.select = function() { var rectEl, rectList; + if (QR.selected) { QR.selected.nodes.el.id = null; QR.selected.forceSave(); @@ -5392,6 +5593,7 @@ _Class.prototype.load = function() { var name, _i, _len, _ref; + _ref = ['thread', 'name', 'email', 'sub', 'com']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; @@ -5403,6 +5605,7 @@ _Class.prototype.save = function(input) { var name, _ref; + if (input.type === 'checkbox') { this.spoiler = input.checked; return; @@ -5423,6 +5626,7 @@ _Class.prototype.forceSave = function() { var name, _i, _len, _ref; + if (this !== QR.selected) { return; } @@ -5452,9 +5656,11 @@ _Class.prototype.setThumbnail = function() { var fileURL, img, _this = this; + img = $.el('img'); img.onload = function() { var cv, height, s, width; + s = 90 * 2; if (_this.file.type === 'image/gif') { s *= 3; @@ -5512,9 +5718,11 @@ _Class.prototype.pasteText = function(file) { var reader, _this = this; + reader = new FileReader(); reader.onload = function(e) { var text; + text = e.target.result; if (_this.com) { _this.com += "\n" + text; @@ -5552,6 +5760,7 @@ _Class.prototype.drop = function() { var el, index, newIndex, oldIndex, post; + $.rmClass(this, 'over'); if (!this.draggable) { return; @@ -5586,6 +5795,7 @@ ready: function() { var imgContainer, input, setLifetime, _this = this; + setLifetime = function(e) { return _this.lifetime = e.detail; }; @@ -5622,6 +5832,7 @@ }); $.get('captchas', [], function(_arg) { var captchas; + captchas = _arg.captchas; return _this.sync(captchas); }); @@ -5636,6 +5847,7 @@ }, getOne: function() { var captcha, challenge, response; + this.clear(); if (captcha = this.captchas.shift()) { challenge = captcha.challenge, response = captcha.response; @@ -5660,6 +5872,7 @@ }, save: function() { var response; + if (!(response = this.nodes.input.value.trim())) { return; } @@ -5674,6 +5887,7 @@ }, clear: function() { var captcha, i, now, _i, _len, _ref; + now = Date.now(); _ref = this.captchas; for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { @@ -5691,6 +5905,7 @@ }, load: function() { var challenge; + if (!this.nodes.challenge.firstChild) { return; } @@ -5703,6 +5918,7 @@ }, count: function() { var count; + count = this.captchas.length; this.nodes.input.placeholder = (function() { switch (count) { @@ -5735,6 +5951,7 @@ }, dialog: function() { var dialog, i, items, mimeTypes, name, nodes, thread; + dialog = UI.dialog('qr', 'top:0;right:0;', "
×
No selected file×+
"); QR.nodes = nodes = { el: dialog, @@ -5836,6 +6053,7 @@ preSubmitHooks: [], submit: function(e) { var challenge, err, extra, filetag, hook, options, post, postData, response, textOnly, thread, threadID, _i, _len, _ref, _ref1; + if (e != null) { e.preventDefault(); } @@ -5949,6 +6167,7 @@ }, response: function() { var URL, ban, board, err, h1, isReply, m, post, postID, req, resDoc, threadID, _, _ref, _ref1; + req = QR.req; delete QR.req; post = QR.posts[0]; @@ -6046,6 +6265,7 @@ FappeTyme = { init: function() { var el, input; + if (!Conf['Fappe Tyme'] || g.VIEW === 'catalog' || g.BOARD === 'f') { return; } @@ -6097,6 +6317,7 @@ }, node: function() { var thumb, _ref; + if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6121,6 +6342,7 @@ }, toggleAll: function() { var ID, file, func, post, _i, _len, _ref, _ref1; + $.event('CloseMenu'); if (ImageExpand.on = $.hasClass(ImageExpand.EAI, 'expand-all-shortcut')) { ImageExpand.EAI.className = 'contract-all-shortcut'; @@ -6154,6 +6376,7 @@ }, toggle: function(post) { var headRect, rect, root, thumb, x, y; + thumb = post.file.thumb; if (!(post.file.isExpanded || $.hasClass(thumb, 'expanding'))) { ImageExpand.expand(post); @@ -6163,6 +6386,7 @@ root = post.nodes.root; rect = (Conf['Advance on contract'] ? (function() { var next; + next = root; while (next = $.x("following::div[contains(@class,'postContainer')][1]", next)) { if ($('.stub', next) || next.offsetHeight === 0) { @@ -6193,6 +6417,7 @@ }, expand: function(post, src) { var img, thumb; + thumb = post.file.thumb; if (post.isHidden || post.file.isExpanded || $.hasClass(thumb, 'expanding')) { return; @@ -6220,6 +6445,7 @@ }, completeExpand: function(post) { var prev, thumb; + thumb = post.file.thumb; if (!$.hasClass(thumb, 'expanding')) { return; @@ -6233,6 +6459,7 @@ prev = post.nodes.root.getBoundingClientRect(); return $.queueTask(function() { var curr; + $.addClass(post.nodes.root, 'expanded-image'); $.rmClass(post.file.thumb, 'expanding'); if (!(prev.top + prev.height <= 0)) { @@ -6244,6 +6471,7 @@ }, error: function() { var URL, post, src, timeoutID; + post = Get.postFromNode(this); $.rm(this); delete post.file.fullImage; @@ -6269,6 +6497,7 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; + if (this.status !== 200) { return; } @@ -6292,6 +6521,7 @@ menu: { init: function() { var conf, createSubEntry, el, name, subEntries, _ref; + if (g.VIEW === 'catalog' || !Conf['Image Expansion']) { return; } @@ -6315,6 +6545,7 @@ }, createSubEntry: function(name, desc) { var input, label; + label = $.el('label', { innerHTML: " " + name, title: desc @@ -6348,6 +6579,7 @@ }, node: function() { var _ref; + if (!((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6355,6 +6587,7 @@ }, mouseover: function(e) { var el, post; + post = Get.postFromNode(this); el = $.el('img', { id: 'ihover', @@ -6376,6 +6609,7 @@ error: function() { var URL, post, src, timeoutID, _this = this; + if (!doc.contains(this)) { return; } @@ -6400,6 +6634,7 @@ return $.ajax("//api.4chan.org/" + post.board + "/res/" + post.thread + ".json", { onload: function() { var postObj, _i, _len, _ref; + if (this.status !== 200) { return; } @@ -6425,6 +6660,7 @@ ImageLoader = { init: function() { var prefetch; + if (g.VIEW === 'catalog') { return; } @@ -6451,6 +6687,7 @@ }, node: function() { var URL, img, string, style, thumb, type, _ref, _ref1; + if (this.isClone || this.isHidden || this.thread.isHidden || !((_ref = this.file) != null ? _ref.isImage : void 0)) { return; } @@ -6472,6 +6709,7 @@ }, toggle: function() { var enabled, id, post, _ref; + enabled = Conf['prefetch'] = this.checked; if (enabled) { _ref = g.threads["" + g.BOARD.ID + "." + g.THREADID].posts; @@ -6495,6 +6733,7 @@ }, node: function() { var thumb, _ref; + if (this.isClone || !((_ref = this.file) != null ? _ref.isSpoiler : void 0)) { return; } @@ -6507,6 +6746,7 @@ Sauce = { init: function() { var err, link, links, _i, _len, _ref; + if (g.VIEW === 'catalog' || !Conf['Sauce']) { return; } @@ -6536,6 +6776,7 @@ }, createSauceLink: function(link) { var m, text; + link = link.replace(/%(T?URL|MD5|board)/ig, function(parameter) { switch (parameter) { case '%TURL': @@ -6556,6 +6797,7 @@ }, node: function() { var link, nodes, _i, _len, _ref; + if (this.isClone || !this.file) { return; } @@ -6572,6 +6814,7 @@ ArchiveLink = { init: function() { var div, entry, type, _i, _len, _ref; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Archive Link']) { return; } @@ -6584,6 +6827,7 @@ order: 90, open: function(_arg) { var ID, board, thread; + ID = _arg.ID, thread = _arg.thread, board = _arg.board; return !!Redirect.to('thread', { postID: ID, @@ -6602,12 +6846,14 @@ }, createSubEntry: function(text, type) { var el, open; + el = $.el('a', { textContent: text, target: '_blank' }); open = type === 'post' ? function(_arg) { var ID, board, thread; + ID = _arg.ID, thread = _arg.thread, board = _arg.board; el.href = Redirect.to('thread', { postID: ID, @@ -6617,6 +6863,7 @@ return true; } : function(post) { var value; + value = Filter[type](post); if (!value) { return false; @@ -6639,6 +6886,7 @@ DeleteLink = { init: function() { var div, fileEl, fileEntry, postEl, postEntry; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Delete Link']) { return; } @@ -6666,6 +6914,7 @@ el: fileEl, open: function(_arg) { var file; + file = _arg.file; if (!file || file.isDead) { return false; @@ -6681,6 +6930,7 @@ order: 40, open: function(post) { var node; + if (post.isDead || post.board.ID === 'q') { return false; } @@ -6695,6 +6945,7 @@ }, "delete": function() { var fileOnly, form, link, post; + post = DeleteLink.post; if (DeleteLink.cooldown.counting === post) { return; @@ -6724,6 +6975,7 @@ }, load: function(link, post, fileOnly, resDoc) { var msg, s; + if (resDoc.title === '4chan - Banned') { s = 'Banned!'; } else if (msg = resDoc.getElementById('errmsg')) { @@ -6744,6 +6996,7 @@ cooldown: { start: function(post, node) { var length, seconds, _ref; + if (!((_ref = QR.db) != null ? _ref.get({ boardID: post.board.ID, threadID: post.thread.ID, @@ -6777,6 +7030,7 @@ DownloadLink = { init: function() { var a; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Download Link']) { return; } @@ -6790,6 +7044,7 @@ order: 100, open: function(_arg) { var file; + file = _arg.file; if (!file) { return false; @@ -6804,6 +7059,7 @@ Menu = (function() { var a; + a = $.el('a', { className: 'menu-button fourchanx-link', innerHTML: '', @@ -6822,6 +7078,7 @@ }, node: function() { var button; + if (this.isClone) { button = $('.menu-button', this.nodes.info); } else { @@ -6832,6 +7089,7 @@ }, makeButton: function() { var el; + el = a.cloneNode(true); $.on(el, 'click', Menu.toggle); return el; @@ -6845,6 +7103,7 @@ ReportLink = { init: function() { var a; + if (g.VIEW === 'catalog' || !Conf['Menu'] || !Conf['Report Link']) { return; } @@ -6866,6 +7125,7 @@ }, report: function() { var id, post, set, url; + post = ReportLink.post; url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post; id = Date.now(); @@ -6878,6 +7138,7 @@ init: function() { return $.ready(function() { var href; + Favicon.el = $('link[rel="shortcut icon"]', d.head); Favicon.el.type = 'image/x-icon'; href = Favicon.el.href; @@ -6950,6 +7211,7 @@ init: function() { var sc, _this = this; + if (g.VIEW !== 'thread' || !Conf['Thread Stats']) { return; } @@ -6978,6 +7240,7 @@ }, node: function() { var ID, fileCount, post, postCount, _ref; + postCount = 0; fileCount = 0; _ref = this.posts; @@ -6995,6 +7258,7 @@ }, onUpdate: function(e) { var fileCount, postCount, _ref; + if (e.detail[404]) { return; } @@ -7003,6 +7267,7 @@ }, update: function(postCount, fileCount) { var fileCountEl, postCountEl, thread; + thread = ThreadStats.thread, postCountEl = ThreadStats.postCountEl, fileCountEl = ThreadStats.fileCountEl; postCountEl.textContent = postCount; fileCountEl.textContent = fileCount; @@ -7027,6 +7292,7 @@ }, onThreadsLoad: function() { var page, pages, thread, _i, _j, _len, _len1, _ref; + if (!(Conf["Page Count in Stats"] && this.status === 200)) { return; } @@ -7050,6 +7316,7 @@ init: function() { var checked, conf, el, input, name, sc, settings, subEntries, _ref, _this = this; + if (g.VIEW !== 'thread' || !Conf['Thread Updater']) { return; } @@ -7199,6 +7466,7 @@ }, interval: function() { var val; + val = +this.value; if (val < 1) { val = 1; @@ -7208,6 +7476,7 @@ }, load: function() { var klass, req, text, _ref; + req = ThreadUpdater.req; switch (req.status) { case 200: @@ -7240,6 +7509,7 @@ }, getInterval: function() { var i, j; + i = ThreadUpdater.interval; j = Math.min(ThreadUpdater.outdateCount, 10); if (!d.hidden) { @@ -7249,12 +7519,14 @@ }, intervalShortcut: function() { var settings; + Settings.open('Advanced'); settings = $.id('fourchanx-settings'); return $('input[name=Interval]', settings).focus(); }, set: function(name, text, klass) { var el, node; + el = ThreadUpdater[name]; if (node = el.firstChild) { node.data = text; @@ -7267,6 +7539,7 @@ }, timeout: function() { var n; + ThreadUpdater.timeoutID = setTimeout(ThreadUpdater.timeout, 1000); if (!(n = --ThreadUpdater.seconds)) { return ThreadUpdater.update(); @@ -7279,6 +7552,7 @@ }, update: function() { var url; + if (!ThreadUpdater.online) { return; } @@ -7301,6 +7575,7 @@ }, updateThreadStatus: function(title, OP) { var icon, message, root, titleLC; + titleLC = title.toLowerCase(); if (ThreadUpdater.thread["is" + title] === !!OP[titleLC]) { return; @@ -7327,6 +7602,7 @@ }, parse: function(postObjects) { var ID, OP, count, deletedFiles, deletedPosts, files, index, key, node, num, post, postObject, posts, root, scroll, _i, _len, _ref; + OP = postObjects[0]; Build.spoilerRange[ThreadUpdater.thread.board] = OP.custom_spoiler; ThreadUpdater.updateThreadStatus('Sticky', OP); @@ -7412,6 +7688,7 @@ } $.queueTask(function() { var length, threadID; + threadID = ThreadUpdater.thread.ID; length = $$('.thread > .postContainer', ThreadUpdater.root).length; return Fourchan.parseThread(threadID, length - count, length); @@ -7432,6 +7709,7 @@ ThreadWatcher = { init: function() { var now, sc; + if (!Conf['Thread Watcher']) { return; } @@ -7464,6 +7742,7 @@ } $.get('WatchedThreads', null, function(_arg) { var WatchedThreads, boardID, data, threadID, threads, _ref; + WatchedThreads = _arg.WatchedThreads; if (!WatchedThreads) { return; @@ -7489,6 +7768,7 @@ }, node: function() { var toggler; + toggler = $.el('img', { className: 'watch-thread-link' }); @@ -7510,6 +7790,7 @@ } return $.get('AutoWatch', 0, function(_arg) { var AutoWatch, thread; + AutoWatch = _arg.AutoWatch; if (!(thread = g.BOARD.threads[AutoWatch])) { return; @@ -7525,6 +7806,7 @@ cb: { openAll: function() { var a, _i, _len, _ref; + if ($.hasClass(this, 'disabled')) { return; } @@ -7543,6 +7825,7 @@ }, pruneDeads: function() { var boardID, data, threadID, _i, _len, _ref, _ref1; + if ($.hasClass(this, 'disabled')) { return; } @@ -7566,11 +7849,13 @@ }, rm: function() { var boardID, threadID, _ref; + _ref = this.parentNode.dataset.fullID.split('.'), boardID = _ref[0], threadID = _ref[1]; return ThreadWatcher.rm(boardID, +threadID); }, post: function(e) { var board, postID, threadID, _ref; + _ref = e.detail, board = _ref.board, postID = _ref.postID, threadID = _ref.threadID; if (postID === threadID) { if (Conf['Auto Watch']) { @@ -7582,6 +7867,7 @@ }, threadUpdate: function(e) { var thread; + thread = e.detail.thread; if (!(e.detail[404] && ThreadWatcher.db.get({ boardID: thread.board.ID, @@ -7598,6 +7884,7 @@ }, fetchAllStatus: function() { var thread, _i, _len, _ref; + ThreadWatcher.status.textContent = '...'; _ref = ThreadWatcher.getAll(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -7607,6 +7894,7 @@ }, fetchStatus: function(_arg) { var boardID, data, fetchCount, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, data = _arg.data; if (data.isDead) { return; @@ -7616,6 +7904,7 @@ return $.ajax("//api.4chan.org/" + boardID + "/res/" + threadID + ".json", { onloadend: function() { var status; + fetchCount.fetched++; if (fetchCount.fetched === fetchCount.fetching) { fetchCount.fetched = 0; @@ -7646,6 +7935,7 @@ }, getAll: function() { var all, boardID, data, threadID, threads, _ref; + all = []; _ref = ThreadWatcher.db.data.boards; for (boardID in _ref) { @@ -7666,6 +7956,7 @@ }, makeLine: function(boardID, threadID, data) { var div, fullID, href, link, x; + x = $.el('a', { textContent: '×', href: 'javascript:;' @@ -7696,6 +7987,7 @@ }, refresh: function() { var boardID, data, list, nodes, refresher, thread, threadID, toggler, watched, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3; + nodes = []; _ref = ThreadWatcher.getAll(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -7723,6 +8015,7 @@ }, toggle: function(thread) { var boardID, threadID; + boardID = thread.board.ID; threadID = thread.ID; if (ThreadWatcher.db.get({ @@ -7736,6 +8029,7 @@ }, add: function(thread) { var boardID, data, threadID; + data = {}; boardID = thread.board.ID; threadID = thread.ID; @@ -7766,6 +8060,7 @@ }, convert: function(oldFormat) { var boardID, data, newFormat, threadID, threads; + newFormat = {}; for (boardID in oldFormat) { threads = oldFormat[boardID]; @@ -7782,6 +8077,7 @@ refreshers: [], init: function() { var menu; + if (!Conf['Thread Watcher']) { return; } @@ -7794,6 +8090,7 @@ }, addHeaderMenuEntry: function() { var entryEl; + if (g.VIEW !== 'thread') { return; } @@ -7810,6 +8107,7 @@ }); return this.refreshers.push(function() { var addClass, rmClass, text, _ref; + _ref = $('.current', ThreadWatcher.list) ? ['unwatch-thread', 'watch-thread', 'Unwatch thread'] : ['watch-thread', 'unwatch-thread', 'Watch thread'], addClass = _ref[0], rmClass = _ref[1], text = _ref[2]; $.addClass(entryEl, addClass); $.rmClass(entryEl, rmClass); @@ -7818,6 +8116,7 @@ }, addMenuEntries: function() { var cb, conf, entries, entry, name, refresh, subEntries, _i, _len, _ref, _ref1, _results; + entries = []; entries.push({ cb: ThreadWatcher.cb.openAll, @@ -7888,6 +8187,7 @@ }, createSubEntry: function(name, desc) { var entry, input; + entry = { type: 'thread watcher', el: $.el('label', { @@ -7939,6 +8239,7 @@ }, ready: function() { var ID, post, posts, _ref; + $.off(d, '4chanXInitFinished', Unread.ready); posts = []; _ref = Unread.thread.posts; @@ -7955,6 +8256,7 @@ }, scroll: function() { var checkPosition, hash, onload, post, posts, root; + if ((hash = location.hash.match(/\d+/)) && hash[0] in Unread.thread.posts) { return; } @@ -7984,6 +8286,7 @@ } checkPosition = function(target) { var height, top, _ref; + _ref = target.getBoundingClientRect(), top = _ref.top, height = _ref.height; return top + height - doc.clientHeight > 0; }; @@ -7991,6 +8294,7 @@ }, sync: function() { var lastReadPost; + lastReadPost = Unread.db.get({ boardID: Unread.thread.board.ID, threadID: Unread.thread.ID, @@ -8007,6 +8311,7 @@ }, addPosts: function(posts) { var ID, data, post, _i, _len; + for (_i = 0, _len = posts.length; _i < _len; _i++) { post = posts[_i]; ID = post.ID; @@ -8034,6 +8339,7 @@ }, addPostQuotingYou: function(post) { var quotelink, _i, _len, _ref; + if (!QR.db) { return; } @@ -8054,6 +8360,7 @@ }, readSinglePost: function(post) { var i; + if ((i = Unread.posts.indexOf(post)) === -1) { return; } @@ -8069,6 +8376,7 @@ }, readArray: function(arr) { var i, post, _i, _len; + for (i = _i = 0, _len = arr.length; _i < _len; i = ++_i) { post = arr[i]; if (post.ID > Unread.lastReadPost) { @@ -8079,6 +8387,7 @@ }, read: $.debounce(50, function(e) { var ID, bottom, height, i, post, posts; + if (d.hidden || !Unread.posts.length) { return; } @@ -8134,6 +8443,7 @@ }), setLine: function(force) { var post, root; + if (!(d.hidden || force === true)) { return; } @@ -8148,6 +8458,7 @@ }, update: function(dontrepeat) { var count; + count = Unread.posts.length; if (Conf['Unread Count']) { d.title = "" + (Conf['Quoted Title'] && Unread.postsQuotingYou.length ? '(!) ' : '') + (count || !Conf['Hide Unread Count at (0)'] ? "(" + count + ") " : '') + (g.DEAD ? "/" + g.BOARD + "/ - 404" : "" + Unread.title); @@ -8173,6 +8484,7 @@ }, init: function() { var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2; + _ref = Conf['selectedArchives']; for (boardID in _ref) { data = _ref[boardID]; @@ -8304,6 +8616,7 @@ }, to: function(dest, data) { var archive; + archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID]; if (!archive) { return ''; @@ -8312,6 +8625,7 @@ }, protocol: function(archive) { var protocol; + protocol = location.protocol; if (!archive[protocol.slice(0, -1)]) { protocol = protocol === 'https:' ? 'http:' : 'https:'; @@ -8320,6 +8634,7 @@ }, thread: function(archive, _arg) { var boardID, path, postID, threadID; + boardID = _arg.boardID, threadID = _arg.threadID, postID = _arg.postID; path = threadID ? "" + boardID + "/thread/" + threadID : "" + boardID + "/post/" + postID; if (archive.software === 'foolfuuka') { @@ -8332,6 +8647,7 @@ }, post: function(archive, _arg) { var URL, boardID, postID, protocol; + boardID = _arg.boardID, postID = _arg.postID; protocol = Redirect.protocol(archive); if (['Foolz', 'NSFW Foolz'].contains(archive.name)) { @@ -8343,11 +8659,13 @@ }, file: function(archive, _arg) { var boardID, filename; + boardID = _arg.boardID, filename = _arg.filename; return "" + (Redirect.protocol(archive)) + archive.domain + "/" + boardID + "/full_image/" + filename; }, search: function(archive, _arg) { var boardID, path, type, value; + boardID = _arg.boardID, type = _arg.type, value = _arg.value; type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type; value = encodeURIComponent(value); @@ -8366,6 +8684,7 @@ }, setup: function() { var btn, entry, psa; + $.off(d, '4chanXInitFinished', PSAHiding.setup); if (!(psa = $.id('globalMessage'))) { $.rmClass(doc, 'hide-announcement'); @@ -8394,6 +8713,7 @@ $.on(btn, 'click', PSAHiding.toggle); $.get('hiddenPSA', 0, function(_arg) { var hiddenPSA; + hiddenPSA = _arg.hiddenPSA; PSAHiding.sync(hiddenPSA); $.before(psa, btn); @@ -8403,6 +8723,7 @@ }, toggle: function(e) { var UTC; + if ($.hasClass(this, 'hide-announcement')) { UTC = +$.id('globalMessage').dataset.utc; $.set('hiddenPSA', UTC); @@ -8414,6 +8735,7 @@ }, sync: function(UTC) { var hr, psa; + psa = $.id('globalMessage'); psa.hidden = PSAHiding.btn.hidden = UTC && UTC >= +psa.dataset.utc ? true : false; if ((hr = psa.nextElementSibling) && hr.nodeName === 'HR') { @@ -8425,6 +8747,7 @@ CatalogLinks = { init: function() { var el, input; + if (!Conf['Catalog Links']) { return; } @@ -8448,12 +8771,14 @@ }, toggle: function() { var useCatalog; + $.event('CloseMenu'); $.set('Header catalog links', useCatalog = this.checked); return CatalogLinks.set(useCatalog); }, set: function(useCatalog) { var a, board, path, _i, _len, _ref; + path = useCatalog ? 'catalog' : ''; _ref = $$("#board-list a[href*=\"boards.4chan.org\"]:not(.catalog),\n#boardNavDesktopFoot a[href*=\"boards.4chan.org\"]"); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -8487,6 +8812,7 @@ }, node: function() { var str, uid; + str = this.info.uniqueID; uid = $('.hand', this.nodes.uniqueID); if (!(str && uid && uid.nodeName === 'SPAN')) { @@ -8497,6 +8823,7 @@ ids: {}, compute: function(str) { var hash, rgb; + hash = this.hash(str); rgb = [(hash >> 24) & 0xFF, (hash >> 16) & 0xFF, (hash >> 8) & 0xFF]; rgb[3] = ((rgb[0] * 0.299) + (rgb[1] * 0.587) + (rgb[2] * 0.114)) > 125; @@ -8508,6 +8835,7 @@ }, hash: function(str) { var i, j, msg; + msg = 0; i = 0; j = str.length; @@ -8555,6 +8883,7 @@ }, node: function() { var dicestats, roll, _ref; + if (this.isClone || !(dicestats = (_ref = this.info.email) != null ? _ref.match(/dice[+\s](\d+)d(\d+)/) : void 0)) { return; } @@ -8566,6 +8895,7 @@ Emoji = { init: function() { var css, icon, name, pos, _ref; + if (!Conf['Emoji']) { return; } @@ -8635,6 +8965,7 @@ }, node: function() { var a; + if (a = $('.abbr > a:not([onclick])', this.nodes.comment)) { return $.on(a, 'click', ExpandComment.cb); } @@ -8646,6 +8977,7 @@ }, expand: function(post) { var a; + if (post.nodes.longComment && !post.nodes.longComment.parentNode) { $.replace(post.nodes.shortComment, post.nodes.longComment); post.nodes.comment = post.nodes.longComment; @@ -8661,6 +8993,7 @@ }, contract: function(post) { var a; + if (!post.nodes.shortComment) { return; } @@ -8671,6 +9004,7 @@ }, parse: function(req, a, post) { var callback, clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; + status = req.status; if (![200, 304].contains(status)) { a.textContent = "Error " + req.statusText + " (" + status + ")"; @@ -8733,6 +9067,7 @@ }, node: function() { var a, files, posts, span, _ref; + if (!(span = $.x('following-sibling::span[contains(@class,"summary")][1]', this.OP.nodes.root))) { return; } @@ -8753,6 +9088,7 @@ }, toggle: function(thread) { var a, files, filesCount, inlined, num, post, posts, postsCount, reply, threadRoot, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4; + threadRoot = thread.OP.nodes.root.parentNode; a = $('.summary', threadRoot); switch (thread.isExpanded) { @@ -8830,6 +9166,7 @@ }, parse: function(req, thread, a) { var filesCount, link, post, posts, postsCount, postsObj, postsRoot, reply, root, spoilerRange, _i, _len; + if (a.textContent[0] === '+') { return; } @@ -8893,6 +9230,7 @@ }, createFunc: function(format) { var code; + code = format.replace(/%(.)/g, function(s, c) { if (c in FileInfo.formatters) { return "' + FileInfo.formatters." + c + ".call(post) + '"; @@ -8904,6 +9242,7 @@ }, convertUnit: function(size, unit) { var i; + if (unit === 'B') { return "" + (size.toFixed()) + " Bytes"; } @@ -8934,6 +9273,7 @@ }, n: function() { var fullname, shortname; + fullname = this.file.name; shortname = Build.shortFilename(this.file.name, this.isReply); if (fullname === shortname) { @@ -8977,6 +9317,7 @@ Fourchan = { init: function() { var board; + if (g.VIEW === 'catalog') { return; } @@ -8998,6 +9339,7 @@ }, code: function() { var pre, _i, _len, _ref; + if (this.isClone) { return; } @@ -9027,11 +9369,13 @@ Keybinds = { init: function() { var init; + if (g.VIEW === 'catalog' || !Conf['Keybinds']) { return; } init = function() { var node, _i, _len, _ref; + $.off(d, '4chanXInitFinished', init); $.on(d, 'keydown', Keybinds.keydown); _ref = $$('[accesskey]'); @@ -9044,6 +9388,7 @@ }, keydown: function(e) { var form, key, notification, notifications, op, target, thread, threadRoot, _i, _len; + if (!(key = Keybinds.keyCode(e))) { return; } @@ -9224,6 +9569,7 @@ }, keyCode: function(e) { var kc, key; + key = (function() { switch (kc = e.keyCode) { case 8: @@ -9279,6 +9625,7 @@ }, tags: function(tag, ta) { var range, selEnd, selStart, value; + value = ta.value; selStart = ta.selectionStart; selEnd = ta.selectionEnd; @@ -9289,11 +9636,13 @@ }, sage: function() { var isSage; + isSage = /sage/i.test(QR.nodes.email.value); return QR.nodes.email.value = isSage ? "" : "sage"; }, img: function(thread, all) { var post; + if (all) { return ImageExpand.cb.toggleAll(); } else { @@ -9303,6 +9652,7 @@ }, open: function(thread, tab) { var url; + if (g.VIEW !== 'index') { return; } @@ -9315,6 +9665,7 @@ }, hl: function(delta, thread) { var axe, headRect, next, postEl, rect, replies, reply, root, topMargin, _i, _len; + if (!delta) { if (postEl = $('.reply.highlight', thread)) { $.rmClass(postEl, 'highlight'); @@ -9374,6 +9725,7 @@ Nav = { init: function() { var append, next, prev, span; + switch (g.VIEW) { case 'index': if (!Conf['Index Navigation']) { @@ -9424,6 +9776,7 @@ }, getThread: function(full) { var headRect, i, rect, thread, threads, topMargin, _i, _len; + if (Conf['Bottom header'] || !Conf['Fixed Header']) { topMargin = 0; } else { @@ -9449,6 +9802,7 @@ }, scroll: function(delta) { var i, rect, thread, threads, top, topMargin, _ref, _ref1; + _ref = Nav.getThread(true), threads = _ref[0], thread = _ref[1], i = _ref[2], rect = _ref[3], topMargin = _ref[4]; top = rect.top - topMargin; if ((delta === -1 && top > -5) || (delta === +1 && top < 5)) { @@ -9473,6 +9827,7 @@ }, node: function() { var dateEl; + if (this.isClone) { return; } @@ -9482,6 +9837,7 @@ }, relative: function(diff, now, date) { var days, months, number, rounded, unit, years; + unit = (number = diff / $.DAY) >= 1 ? (years = now.getYear() - date.getYear(), months = now.getMonth() - date.getMonth(), days = now.getDate() - date.getDate(), years > 1 ? (number = years - (months < 0 || months === 0 && days < 0), 'year') : years === 1 && (months > 0 || months === 0 && days >= 0) ? (number = years, 'year') : (months = (months + 12) % 12) > 1 ? (number = months - (days < 0), 'month') : months === 1 && days >= 0 ? (number = months, 'month') : 'day') : (number = diff / $.HOUR) >= 1 ? 'hour' : (number = diff / $.MINUTE) >= 1 ? 'minute' : (number = Math.max(0, diff) / $.SECOND, 'second'); rounded = Math.round(number); if (rounded !== 1) { @@ -9492,6 +9848,7 @@ stale: [], flush: function() { var now, update, _i, _len, _ref; + if (d.hidden) { return; } @@ -9507,13 +9864,16 @@ }, setUpdate: function(post) { var markStale, setOwnTimeout, update; + setOwnTimeout = function(diff) { var delay; + delay = diff < $.MINUTE ? $.SECOND - (diff + $.SECOND / 2) % $.SECOND : diff < $.HOUR ? $.MINUTE - (diff + $.MINUTE / 2) % $.MINUTE : diff < $.DAY ? $.HOUR - (diff + $.HOUR / 2) % $.HOUR : $.DAY - (diff + $.DAY / 2) % $.DAY; return setTimeout(markStale, delay); }; update = function(now) { var date, diff, relative, singlePost, _i, _len, _ref; + date = post.info.date; diff = now - date; relative = RelativeDates.relative(diff, now, date); @@ -9554,6 +9914,7 @@ }, node: function(post) { var spoiler, spoilers, _i, _len; + spoilers = $$('s', this.nodes.comment); for (_i = 0, _len = spoilers.length; _i < _len; _i++) { spoiler = spoilers[_i]; @@ -9573,6 +9934,7 @@ }, ready: function() { var field; + field = $.id('recaptcha_response_field'); $.on(field, 'keydown', function(e) { if (e.keyCode === 8 && !field.value) { @@ -9581,6 +9943,7 @@ }); return $.on($('form'), 'submit', function(e) { var response; + e.preventDefault(); response = field.value.trim(); if (!/\s/.test(response)) { @@ -9610,6 +9973,7 @@ }, createFunc: function(format) { var code; + code = format.replace(/%([A-Za-z])/g, function(s, c) { if (c in Time.formatters) { return "' + Time.formatters." + c + ".call(date) + '"; @@ -9694,6 +10058,7 @@ Settings = { init: function() { var link, settings; + link = $.el('a', { className: 'settings-link', textContent: 'Settings', @@ -9703,6 +10068,7 @@ Header.addShortcut(link); $.get('previousversion', null, function(item) { var changelog, el, previous; + if (previous = item['previousversion']) { if (previous === g.VERSION) { return; @@ -9740,6 +10106,7 @@ }, open: function(openSection) { var dialog, html, link, links, overlay, section, sectionToOpen, _i, _len, _ref; + $.off(d, '4chanXInitFinished', Settings.open); if (Settings.dialog) { return; @@ -9792,6 +10159,7 @@ sections: [], addSection: function(title, open) { var hyphenatedTitle, _ref; + if (typeof title !== 'string') { _ref = title.detail, title = _ref.title, open = _ref.open; } @@ -9804,6 +10172,7 @@ }, openSection: function() { var section, selected; + if (selected = $('.tab-selected', Settings.dialog)) { $.rmClass(selected, 'tab-selected'); } @@ -9817,6 +10186,7 @@ }, main: function(section) { var arr, button, description, div, fs, hiddenNum, input, inputs, items, key, obj, _ref; + items = {}; inputs = {}; _ref = Config.main; @@ -9841,6 +10211,7 @@ } $.get(items, function(items) { var val; + for (key in items) { val = items[key]; inputs[key].checked = val; @@ -9855,6 +10226,7 @@ boards: {} }, function(item) { var ID, board, thread, _ref1; + _ref1 = item.hiddenThreads.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9869,6 +10241,7 @@ boards: {} }, function(item) { var ID, board, post, thread, _ref1; + _ref1 = item.hiddenPosts.boards; for (ID in _ref1) { board = _ref1[ID]; @@ -9888,6 +10261,7 @@ boards: {} }, function(item) { var boardID; + for (boardID in item.hiddenThreads.boards) { localStorage.removeItem("4chan-hide-t-" + boardID); } @@ -9898,6 +10272,7 @@ }, "export": function(now, data) { var a, db, _i, _len; + if (typeof now !== 'number') { now = Date.now(); data = { @@ -9931,6 +10306,7 @@ }, onImport: function() { var file, output, reader; + if (!(file = this.files[0])) { return; } @@ -9942,6 +10318,7 @@ reader = new FileReader(); reader.onload = function(e) { var data, err; + try { data = JSON.parse(e.target.result); Settings.loadSettings(data); @@ -9958,6 +10335,7 @@ }, loadSettings: function(data) { var key, val, version, _ref; + version = data.version.split('.'); if (version[0] === '2') { data = Settings.convertSettings(data, { @@ -10045,6 +10423,7 @@ }, convertSettings: function(data, map) { var newKey, prevKey; + for (prevKey in map) { newKey = map[prevKey]; if (newKey) { @@ -10056,6 +10435,7 @@ }, filter: function(section) { var select; + section.innerHTML = "
"; select = $('select', section); $.on(select, 'change', Settings.selectFilter); @@ -10063,6 +10443,7 @@ }, selectFilter: function() { var div, name, ta; + div = this.nextElementSibling; if ((name = this.value) !== 'guide') { $.rmAll(div); @@ -10082,6 +10463,7 @@ }, sauce: function(section) { var ta; + section.innerHTML = "
Sauce is disabled.
Lines starting with a # will be ignored.
You can specify a display text by appending ;text:[text] to the URL.
    These parameters will be replaced by their corresponding values:\n
  • %TURL: Thumbnail URL.
  • %URL: Full image URL.
  • %MD5: MD5 hash.
  • %board: Current board.
"; ta = $('textarea', section); $.get('sauces', Conf['sauces'], function(item) { @@ -10091,6 +10473,7 @@ }, advanced: function(section) { var archive, boardID, boardOptions, boardSelect, boards, data, event, input, inputs, item, items, name, row, rows, ta, table, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4; + section.innerHTML = "
Archiver
404 Redirect is disabled.
Thread redirectionPost fetchingFile redirection
Disabled selections indicate that only one archive is available for that board and redirection type.
Custom Board Navigation
New lines will be converted into spaces.

In the following examples for /g/, g can be changed to a different board ID (a, b, etc...), the current board (current), or the Status/Twitter link (status, @).
Board link: g
Title link: g-title
Board link (Replace with title when on that board): g-replace
Full text link: g-full
Custom text link: g-text:\"Install Gentoo\"
Index-only link: g-index
Catalog-only link: g-catalog
External link: external-text:\"Google\",\"http://www.google.com\"
Combinations are possible: g-index-text:\"Technology Index\"
Full board list toggle: toggle-all

[ toggle-all ] [current-title] [g-title / a-title / jp-title] [x / wsg / h] [t-text:\"Piracy\"]
\n will give you
[ + ] [Technology] [Technology / Anime & Manga / Otaku Culture] [x / wsg / h] [Piracy]
\n if you are on /g/.\n
Time Formatting is disabled.
:
Day: %a, %A, %d, %e
Month: %m, %b, %B
Year: %y, %Y
Hour: %k, %H, %l, %I, %p, %P
Minute: %M
Second: %S
Quote Backlinks formatting is disabled.
:
File Info Formatting is disabled.
:
Link: %l (truncated), %L (untruncated), %T (Unix timestamp)
Original file name: %n (truncated), %N (untruncated), %t (Unix timestamp)
Spoiler indicator: %p
Size: %B (Bytes), %K (KB), %M (MB), %s (4chan default)
Resolution: %r (Displays 'PDF' for PDF files)
Quick Reply Personas is disabled.

\n One item per line.
\n Items will be added in the relevant input's auto-completion list.
\n Password items will always be used, since there is no password input.
\n Lines starting with a # will be ignored.\n

    You can use these settings with each item, separate them with semicolons:\n
  • Possible items are: name, email, subject and password.
  • Wrap values of items with quotes, like this: email:\"sage\".
  • Force values as defaults with the always keyword, for example: email:\"sage\";always.
  • Select specific boards for an item, separated with commas, for example: email:\"sage\";boards:jp;always.
Unread Favicon is disabled.
Emoji is disabled.
\n Sage Icon:
\n Position:
Thread Updater is disabled.
\n Interval:
"; items = {}; inputs = {}; @@ -10110,6 +10493,7 @@ $.on(ta, 'change', $.cb.value); $.get(items, function(items) { var key, val; + for (key in items) { val = items[key]; if (['emojiPos'].contains(key)) { @@ -10180,6 +10564,7 @@ }); $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var option, selectedArchives, type; + selectedArchives = _arg.selectedArchives; for (boardID in selectedArchives) { data = selectedArchives[boardID]; @@ -10194,6 +10579,7 @@ }, addArchiveCell: function(boardID, data, type) { var archive, i, length, options, select, td; + length = data[type].length; td = $.el('td', { className: 'archive-cell' @@ -10223,8 +10609,10 @@ }, saveSelectedArchive: function() { var _this = this; + return $.get('selectedArchives', Conf['selectedArchives'], function(_arg) { var selectedArchives, _name; + selectedArchives = _arg.selectedArchives; (selectedArchives[_name = _this.dataset.boardid] || (selectedArchives[_name] = {}))[_this.dataset.type] = _this.value; return $.set('selectedArchives', selectedArchives); @@ -10235,6 +10623,7 @@ }, time: function() { var funk; + funk = Time.createFunc(this.value); return this.nextElementSibling.textContent = funk(Time, new Date()); }, @@ -10243,6 +10632,7 @@ }, fileInfo: function() { var data, funk; + data = { isReply: true, file: { @@ -10281,6 +10671,7 @@ }, keybinds: function(section) { var arr, input, inputs, items, key, tbody, tr, _ref; + section.innerHTML = "
Keybinds are disabled.
Allowed keys: a-z, 0-9, Ctrl, Shift, Alt, Meta, Enter, Esc, Up, Down, Right, Left.
Press Backspace to disable a keybind.
ActionsKeybinds
"; tbody = $('tbody', section); items = {}; @@ -10301,6 +10692,7 @@ } return $.get(items, function(items) { var val; + for (key in items) { val = items[key]; inputs[key].value = val; @@ -10309,6 +10701,7 @@ }, keybind: function(e) { var key; + if (e.keyCode === 9) { return; } @@ -10325,8 +10718,10 @@ Main = { init: function() { var db, flatten, _i, _len; + flatten = function(parent, obj) { var key, val; + if (obj instanceof Array) { Conf[parent] = obj[0]; } else if (typeof obj === 'object') { @@ -10368,6 +10763,7 @@ }, initFeatures: function() { var init, pathname, _ref; + pathname = location.pathname.split('/'); g.BOARD = new Board(pathname[1]); if ((_ref = g.BOARD.ID) === 'z' || _ref === 'fk') { @@ -10395,6 +10791,7 @@ case 'images.4chan.org': $.ready(function() { var URL; + if (Conf['404 Redirect'] && ['4chan - Temporarily Offline', '4chan - 404 Not Found'].contains(d.title)) { Redirect.init(); pathname = location.pathname.split('/'); @@ -10411,6 +10808,7 @@ } init = function(features) { var err, module, name; + for (name in features) { module = features[name]; try { @@ -10488,6 +10886,7 @@ }, initStyle: function() { var mainStyleSheet, setStyle, style, styleSheets, _ref; + $.off(d, '4chanMainInit', Main.initStyle); if (!Main.isThisPageLegit() || $.hasClass(doc, 'fourchan-x')) { return; @@ -10508,6 +10907,7 @@ styleSheets = $$('link[rel="alternate stylesheet"]', d.head); setStyle = function() { var styleSheet, _i, _len; + $.rmClass(doc, style); for (_i = 0, _len = styleSheets.length; _i < _len; _i++) { styleSheet = styleSheets[_i]; @@ -10529,6 +10929,7 @@ }, initReady: function() { var board, err, errors, href, passLink, postRoot, posts, styleSelector, thread, threadRoot, threads, _i, _j, _len, _len1, _ref, _ref1; + if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { href = Redirect.to('thread', { @@ -10595,6 +10996,7 @@ }, callbackNodes: function(klass, nodes) { var callback, err, errors, i, len, node, _i, _len, _ref; + len = nodes.length; _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -10622,9 +11024,11 @@ }, callbackNodesDB: function(klass, nodes, cb) { var errors, func, i, len, node, queue, softTask; + queue = []; softTask = function() { var args, func, task; + task = queue.shift(); func = task[0]; args = Array.prototype.slice.call(task, 1); @@ -10643,6 +11047,7 @@ errors = null; func = function(node, i) { var callback, err, _i, _len, _ref; + _ref = klass.prototype.callbacks; for (_i = 0, _len = _ref.length; _i < _len; _i++) { callback = _ref[_i]; @@ -10676,6 +11081,7 @@ }, addCallback: function(e) { var Klass, obj; + obj = e.detail; if (typeof obj.callback.name !== 'string') { throw new Error("Invalid callback name: " + obj.callback.name); @@ -10695,6 +11101,7 @@ }, handleErrors: function(errors) { var div, error, logs, _i, _len; + if (!(errors instanceof Array)) { error = errors; } else if (errors.length === 1) { @@ -10709,6 +11116,7 @@ }); $.on(div.lastElementChild, 'click', function() { var _ref; + return _ref = this.textContent === 'show' ? ['hide', false] : ['show', true], this.textContent = _ref[0], logs.hidden = _ref[1], _ref; }); logs = $.el('div', { @@ -10722,6 +11130,7 @@ }, parseError: function(data) { var error, message; + Main.logError(data); message = $.el('div', { textContent: data.message @@ -10738,6 +11147,7 @@ }, isThisPageLegit: function() { var _ref; + if (!('thisPageIsLegit' in Main)) { Main.thisPageIsLegit = location.hostname === 'boards.4chan.org' && !$('link[href*="favicon-status.ico"]', d.head) && ((_ref = d.title) !== '4chan - Temporarily Offline' && _ref !== '4chan - Error' && _ref !== '504 Gateway Time-out'); } diff --git a/src/General/html/Build/post.html b/src/General/html/Build/post.html index 239dec4f7..234b356f4 100755 --- a/src/General/html/Build/post.html +++ b/src/General/html/Build/post.html @@ -34,7 +34,7 @@