rm changeValue

This commit is contained in:
James Campos 2011-04-16 19:32:15 -07:00
parent e4117f0c57
commit e7ea8ec816
2 changed files with 5 additions and 11 deletions

View File

@ -59,7 +59,7 @@
*/ */
(function() { (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; var __slice = Array.prototype.slice;
if (typeof console != "undefined" && console !== null) { if (typeof console != "undefined" && console !== null) {
log = console.log; log = console.log;
@ -1690,9 +1690,6 @@
thumb.className = ''; thumb.className = '';
return $.remove(thumb.nextSibling); return $.remove(thumb.nextSibling);
}; };
changeValue = function() {
return GM_setValue(this.name, this.value);
};
recaptchaListener = function(e) { recaptchaListener = function(e) {
if (e.keyCode === 8 && this.value === '') { if (e.keyCode === 8 && this.value === '') {
return recaptchaReload(); return recaptchaReload();
@ -1949,7 +1946,7 @@
expand = $.el('div', { expand = $.el('div', {
innerHTML: "<select id=imageType name=imageType><option>full</option><option>fit width</option><option>fit screen</option></select> <label>Expand Images<input type=checkbox id=imageExpand></label>" innerHTML: "<select id=imageType name=imageType><option>full</option><option>fit width</option><option>fit screen</option></select> <label>Expand Images<input type=checkbox id=imageExpand></label>"
}); });
imageType = GM_getValue('imageType', 'full'); imageType = $.getValue('imageType', 'full');
_ref3 = $$("option", expand); _ref3 = $$("option", expand);
for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) {
option = _ref3[_j]; option = _ref3[_j];
@ -1958,7 +1955,7 @@
break; break;
} }
} }
$.bind($('select', expand), 'change', changeValue); $.bind($('select', expand), 'change', $.cb.value);
$.bind($('select', expand), 'change', imageTypeChange); $.bind($('select', expand), 'change', imageTypeChange);
$.bind($('input', expand), 'click', imageExpandClick); $.bind($('input', expand), 'click', imageExpandClick);
$.before(delform.firstChild, expand); $.before(delform.firstChild, expand);

View File

@ -1338,9 +1338,6 @@ imageThumb = (thumb) ->
thumb.className = '' thumb.className = ''
$.remove thumb.nextSibling $.remove thumb.nextSibling
changeValue = ->
GM_setValue @name, @value
recaptchaListener = (e) -> recaptchaListener = (e) ->
if e.keyCode is 8 and @value is '' if e.keyCode is 8 and @value is ''
recaptchaReload() recaptchaReload()
@ -1563,12 +1560,12 @@ if $.config 'Image Expansion'
innerHTML: innerHTML:
"<select id=imageType name=imageType><option>full</option><option>fit width</option><option>fit screen</option></select> "<select id=imageType name=imageType><option>full</option><option>fit width</option><option>fit screen</option></select>
<label>Expand Images<input type=checkbox id=imageExpand></label>" <label>Expand Images<input type=checkbox id=imageExpand></label>"
imageType = GM_getValue 'imageType', 'full' imageType = $.getValue 'imageType', 'full'
for option in $$("option", expand) for option in $$("option", expand)
if option.textContent is imageType if option.textContent is imageType
option.selected = true option.selected = true
break break
$.bind $('select', expand), 'change', changeValue $.bind $('select', expand), 'change', $.cb.value
$.bind $('select', expand), 'change', imageTypeChange $.bind $('select', expand), 'change', imageTypeChange
$.bind $('input', expand), 'click', imageExpandClick $.bind $('input', expand), 'click', imageExpandClick
$.before delform.firstChild, expand $.before delform.firstChild, expand