From b37511bc5f03fb17181008880c7f2433cc44b4f9 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 3 Nov 2010 17:07:05 -0700 Subject: [PATCH] add option descriptions --- 4chan_x.coffee | 36 ++++++++++++++++++------------------ 4chan_x.js | 36 ++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/4chan_x.coffee b/4chan_x.coffee index b874108ad..bd64f8a00 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -6,22 +6,22 @@ #addClass, removeClass; remove hide / show; makeDialog el, 'center' config = - 'Thread Hiding': true - 'Reply Hiding': true - 'Show Stubs': true - 'Thread Navigation': true - 'Reply Navigation': true - 'Thread Watcher': true - 'Thread Expansion': true - 'Comment Expansion': true - 'Quick Report': true - 'Quick Reply': true - 'Persistent QR': false - 'Anonymize': false - 'Auto Watch': true - '404 Redirect': true - 'Post in Title': true - 'Sauce': true + 'Thread Hiding': [true, 'Hide entire threads'] + 'Reply Hiding': [true, 'Hide single replies'] + 'Show Stubs': [true, 'Of hidden threads / replies'] + 'Thread Navigation': [true, 'Navigate to previous / next thread'] + 'Reply Navigation': [true, 'Navigate to the beginning / end of a thread'] + 'Thread Watcher': [true, 'Bookmark threads'] + 'Thread Expansion': [true, 'View all replies'] + 'Comment Expansion': [true, 'Expand too long comments'] + 'Quick Report': [true, 'Add quick report buttons'] + 'Quick Reply': [true, 'Reply without leaving the page'] + 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'] + 'Anonymize': [false, 'Make everybody anonymous'] + 'Auto Watch': [true, 'Automatically watch threads that you start (Firefox only)'] + '404 Redirect': [true, 'Redirect dead threads'] + 'Post in Title': [true, 'Show the op\'s post in the tab title'] + 'Sauce': [true, 'Add sauce to images'] #TODO - expose 'hidden' configs @@ -146,7 +146,7 @@ addTo = (parent, children...) -> for child in children parent.appendChild child getConfig = (name) -> - GM_getValue(name, config[name]) + GM_getValue(name, config[name][0]) getTime = -> Math.floor(new Date().getTime() / 1000) hide = (el) -> @@ -332,7 +332,7 @@ options = -> html = '
Options X
' for option of config checked = if getConfig option then "checked" else "" - html += "
" + html += "
" html += "
Edit Sauce
" html += "
" html += "
" diff --git a/4chan_x.js b/4chan_x.js index 4efbe860c..2d9955cb2 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -2,22 +2,22 @@ var $, $$, AEOS, BOARD, DAY, PAGENUM, REPLY, THREAD_ID, _, _i, _j, _len, _len2, _ref, _ref2, a, addTo, arr, as, autoWatch, autohide, b, board, callback, callbacks, clearHidden, close, config, cooldown, cutoff, d, defaultSaucePrefix, delform, down, editSauce, el, expandComment, expandThread, favEmpty, favNormal, favicon, getConfig, getTime, head, hiddenReplies, hiddenThreads, hide, hideReply, hideThread, href, html, i, i1, id, iframe, iframeLoad, iframeLoop, img, inAfter, inBefore, input, inputs, l, l1, lastChecked, magic, n, navbotr, navtopr, nodeInserted, now, omitted, onloadComment, onloadThread, options, optionsClose, parseResponse, pathname, quickReply, r, recaptcha, recaptchaListener, recaptchaReload, redirect, remove, replace, replyNav, report, show, showReply, showThread, slice, span, src, stopPropagation, submit, text, textContent, thread, threadF, threads, tn, up, watch, watchX, watched, watcher, watcherUpdate, x, xhrs; var __slice = Array.prototype.slice, __hasProp = Object.prototype.hasOwnProperty; config = { - 'Thread Hiding': true, - 'Reply Hiding': true, - 'Show Stubs': true, - 'Thread Navigation': true, - 'Reply Navigation': true, - 'Thread Watcher': true, - 'Thread Expansion': true, - 'Comment Expansion': true, - 'Quick Report': true, - 'Quick Reply': true, - 'Persistent QR': false, - 'Anonymize': false, - 'Auto Watch': true, - '404 Redirect': true, - 'Post in Title': true, - 'Sauce': true + 'Thread Hiding': [true, 'Hide entire threads'], + 'Reply Hiding': [true, 'Hide single replies'], + 'Show Stubs': [true, 'Of hidden threads / replies'], + 'Thread Navigation': [true, 'Navigate to previous / next thread'], + 'Reply Navigation': [true, 'Navigate to the beginning / end of a thread'], + 'Thread Watcher': [true, 'Bookmark threads'], + 'Thread Expansion': [true, 'View all replies'], + 'Comment Expansion': [true, 'Expand too long comments'], + 'Quick Report': [true, 'Add quick report buttons'], + 'Quick Reply': [true, 'Reply without leaving the page'], + 'Persistent QR': [false, 'Quick reply won\'t disappear after posting. Only in replies.'], + 'Anonymize': [false, 'Make everybody anonymous'], + 'Auto Watch': [true, 'Automatically watch threads that you start (Firefox only)'], + '404 Redirect': [true, 'Redirect dead threads'], + 'Post in Title': [true, 'Show the op\'s post in the tab title'], + 'Sauce': [true, 'Add sauce to images'] }; AEOS = { init: function() { @@ -171,7 +171,7 @@ return _result; }; getConfig = function(name) { - return GM_getValue(name, config[name]); + return GM_getValue(name, config[name][0]); }; getTime = function() { return Math.floor(new Date().getTime() / 1000); @@ -382,7 +382,7 @@ if (!__hasProp.call(_ref2, option)) continue; _i = _ref2[option]; checked = getConfig(option) ? "checked" : ""; - html += ("
"); + html += ("
"); } html += "
Edit Sauce
"; html += "
";