From ee44097eec6a2b2835de4d1270f12a55c9729d00 Mon Sep 17 00:00:00 2001 From: James Campos Date: Mon, 2 May 2011 22:28:11 -0700 Subject: [PATCH 1/6] @include file://* --- 4chan_x.js | 1 + header | 1 + 2 files changed, 2 insertions(+) diff --git a/4chan_x.js b/4chan_x.js index 0b6473fe6..32f3b7ac5 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -7,6 +7,7 @@ // @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/header b/header index 7600ae860..8ba4abddb 100644 --- a/header +++ b/header @@ -7,6 +7,7 @@ // @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== From 757c964f7b215bbf41f7b3891b2aca0ed1100838 Mon Sep 17 00:00:00 2001 From: James Campos Date: Mon, 2 May 2011 23:52:03 -0700 Subject: [PATCH 2/6] comment --- script.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/script.coffee b/script.coffee index c535fdc85..73b6cdf6b 100644 --- a/script.coffee +++ b/script.coffee @@ -934,6 +934,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 From 1a213fdfa735e8b3d3660c439c430e978582a43b Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 3 May 2011 18:41:57 -0700 Subject: [PATCH 3/6] double namespacing, bleh --- 4chan_x.js | 3 +++ script.coffee | 3 +++ 2 files changed, 6 insertions(+) diff --git a/4chan_x.js b/4chan_x.js index 274edf915..52173018d 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -387,10 +387,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 +403,7 @@ return GM_openInTab(url); }, setValue: function(name, value) { + name = NAMESPACE + name; return GM_setValue(name, JSON.stringify(value)); } }); diff --git a/script.coffee b/script.coffee index 73b6cdf6b..37c9a4b36 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 $, From 8b64a77fac14064c072e7aa0ff85559d01c64bec Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 3 May 2011 19:11:06 -0700 Subject: [PATCH 4/6] comment --- script.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script.coffee b/script.coffee index 37c9a4b36..d9669e50f 100644 --- a/script.coffee +++ b/script.coffee @@ -1230,6 +1230,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 From f40988ecb6925e30048d464b794ce454076b149b Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 3 May 2011 19:11:53 -0700 Subject: [PATCH 5/6] 2.2.2 --- 4chan_x.js | 2 +- changelog | 3 +++ header | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index 52173018d..b0032a8b9 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -2,7 +2,7 @@ // @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/* 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..0b3df9579 100644 --- a/header +++ b/header @@ -2,7 +2,7 @@ // @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/* From 179c846d1631eda99eea0c8c9c38ef1a033081f5 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 4 May 2011 00:05:13 -0700 Subject: [PATCH 6/6] qr remix --- 4chan_x.js | 21 +++++++++++++++++---- script.coffee | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/4chan_x.js b/4chan_x.js index bb45f30b4..62138fa3a 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -1142,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++) { @@ -2278,11 +2283,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/script.coffee b/script.coffee index d9669e50f..a1dc8b46a 100644 --- a/script.coffee +++ b/script.coffee @@ -875,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 @@ -1789,11 +1807,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; }