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
|
### v2.9.10
|
||||||
*2014-04-02*
|
*2014-04-02*
|
||||||
|
|
||||||
|
|||||||
@ -50,6 +50,7 @@ module.exports = (grunt) ->
|
|||||||
crx:
|
crx:
|
||||||
files:
|
files:
|
||||||
'builds/crx/manifest.json': 'src/General/meta/manifest.json'
|
'builds/crx/manifest.json': 'src/General/meta/manifest.json'
|
||||||
|
'builds/updates.xml': 'src/General/meta/updates.xml'
|
||||||
'builds/crx/script.js': [
|
'builds/crx/script.js': [
|
||||||
'src/General/meta/botproc.js'
|
'src/General/meta/botproc.js'
|
||||||
'src/General/meta/banner.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.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.4.1
|
// @version 1.4.5
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @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/Spittie/4chan-x/blob/master/LICENSE
|
// @license MIT; https://github.com/ccd0/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/*
|
||||||
@ -17,7 +17,7 @@
|
|||||||
// @grant GM_openInTab
|
// @grant GM_openInTab
|
||||||
// @grant GM_xmlhttpRequest
|
// @grant GM_xmlhttpRequest
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
// @updateURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.meta.js
|
// @updateURL https://github.com/ccd0/4chan-x/raw/stable/builds/4chan-X.meta.js
|
||||||
// @downloadURL https://github.com/Spittie/4chan-x/raw/stable/builds/4chan-X.user.js
|
// @downloadURL https://github.com/ccd0/4chan-x/raw/stable/builds/4chan-X.user.js
|
||||||
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAF5JREFUeNrtkTESABAQxPD/R6tsE2dUGYUtFJvLDKf93KevHJAjpBorAQWSBIKqFASC4G0pCAkm4GfaEvgYXl0T6HBaE97f0vmnfYHbZOMLZCx9ISdKWwjOWZSC8GYm4SUGwfYgqI4AAAAASUVORK5CYII=
|
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAF5JREFUeNrtkTESABAQxPD/R6tsE2dUGYUtFJvLDKf93KevHJAjpBorAQWSBIKqFASC4G0pCAkm4GfaEvgYXl0T6HBaE97f0vmnfYHbZOMLZCx9ISdKWwjOWZSC8GYm4SUGwfYgqI4AAAAASUVORK5CYII=
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appchan x - Version 2.9.10 - 2014-04-02
|
* appchan x - Version 2.9.10 - 2014-04-03
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -390,7 +390,7 @@
|
|||||||
'Bottom Board List': true,
|
'Bottom Board List': true,
|
||||||
'Custom Board Navigation': 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: {
|
||||||
'QR.personas': "#email:\"sage\";boards:jp;always"
|
'QR.personas': "#email:\"sage\";boards:jp;always"
|
||||||
},
|
},
|
||||||
@ -8057,9 +8057,16 @@
|
|||||||
|
|
||||||
Linkify = {
|
Linkify = {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
var type, _i, _len, _ref;
|
||||||
if (!Conf['Linkify']) {
|
if (!Conf['Linkify']) {
|
||||||
return;
|
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']) {
|
if (Conf['Comment Expansion']) {
|
||||||
ExpandComment.callbacks.push(this.node);
|
ExpandComment.callbacks.push(this.node);
|
||||||
}
|
}
|
||||||
@ -8191,14 +8198,18 @@
|
|||||||
return a;
|
return a;
|
||||||
},
|
},
|
||||||
services: function(link) {
|
services: function(link) {
|
||||||
var href, key, match, type, _ref;
|
var href, match, type, _i, _len, _ref;
|
||||||
href = link.href;
|
href = link.href;
|
||||||
_ref = Linkify.types;
|
_ref = Linkify.ordered_types;
|
||||||
for (key in _ref) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
type = _ref[key];
|
type = _ref[_i];
|
||||||
if (match = type.regExp.exec(href)) {
|
if (!(match = type.regExp.exec(href))) {
|
||||||
return [key, match[1], match[2], link];
|
continue;
|
||||||
}
|
}
|
||||||
|
if (type.dummy) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return [type.key, match[1], match[2], link];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
embed: function(data) {
|
embed: function(data) {
|
||||||
@ -8309,8 +8320,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
types: {
|
ordered_types: [
|
||||||
audio: {
|
{
|
||||||
|
key: 'audio',
|
||||||
regExp: /(.*\.(mp3|ogg|wav))$/,
|
regExp: /(.*\.(mp3|ogg|wav))$/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
return $.el('audio', {
|
||||||
@ -8319,8 +8331,8 @@
|
|||||||
src: a.dataset.uid
|
src: a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
gist: {
|
key: 'gist',
|
||||||
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/,
|
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var div;
|
var div;
|
||||||
@ -8342,8 +8354,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
image: {
|
key: 'image',
|
||||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/,
|
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/,
|
||||||
style: 'border: 0; width: auto; height: auto;',
|
style: 'border: 0; width: auto; height: auto;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8351,24 +8363,24 @@
|
|||||||
innerHTML: "<a target=_blank href='" + a.dataset.href + "'><img src='" + a.dataset.href + "'></a>"
|
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_]+)/,
|
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('iframe', {
|
return $.el('iframe', {
|
||||||
src: "http://paste.installgentoo.com/view/embed/" + a.dataset.uid
|
src: "http://paste.installgentoo.com/view/embed/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
Twitter: {
|
key: 'Twitter',
|
||||||
regExp: /.*twitter.com\/(.+\/status\/\d+)/,
|
regExp: /.*twitter.com\/(.+\/status\/\d+)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('iframe', {
|
return $.el('iframe', {
|
||||||
src: "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid
|
src: "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
LiveLeak: {
|
key: 'LiveLeak',
|
||||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/,
|
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var el;
|
var el;
|
||||||
@ -8381,8 +8393,8 @@
|
|||||||
el.setAttribute("allowfullscreen", "true");
|
el.setAttribute("allowfullscreen", "true");
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
MediaCrush: {
|
key: 'MediaCrush',
|
||||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i,
|
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i,
|
||||||
style: 'border: 0;',
|
style: 'border: 0;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8433,8 +8445,8 @@
|
|||||||
});
|
});
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
pastebin: {
|
key: 'pastebin',
|
||||||
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/,
|
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var div;
|
var div;
|
||||||
@ -8442,8 +8454,8 @@
|
|||||||
src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid
|
src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
gfycat: {
|
key: 'gfycat',
|
||||||
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/,
|
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var div;
|
var div;
|
||||||
@ -8451,8 +8463,8 @@
|
|||||||
src: "http://gfycat.com/iframe/" + a.dataset.uid
|
src: "http://gfycat.com/iframe/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
SoundCloud: {
|
key: 'SoundCloud',
|
||||||
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/,
|
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/,
|
||||||
style: 'height: auto; width: 500px; display: inline-block;',
|
style: 'height: auto; width: 500px; display: inline-block;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8476,8 +8488,8 @@
|
|||||||
return _.title;
|
return _.title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
StrawPoll: {
|
key: 'StrawPoll',
|
||||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/,
|
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/,
|
||||||
style: 'border: 0; width: 600px; height: 406px;',
|
style: 'border: 0; width: 600px; height: 406px;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8485,8 +8497,8 @@
|
|||||||
src: "http://strawpoll.me/embed_1/" + a.dataset.uid
|
src: "http://strawpoll.me/embed_1/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
TwitchTV: {
|
key: 'TwitchTV',
|
||||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/,
|
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/,
|
||||||
style: "border: none; width: 640px; height: 360px;",
|
style: "border: none; width: 640px; height: 360px;",
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8505,8 +8517,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
Vocaroo: {
|
key: 'Vocaroo',
|
||||||
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/,
|
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/,
|
||||||
style: 'border: 0; width: 150px; height: 45px;',
|
style: 'border: 0; width: 150px; height: 45px;',
|
||||||
el: function(a) {
|
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>"
|
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\/)([^#\&\?]*).*/,
|
regExp: /.*(?:vimeo.com\/)([^#\&\?]*).*/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('iframe', {
|
return $.el('iframe', {
|
||||||
@ -8530,8 +8542,8 @@
|
|||||||
return _.title;
|
return _.title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
Vine: {
|
key: 'Vine',
|
||||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/,
|
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/,
|
||||||
style: 'border: none; width: 500px; height: 500px;',
|
style: 'border: none; width: 500px; height: 500px;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8539,8 +8551,8 @@
|
|||||||
src: "https://vine.co/" + a.dataset.uid + "/card"
|
src: "https://vine.co/" + a.dataset.uid + "/card"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
YouTube: {
|
key: 'YouTube',
|
||||||
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/,
|
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var el;
|
var el;
|
||||||
@ -8558,8 +8570,26 @@
|
|||||||
return data.entry.title.$t;
|
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 = {
|
QR = {
|
||||||
@ -9229,20 +9259,20 @@
|
|||||||
},
|
},
|
||||||
flags: function() {
|
flags: function() {
|
||||||
var flag, fn, select, _i, _len, _ref;
|
var flag, fn, select, _i, _len, _ref;
|
||||||
fn = function(val) {
|
|
||||||
return $.el('option', {
|
|
||||||
value: val[0],
|
|
||||||
textContent: val[1]
|
|
||||||
});
|
|
||||||
};
|
|
||||||
select = $.el('select', {
|
select = $.el('select', {
|
||||||
name: 'flag',
|
name: 'flag',
|
||||||
className: 'flagSelector'
|
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']];
|
_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++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
flag = _ref[_i];
|
flag = _ref[_i];
|
||||||
$.add(select, fn(flag));
|
fn(flag);
|
||||||
}
|
}
|
||||||
return select;
|
return select;
|
||||||
},
|
},
|
||||||
@ -9411,6 +9441,8 @@
|
|||||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
||||||
if (/mistyped/i.test(err.textContent)) {
|
if (/mistyped/i.test(err.textContent)) {
|
||||||
err = 'You seem to have mistyped the CAPTCHA.';
|
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.auto = false;
|
||||||
QR.cooldown.set({
|
QR.cooldown.set({
|
||||||
|
|||||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -15,6 +15,7 @@
|
|||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
}],
|
}],
|
||||||
"homepage_url": "http://zixaphir.github.com/appchan-x/",
|
"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",
|
"minimum_chrome_version": "32",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"storage",
|
"storage",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// Generated by CoffeeScript
|
// 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.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||||
@ -365,7 +365,7 @@
|
|||||||
'Bottom Board List': true,
|
'Bottom Board List': true,
|
||||||
'Custom Board Navigation': 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: {
|
||||||
'QR.personas': "#email:\"sage\";boards:jp;always"
|
'QR.personas': "#email:\"sage\";boards:jp;always"
|
||||||
},
|
},
|
||||||
@ -8110,9 +8110,16 @@
|
|||||||
|
|
||||||
Linkify = {
|
Linkify = {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
var type, _i, _len, _ref;
|
||||||
if (!Conf['Linkify']) {
|
if (!Conf['Linkify']) {
|
||||||
return;
|
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']) {
|
if (Conf['Comment Expansion']) {
|
||||||
ExpandComment.callbacks.push(this.node);
|
ExpandComment.callbacks.push(this.node);
|
||||||
}
|
}
|
||||||
@ -8244,14 +8251,18 @@
|
|||||||
return a;
|
return a;
|
||||||
},
|
},
|
||||||
services: function(link) {
|
services: function(link) {
|
||||||
var href, key, match, type, _ref;
|
var href, match, type, _i, _len, _ref;
|
||||||
href = link.href;
|
href = link.href;
|
||||||
_ref = Linkify.types;
|
_ref = Linkify.ordered_types;
|
||||||
for (key in _ref) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
type = _ref[key];
|
type = _ref[_i];
|
||||||
if (match = type.regExp.exec(href)) {
|
if (!(match = type.regExp.exec(href))) {
|
||||||
return [key, match[1], match[2], link];
|
continue;
|
||||||
}
|
}
|
||||||
|
if (type.dummy) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return [type.key, match[1], match[2], link];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
embed: function(data) {
|
embed: function(data) {
|
||||||
@ -8362,8 +8373,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
types: {
|
ordered_types: [
|
||||||
audio: {
|
{
|
||||||
|
key: 'audio',
|
||||||
regExp: /(.*\.(mp3|ogg|wav))$/,
|
regExp: /(.*\.(mp3|ogg|wav))$/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('audio', {
|
return $.el('audio', {
|
||||||
@ -8372,8 +8384,8 @@
|
|||||||
src: a.dataset.uid
|
src: a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
gist: {
|
key: 'gist',
|
||||||
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/,
|
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var div;
|
var div;
|
||||||
@ -8395,8 +8407,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
image: {
|
key: 'image',
|
||||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/,
|
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/,
|
||||||
style: 'border: 0; width: auto; height: auto;',
|
style: 'border: 0; width: auto; height: auto;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8404,24 +8416,24 @@
|
|||||||
innerHTML: "<a target=_blank href='" + a.dataset.href + "'><img src='" + a.dataset.href + "'></a>"
|
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_]+)/,
|
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('iframe', {
|
return $.el('iframe', {
|
||||||
src: "http://paste.installgentoo.com/view/embed/" + a.dataset.uid
|
src: "http://paste.installgentoo.com/view/embed/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
Twitter: {
|
key: 'Twitter',
|
||||||
regExp: /.*twitter.com\/(.+\/status\/\d+)/,
|
regExp: /.*twitter.com\/(.+\/status\/\d+)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('iframe', {
|
return $.el('iframe', {
|
||||||
src: "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid
|
src: "https://twitframe.com/show?url=https://twitter.com/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
LiveLeak: {
|
key: 'LiveLeak',
|
||||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/,
|
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var el;
|
var el;
|
||||||
@ -8434,8 +8446,8 @@
|
|||||||
el.setAttribute("allowfullscreen", "true");
|
el.setAttribute("allowfullscreen", "true");
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
MediaCrush: {
|
key: 'MediaCrush',
|
||||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i,
|
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i,
|
||||||
style: 'border: 0;',
|
style: 'border: 0;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8486,8 +8498,8 @@
|
|||||||
});
|
});
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
pastebin: {
|
key: 'pastebin',
|
||||||
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/,
|
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var div;
|
var div;
|
||||||
@ -8495,8 +8507,8 @@
|
|||||||
src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid
|
src: "http://pastebin.com/embed_iframe.php?i=" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
gfycat: {
|
key: 'gfycat',
|
||||||
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/,
|
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var div;
|
var div;
|
||||||
@ -8504,8 +8516,8 @@
|
|||||||
src: "http://gfycat.com/iframe/" + a.dataset.uid
|
src: "http://gfycat.com/iframe/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
SoundCloud: {
|
key: 'SoundCloud',
|
||||||
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/,
|
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/,
|
||||||
style: 'height: auto; width: 500px; display: inline-block;',
|
style: 'height: auto; width: 500px; display: inline-block;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8529,8 +8541,8 @@
|
|||||||
return _.title;
|
return _.title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
StrawPoll: {
|
key: 'StrawPoll',
|
||||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/,
|
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/,
|
||||||
style: 'border: 0; width: 600px; height: 406px;',
|
style: 'border: 0; width: 600px; height: 406px;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8538,8 +8550,8 @@
|
|||||||
src: "http://strawpoll.me/embed_1/" + a.dataset.uid
|
src: "http://strawpoll.me/embed_1/" + a.dataset.uid
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
TwitchTV: {
|
key: 'TwitchTV',
|
||||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/,
|
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/,
|
||||||
style: "border: none; width: 640px; height: 360px;",
|
style: "border: none; width: 640px; height: 360px;",
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8558,8 +8570,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
Vocaroo: {
|
key: 'Vocaroo',
|
||||||
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/,
|
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/,
|
||||||
style: 'border: 0; width: 150px; height: 45px;',
|
style: 'border: 0; width: 150px; height: 45px;',
|
||||||
el: function(a) {
|
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>"
|
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\/)([^#\&\?]*).*/,
|
regExp: /.*(?:vimeo.com\/)([^#\&\?]*).*/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
return $.el('iframe', {
|
return $.el('iframe', {
|
||||||
@ -8583,8 +8595,8 @@
|
|||||||
return _.title;
|
return _.title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
Vine: {
|
key: 'Vine',
|
||||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/,
|
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/,
|
||||||
style: 'border: none; width: 500px; height: 500px;',
|
style: 'border: none; width: 500px; height: 500px;',
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
@ -8592,8 +8604,8 @@
|
|||||||
src: "https://vine.co/" + a.dataset.uid + "/card"
|
src: "https://vine.co/" + a.dataset.uid + "/card"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
YouTube: {
|
key: 'YouTube',
|
||||||
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/,
|
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/,
|
||||||
el: function(a) {
|
el: function(a) {
|
||||||
var el;
|
var el;
|
||||||
@ -8611,8 +8623,26 @@
|
|||||||
return data.entry.title.$t;
|
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 = {
|
QR = {
|
||||||
@ -9273,20 +9303,20 @@
|
|||||||
},
|
},
|
||||||
flags: function() {
|
flags: function() {
|
||||||
var flag, fn, select, _i, _len, _ref;
|
var flag, fn, select, _i, _len, _ref;
|
||||||
fn = function(val) {
|
|
||||||
return $.el('option', {
|
|
||||||
value: val[0],
|
|
||||||
textContent: val[1]
|
|
||||||
});
|
|
||||||
};
|
|
||||||
select = $.el('select', {
|
select = $.el('select', {
|
||||||
name: 'flag',
|
name: 'flag',
|
||||||
className: 'flagSelector'
|
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']];
|
_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++) {
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||||
flag = _ref[_i];
|
flag = _ref[_i];
|
||||||
$.add(select, fn(flag));
|
fn(flag);
|
||||||
}
|
}
|
||||||
return select;
|
return select;
|
||||||
},
|
},
|
||||||
@ -9455,6 +9485,8 @@
|
|||||||
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
|
||||||
if (/mistyped/i.test(err.textContent)) {
|
if (/mistyped/i.test(err.textContent)) {
|
||||||
err = 'You seem to have mistyped the CAPTCHA.';
|
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.auto = false;
|
||||||
QR.cooldown.set({
|
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
|
'Custom Board Navigation': true
|
||||||
|
|
||||||
boardnav: """
|
boardnav: """
|
||||||
[ toggle-all ]
|
[ toggle-all ]
|
||||||
[current-title]
|
[current-title]
|
||||||
[external-text:"FAQ","https://github.com/seaweedchan/4chan-x/wiki/Frequently-Asked-Questions"]
|
[external-text:"FAQ","https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions"]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
QR:
|
QR:
|
||||||
'QR.personas': """
|
'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"
|
"run_at": "document_start"
|
||||||
}],
|
}],
|
||||||
"homepage_url": "<%= meta.page %>",
|
"homepage_url": "<%= meta.page %>",
|
||||||
|
"update_url": "<%= meta.repo %>raw/master/builds/updates.xml",
|
||||||
"minimum_chrome_version": "<%= meta.min.chrome %>",
|
"minimum_chrome_version": "<%= meta.min.chrome %>",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"storage",
|
"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: ->
|
init: ->
|
||||||
return if !Conf['Linkify']
|
return if !Conf['Linkify']
|
||||||
|
|
||||||
|
@types = {}
|
||||||
|
@types[type.key] = type for type in @ordered_types
|
||||||
|
|
||||||
if Conf['Comment Expansion']
|
if Conf['Comment Expansion']
|
||||||
ExpandComment.callbacks.push @node
|
ExpandComment.callbacks.push @node
|
||||||
|
|
||||||
@ -147,8 +150,9 @@ Linkify =
|
|||||||
|
|
||||||
services: (link) ->
|
services: (link) ->
|
||||||
{href} = link
|
{href} = link
|
||||||
for key, type of Linkify.types when match = type.regExp.exec href
|
for type in Linkify.ordered_types when match = type.regExp.exec href
|
||||||
return [key, match[1], match[2], link]
|
return if type.dummy
|
||||||
|
return [type.key, match[1], match[2], link]
|
||||||
return
|
return
|
||||||
|
|
||||||
embed: (data) ->
|
embed: (data) ->
|
||||||
@ -242,16 +246,16 @@ Linkify =
|
|||||||
embed.dataset.title = text if Conf['Embedding'] and status in [200, 304]
|
embed.dataset.title = text if Conf['Embedding'] and status in [200, 304]
|
||||||
link.textContent = text if link
|
link.textContent = text if link
|
||||||
|
|
||||||
types:
|
ordered_types: [
|
||||||
audio:
|
key: 'audio'
|
||||||
regExp: /(.*\.(mp3|ogg|wav))$/
|
regExp: /(.*\.(mp3|ogg|wav))$/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'audio',
|
$.el 'audio',
|
||||||
controls: 'controls'
|
controls: 'controls'
|
||||||
preload: 'auto'
|
preload: 'auto'
|
||||||
src: a.dataset.uid
|
src: a.dataset.uid
|
||||||
|
,
|
||||||
gist:
|
key: 'gist'
|
||||||
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/
|
regExp: /.*(?:gist.github.com.*\/)([^\/][^\/]*)$/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
div = $.el 'iframe',
|
div = $.el 'iframe',
|
||||||
@ -261,27 +265,27 @@ Linkify =
|
|||||||
api: (uid) -> "https://api.github.com/gists/#{uid}"
|
api: (uid) -> "https://api.github.com/gists/#{uid}"
|
||||||
text: ({files}) ->
|
text: ({files}) ->
|
||||||
return file for file of files when files.hasOwnProperty file
|
return file for file of files when files.hasOwnProperty file
|
||||||
|
,
|
||||||
image:
|
key: 'image'
|
||||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/
|
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/
|
||||||
style: 'border: 0; width: auto; height: auto;'
|
style: 'border: 0; width: auto; height: auto;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'div',
|
$.el 'div',
|
||||||
innerHTML: "<a target=_blank href='#{a.dataset.href}'><img src='#{a.dataset.href}'></a>"
|
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_]+)/
|
regExp: /.*(?:paste.installgentoo.com\/view\/)([0-9a-z_]+)/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'iframe',
|
$.el 'iframe',
|
||||||
src: "http://paste.installgentoo.com/view/embed/#{a.dataset.uid}"
|
src: "http://paste.installgentoo.com/view/embed/#{a.dataset.uid}"
|
||||||
|
,
|
||||||
Twitter:
|
key: 'Twitter'
|
||||||
regExp: /.*twitter.com\/(.+\/status\/\d+)/
|
regExp: /.*twitter.com\/(.+\/status\/\d+)/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'iframe',
|
$.el 'iframe',
|
||||||
src: "https://twitframe.com/show?url=https://twitter.com/#{a.dataset.uid}"
|
src: "https://twitframe.com/show?url=https://twitter.com/#{a.dataset.uid}"
|
||||||
|
,
|
||||||
LiveLeak:
|
key: 'LiveLeak'
|
||||||
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/
|
regExp: /.*(?:liveleak.com\/view.+i=)([0-9a-z_]+)/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
el = $.el 'iframe',
|
el = $.el 'iframe',
|
||||||
@ -291,8 +295,8 @@ Linkify =
|
|||||||
frameborder: "0"
|
frameborder: "0"
|
||||||
el.setAttribute "allowfullscreen", "true"
|
el.setAttribute "allowfullscreen", "true"
|
||||||
el
|
el
|
||||||
|
,
|
||||||
MediaCrush:
|
key: 'MediaCrush'
|
||||||
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i
|
regExp: /.*(?:mediacru.sh\/)([0-9a-z_]+)/i
|
||||||
style: 'border: 0;'
|
style: 'border: 0;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
@ -323,20 +327,20 @@ Linkify =
|
|||||||
else
|
else
|
||||||
"ERROR: No valid filetype."
|
"ERROR: No valid filetype."
|
||||||
el
|
el
|
||||||
|
,
|
||||||
pastebin:
|
key: 'pastebin'
|
||||||
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/
|
regExp: /.*(?:pastebin.com\/(?!u\/))([^#\&\?]*).*/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
div = $.el 'iframe',
|
div = $.el 'iframe',
|
||||||
src: "http://pastebin.com/embed_iframe.php?i=#{a.dataset.uid}"
|
src: "http://pastebin.com/embed_iframe.php?i=#{a.dataset.uid}"
|
||||||
|
,
|
||||||
gfycat:
|
key: 'gfycat'
|
||||||
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/
|
regExp: /.*gfycat.com\/(?:iframe\/)?(\S*)/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
div = $.el 'iframe',
|
div = $.el 'iframe',
|
||||||
src: "http://gfycat.com/iframe/#{a.dataset.uid}"
|
src: "http://gfycat.com/iframe/#{a.dataset.uid}"
|
||||||
|
,
|
||||||
SoundCloud:
|
key: 'SoundCloud'
|
||||||
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/
|
regExp: /.*(?:soundcloud.com\/|snd.sc\/)([^#\&\?]*).*/
|
||||||
style: 'height: auto; width: 500px; display: inline-block;'
|
style: 'height: auto; width: 500px; display: inline-block;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
@ -352,15 +356,15 @@ Linkify =
|
|||||||
title:
|
title:
|
||||||
api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}"
|
api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}"
|
||||||
text: (_) -> _.title
|
text: (_) -> _.title
|
||||||
|
,
|
||||||
StrawPoll:
|
key: 'StrawPoll'
|
||||||
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/
|
regExp: /strawpoll\.me\/(?:embed_\d+\/)?(\d+)/
|
||||||
style: 'border: 0; width: 600px; height: 406px;'
|
style: 'border: 0; width: 600px; height: 406px;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'iframe',
|
$.el 'iframe',
|
||||||
src: "http://strawpoll.me/embed_1/#{a.dataset.uid}"
|
src: "http://strawpoll.me/embed_1/#{a.dataset.uid}"
|
||||||
|
,
|
||||||
TwitchTV:
|
key: 'TwitchTV'
|
||||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
|
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
|
||||||
style: "border: none; width: 640px; height: 360px;"
|
style: "border: none; width: 640px; height: 360px;"
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
@ -384,15 +388,15 @@ Linkify =
|
|||||||
<param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" />
|
<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" />
|
<param name="flashvars" value="hostname=www.twitch.tv&channel=#{channel}&auto_play=true&start_volume=25" />
|
||||||
"""
|
"""
|
||||||
|
,
|
||||||
Vocaroo:
|
key: 'Vocaroo'
|
||||||
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/
|
regExp: /.*(?:vocaroo.com\/)([^#\&\?]*).*/
|
||||||
style: 'border: 0; width: 150px; height: 45px;'
|
style: 'border: 0; width: 150px; height: 45px;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'object',
|
$.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>"
|
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\/)([^#\&\?]*).*/
|
regExp: /.*(?:vimeo.com\/)([^#\&\?]*).*/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'iframe',
|
$.el 'iframe',
|
||||||
@ -400,15 +404,15 @@ Linkify =
|
|||||||
title:
|
title:
|
||||||
api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}"
|
api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}"
|
||||||
text: (_) -> _.title
|
text: (_) -> _.title
|
||||||
|
,
|
||||||
Vine:
|
key: 'Vine'
|
||||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/
|
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/
|
||||||
style: 'border: none; width: 500px; height: 500px;'
|
style: 'border: none; width: 500px; height: 500px;'
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
$.el 'iframe',
|
$.el 'iframe',
|
||||||
src: "https://vine.co/#{a.dataset.uid}/card"
|
src: "https://vine.co/#{a.dataset.uid}/card"
|
||||||
|
,
|
||||||
YouTube:
|
key: 'YouTube'
|
||||||
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/
|
regExp: /.*(?:youtu.be\/|youtube.*v=|youtube.*\/embed\/|youtube.*\/v\/|youtube.*videos\/)([^#\&\?]*)\??(t\=.*)?/
|
||||||
el: (a) ->
|
el: (a) ->
|
||||||
el = $.el 'iframe',
|
el = $.el 'iframe',
|
||||||
@ -418,4 +422,22 @@ Linkify =
|
|||||||
title:
|
title:
|
||||||
api: (uid) -> "https://gdata.youtube.com/feeds/api/videos/#{uid}?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode"
|
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
|
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'
|
else if !check and @.className.match "\\btripped\\b" then $.rmClass @, 'tripped'
|
||||||
|
|
||||||
flags: ->
|
flags: ->
|
||||||
fn = (val) -> $.el 'option',
|
|
||||||
value: val[0]
|
|
||||||
textContent: val[1]
|
|
||||||
select = $.el 'select',
|
select = $.el 'select',
|
||||||
name: 'flag'
|
name: 'flag'
|
||||||
className: 'flagSelector'
|
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']
|
['0', 'None']
|
||||||
['US', 'American']
|
['US', 'American']
|
||||||
['KP', 'Best Korean']
|
['KP', 'Best Korean']
|
||||||
@ -770,6 +772,8 @@ QR =
|
|||||||
# Remove the obnoxious 4chan Pass ad.
|
# Remove the obnoxious 4chan Pass ad.
|
||||||
if /mistyped/i.test err.textContent
|
if /mistyped/i.test err.textContent
|
||||||
err = 'You seem to have mistyped the CAPTCHA.'
|
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.auto = false
|
||||||
# Too many frequent mistyped captchas will auto-ban you!
|
# Too many frequent mistyped captchas will auto-ban you!
|
||||||
# On connection error, the post most likely didn't go through.
|
# On connection error, the post most likely didn't go through.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user