From e7ea8ec8160b74bd911b7f6969cd4c035fe6adeb Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 16 Apr 2011 19:32:15 -0700 Subject: [PATCH] rm changeValue --- 4chan_x.js | 9 +++------ script.coffee | 7 ++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 9e43554dd..55b0cd178 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -59,7 +59,7 @@ */ (function() { - var $, $$, NAMESPACE, autoWatch, callback, changeValue, config, d, delform, el, expand, expandComment, expandThread, g, imageClick, imageExpand, imageExpandClick, imageHover, imageResize, imageThumb, imageToggle, imageType, imageTypeChange, keybinds, log, nav, navtopr, nodeInserted, option, options, pathname, qr, recaptcha, recaptchaListener, recaptchaReload, redirect, replyHiding, report, scroll, temp, text, threadHiding, tzOffset, ui, updateFavicon, updateTitle, updater, watcher, _config, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4; + var $, $$, NAMESPACE, autoWatch, callback, config, d, delform, el, expand, expandComment, expandThread, g, imageClick, imageExpand, imageExpandClick, imageHover, imageResize, imageThumb, imageToggle, imageType, imageTypeChange, keybinds, log, nav, navtopr, nodeInserted, option, options, pathname, qr, recaptcha, recaptchaListener, recaptchaReload, redirect, replyHiding, report, scroll, temp, text, threadHiding, tzOffset, ui, updateFavicon, updateTitle, updater, watcher, _config, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4; var __slice = Array.prototype.slice; if (typeof console != "undefined" && console !== null) { log = console.log; @@ -1690,9 +1690,6 @@ thumb.className = ''; return $.remove(thumb.nextSibling); }; - changeValue = function() { - return GM_setValue(this.name, this.value); - }; recaptchaListener = function(e) { if (e.keyCode === 8 && this.value === '') { return recaptchaReload(); @@ -1949,7 +1946,7 @@ expand = $.el('div', { innerHTML: " " }); - imageType = GM_getValue('imageType', 'full'); + imageType = $.getValue('imageType', 'full'); _ref3 = $$("option", expand); for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { option = _ref3[_j]; @@ -1958,7 +1955,7 @@ break; } } - $.bind($('select', expand), 'change', changeValue); + $.bind($('select', expand), 'change', $.cb.value); $.bind($('select', expand), 'change', imageTypeChange); $.bind($('input', expand), 'click', imageExpandClick); $.before(delform.firstChild, expand); diff --git a/script.coffee b/script.coffee index 2cc5e2edb..19452ffbf 100644 --- a/script.coffee +++ b/script.coffee @@ -1338,9 +1338,6 @@ imageThumb = (thumb) -> thumb.className = '' $.remove thumb.nextSibling -changeValue = -> - GM_setValue @name, @value - recaptchaListener = (e) -> if e.keyCode is 8 and @value is '' recaptchaReload() @@ -1563,12 +1560,12 @@ if $.config 'Image Expansion' innerHTML: " " - imageType = GM_getValue 'imageType', 'full' + imageType = $.getValue 'imageType', 'full' for option in $$("option", expand) if option.textContent is imageType option.selected = true break - $.bind $('select', expand), 'change', changeValue + $.bind $('select', expand), 'change', $.cb.value $.bind $('select', expand), 'change', imageTypeChange $.bind $('input', expand), 'click', imageExpandClick $.before delform.firstChild, expand