This commit is contained in:
Kabir Sala 2014-02-09 21:43:31 +01:00
parent 3bd506e617
commit 1b6052304b
9 changed files with 83 additions and 28 deletions

View File

@ -1,3 +1,10 @@
### v1.3.3
**MayhemYDG**
- Fix new captcha (Firefox only)
**Spittie**
- Add archive.installgentoo.com
### v1.3.2 ### v1.3.2
*2014-01-12* *2014-01-12*

View File

@ -2,7 +2,7 @@
* 4chan X - Version 1.3.3 - 2014-02-09 * 4chan X - Version 1.3.3 - 2014-02-09
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/Spittie/4chan-x/blob/master/LICENSE
* *
* Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com> * Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com>
* http://zixaphir.github.io/appchan-x/ * http://zixaphir.github.io/appchan-x/

View File

@ -1,4 +1,11 @@
# Discontinued. Personal fork of Seaweed's 4chan X.
Don't expect new features, I don't know Javascript, Coffeescript or all this stuff.
Don't expect any bug fix.
Don't expect any support.
Actually, don't expect anything.
Works with Firefox only.
## Forking ## Forking

View File

@ -5,7 +5,7 @@
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan. // @description Cross-browser userscript for maximum lurking on 4chan.
// @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE // @license MIT; https://github.com/Spittie/4chan-x/blob/master/LICENSE
// @match *://boards.4chan.org/* // @match *://boards.4chan.org/*
// @match *://sys.4chan.org/* // @match *://sys.4chan.org/*
// @match *://a.4cdn.org/* // @match *://a.4cdn.org/*
@ -15,7 +15,7 @@
// @grant GM_deleteValue // @grant GM_deleteValue
// @grant GM_openInTab // @grant GM_openInTab
// @run-at document-start // @run-at document-start
// @updateURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.meta.js // @updateURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.meta.js
// @downloadURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.user.js // @downloadURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC
// ==/UserScript== // ==/UserScript==

View File

@ -6,7 +6,7 @@
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan. // @description Cross-browser userscript for maximum lurking on 4chan.
// @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE // @license MIT; https://github.com/Spittie/4chan-x/blob/master/LICENSE
// @match *://boards.4chan.org/* // @match *://boards.4chan.org/*
// @match *://sys.4chan.org/* // @match *://sys.4chan.org/*
// @match *://a.4cdn.org/* // @match *://a.4cdn.org/*
@ -16,8 +16,8 @@
// @grant GM_deleteValue // @grant GM_deleteValue
// @grant GM_openInTab // @grant GM_openInTab
// @run-at document-start // @run-at document-start
// @updateURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.meta.js // @updateURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.meta.js
// @downloadURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.user.js // @downloadURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC
// ==/UserScript== // ==/UserScript==
@ -25,7 +25,7 @@
* 4chan X - Version 1.3.3 - 2014-02-09 * 4chan X - Version 1.3.3 - 2014-02-09
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/Spittie/4chan-x/blob/master/LICENSE
* *
* Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com> * Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com>
* http://zixaphir.github.io/appchan-x/ * http://zixaphir.github.io/appchan-x/
@ -6132,7 +6132,8 @@
title: 'Verification', title: 'Verification',
placeholder: 'Focus to load reCAPTCHA', placeholder: 'Focus to load reCAPTCHA',
autocomplete: 'off', autocomplete: 'off',
spellcheck: false spellcheck: false,
tabIndex: 55
}); });
this.nodes = { this.nodes = {
img: imgContainer.firstChild, img: imgContainer.firstChild,
@ -9914,7 +9915,7 @@
software: "foolfuuka" software: "foolfuuka"
} }
}, },
"Install Gentoo": { "Install Gentoo (.net)": {
boards: ["diy", "g", "sci"], boards: ["diy", "g", "sci"],
files: [], files: [],
data: { data: {
@ -9924,6 +9925,16 @@
software: "fuuka" software: "fuuka"
} }
}, },
"Install Gentoo (.com)": {
boards: ["t", "g"],
files: ["t", "g"],
data: {
domain: "archive.installgentoo.com/",
http: true,
https: true,
software: "foolfuuka"
}
},
"Rebecca Black Tech": { "Rebecca Black Tech": {
boards: ["cgl", "g", "mu", "w"], boards: ["cgl", "g", "mu", "w"],
files: ["cgl", "g", "mu", "w"], files: ["cgl", "g", "mu", "w"],
@ -11713,7 +11724,7 @@
if (previous === g.VERSION) { if (previous === g.VERSION) {
return; return;
} }
changelog = 'https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md'; changelog = 'https://github.com/Spittie/4chan-x/blob/master/CHANGELOG.md';
el = $.el('span', { el = $.el('span', {
innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>." innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>."
}); });
@ -11748,7 +11759,7 @@
return; return;
} }
$.event('CloseMenu'); $.event('CloseMenu');
html = "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> |<a class=import>Import</a> |<input type=file style='display: none;'><a href='http://seaweedchan.github.io/4chan-x/' target=_blank>4chan X</a> |<a href='https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md' target=_blank>" + g.VERSION + "</a> |<a href='https://github.com/seaweedchan/4chan-x/blob/master/README.md#reporting-bugs-and-suggestions' target=_blank>Issues</a> |<a href=javascript:; class=close title=Close>×</a></div></nav><div class=section-container><section></section></div>"; html = "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> |<a class=import>Import</a> |<input type=file style='display: none;'><a href='http://seaweedchan.github.io/4chan-x/' target=_blank>4chan X</a> |<a href='https://github.com/Spittie/4chan-x/blob/master/CHANGELOG.md' target=_blank>" + g.VERSION + "</a> |<a href='https://github.com/Spittie/4chan-x/blob/master/README.md#reporting-bugs-and-suggestions' target=_blank>Issues</a> |<a href=javascript:; class=close title=Close>×</a></div></nav><div class=section-container><section></section></div>";
Settings.overlay = overlay = $.el('div', { Settings.overlay = overlay = $.el('div', {
id: 'overlay' id: 'overlay'
}); });

View File

@ -3,7 +3,7 @@
* 4chan X - Version 1.3.3 - 2014-02-09 * 4chan X - Version 1.3.3 - 2014-02-09
* *
* Licensed under the MIT license. * Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE * https://github.com/Spittie/4chan-x/blob/master/LICENSE
* *
* Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com> * Appchan X Copyright © 2013-2013 Zixaphir <zixaphirmoxphar@gmail.com>
* http://zixaphir.github.io/appchan-x/ * http://zixaphir.github.io/appchan-x/
@ -6123,7 +6123,8 @@
title: 'Verification', title: 'Verification',
placeholder: 'Focus to load reCAPTCHA', placeholder: 'Focus to load reCAPTCHA',
autocomplete: 'off', autocomplete: 'off',
spellcheck: false spellcheck: false,
tabIndex: 55
}); });
this.nodes = { this.nodes = {
img: imgContainer.firstChild, img: imgContainer.firstChild,
@ -9903,7 +9904,7 @@
software: "foolfuuka" software: "foolfuuka"
} }
}, },
"Install Gentoo": { "Install Gentoo (.net)": {
boards: ["diy", "g", "sci"], boards: ["diy", "g", "sci"],
files: [], files: [],
data: { data: {
@ -9913,6 +9914,16 @@
software: "fuuka" software: "fuuka"
} }
}, },
"Install Gentoo (.com)": {
boards: ["t", "g"],
files: ["t", "g"],
data: {
domain: "archive.installgentoo.com/",
http: true,
https: true,
software: "foolfuuka"
}
},
"Rebecca Black Tech": { "Rebecca Black Tech": {
boards: ["cgl", "g", "mu", "w"], boards: ["cgl", "g", "mu", "w"],
files: ["cgl", "g", "mu", "w"], files: ["cgl", "g", "mu", "w"],
@ -11702,7 +11713,7 @@
if (previous === g.VERSION) { if (previous === g.VERSION) {
return; return;
} }
changelog = 'https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md'; changelog = 'https://github.com/Spittie/4chan-x/blob/master/CHANGELOG.md';
el = $.el('span', { el = $.el('span', {
innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>." innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>."
}); });
@ -11737,7 +11748,7 @@
return; return;
} }
$.event('CloseMenu'); $.event('CloseMenu');
html = "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> |<a class=import>Import</a> |<input type=file style='display: none;'><a href='http://seaweedchan.github.io/4chan-x/' target=_blank>4chan X</a> |<a href='https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md' target=_blank>" + g.VERSION + "</a> |<a href='https://github.com/seaweedchan/4chan-x/blob/master/README.md#reporting-bugs-and-suggestions' target=_blank>Issues</a> |<a href=javascript:; class=close title=Close>×</a></div></nav><div class=section-container><section></section></div>"; html = "<nav><div class=sections-list></div><p class='imp-exp-result warning'></p><div class=credits><a class=export>Export</a> |<a class=import>Import</a> |<input type=file style='display: none;'><a href='http://seaweedchan.github.io/4chan-x/' target=_blank>4chan X</a> |<a href='https://github.com/Spittie/4chan-x/blob/master/CHANGELOG.md' target=_blank>" + g.VERSION + "</a> |<a href='https://github.com/Spittie/4chan-x/blob/master/README.md#reporting-bugs-and-suggestions' target=_blank>Issues</a> |<a href=javascript:; class=close title=Close>×</a></div></nav><div class=section-container><section></section></div>";
Settings.overlay = overlay = $.el('div', { Settings.overlay = overlay = $.el('div', {
id: 'overlay' id: 'overlay'
}); });

View File

@ -4,7 +4,7 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.", "description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": { "meta": {
"name": "4chan X", "name": "4chan X",
"repo": "https://github.com/seaweedchan/4chan-x/", "repo": "https://github.com/Spittie/4chan-x/",
"page": "http://seaweedchan.github.io/4chan-x/", "page": "http://seaweedchan.github.io/4chan-x/",
"buildsPath": "builds/", "buildsPath": "builds/",
"mainBranch": "master", "mainBranch": "master",

View File

@ -69,7 +69,7 @@ Redirect =
https: true https: true
software: "foolfuuka" software: "foolfuuka"
"Install Gentoo": "Install Gentoo (.net)":
boards: ["diy", "g", "sci"] boards: ["diy", "g", "sci"]
files: [] files: []
data: data:
@ -78,6 +78,16 @@ Redirect =
https: true https: true
software: "fuuka" software: "fuuka"
"Install Gentoo (.com)":
boards: ["t", "g"]
files: ["t", "g"]
data:
domain: "archive.installgentoo.com/"
http: true
https: true
software: "foolfuuka"
"Rebecca Black Tech": "Rebecca Black Tech":
boards: ["cgl", "g", "mu", "w"] boards: ["cgl", "g", "mu", "w"]
files: ["cgl", "g", "mu", "w"] files: ["cgl", "g", "mu", "w"]

View File

@ -15,9 +15,10 @@ QR.captcha =
placeholder: 'Focus to load reCAPTCHA' placeholder: 'Focus to load reCAPTCHA'
autocomplete: 'off' autocomplete: 'off'
spellcheck: false spellcheck: false
tabIndex: 55
@nodes = @nodes =
img: imgContainer.firstChild img: imgContainer.firstChild
input: input input: input
$.on input, 'focus', @setup $.on input, 'focus', @setup
@ -40,15 +41,15 @@ QR.captcha =
delete QR.captcha.setupObserver delete QR.captcha.setupObserver
setLifetime = (e) -> QR.captcha.lifetime = e.detail setLifetime = (e) -> QR.captcha.lifetime = e.detail
$.on window, 'captcha:timeout', setLifetime $.on window, 'captcha:timeout', setLifetime
$.globalEval 'window.dispatchEvent(new CustomEvent("captcha:timeout", {detail: RecaptchaState.timeout}))' $.globalEval 'window.dispatchEvent(new CustomEvent("captcha:timeout", {detail: RecaptchaState.timeout}))'
$.off window, 'captcha:timeout', setLifetime $.off window, 'captcha:timeout', setLifetime
{img, input} = QR.captcha.nodes {img, input} = QR.captcha.nodes
img.parentNode.hidden = false img.parentNode.hidden = false
$.off input, 'focus', QR.captcha.setup $.off input, 'focus', QR.captcha.setup
$.on input, 'keydown', QR.captcha.keydown.bind QR.captcha $.on input, 'keydown', QR.captcha.keydown.bind QR.captcha
$.on img.parentNode, 'click', QR.captcha.reload.bind QR.captcha $.on img.parentNode, 'click', QR.captcha.reload.bind QR.captcha
$.get 'captchas', [], ({captchas}) -> $.get 'captchas', [], ({captchas}) ->
QR.captcha.sync captchas QR.captcha.sync captchas
@ -58,9 +59,11 @@ QR.captcha =
new MutationObserver(QR.captcha.load.bind QR.captcha).observe challenge, new MutationObserver(QR.captcha.load.bind QR.captcha).observe challenge,
childList: true childList: true
QR.captcha.load() QR.captcha.load()
sync: (captchas) -> sync: (captchas) ->
QR.captcha.captchas = captchas QR.captcha.captchas = captchas
QR.captcha.count() QR.captcha.count()
getOne: -> getOne: ->
@clear() @clear()
if captcha = @captchas.shift() if captcha = @captchas.shift()
@ -76,6 +79,7 @@ QR.captcha =
# If there's only one word, duplicate it. # If there's only one word, duplicate it.
response = "#{response} #{response}" unless /\s/.test response response = "#{response} #{response}" unless /\s/.test response
{challenge, response} {challenge, response}
save: -> save: ->
return unless response = @nodes.input.value.trim() return unless response = @nodes.input.value.trim()
@captchas.push @captchas.push
@ -85,6 +89,7 @@ QR.captcha =
@count() @count()
@reload() @reload()
$.set 'captchas', @captchas $.set 'captchas', @captchas
clear: -> clear: ->
return unless @captchas.length return unless @captchas.length
now = Date.now() now = Date.now()
@ -94,6 +99,7 @@ QR.captcha =
@captchas = @captchas[i..] @captchas = @captchas[i..]
@count() @count()
$.set 'captchas', @captchas $.set 'captchas', @captchas
load: -> load: ->
return unless @nodes.challenge.firstChild return unless @nodes.challenge.firstChild
# -1 minute to give upload some time. # -1 minute to give upload some time.
@ -103,6 +109,7 @@ QR.captcha =
@nodes.img.src = "//www.google.com/recaptcha/api/image?c=#{challenge}" @nodes.img.src = "//www.google.com/recaptcha/api/image?c=#{challenge}"
@nodes.input.value = null @nodes.input.value = null
@clear() @clear()
count: -> count: ->
count = @captchas.length count = @captchas.length
@nodes.input.placeholder = switch count @nodes.input.placeholder = switch count
@ -113,11 +120,13 @@ QR.captcha =
else else
"Verification (#{count} cached captchas)" "Verification (#{count} cached captchas)"
@nodes.input.alt = count # For XTRM RICE. @nodes.input.alt = count # For XTRM RICE.
reload: (focus) -> reload: (focus) ->
# the 't' argument prevents the input from being focused # the 't' argument prevents the input from being focused
$.globalEval 'Recaptcha.reload("t")' $.globalEval 'Recaptcha.reload("t")'
# Focus if we meant to. # Focus if we meant to.
@nodes.input.focus() if focus @nodes.input.focus() if focus
keydown: (e) -> keydown: (e) ->
if e.keyCode is 8 and not @nodes.input.value if e.keyCode is 8 and not @nodes.input.value
@reload() @reload()