diff --git a/4chan_x.js b/4chan_x.js index ce589e7d6..865eca94d 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -2,11 +2,12 @@ // @name 4chan x // @namespace aeosynth // @description Adds various features. -// @version 2.2.1 +// @version 2.2.2 // @copyright 2009-2011 James Campos // @license MIT; http://en.wikipedia.org/wiki/Mit_license // @include http://boards.4chan.org/* // @include http://sys.4chan.org/* +// @include file://* // @updateURL http://userscripts.org/scripts/source/51412.meta.js // ==/UserScript== @@ -387,10 +388,12 @@ if (typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) { $.extend($, { deleteValue: function(name) { + name = NAMESPACE + name; return GM_deleteValue(name); }, getValue: function(name, defaultValue) { var value; + name = NAMESPACE + name; if (value = GM_getValue(name)) { return JSON.parse(value); } else { @@ -401,6 +404,7 @@ return GM_openInTab(url); }, setValue: function(name, value) { + name = NAMESPACE + name; return GM_setValue(name, JSON.stringify(value)); } }); @@ -1138,13 +1142,18 @@ }, dialog: function(link) { var clone, dialog, el, html, resto, script, xpath, _i, _len, _ref; - html = "
Quick Reply X
"; + html = "
Quick Reply X
"; dialog = ui.dialog('qr', { top: '0px', left: '0px' }, html); el = $('input[title=autohide]', dialog); $.bind(el, 'click', qr.cb.autohide); + clone = $('#recaptcha_widget_div').cloneNode(true); + $.append($('#qr_captcha', dialog), clone); + $('input[name=recaptcha_response_field]', clone).placeholder = 'verification'; + $.append(d.body, dialog); + return; clone = $('form[name=post]').cloneNode(true); _ref = $$('script', clone); for (_i = 0, _len = _ref.length; _i < _len; _i++) { @@ -2287,11 +2296,19 @@ #qr > div.move {\ text-align: right;\ }\ - #qr > form > div, /* ad */\ - #qr #recaptcha_table td:nth-of-type(3), /* captcha logos */\ - #qr td.rules {\ + #qr #recaptcha_table td:nth-of-type(3) {/* captcha logos */\ display: none;\ }\ + #qr textarea {\ + width: 300px;\ + height: 100px;\ + }\ + #qr form {\ + margin: 0px;\ + }\ + #qr * {\ + padding: 0px !important;\ + }\ #qr.auto:not(:hover) form {\ display: none;\ }\ diff --git a/changelog b/changelog index 758cd36d8..805539893 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +2.2.2 +- hopefully fix upgrading issues + 2.2.1 - mayhem: fix op image expansion bug diff --git a/header b/header index 903e12d9c..3a4745582 100644 --- a/header +++ b/header @@ -2,11 +2,12 @@ // @name 4chan x // @namespace aeosynth // @description Adds various features. -// @version 2.2.1 +// @version 2.2.2 // @copyright 2009-2011 James Campos // @license MIT; http://en.wikipedia.org/wiki/Mit_license // @include http://boards.4chan.org/* // @include http://sys.4chan.org/* +// @include file://* // @updateURL http://userscripts.org/scripts/source/51412.meta.js // ==/UserScript== diff --git a/script.coffee b/script.coffee index c8cce8408..78e559597 100644 --- a/script.coffee +++ b/script.coffee @@ -264,8 +264,10 @@ $.extend $, if GM_deleteValue? $.extend $, deleteValue: (name) -> + name = NAMESPACE + name GM_deleteValue name getValue: (name, defaultValue) -> + name = NAMESPACE + name if value = GM_getValue name JSON.parse value else @@ -273,6 +275,7 @@ if GM_deleteValue? openInTab: (url) -> GM_openInTab url setValue: (name, value) -> + name = NAMESPACE + name GM_setValue name, JSON.stringify value else $.extend $, @@ -872,11 +875,29 @@ qr = clearInterval qr.cooldownIntervalID dialog: (link) -> - html = "
Quick Reply X
" + html = " +
Quick Reply X
+
+
+
+
+
+
+
+
+
+ " dialog = ui.dialog 'qr', top: '0px', left: '0px', html el = $ 'input[title=autohide]', dialog $.bind el, 'click', qr.cb.autohide + clone = $('#recaptcha_widget_div').cloneNode(true) + $.append $('#qr_captcha', dialog), clone + $('input[name=recaptcha_response_field]', clone).placeholder = 'verification' + + $.append d.body, dialog + return + clone = $('form[name=post]').cloneNode(true) for script in $$ 'script', clone $.remove script @@ -934,6 +955,7 @@ threading = # don't thread image controls node = $ 'form[name=delform] > *:not([id])' # don't confuse other scripts *cough*/b/ackwash*cough* + # gotta have a named function to unbind. $.bind d, 'DOMNodeInserted', threading.stopPropagation threading.thread node $.unbind d, 'DOMNodeInserted', threading.stopPropagation @@ -1228,6 +1250,8 @@ watcher = watch: (thread) -> favicon = $ 'img.favicon', thread + + #this happens if we try to auto-watch an already watched thread. return if favicon.src is Favicon.default favicon.src = Favicon.default @@ -1785,11 +1809,19 @@ main = #qr > div.move { text-align: right; } - #qr > form > div, /* ad */ - #qr #recaptcha_table td:nth-of-type(3), /* captcha logos */ - #qr td.rules { + #qr #recaptcha_table td:nth-of-type(3) {/* captcha logos */ display: none; } + #qr textarea { + width: 300px; + height: 100px; + } + #qr form { + margin: 0px; + } + #qr * { + padding: 0px !important; + } #qr.auto:not(:hover) form { display: none; }