Merge branch 'v3'
Conflicts: CHANGELOG.md Gruntfile.coffee LICENSE README.md builds/appchan-x.user.js builds/crx/manifest.json builds/crx/script.js latest.js package.json src/General/Config.coffee src/General/css/style.css src/Posting/QR.captcha.coffee src/Posting/QR.coffee
This commit is contained in:
commit
b662cf2366
@ -1,3 +1,8 @@
|
||||
**ccd0**:
|
||||
- Add updater for Chrom* extension.
|
||||
- Fix flag selector not being removed from post form.
|
||||
- Fix [navigation bug](https://github.com/ccd0/4chan-x/issues/14)
|
||||
|
||||
### v2.9.10
|
||||
*2014-04-02*
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@ module.exports = (grunt) ->
|
||||
crx:
|
||||
files:
|
||||
'builds/crx/manifest.json': 'src/General/meta/manifest.json'
|
||||
'builds/updates.xml': 'src/General/meta/updates.xml'
|
||||
'builds/crx/script.js': [
|
||||
'src/General/meta/botproc.js'
|
||||
'src/General/meta/banner.js'
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* appchan x - Version 2.9.10 - 2014-04-02
|
||||
* appchan x - Version 2.9.10 - 2014-04-03
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.4.1
|
||||
// @version 1.4.5
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
// @description Cross-browser userscript for maximum lurking on 4chan.
|
||||
// @license MIT; https://github.com/Spittie/4chan-x/blob/master/LICENSE
|
||||
// @license MIT; https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
// @match *://boards.4chan.org/*
|
||||
// @match *://sys.4chan.org/*
|
||||
// @match *://a.4cdn.org/*
|
||||
@ -17,7 +17,7 @@
|
||||
// @grant GM_openInTab
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @run-at document-start
|
||||
// @updateURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.meta.js
|
||||
// @downloadURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.user.js
|
||||
// @updateURL https://github.com/ccd0/4chan-x/raw/stable/builds/4chan-X.meta.js
|
||||
// @downloadURL https://github.com/ccd0/4chan-x/raw/stable/builds/4chan-X.user.js
|
||||
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAF5JREFUeNrtkTESABAQxPD/R6tsE2dUGYUtFJvLDKf93KevHJAjpBorAQWSBIKqFASC4G0pCAkm4GfaEvgYXl0T6HBaE97f0vmnfYHbZOMLZCx9ISdKWwjOWZSC8GYm4SUGwfYgqI4AAAAASUVORK5CYII=
|
||||
// ==/UserScript==
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* appchan x - Version 2.9.10 - 2014-04-02
|
||||
* appchan x - Version 2.9.10 - 2014-04-03
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -390,7 +390,7 @@
|
||||
'Bottom Board List': true,
|
||||
'Custom Board Navigation': true
|
||||
},
|
||||
boardnav: "[ toggle-all ]\n[current-title]\n[external-text:\"FAQ\",\"https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions\"]",
|
||||
boardnav: "[ toggle-all ]\n[current-title]\n[external-text:\"FAQ\",\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions\"]",
|
||||
QR: {
|
||||
'QR.personas': "#email:\"sage\";boards:jp;always"
|
||||
},
|
||||
@ -8057,9 +8057,16 @@
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
var type, _i, _len, _ref;
|
||||
if (!Conf['Linkify']) {
|
||||
return;
|
||||
}
|
||||
this.types = {};
|
||||
_ref = this.ordered_types;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
this.types[type.key] = type;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
ExpandComment.callbacks.push(this.node);
|
||||
}
|
||||
@ -8191,14 +8198,18 @@
|
||||
return a;
|
||||
},
|
||||
services: function(link) {
|
||||
var href, key, match, type, _ref;
|
||||
var href, match, type, _i, _len, _ref;
|
||||
href = link.href;
|
||||
_ref = Linkify.types;
|
||||
for (key in _ref) {
|
||||
type = _ref[key];
|
||||
if (match = type.regExp.exec(href)) {
|
||||
return [key, match[1], match[2], link];
|
||||
_ref = Linkify.ordered_types;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
if (!(match = type.regExp.exec(href))) {
|
||||
continue;
|
||||
}
|
||||
if (type.dummy) {
|
||||
return;
|
||||
}
|
||||
return [type.key, match[1], match[2], link];
|
||||
}
|
||||
},
|
||||
embed: function(data) {
|
||||
@ -8309,8 +8320,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
types: {
|
||||
audio: {
|
||||
ordered_types: [
|
||||
{
|
||||
key: 'audio',
|
||||
regExp: /(.*\.(mp3|ogg|wav))$/,
|
||||
el: function(a) {
|
||||
return $.el('audio', {
|
||||
@ -8319,8 +8331,8 @@
|
||||
src: a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
gist: {
|
||||
}, {
|
||||
key: 'gist',
|
||||
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/,
|
||||
el: function(a) {
|
||||
var div;
|
||||
@ -8342,8 +8354,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
image: {
|
||||
}, {
|
||||
key: 'image',
|
||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/,
|
||||
style: 'border: 0; width: auto; height: auto;',
|
||||
el: function(a) {
|
||||
@ -8351,24 +8363,24 @@
|
||||
innerHTML: "<a target=_blank href='" + a.dataset.href + "'><img src='" + a.dataset.href + "'></a>"
|
||||
});
|
||||
}
|
||||
},
|
||||
InstallGentoo: {
|
||||
}, {
|
||||
key: 'InstallGentoo',
|
||||
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/,
|
||||
el: function(a) {
|
||||
return $.el('iframe', {
|
||||
src: "http://paste.installgentoo.com/view/embed/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
Twitter: {
|
||||
}, {
|
||||
key: 'Twitter',
|
||||
regExp: /.*twitter.com\/(.+\/status\/\d+)/,
|
||||
el: function(a) {
|
||||
return $.el('iframe', {
|
||||
src: "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
LiveLeak: {
|
||||
}, {
|
||||
key: 'LiveLeak',
|
||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/,
|
||||
el: function(a) {
|
||||
var el;
|
||||
@ -8381,8 +8393,8 @@
|
||||
el.setAttribute("allowfullscreen", "true");
|
||||
return el;
|
||||
}
|
||||
},
|
||||
MediaCrush: {
|
||||
}, {
|
||||
key: 'MediaCrush',
|
||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i,
|
||||
style: 'border: 0;',
|
||||
el: function(a) {
|
||||
@ -8433,8 +8445,8 @@
|
||||
});
|
||||
return el;
|
||||
}
|
||||
},
|
||||
pastebin: {
|
||||
}, {
|
||||
key: 'pastebin',
|
||||
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/,
|
||||
el: function(a) {
|
||||
var div;
|
||||
@ -8442,8 +8454,8 @@
|
||||
src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
gfycat: {
|
||||
}, {
|
||||
key: 'gfycat',
|
||||
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/,
|
||||
el: function(a) {
|
||||
var div;
|
||||
@ -8451,8 +8463,8 @@
|
||||
src: "http://gfycat.com/iframe/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
SoundCloud: {
|
||||
}, {
|
||||
key: 'SoundCloud',
|
||||
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/,
|
||||
style: 'height: auto; width: 500px; display: inline-block;',
|
||||
el: function(a) {
|
||||
@ -8476,8 +8488,8 @@
|
||||
return _.title;
|
||||
}
|
||||
}
|
||||
},
|
||||
StrawPoll: {
|
||||
}, {
|
||||
key: 'StrawPoll',
|
||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/,
|
||||
style: 'border: 0; width: 600px; height: 406px;',
|
||||
el: function(a) {
|
||||
@ -8485,8 +8497,8 @@
|
||||
src: "http://strawpoll.me/embed_1/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
TwitchTV: {
|
||||
}, {
|
||||
key: 'TwitchTV',
|
||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/,
|
||||
style: "border: none; width: 640px; height: 360px;",
|
||||
el: function(a) {
|
||||
@ -8505,8 +8517,8 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
Vocaroo: {
|
||||
}, {
|
||||
key: 'Vocaroo',
|
||||
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/,
|
||||
style: 'border: 0; width: 150px; height: 45px;',
|
||||
el: function(a) {
|
||||
@ -8514,8 +8526,8 @@
|
||||
innerHTML: "<embed src='http://vocaroo.com/player.swf?playMediaID=" + (a.dataset.uid.replace(/^i\//, '')) + "&autoplay=0' wmode='opaque' width='150' height='45' pluginspage='http://get.adobe.com/flashplayer/' type='application/x-shockwave-flash'></embed>"
|
||||
});
|
||||
}
|
||||
},
|
||||
Vimeo: {
|
||||
}, {
|
||||
key: 'Vimeo',
|
||||
regExp: /.*(?:vimeo.com\/)([^#\&\?]*).*/,
|
||||
el: function(a) {
|
||||
return $.el('iframe', {
|
||||
@ -8530,8 +8542,8 @@
|
||||
return _.title;
|
||||
}
|
||||
}
|
||||
},
|
||||
Vine: {
|
||||
}, {
|
||||
key: 'Vine',
|
||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/,
|
||||
style: 'border: none; width: 500px; height: 500px;',
|
||||
el: function(a) {
|
||||
@ -8539,8 +8551,8 @@
|
||||
src: "https://vine.co/" + a.dataset.uid + "/card"
|
||||
});
|
||||
}
|
||||
},
|
||||
YouTube: {
|
||||
}, {
|
||||
key: 'YouTube',
|
||||
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/,
|
||||
el: function(a) {
|
||||
var el;
|
||||
@ -8558,8 +8570,26 @@
|
||||
return data.entry.title.$t;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'Loopvid',
|
||||
regExp: /.*loopvid.appspot.com\/.*/,
|
||||
dummy: true
|
||||
}, {
|
||||
key: 'MediaFire',
|
||||
regExp: /.*mediafire.com\/.*/,
|
||||
dummy: true
|
||||
}, {
|
||||
key: 'video',
|
||||
regExp: /(.*\.(ogv|webm|mp4))$/,
|
||||
el: function(a) {
|
||||
return $.el('video', {
|
||||
controls: 'controls',
|
||||
preload: 'auto',
|
||||
src: a.dataset.uid
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
QR = {
|
||||
@ -9229,20 +9259,20 @@
|
||||
},
|
||||
flags: function() {
|
||||
var flag, fn, select, _i, _len, _ref;
|
||||
fn = function(val) {
|
||||
return $.el('option', {
|
||||
value: val[0],
|
||||
textContent: val[1]
|
||||
});
|
||||
};
|
||||
select = $.el('select', {
|
||||
name: 'flag',
|
||||
className: 'flagSelector'
|
||||
});
|
||||
fn = function(val) {
|
||||
return $.add(select, $.el('option', {
|
||||
value: val[0],
|
||||
textContent: val[1]
|
||||
}));
|
||||
};
|
||||
_ref = [['0', 'None'], ['US', 'American'], ['KP', 'Best Korean'], ['BL', 'Black Nationalist'], ['CM', 'Communist'], ['CF', 'Confederate'], ['RE', 'Conservative'], ['EU', 'European'], ['GY', 'Gay'], ['PC', 'Hippie'], ['IL', 'Israeli'], ['DM', 'Liberal'], ['RP', 'Libertarian'], ['MF', 'Muslim'], ['NZ', 'Nazi'], ['OB', 'Obama'], ['PR', 'Pirate'], ['RB', 'Rebel'], ['TP', 'Tea Partier'], ['TX', 'Texan'], ['TR', 'Tree Hugger'], ['WP', 'White Supremacist']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
flag = _ref[_i];
|
||||
$.add(select, fn(flag));
|
||||
fn(flag);
|
||||
}
|
||||
return select;
|
||||
},
|
||||
@ -9411,6 +9441,8 @@
|
||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
||||
if (/mistyped/i.test(err.textContent)) {
|
||||
err = 'You seem to have mistyped the CAPTCHA.';
|
||||
} else if (/expired/i.test(err.textContent)) {
|
||||
err = 'This CAPTCHA is no longer valid because it has expired.';
|
||||
}
|
||||
QR.cooldown.auto = false;
|
||||
QR.cooldown.set({
|
||||
|
||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -15,6 +15,7 @@
|
||||
"run_at": "document_start"
|
||||
}],
|
||||
"homepage_url": "http://zixaphir.github.com/appchan-x/",
|
||||
"update_url": "https://github.com/zixaphir/appchan-x/raw/master/builds/updates.xml",
|
||||
"minimum_chrome_version": "32",
|
||||
"permissions": [
|
||||
"storage",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* appchan x - Version 2.9.10 - 2014-04-02
|
||||
* appchan x - Version 2.9.10 - 2014-04-03
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -365,7 +365,7 @@
|
||||
'Bottom Board List': true,
|
||||
'Custom Board Navigation': true
|
||||
},
|
||||
boardnav: "[ toggle-all ]\n[current-title]\n[external-text:\"FAQ\",\"https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions\"]",
|
||||
boardnav: "[ toggle-all ]\n[current-title]\n[external-text:\"FAQ\",\"https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions\"]",
|
||||
QR: {
|
||||
'QR.personas': "#email:\"sage\";boards:jp;always"
|
||||
},
|
||||
@ -8110,9 +8110,16 @@
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
var type, _i, _len, _ref;
|
||||
if (!Conf['Linkify']) {
|
||||
return;
|
||||
}
|
||||
this.types = {};
|
||||
_ref = this.ordered_types;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
this.types[type.key] = type;
|
||||
}
|
||||
if (Conf['Comment Expansion']) {
|
||||
ExpandComment.callbacks.push(this.node);
|
||||
}
|
||||
@ -8244,14 +8251,18 @@
|
||||
return a;
|
||||
},
|
||||
services: function(link) {
|
||||
var href, key, match, type, _ref;
|
||||
var href, match, type, _i, _len, _ref;
|
||||
href = link.href;
|
||||
_ref = Linkify.types;
|
||||
for (key in _ref) {
|
||||
type = _ref[key];
|
||||
if (match = type.regExp.exec(href)) {
|
||||
return [key, match[1], match[2], link];
|
||||
_ref = Linkify.ordered_types;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
type = _ref[_i];
|
||||
if (!(match = type.regExp.exec(href))) {
|
||||
continue;
|
||||
}
|
||||
if (type.dummy) {
|
||||
return;
|
||||
}
|
||||
return [type.key, match[1], match[2], link];
|
||||
}
|
||||
},
|
||||
embed: function(data) {
|
||||
@ -8362,8 +8373,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
types: {
|
||||
audio: {
|
||||
ordered_types: [
|
||||
{
|
||||
key: 'audio',
|
||||
regExp: /(.*\.(mp3|ogg|wav))$/,
|
||||
el: function(a) {
|
||||
return $.el('audio', {
|
||||
@ -8372,8 +8384,8 @@
|
||||
src: a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
gist: {
|
||||
}, {
|
||||
key: 'gist',
|
||||
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/,
|
||||
el: function(a) {
|
||||
var div;
|
||||
@ -8395,8 +8407,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
image: {
|
||||
}, {
|
||||
key: 'image',
|
||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/,
|
||||
style: 'border: 0; width: auto; height: auto;',
|
||||
el: function(a) {
|
||||
@ -8404,24 +8416,24 @@
|
||||
innerHTML: "<a target=_blank href='" + a.dataset.href + "'><img src='" + a.dataset.href + "'></a>"
|
||||
});
|
||||
}
|
||||
},
|
||||
InstallGentoo: {
|
||||
}, {
|
||||
key: 'InstallGentoo',
|
||||
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/,
|
||||
el: function(a) {
|
||||
return $.el('iframe', {
|
||||
src: "http://paste.installgentoo.com/view/embed/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
Twitter: {
|
||||
}, {
|
||||
key: 'Twitter',
|
||||
regExp: /.*twitter.com\/(.+\/status\/\d+)/,
|
||||
el: function(a) {
|
||||
return $.el('iframe', {
|
||||
src: "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
LiveLeak: {
|
||||
}, {
|
||||
key: 'LiveLeak',
|
||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/,
|
||||
el: function(a) {
|
||||
var el;
|
||||
@ -8434,8 +8446,8 @@
|
||||
el.setAttribute("allowfullscreen", "true");
|
||||
return el;
|
||||
}
|
||||
},
|
||||
MediaCrush: {
|
||||
}, {
|
||||
key: 'MediaCrush',
|
||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i,
|
||||
style: 'border: 0;',
|
||||
el: function(a) {
|
||||
@ -8486,8 +8498,8 @@
|
||||
});
|
||||
return el;
|
||||
}
|
||||
},
|
||||
pastebin: {
|
||||
}, {
|
||||
key: 'pastebin',
|
||||
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/,
|
||||
el: function(a) {
|
||||
var div;
|
||||
@ -8495,8 +8507,8 @@
|
||||
src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
gfycat: {
|
||||
}, {
|
||||
key: 'gfycat',
|
||||
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/,
|
||||
el: function(a) {
|
||||
var div;
|
||||
@ -8504,8 +8516,8 @@
|
||||
src: "http://gfycat.com/iframe/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
SoundCloud: {
|
||||
}, {
|
||||
key: 'SoundCloud',
|
||||
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/,
|
||||
style: 'height: auto; width: 500px; display: inline-block;',
|
||||
el: function(a) {
|
||||
@ -8529,8 +8541,8 @@
|
||||
return _.title;
|
||||
}
|
||||
}
|
||||
},
|
||||
StrawPoll: {
|
||||
}, {
|
||||
key: 'StrawPoll',
|
||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/,
|
||||
style: 'border: 0; width: 600px; height: 406px;',
|
||||
el: function(a) {
|
||||
@ -8538,8 +8550,8 @@
|
||||
src: "http://strawpoll.me/embed_1/" + a.dataset.uid
|
||||
});
|
||||
}
|
||||
},
|
||||
TwitchTV: {
|
||||
}, {
|
||||
key: 'TwitchTV',
|
||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/,
|
||||
style: "border: none; width: 640px; height: 360px;",
|
||||
el: function(a) {
|
||||
@ -8558,8 +8570,8 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
Vocaroo: {
|
||||
}, {
|
||||
key: 'Vocaroo',
|
||||
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/,
|
||||
style: 'border: 0; width: 150px; height: 45px;',
|
||||
el: function(a) {
|
||||
@ -8567,8 +8579,8 @@
|
||||
innerHTML: "<embed src='http://vocaroo.com/player.swf?playMediaID=" + (a.dataset.uid.replace(/^i\//, '')) + "&autoplay=0' wmode='opaque' width='150' height='45' pluginspage='http://get.adobe.com/flashplayer/' type='application/x-shockwave-flash'></embed>"
|
||||
});
|
||||
}
|
||||
},
|
||||
Vimeo: {
|
||||
}, {
|
||||
key: 'Vimeo',
|
||||
regExp: /.*(?:vimeo.com\/)([^#\&\?]*).*/,
|
||||
el: function(a) {
|
||||
return $.el('iframe', {
|
||||
@ -8583,8 +8595,8 @@
|
||||
return _.title;
|
||||
}
|
||||
}
|
||||
},
|
||||
Vine: {
|
||||
}, {
|
||||
key: 'Vine',
|
||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/,
|
||||
style: 'border: none; width: 500px; height: 500px;',
|
||||
el: function(a) {
|
||||
@ -8592,8 +8604,8 @@
|
||||
src: "https://vine.co/" + a.dataset.uid + "/card"
|
||||
});
|
||||
}
|
||||
},
|
||||
YouTube: {
|
||||
}, {
|
||||
key: 'YouTube',
|
||||
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/,
|
||||
el: function(a) {
|
||||
var el;
|
||||
@ -8611,8 +8623,26 @@
|
||||
return data.entry.title.$t;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'Loopvid',
|
||||
regExp: /.*loopvid.appspot.com\/.*/,
|
||||
dummy: true
|
||||
}, {
|
||||
key: 'MediaFire',
|
||||
regExp: /.*mediafire.com\/.*/,
|
||||
dummy: true
|
||||
}, {
|
||||
key: 'video',
|
||||
regExp: /(.*\.(ogv|webm|mp4))$/,
|
||||
el: function(a) {
|
||||
return $.el('video', {
|
||||
controls: 'controls',
|
||||
preload: 'auto',
|
||||
src: a.dataset.uid
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
QR = {
|
||||
@ -9273,20 +9303,20 @@
|
||||
},
|
||||
flags: function() {
|
||||
var flag, fn, select, _i, _len, _ref;
|
||||
fn = function(val) {
|
||||
return $.el('option', {
|
||||
value: val[0],
|
||||
textContent: val[1]
|
||||
});
|
||||
};
|
||||
select = $.el('select', {
|
||||
name: 'flag',
|
||||
className: 'flagSelector'
|
||||
});
|
||||
fn = function(val) {
|
||||
return $.add(select, $.el('option', {
|
||||
value: val[0],
|
||||
textContent: val[1]
|
||||
}));
|
||||
};
|
||||
_ref = [['0', 'None'], ['US', 'American'], ['KP', 'Best Korean'], ['BL', 'Black Nationalist'], ['CM', 'Communist'], ['CF', 'Confederate'], ['RE', 'Conservative'], ['EU', 'European'], ['GY', 'Gay'], ['PC', 'Hippie'], ['IL', 'Israeli'], ['DM', 'Liberal'], ['RP', 'Libertarian'], ['MF', 'Muslim'], ['NZ', 'Nazi'], ['OB', 'Obama'], ['PR', 'Pirate'], ['RB', 'Rebel'], ['TP', 'Tea Partier'], ['TX', 'Texan'], ['TR', 'Tree Hugger'], ['WP', 'White Supremacist']];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
flag = _ref[_i];
|
||||
$.add(select, fn(flag));
|
||||
fn(flag);
|
||||
}
|
||||
return select;
|
||||
},
|
||||
@ -9455,6 +9485,8 @@
|
||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
||||
if (/mistyped/i.test(err.textContent)) {
|
||||
err = 'You seem to have mistyped the CAPTCHA.';
|
||||
} else if (/expired/i.test(err.textContent)) {
|
||||
err = 'This CAPTCHA is no longer valid because it has expired.';
|
||||
}
|
||||
QR.cooldown.auto = false;
|
||||
QR.cooldown.set({
|
||||
|
||||
7
builds/updates.xml
Normal file
7
builds/updates.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='appchan x'>
|
||||
<updatecheck codebase='https://github.com/zixaphir/appchan-x/raw/master/builds/crx.crx' version='2.9.10' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
@ -865,10 +865,11 @@ Config =
|
||||
'Custom Board Navigation': true
|
||||
|
||||
boardnav: """
|
||||
[ toggle-all ]
|
||||
[current-title]
|
||||
[external-text:"FAQ","https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions"]
|
||||
"""
|
||||
[ toggle-all ]
|
||||
[current-title]
|
||||
[external-text:"FAQ","https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions"]
|
||||
"""
|
||||
|
||||
|
||||
QR:
|
||||
'QR.personas': """
|
||||
|
||||
1559
src/General/css/style.css
Executable file
1559
src/General/css/style.css
Executable file
File diff suppressed because it is too large
Load Diff
BIN
src/General/img/links/video.png
Normal file
BIN
src/General/img/links/video.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 209 B |
@ -15,6 +15,7 @@
|
||||
"run_at": "document_start"
|
||||
}],
|
||||
"homepage_url": "<%= meta.page %>",
|
||||
"update_url": "<%= meta.repo %>raw/master/builds/updates.xml",
|
||||
"minimum_chrome_version": "<%= meta.min.chrome %>",
|
||||
"permissions": [
|
||||
"storage",
|
||||
|
||||
7
src/General/meta/updates.xml
Normal file
7
src/General/meta/updates.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||
<app appid='<%= meta.name %>'>
|
||||
<updatecheck codebase='<%= meta.repo %>raw/master/builds/crx.crx' version='<%= version %>' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
@ -2,6 +2,9 @@ Linkify =
|
||||
init: ->
|
||||
return if !Conf['Linkify']
|
||||
|
||||
@types = {}
|
||||
@types[type.key] = type for type in @ordered_types
|
||||
|
||||
if Conf['Comment Expansion']
|
||||
ExpandComment.callbacks.push @node
|
||||
|
||||
@ -147,8 +150,9 @@ Linkify =
|
||||
|
||||
services: (link) ->
|
||||
{href} = link
|
||||
for key, type of Linkify.types when match = type.regExp.exec href
|
||||
return [key, match[1], match[2], link]
|
||||
for type in Linkify.ordered_types when match = type.regExp.exec href
|
||||
return if type.dummy
|
||||
return [type.key, match[1], match[2], link]
|
||||
return
|
||||
|
||||
embed: (data) ->
|
||||
@ -242,16 +246,16 @@ Linkify =
|
||||
embed.dataset.title = text if Conf['Embedding'] and status in [200, 304]
|
||||
link.textContent = text if link
|
||||
|
||||
types:
|
||||
audio:
|
||||
ordered_types: [
|
||||
key: 'audio'
|
||||
regExp: /(.*\.(mp3|ogg|wav))$/
|
||||
el: (a) ->
|
||||
$.el 'audio',
|
||||
controls: 'controls'
|
||||
preload: 'auto'
|
||||
src: a.dataset.uid
|
||||
|
||||
gist:
|
||||
,
|
||||
key: 'gist'
|
||||
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/
|
||||
el: (a) ->
|
||||
div = $.el 'iframe',
|
||||
@ -261,27 +265,27 @@ Linkify =
|
||||
api: (uid) -> "https://api.github.com/gists/#{uid}"
|
||||
text: ({files}) ->
|
||||
return file for file of files when files.hasOwnProperty file
|
||||
|
||||
image:
|
||||
,
|
||||
key: 'image'
|
||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/
|
||||
style: 'border: 0; width: auto; height: auto;'
|
||||
el: (a) ->
|
||||
$.el 'div',
|
||||
innerHTML: "<a target=_blank href='#{a.dataset.href}'><img src='#{a.dataset.href}'></a>"
|
||||
|
||||
InstallGentoo:
|
||||
,
|
||||
key: 'InstallGentoo'
|
||||
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/
|
||||
el: (a) ->
|
||||
$.el 'iframe',
|
||||
src: "http://paste.installgentoo.com/view/embed/#{a.dataset.uid}"
|
||||
|
||||
Twitter:
|
||||
,
|
||||
key: 'Twitter'
|
||||
regExp: /.*twitter.com\/(.+\/status\/\d+)/
|
||||
el: (a) ->
|
||||
$.el 'iframe',
|
||||
src: "https://twitframe.com/show?url=https://twitter.com/#{a.dataset.uid}"
|
||||
|
||||
LiveLeak:
|
||||
,
|
||||
key: 'LiveLeak'
|
||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/
|
||||
el: (a) ->
|
||||
el = $.el 'iframe',
|
||||
@ -291,8 +295,8 @@ Linkify =
|
||||
frameborder: "0"
|
||||
el.setAttribute "allowfullscreen", "true"
|
||||
el
|
||||
|
||||
MediaCrush:
|
||||
,
|
||||
key: 'MediaCrush'
|
||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i
|
||||
style: 'border: 0;'
|
||||
el: (a) ->
|
||||
@ -323,20 +327,20 @@ Linkify =
|
||||
else
|
||||
"ERROR: No valid filetype."
|
||||
el
|
||||
|
||||
pastebin:
|
||||
,
|
||||
key: 'pastebin'
|
||||
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/
|
||||
el: (a) ->
|
||||
div = $.el 'iframe',
|
||||
src: "http://pastebin.com/embed_iframe.php?i=#{a.dataset.uid}"
|
||||
|
||||
gfycat:
|
||||
,
|
||||
key: 'gfycat'
|
||||
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/
|
||||
el: (a) ->
|
||||
div = $.el 'iframe',
|
||||
src: "http://gfycat.com/iframe/#{a.dataset.uid}"
|
||||
|
||||
SoundCloud:
|
||||
,
|
||||
key: 'SoundCloud'
|
||||
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/
|
||||
style: 'height: auto; width: 500px; display: inline-block;'
|
||||
el: (a) ->
|
||||
@ -352,15 +356,15 @@ Linkify =
|
||||
title:
|
||||
api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}"
|
||||
text: (_) -> _.title
|
||||
|
||||
StrawPoll:
|
||||
,
|
||||
key: 'StrawPoll'
|
||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/
|
||||
style: 'border: 0; width: 600px; height: 406px;'
|
||||
el: (a) ->
|
||||
$.el 'iframe',
|
||||
src: "http://strawpoll.me/embed_1/#{a.dataset.uid}"
|
||||
|
||||
TwitchTV:
|
||||
,
|
||||
key: 'TwitchTV'
|
||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
|
||||
style: "border: none; width: 640px; height: 360px;"
|
||||
el: (a) ->
|
||||
@ -384,15 +388,15 @@ Linkify =
|
||||
<param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" />
|
||||
<param name="flashvars" value="hostname=www.twitch.tv&channel=#{channel}&auto_play=true&start_volume=25" />
|
||||
"""
|
||||
|
||||
Vocaroo:
|
||||
,
|
||||
key: 'Vocaroo'
|
||||
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/
|
||||
style: 'border: 0; width: 150px; height: 45px;'
|
||||
el: (a) ->
|
||||
$.el 'object',
|
||||
innerHTML: "<embed src='http://vocaroo.com/player.swf?playMediaID=#{a.dataset.uid.replace /^i\//, ''}&autoplay=0' wmode='opaque' width='150' height='45' pluginspage='http://get.adobe.com/flashplayer/' type='application/x-shockwave-flash'></embed>"
|
||||
|
||||
Vimeo:
|
||||
,
|
||||
key: 'Vimeo'
|
||||
regExp: /.*(?:vimeo.com\/)([^#\&\?]*).*/
|
||||
el: (a) ->
|
||||
$.el 'iframe',
|
||||
@ -400,15 +404,15 @@ Linkify =
|
||||
title:
|
||||
api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}"
|
||||
text: (_) -> _.title
|
||||
|
||||
Vine:
|
||||
,
|
||||
key: 'Vine'
|
||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/
|
||||
style: 'border: none; width: 500px; height: 500px;'
|
||||
el: (a) ->
|
||||
$.el 'iframe',
|
||||
src: "https://vine.co/#{a.dataset.uid}/card"
|
||||
|
||||
YouTube:
|
||||
,
|
||||
key: 'YouTube'
|
||||
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/
|
||||
el: (a) ->
|
||||
el = $.el 'iframe',
|
||||
@ -418,4 +422,22 @@ Linkify =
|
||||
title:
|
||||
api: (uid) -> "https://gdata.youtube.com/feeds/api/videos/#{uid}?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode"
|
||||
text: (data) -> data.entry.title.$t
|
||||
,
|
||||
# dummy entries: not implemented yet but included to prevent them being wrongly embedded as a subsequent type
|
||||
key: 'Loopvid'
|
||||
regExp: /.*loopvid.appspot.com\/.*/
|
||||
dummy: true
|
||||
,
|
||||
key: 'MediaFire'
|
||||
regExp: /.*mediafire.com\/.*/
|
||||
dummy: true
|
||||
,
|
||||
key: 'video'
|
||||
regExp: /(.*\.(ogv|webm|mp4))$/
|
||||
el: (a) ->
|
||||
$.el 'video',
|
||||
controls: 'controls'
|
||||
preload: 'auto'
|
||||
src: a.dataset.uid
|
||||
]
|
||||
|
||||
|
||||
@ -573,14 +573,16 @@ QR =
|
||||
else if !check and @.className.match "\\btripped\\b" then $.rmClass @, 'tripped'
|
||||
|
||||
flags: ->
|
||||
fn = (val) -> $.el 'option',
|
||||
value: val[0]
|
||||
textContent: val[1]
|
||||
select = $.el 'select',
|
||||
name: 'flag'
|
||||
className: 'flagSelector'
|
||||
|
||||
$.add select, fn flag for flag in [
|
||||
fn = (val) ->
|
||||
$.add select, $.el 'option',
|
||||
value: val[0]
|
||||
textContent: val[1]
|
||||
|
||||
fn flag for flag in [
|
||||
['0', 'None']
|
||||
['US', 'American']
|
||||
['KP', 'Best Korean']
|
||||
@ -770,6 +772,8 @@ QR =
|
||||
# Remove the obnoxious 4chan Pass ad.
|
||||
if /mistyped/i.test err.textContent
|
||||
err = 'You seem to have mistyped the CAPTCHA.'
|
||||
else if /expired/i.test err.textContent
|
||||
err = 'This CAPTCHA is no longer valid because it has expired.'
|
||||
QR.cooldown.auto = false
|
||||
# Too many frequent mistyped captchas will auto-ban you!
|
||||
# On connection error, the post most likely didn't go through.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user