Merge branch 'v3'

Conflicts:
	CHANGELOG.md
	Gruntfile.coffee
	LICENSE
	builds/4chan-X.js
	builds/4chan-X.meta.js
	builds/crx/manifest.json
	builds/crx/script.js
	latest.js
	package.json
	src/General/Main.coffee
	src/Linkification/Linkify.coffee
This commit is contained in:
Zixaphir 2013-08-04 20:10:29 -07:00
commit 217f1cd42c
18 changed files with 11499 additions and 669 deletions

View File

@ -1,6 +1,25 @@
**aeosynth**:
- Update Gruntfile.coffee.
**MayhemYDG**:
- Fix impossibility to create new threads when in dead threads.
- Fix flag filtering on /sp/ and /int/.
- Update archives. (with woxxy and proplex)
- Minor fixes.
- Minor optimizations.
**seaweedchan**:
- Fix issues with having two options called `Reveal Spoilers`.
- Update archive.
**Zixaphir**:
- Linkifier Rewrite.
- Fix Quote Threading toggle.
- Minor optimizations.
- Minor fixes.
### v2.2.2
*2013-08-01*
**zixaphir**:
- Fix opening new threads and posts in a new tab.
- Minimum Chrome Version is now 27.

View File

@ -1,18 +1,19 @@
module.exports = (grunt) ->
pkg = grunt.file.readJSON 'package.json'
concatOptions =
process:
data: pkg
process: Object.create(null, data:
get: -> grunt.config 'pkg'
enumerable: true
)
shellOptions =
stdout: true
stderr: true
stdout: true
stderr: true
failOnError: true
# Project configuration.
grunt.initConfig
pkg: pkg
pkg: grunt.file.readJSON 'package.json'
concat:
coffee:
options: concatOptions
@ -39,12 +40,6 @@ module.exports = (grunt) ->
]
dest: 'tmp-<%= pkg.type %>/script.coffee'
meta:
options: concatOptions
files:
'LICENSE': 'src/General/meta/banner.js',
'latest.js': 'src/General/meta/latest.js'
crx:
options: concatOptions
files:
@ -52,27 +47,26 @@ module.exports = (grunt) ->
'builds/crx/script.js': [
'src/General/meta/botproc.js'
'src/General/meta/banner.js'
'src/General/meta/usestrict.js'
'tmp-<%= pkg.type %>/script.js'
]
userscript:
options: concatOptions
files:
'builds/<%= pkg.name %>.meta.js': 'src/General/meta/metadata.js'
'builds/<%= pkg.name %>.user.js': [
'src/General/meta/botproc.js'
'src/General/meta/metadata.js'
'src/General/meta/banner.js'
'src/General/meta/usestrict.js'
'tmp-<%= pkg.type %>/script.js'
]
copy:
crx:
src: 'src/General/img/*.png'
dest: 'builds/crx/'
src: 'src/General/img/*.png'
dest: 'builds/crx/'
expand: true
flatten: true
opera:
nex:
files:
'builds/<%= pkg.name %>.nex': 'builds/<%= pkg.name %>.zip'
@ -83,25 +77,32 @@ module.exports = (grunt) ->
concurrent:
build: [
'concat:meta'
'build-crx'
'build-userscript'
]
bump:
options:
updateConfigs: [
'pkg'
]
commit: false
createTag: false
push: false
shell:
commit:
options: shellOptions
command: [
'git checkout <%= pkg.meta.mainBranch %>',
'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."',
'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."',
'git tag -af stable -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
].join(' && ')
stdout: true
'git checkout <%= pkg.meta.mainBranch %>'
'git commit -am "Release <%= pkg.meta.name %> v<%= pkg.version %>."'
'git tag -a <%= pkg.version %> -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
'git tag -af stable-v3 -m "<%= pkg.meta.name %> v<%= pkg.version %>."'
].join ' && '
push:
options: shellOptions
command: 'git push origin --tags -f && git push origin --all'
command: 'git push origin --tags -f && git push origin --all'
watch:
all:
@ -120,31 +121,25 @@ module.exports = (grunt) ->
archive: 'builds/<%= pkg.name %>.zip'
level: 9
pretty: true
expand: true
cwd: 'builds/crx/'
src: '**'
expand: true
flatten: true
src: 'builds/crx/*'
dest: '/'
clean:
builds: 'builds'
tmpcrx: 'tmp-crx'
builds: 'builds'
tmpcrx: 'tmp-crx'
tmpuserscript: 'tmp-userscript'
grunt.loadNpmTasks 'grunt-bump'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-compress'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-shell'
require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks
grunt.registerTask 'default', [
'build'
]
grunt.registerTask 'set-build', 'Set the build type variable', (type) ->
pkg = grunt.config 'pkg'
pkg.type = type;
grunt.config 'pkg', pkg
pkg.sizing = if type is 'crx'
'box-sizing'
else
@ -181,40 +176,36 @@ module.exports = (grunt) ->
]
grunt.registerTask 'release', [
'default'
'compress:crx'
'shell:commit'
'shell:push'
'build-crx'
'compress:crx'
'copy:nex'
]
grunt.registerTask 'patch', [
'bump-only'
'reloadPkg'
grunt.registerTask 'patch', [
'bump'
'updcl:3'
'release'
]
grunt.registerTask 'minor', [
'bump-only:minor'
'reloadPkg'
grunt.registerTask 'minor', [
'bump:minor'
'updcl:2'
'release'
]
grunt.registerTask 'major', [
'bump-only:major'
'reloadPkg'
grunt.registerTask 'major', [
'bump:major'
'updcl:1'
'release'
]
grunt.registerTask 'reloadPkg', 'Reload the package', ->
# Update the `pkg` object with the new version.
pkg = grunt.file.readJSON('package.json')
grunt.config.data.pkg = concatOptions.process.data = pkg
grunt.log.ok('pkg reloaded.')
grunt.registerTask 'updcl', 'Update the changelog', (headerLevel) ->
headerPrefix = new Array(+headerLevel + 1).join '#'
{version} = grunt.config 'pkg'
today = grunt.template.today 'yyyy-mm-dd'
changelog = grunt.file.read 'CHANGELOG.md'
grunt.file.write 'CHANGELOG.md', "#{headerPrefix} #{version} - *#{today}*\n\n#{changelog}"
grunt.log.ok "Changelog updated for v#{version}."
grunt.registerTask 'updcl', 'Update the changelog', (i) ->
# i is the number of #s for markdown.
version = []
version.length = +i + 1
version = version.join('#') + ' v' + pkg.version + '\n*' + grunt.template.today('yyyy-mm-dd') + '*\n'
grunt.file.write 'CHANGELOG.md', version + '\n' + grunt.file.read('CHANGELOG.md')
grunt.log.ok 'Changelog updated for v' + pkg.version + '.'

View File

@ -1,5 +1,9 @@
/*
<<<<<<< HEAD
* appchan x - Version 2.2.2 - 2013-08-04
=======
* 4chan X - Version 1.2.25 - 2013-08-04
>>>>>>> v3
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

10653
builds/4chan-X.js Normal file

File diff suppressed because one or more lines are too long

19
builds/4chan-X.meta.js Normal file
View File

@ -0,0 +1,19 @@
// ==UserScript==
// @name 4chan X
// @version 1.2.25
// @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan.
// @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
// @match *://api.4chan.org/*
// @match *://boards.4chan.org/*
// @match *://images.4chan.org/*
// @match *://sys.4chan.org/*
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_deleteValue
// @grant GM_openInTab
// @run-at document-start
// @updateURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.meta.js
// @downloadURL https://github.com/seaweedchan/4chan-x/raw/stable/builds/4chan-X.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC
// ==/UserScript==

View File

@ -1,7 +1,6 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.2.24
// @version 1.2.25
// @namespace 4chan-X
// @description Cross-browser userscript for maximum lurking on 4chan.
// @license MIT; https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
@ -19,7 +18,7 @@
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAHFJREFUKFOt0LENACEIBdBv4Qju4wgWanEj3D6OcIVMKaitYHEU/jwTCQj8W75kiVCSBvdQ5/AvfVHBin11BgdRq3ysBgfwBDRrj3MCIA+oAQaku/Q1cNctrAmyDl577tOThYt/Y1RBM4DgOHzM0HFTAyLukH/cmRnqAAAAAElFTkSuQmCC
// ==/UserScript==
/*
* 4chan X - Version 1.2.24 - 2013-08-01
* 4chan X - Version 1.2.25 - 2013-08-04
*
* Licensed under the MIT license.
* https://github.com/seaweedchan/4chan-x/blob/master/LICENSE
@ -108,6 +107,8 @@
* license: http://userscripts.org/scripts/review/1352
*
*/
'use strict';
(function() {
var $, $$, Anonymize, ArchiveLink, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, Header, IDColor, ImageExpand, ImageHover, ImageLoader, Keybinds, Linkify, Main, Menu, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, g,
__slice = [].slice,
@ -159,7 +160,7 @@
'Image Expansion': [true, 'Expand images.'],
'Image Hover': [true, 'Show full image on mouseover.'],
'Sauce': [true, 'Add sauce links to images.'],
'Reveal Spoilers': [false, 'Reveal spoiler thumbnails.'],
'Reveal Spoiler Thumbnails': [false, 'Replace spoiler thumbnails with the original image.'],
'Replace GIF': [false, 'Replace thumbnail of gifs with its actual image.'],
'Replace PNG': [false, 'Replace pngs.'],
'Replace JPG': [false, 'Replace jpgs.'],
@ -320,7 +321,7 @@
doc = d.documentElement;
g = {
VERSION: '1.2.24',
VERSION: '1.2.25',
NAMESPACE: '4chan X.',
boards: {},
threads: {},
@ -674,9 +675,7 @@
}));
};
$.open = function(URL) {
return GM_openInTab(URL);
};
$.open = GM_openInTab;
$.debounce = function(wait, fn) {
var args, exec, lastCall, that, timeout;
@ -905,6 +904,7 @@
post: post,
info: info,
comment: $('.postMessage', post),
links: [],
quotelinks: [],
backlinks: info.getElementsByClassName('backlink')
};
@ -4300,122 +4300,235 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return;
}
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]+|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-z]{3,}:[a-z0-9?]|[a-z0-9._%+-:]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[^\s@]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}
if (Conf['Title Link']) {
$.sync('CachedTitles', Linkify.titleSync);
}
return Post.prototype.callbacks.push({
name: 'Linkify',
cb: this.node
});
},
cypher: $.el('div'),
node: function() {
var a, child, cypher, cypherText, data, embed, embedder, embeds, i, index, len, link, links, lookahead, name, next, node, nodes, snapshot, spoiler, text, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2;
var data, embedder, i, len, node, range, snapshot, _i, _j, _len, _len1, _ref, _ref1;
if (this.isClone && Conf['Embedding']) {
_ref = $$('.embedder', this.nodes.comment);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
embedder = _ref[_i];
$.on(embedder, "click", Linkify.toggle);
$.on(embedder, "click", Linkify.cb.toggle);
}
return;
}
snapshot = $.X('.//text()', this.nodes.comment);
cypher = Linkify.cypher;
i = -1;
len = snapshot.snapshotLength;
while (++i < len) {
nodes = $.frag();
node = snapshot.snapshotItem(i);
data = node.data;
if (!(node.parentNode && Linkify.regString.test(data))) {
continue;
if (Linkify.regString.test(data)) {
Linkify.regString.lastIndex = 0;
Linkify.gatherLinks(node, this);
}
Linkify.regString.lastIndex = 0;
cypherText = [];
if (next = node.nextSibling) {
cypher.textContent = node.textContent;
cypherText[0] = cypher.innerHTML;
while ((next.nodeName.toLowerCase() === 'wbr' || next.nodeName.toLowerCase() === 's') && (lookahead = next.nextSibling) && ((name = lookahead.nodeName) === "#text" || name.toLowerCase() === 'br')) {
cypher.textContent = lookahead.textContent;
cypherText.push((spoiler = next.innerHTML) ? "<s>" + (spoiler.replace(/</g, ' <')) + "</s>" : '<wbr>');
cypherText.push(cypher.innerHTML);
$.rm(next);
next = lookahead.nextSibling;
if (lookahead.nodeName === "#text") {
$.rm(lookahead);
}
if (!next) {
break;
}
}
}
if (cypherText.length) {
data = cypherText.join('');
}
links = data.match(Linkify.regString);
for (_j = 0, _len1 = links.length; _j < _len1; _j++) {
link = links[_j];
index = data.indexOf(link);
if (text = data.slice(0, index)) {
cypher.innerHTML = text;
_ref1 = __slice.call(cypher.childNodes);
for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
child = _ref1[_k];
$.add(nodes, child);
}
}
cypher.innerHTML = (link.indexOf(':') < 0 ? (link.indexOf('@') > 0 ? 'mailto:' + link : 'http://' + link) : link).replace(/<(wbr|s|\/s)>/g, '');
a = $.el('a', {
innerHTML: link,
className: 'linkify',
rel: 'nofollow noreferrer',
target: '_blank',
href: cypher.textContent
});
$.add(nodes, Linkify.embedder(a));
data = data.slice(index + link.length);
}
if (data) {
cypher.innerHTML = data;
_ref2 = __slice.call(cypher.childNodes);
for (_l = 0, _len3 = _ref2.length; _l < _len3; _l++) {
child = _ref2[_l];
$.add(nodes, child);
}
}
$.replace(node, nodes);
}
if (Conf['Auto-embed']) {
embeds = $$('.embedder', this.nodes.comment);
for (_m = 0, _len4 = embeds.length; _m < _len4; _m++) {
embed = embeds[_m];
embed.click();
if (!(Conf['Embedding'] || Conf['Link Title'])) {
return;
}
_ref1 = this.nodes.links;
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
range = _ref1[_j];
if (data = Linkify.services(range)) {
if (Conf['Embedding']) {
Linkify.embed(data);
}
if (Conf['Link Title']) {
Linkify.title(data);
}
}
}
},
toggle: function() {
var el, embed, style, type, url;
gatherLinks: function(node, post) {
var data, index, len, len2, link, links, match, range, _i, _len, _ref;
data = node.data;
len = data.length;
links = [];
while ((match = Linkify.regString.exec(data))) {
index = match.index;
link = match[0];
len2 = index + link.length;
if (len - len2 === 0) {
break;
}
range = document.createRange();
range.setStart(node, index);
range.setEnd(node, len2);
links.push(range);
}
if (match) {
Linkify.seek(match, node, post);
}
_ref = links.reverse();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
range = _ref[_i];
Linkify.makeLink(range, post);
}
},
seek: function(match, node, post) {
var data, index, link, next, range, result;
index = match.index;
link = match[0];
range = document.createRange();
range.setStart(node, index);
while ((next = node.nextSibling) && next.nodeName !== 'BR') {
node = next;
data = node.data;
if (result = /[\s'"]/.exec(data)) {
range.setEnd(node, result.index);
}
}
if (range.collapsed) {
if (node.nodeName === 'WBR') {
node = node.previousSibling;
}
range.setEnd(node, node.length);
}
return Linkify.makeLink(range, post);
},
makeLink: function(range, post) {
var a, link;
link = range.toString();
link = link.contains(':') ? link : (link.contains('@') ? 'mailto:' : 'http://') + link;
a = $.el('a', {
className: 'linkify',
rel: 'nofollow noreferrer',
target: '_blank',
href: link
});
range.surroundContents(a);
post.nodes.links.push(a);
},
services: function(link) {
var href, key, match, type, _ref;
href = link.href;
_ref = Linkify.types;
for (key in _ref) {
type = _ref[key];
if (!(match = type.regExp.exec(href))) {
continue;
}
return [key, match[1], match[2], link];
}
},
embed: function(data) {
var embed, key, link, options, uid;
key = data[0], uid = data[1], options = data[2], link = data[3];
embed = $.el('a', {
name: uid,
option: options,
className: 'embedder',
href: 'javascript:;',
textContent: '(embed)'
});
embed.dataset.service = key;
embed.dataset.originalurl = link.href;
$.addClass(link, "" + embed.dataset.service);
$.on(embed, 'click', Linkify.cb.toggle);
return $.after(link, [$.tn(' '), embed]);
},
title: function(data) {
var err, key, link, options, service, title, titles, uid;
key = data[0], uid = data[1], options = data[2], link = data[3];
if (!(service = Linkify.types[key].title)) {
return;
}
titles = Conf['CachedTitles'];
if (title = titles[uid]) {
link.textContent = title[0];
if (Conf['Embedding']) {
return link.nextElementSibling.dataset.title = title[0];
}
} else {
try {
$.cache(service.api(uid), function() {
return title = Linkify.cb.title.apply(this, [data]);
});
} catch (_error) {
err = _error;
link.innerHTML = "[" + key + "] <span class=warning>Title Link Blocked</span> (are you using NoScript?)</a>";
return;
}
if (title) {
titles[uid] = [title, Date.now()];
return $.set('CachedTitles', titles);
}
}
},
titleSync: function(value) {
return Conf['CachedTitles'] = value;
},
cb: {
toggle: function() {
var el, embed;
embed = this.previousElementSibling;
el = !this.className.contains("embedded") ? Linkify.cb.embed(this) : Linkify.cb.unembed(this);
$.replace(embed, el);
return $.toggleClass(this, 'embedded');
},
embed: function(a) {
var el, style, type;
el = (type = Linkify.types[a.dataset.service]).el.call(a);
el.style.cssText = (style = type.style) ? style : "border: 0; width: 640px; height: 390px";
a.textContent = '(unembed)';
return el;
},
unembed: function(a) {
var el, url;
embed = this.previousElementSibling;
if (this.className.contains("embedded")) {
el = $.el('a', {
rel: 'nofollow noreferrer',
target: 'blank',
className: 'linkify',
href: url = this.getAttribute("data-originalURL"),
textContent: this.getAttribute("data-title") || url
href: url = a.dataset.originalurl,
textContent: a.dataset.title || url
});
this.textContent = '(embed)';
$.addClass(el, "" + (this.getAttribute('data-service')));
} else {
el = (type = Linkify.types[this.getAttribute("data-service")]).el.call(this);
el.style.cssText = (style = type.style) ? style : "border: 0; width: 640px; height: 390px";
this.textContent = '(unembed)';
a.textContent = '(embed)';
$.addClass(el, "" + a.dataset.service);
return el;
},
title: function(data) {
var key, link, options, service, text, uid;
key = data[0], uid = data[1], options = data[2], link = data[3];
service = Linkify.types[key].title;
return link.textContent = (function() {
switch (this.status) {
case 200:
case 304:
text = "" + (service.text.call(this));
if (Conf['Embedding']) {
link.nextElementSibling.dataset.title = text;
}
return text;
case 404:
return "[" + key + "] Not Found";
case 403:
return "[" + key + "] Forbidden or Private";
default:
return "[" + key + "] " + this.status + "'d";
}
}).call(this);
}
$.replace(embed, el);
return $.toggleClass(this, 'embedded');
},
types: {
YouTube: {
@ -4426,8 +4539,8 @@
});
},
title: {
api: function() {
return "https://gdata.youtube.com/feeds/api/videos/" + this.name + "?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode";
api: function(uid) {
return "https://gdata.youtube.com/feeds/api/videos/" + uid + "?alt=json&fields=title/text(),yt:noembed,app:control/yt:state/@reasonCode";
},
text: function() {
return JSON.parse(this.responseText).entry.title.$t;
@ -4451,8 +4564,8 @@
});
},
title: {
api: function() {
return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + this.name;
api: function(uid) {
return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid;
},
text: function() {
return JSON.parse(this.responseText).title;
@ -4482,7 +4595,7 @@
style: 'border: 0; width: auto; height: auto;',
el: function() {
return $.el('div', {
innerHTML: "<a target=_blank href='" + (this.getAttribute('data-originalURL')) + "'><img src='" + (this.getAttribute('data-originalURL')) + "'></a>"
innerHTML: "<a target=_blank href='" + this.dataset.originalurl + "'><img src='" + this.dataset.originalurl + "'></a>"
});
}
},
@ -4505,8 +4618,8 @@
return div;
},
title: {
api: function() {
return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + this.name;
api: function(uid) {
return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid;
},
text: function() {
return JSON.parse(this.responseText).title;
@ -4533,8 +4646,8 @@
});
},
title: {
api: function() {
return "https://api.github.com/gists/" + this.name;
api: function(uid) {
return "https://api.github.com/gists/" + uid;
},
text: function() {
var file, response;
@ -4556,76 +4669,6 @@
});
}
}
},
embedder: function(a) {
var callbacks, embed, key, match, service, titles, type, _ref;
if (!Conf['Link Title']) {
return [a];
}
titles = {};
callbacks = function() {
var title;
return a.textContent = (function() {
switch (this.status) {
case 200:
case 304:
title = "" + (service.text.call(this));
embed.setAttribute('data-title', title);
titles[embed.name] = [title, Date.now()];
$.set('CachedTitles', titles);
return title;
case 404:
return "[" + key + "] Not Found";
case 403:
return "[" + key + "] Forbidden or Private";
default:
return "[" + key + "] " + this.status + "'d";
}
}).call(this);
};
_ref = Linkify.types;
for (key in _ref) {
type = _ref[key];
if (!(match = a.href.match(type.regExp))) {
continue;
}
embed = $.el('a', {
name: (a.name = match[1]),
option: match[2],
className: 'embedder',
href: 'javascript:;',
textContent: '(embed)'
});
embed.setAttribute('data-service', key);
embed.setAttribute('data-originalURL', a.href);
$.addClass(a, "" + (embed.getAttribute('data-service')));
$.on(embed, 'click', Linkify.toggle);
if (!Conf['Embedding']) {
embed.hidden = true;
}
if (Conf['Link Title'] && (service = type.title)) {
$.get('CachedTitles', {}, function(item) {
var err, title;
titles = item['CachedTitles'];
if (title = titles[match[1]]) {
a.textContent = title[0];
return embed.setAttribute('data-title', title[0]);
} else {
try {
return $.cache(service.api.call(a), callbacks);
} catch (_error) {
err = _error;
return a.innerHTML = "[" + key + "] <span class=warning>Title Link Blocked</span> (are you using NoScript?)</a>";
}
}
});
}
return [a, $.tn(' '), embed];
}
return [a];
}
};
@ -6534,11 +6577,11 @@
RevealSpoilers = {
init: function() {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoilers']) {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoiler Thumbnails']) {
return;
}
return Post.prototype.callbacks.push({
name: 'Reveal Spoilers',
name: 'Reveal Spoiler Thumbnails',
cb: this.node
});
},
@ -7902,6 +7945,9 @@
}
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {
return;
}
return Unread.db.set({
boardID: Unread.thread.board.ID,
threadID: Unread.thread.ID,
@ -7939,9 +7985,11 @@
};
Redirect = {
thread: {},
post: {},
file: {},
data: {
thread: {},
post: {},
file: {}
},
init: function() {
var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2;
@ -7955,7 +8003,7 @@
if (!boards.contains(boardID)) {
continue;
}
Redirect[type][boardID] = archive;
Redirect.data[type][boardID] = archive;
}
}
}
@ -7965,126 +8013,118 @@
_ref2 = archive.boards;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
boardID = _ref2[_i];
if (!(boardID in Redirect.thread)) {
Redirect.thread[boardID] = archive;
if (!(boardID in Redirect.data.thread)) {
Redirect.data.thread[boardID] = archive;
}
if (!(boardID in Redirect.post || archive.software !== 'foolfuuka')) {
Redirect.post[boardID] = archive;
if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) {
Redirect.data.post[boardID] = archive;
}
if (!(boardID in Redirect.file || !archive.files.contains(boardID))) {
Redirect.file[boardID] = archive;
if (!(boardID in Redirect.data.file || !archive.files.contains(boardID))) {
Redirect.data.file[boardID] = archive;
}
}
}
},
archives: {
'Foolz': {
'domain': 'archive.foolz.us',
'http': false,
'https': true,
'software': 'foolfuuka',
'boards': ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg'],
'files': ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
},
'NSFW Foolz': {
'domain': 'nsfw.foolz.us',
'http': false,
'https': true,
'software': 'foolfuuka',
'boards': ['u'],
'files': ['u']
},
'The Dark Cave': {
'domain': 'archive.thedarkcave.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['c', 'int', 'out', 'po'],
'files': ['c', 'po']
},
'4plebs': {
'domain': 'archive.4plebs.org',
'http': true,
'software': 'foolfuuka',
'boards': ['hr', 'tg', 'tv', 'x'],
'files': ['hr', 'tg', 'tv', 'x']
domain: 'archive.4plebs.org',
http: true,
software: 'foolfuuka',
boards: ['hr', 'tg', 'tv', 'x'],
files: ['hr', 'tg', 'tv', 'x']
},
'Nyafuu': {
'domain': 'archive.nyafuu.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['c', 'w', 'wg'],
'files': ['c', 'w', 'wg']
'fap archive': {
domain: 'fuuka.worldathleticproject.org',
http: true,
https: false,
software: 'foolfuuka',
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'],
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
},
'Foolz': {
domain: 'archive.foolz.us',
http: false,
https: true,
software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
},
'Foolz a Shit': {
'domain': 'archive.foolzashit.com',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv'],
'files': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
domain: 'archive.foolzashit.com',
http: true,
https: true,
software: 'foolfuuka',
boards: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv'],
files: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
},
'World Athletic Project': {
'domain': 'fuuka.worldathleticproject.org',
'http': true,
'https': false,
'software': 'foolfuuka',
'boards': ['e', 'h', 'p', 's', 'u'],
'files': ['e', 'h', 'p', 's', 'u']
},
'Install Gentoo': {
'domain': 'archive.installgentoo.net',
'http': false,
'https': true,
'software': 'fuuka',
'boards': ['diy', 'g', 'sci'],
'files': []
},
'warosu': {
'domain': 'fuuka.warosu.org',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
},
'Rebecca Black Tech': {
'domain': 'rbt.asia',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['cgl', 'g', 'mu', 'w'],
'files': ['cgl', 'g', 'mu', 'w']
'Foolz Beta': {
domain: 'beta.foolz.us',
http: true,
https: true,
software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
},
'Heinessen': {
'domain': 'archive.heinessen.com',
'http': true,
'software': 'fuuka',
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
'files': ['an', 'k', 'toy']
domain: 'archive.heinessen.com',
http: true,
software: 'fuuka',
boards: ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
files: ['an', 'k', 'toy']
},
'Install Gentoo': {
domain: 'archive.installgentoo.net',
http: false,
https: true,
software: 'fuuka',
boards: ['diy', 'g', 'sci'],
files: []
},
'NSFW Foolz': {
domain: 'nsfw.foolz.us',
http: false,
https: true,
software: 'foolfuuka',
boards: ['u'],
files: ['u']
},
'Nyafuu': {
domain: 'archive.nyafuu.org',
http: true,
https: true,
software: 'foolfuuka',
boards: ['c', 'w', 'wg'],
files: ['c', 'w', 'wg']
},
'Rebecca Black Tech': {
domain: 'rbt.asia',
http: true,
https: true,
software: 'fuuka',
boards: ['cgl', 'g', 'mu', 'w'],
files: ['cgl', 'g', 'mu', 'w']
},
'The Dark Cave': {
domain: 'archive.thedarkcave.org',
http: true,
https: true,
software: 'foolfuuka',
boards: ['c', 'int', 'out', 'po'],
files: ['c', 'po']
},
'warosu': {
'domain': 'fuuka.warosu.org',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'vr']
},
'worldathleticproject': {
'domain': 'fuuka.worldathleticproject.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['e', 'h', 'p', 's', 'u'],
'files': ['e', 'h', 'p', 's', 'u']
domain: 'fuuka.warosu.org',
http: true,
https: true,
software: 'fuuka',
boards: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
files: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
}
},
to: function(dest, data) {
var archive;
archive = (dest === 'search' ? Redirect.thread : Redirect[dest])[data.boardID];
archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID];
if (!archive) {
return '';
}

View File

@ -1,4 +1,3 @@
// Generated by CoffeeScript
// ==UserScript==
// @name appchan x
// @version 2.2.2
@ -112,6 +111,8 @@
* license: http://www.gnu.org/copyleft/lesser.html
*
*/
'use strict';
(function() {
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, IDColor, ImageExpand, ImageHover, ImageLoader, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
__slice = [].slice,
@ -160,7 +161,7 @@
'Image Expansion': [true, 'Expand images.'],
'Image Hover': [true, 'Show full image on mouseover.'],
'Sauce': [true, 'Add sauce links to images.'],
'Reveal Spoilers': [false, 'Reveal spoiler thumbnails.'],
'Reveal Spoiler Thumbnails': [false, 'Replace spoiler thumbnails with the original image.'],
'Replace GIF': [false, 'Replace thumbnail of gifs with its actual image.'],
'Replace PNG': [false, 'Replace pngs.'],
'Replace JPG': [false, 'Replace jpgs.'],
@ -3032,9 +3033,7 @@
}));
};
$.open = function(URL) {
return GM_openInTab(URL);
};
$.open = GM_openInTab;
$.debounce = function(wait, fn) {
var args, exec, lastCall, that, timeout;
@ -6594,7 +6593,7 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return;
}
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[\S]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[^\s@]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}
@ -8908,11 +8907,11 @@
RevealSpoilers = {
init: function() {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoilers']) {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoiler Thumbnails']) {
return;
}
return Post.prototype.callbacks.push({
name: 'Reveal Spoilers',
name: 'Reveal Spoiler Thumbnails',
cb: this.node
});
},
@ -10271,6 +10270,9 @@
}
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {
return;
}
return Unread.db.set({
boardID: Unread.thread.board.ID,
threadID: Unread.thread.ID,
@ -10308,9 +10310,11 @@
};
Redirect = {
thread: {},
post: {},
file: {},
data: {
thread: {},
post: {},
file: {}
},
init: function() {
var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2;
@ -10324,7 +10328,7 @@
if (!boards.contains(boardID)) {
continue;
}
Redirect[type][boardID] = archive;
Redirect.data[type][boardID] = archive;
}
}
}
@ -10334,126 +10338,118 @@
_ref2 = archive.boards;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
boardID = _ref2[_i];
if (!(boardID in Redirect.thread)) {
Redirect.thread[boardID] = archive;
if (!(boardID in Redirect.data.thread)) {
Redirect.data.thread[boardID] = archive;
}
if (!(boardID in Redirect.post || archive.software !== 'foolfuuka')) {
Redirect.post[boardID] = archive;
if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) {
Redirect.data.post[boardID] = archive;
}
if (!(boardID in Redirect.file || !archive.files.contains(boardID))) {
Redirect.file[boardID] = archive;
if (!(boardID in Redirect.data.file || !archive.files.contains(boardID))) {
Redirect.data.file[boardID] = archive;
}
}
}
},
archives: {
'Foolz': {
'domain': 'archive.foolz.us',
'http': false,
'https': true,
'software': 'foolfuuka',
'boards': ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg'],
'files': ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
},
'NSFW Foolz': {
'domain': 'nsfw.foolz.us',
'http': false,
'https': true,
'software': 'foolfuuka',
'boards': ['u'],
'files': ['u']
},
'The Dark Cave': {
'domain': 'archive.thedarkcave.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['c', 'int', 'out', 'po'],
'files': ['c', 'po']
},
'4plebs': {
'domain': 'archive.4plebs.org',
'http': true,
'software': 'foolfuuka',
'boards': ['hr', 'tg', 'tv', 'x'],
'files': ['hr', 'tg', 'tv', 'x']
domain: 'archive.4plebs.org',
http: true,
software: 'foolfuuka',
boards: ['hr', 'tg', 'tv', 'x'],
files: ['hr', 'tg', 'tv', 'x']
},
'Nyafuu': {
'domain': 'archive.nyafuu.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['c', 'w', 'wg'],
'files': ['c', 'w', 'wg']
'fap archive': {
domain: 'fuuka.worldathleticproject.org',
http: true,
https: false,
software: 'foolfuuka',
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'],
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
},
'Foolz': {
domain: 'archive.foolz.us',
http: false,
https: true,
software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
},
'Foolz a Shit': {
'domain': 'archive.foolzashit.com',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv'],
'files': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
domain: 'archive.foolzashit.com',
http: true,
https: true,
software: 'foolfuuka',
boards: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv'],
files: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
},
'World Athletic Project': {
'domain': 'fuuka.worldathleticproject.org',
'http': true,
'https': false,
'software': 'foolfuuka',
'boards': ['e', 'h', 'p', 's', 'u'],
'files': ['e', 'h', 'p', 's', 'u']
},
'Install Gentoo': {
'domain': 'archive.installgentoo.net',
'http': false,
'https': true,
'software': 'fuuka',
'boards': ['diy', 'g', 'sci'],
'files': []
},
'warosu': {
'domain': 'fuuka.warosu.org',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
},
'Rebecca Black Tech': {
'domain': 'rbt.asia',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['cgl', 'g', 'mu', 'w'],
'files': ['cgl', 'g', 'mu', 'w']
'Foolz Beta': {
domain: 'beta.foolz.us',
http: true,
https: true,
software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
},
'Heinessen': {
'domain': 'archive.heinessen.com',
'http': true,
'software': 'fuuka',
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
'files': ['an', 'k', 'toy']
domain: 'archive.heinessen.com',
http: true,
software: 'fuuka',
boards: ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
files: ['an', 'k', 'toy']
},
'Install Gentoo': {
domain: 'archive.installgentoo.net',
http: false,
https: true,
software: 'fuuka',
boards: ['diy', 'g', 'sci'],
files: []
},
'NSFW Foolz': {
domain: 'nsfw.foolz.us',
http: false,
https: true,
software: 'foolfuuka',
boards: ['u'],
files: ['u']
},
'Nyafuu': {
domain: 'archive.nyafuu.org',
http: true,
https: true,
software: 'foolfuuka',
boards: ['c', 'w', 'wg'],
files: ['c', 'w', 'wg']
},
'Rebecca Black Tech': {
domain: 'rbt.asia',
http: true,
https: true,
software: 'fuuka',
boards: ['cgl', 'g', 'mu', 'w'],
files: ['cgl', 'g', 'mu', 'w']
},
'The Dark Cave': {
domain: 'archive.thedarkcave.org',
http: true,
https: true,
software: 'foolfuuka',
boards: ['c', 'int', 'out', 'po'],
files: ['c', 'po']
},
'warosu': {
'domain': 'fuuka.warosu.org',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'vr']
},
'worldathleticproject': {
'domain': 'fuuka.worldathleticproject.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['e', 'h', 'p', 's', 'u'],
'files': ['e', 'h', 'p', 's', 'u']
domain: 'fuuka.warosu.org',
http: true,
https: true,
software: 'fuuka',
boards: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
files: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
}
},
to: function(dest, data) {
var archive;
archive = (dest === 'search' ? Redirect.thread : Redirect[dest])[data.boardID];
archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID];
if (!archive) {
return '';
}

View File

@ -94,6 +94,8 @@
* license: http://www.gnu.org/copyleft/lesser.html
*
*/
'use strict';
(function() {
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, IDColor, ImageExpand, ImageHover, ImageLoader, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
@ -141,7 +143,7 @@
'Image Expansion': [true, 'Expand images.'],
'Image Hover': [true, 'Show full image on mouseover.'],
'Sauce': [true, 'Add sauce links to images.'],
'Reveal Spoilers': [false, 'Reveal spoiler thumbnails.'],
'Reveal Spoiler Thumbnails': [false, 'Replace spoiler thumbnails with the original image.'],
'Replace GIF': [false, 'Replace thumbnail of gifs with its actual image.'],
'Replace PNG': [false, 'Replace pngs.'],
'Replace JPG': [false, 'Replace jpgs.'],
@ -6597,7 +6599,7 @@
if (g.VIEW === 'catalog' || !Conf['Linkify']) {
return;
}
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[\S]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
this.regString = Conf['Allow False Positives'] ? /(\b([a-z]+:\/\/|[a-z]{3,}\.[-a-z0-9]+\.[a-z]|[-a-z0-9]+\.[a-z]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]|[a-z]{3,}:[a-z0-9?]|[^\s@]+@[a-z0-9.-]+\.[a-z0-9])[^\s'"]+)/gi : /(((magnet|mailto)\:|(www\.)|(news|(ht|f)tp(s?))\:\/\/){1}\S+)/gi;
if (Conf['Comment Expansion']) {
ExpandComment.callbacks.push(this.node);
}
@ -8887,11 +8889,11 @@
RevealSpoilers = {
init: function() {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoilers']) {
if (g.VIEW === 'catalog' || !Conf['Reveal Spoiler Thumbnails']) {
return;
}
return Post.prototype.callbacks.push({
name: 'Reveal Spoilers',
name: 'Reveal Spoiler Thumbnails',
cb: this.node
});
},
@ -10250,6 +10252,9 @@
}
}),
saveLastReadPost: $.debounce(2 * $.SECOND, function() {
if (Unread.thread.isDead) {
return;
}
return Unread.db.set({
boardID: Unread.thread.board.ID,
threadID: Unread.thread.ID,
@ -10292,9 +10297,11 @@
};
Redirect = {
thread: {},
post: {},
file: {},
data: {
thread: {},
post: {},
file: {}
},
init: function() {
var archive, boardID, boards, data, id, name, type, _i, _len, _ref, _ref1, _ref2;
@ -10308,7 +10315,7 @@
if (!boards.contains(boardID)) {
continue;
}
Redirect[type][boardID] = archive;
Redirect.data[type][boardID] = archive;
}
}
}
@ -10318,126 +10325,118 @@
_ref2 = archive.boards;
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
boardID = _ref2[_i];
if (!(boardID in Redirect.thread)) {
Redirect.thread[boardID] = archive;
if (!(boardID in Redirect.data.thread)) {
Redirect.data.thread[boardID] = archive;
}
if (!(boardID in Redirect.post || archive.software !== 'foolfuuka')) {
Redirect.post[boardID] = archive;
if (!(boardID in Redirect.data.post || archive.software !== 'foolfuuka')) {
Redirect.data.post[boardID] = archive;
}
if (!(boardID in Redirect.file || !archive.files.contains(boardID))) {
Redirect.file[boardID] = archive;
if (!(boardID in Redirect.data.file || !archive.files.contains(boardID))) {
Redirect.data.file[boardID] = archive;
}
}
}
},
archives: {
'Foolz': {
'domain': 'archive.foolz.us',
'http': false,
'https': true,
'software': 'foolfuuka',
'boards': ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg'],
'files': ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
},
'NSFW Foolz': {
'domain': 'nsfw.foolz.us',
'http': false,
'https': true,
'software': 'foolfuuka',
'boards': ['u'],
'files': ['u']
},
'The Dark Cave': {
'domain': 'archive.thedarkcave.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['c', 'int', 'out', 'po'],
'files': ['c', 'po']
},
'4plebs': {
'domain': 'archive.4plebs.org',
'http': true,
'software': 'foolfuuka',
'boards': ['hr', 'tg', 'tv', 'x'],
'files': ['hr', 'tg', 'tv', 'x']
domain: 'archive.4plebs.org',
http: true,
software: 'foolfuuka',
boards: ['hr', 'tg', 'tv', 'x'],
files: ['hr', 'tg', 'tv', 'x']
},
'Nyafuu': {
'domain': 'archive.nyafuu.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['c', 'w', 'wg'],
'files': ['c', 'w', 'wg']
'fap archive': {
domain: 'fuuka.worldathleticproject.org',
http: true,
https: false,
software: 'foolfuuka',
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u'],
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
},
'Foolz': {
domain: 'archive.foolz.us',
http: false,
https: true,
software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
},
'Foolz a Shit': {
'domain': 'archive.foolzashit.com',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv'],
'files': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
domain: 'archive.foolzashit.com',
http: true,
https: true,
software: 'foolfuuka',
boards: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv'],
files: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
},
'World Athletic Project': {
'domain': 'fuuka.worldathleticproject.org',
'http': true,
'https': false,
'software': 'foolfuuka',
'boards': ['e', 'h', 'p', 's', 'u'],
'files': ['e', 'h', 'p', 's', 'u']
},
'Install Gentoo': {
'domain': 'archive.installgentoo.net',
'http': false,
'https': true,
'software': 'fuuka',
'boards': ['diy', 'g', 'sci'],
'files': []
},
'warosu': {
'domain': 'fuuka.warosu.org',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
},
'Rebecca Black Tech': {
'domain': 'rbt.asia',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['cgl', 'g', 'mu', 'w'],
'files': ['cgl', 'g', 'mu', 'w']
'Foolz Beta': {
domain: 'beta.foolz.us',
http: true,
https: true,
software: 'foolfuuka',
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
},
'Heinessen': {
'domain': 'archive.heinessen.com',
'http': true,
'software': 'fuuka',
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
'files': ['an', 'k', 'toy']
domain: 'archive.heinessen.com',
http: true,
software: 'fuuka',
boards: ['an', 'fit', 'k', 'mlp', 'r9k', 'toy'],
files: ['an', 'k', 'toy']
},
'Install Gentoo': {
domain: 'archive.installgentoo.net',
http: false,
https: true,
software: 'fuuka',
boards: ['diy', 'g', 'sci'],
files: []
},
'NSFW Foolz': {
domain: 'nsfw.foolz.us',
http: false,
https: true,
software: 'foolfuuka',
boards: ['u'],
files: ['u']
},
'Nyafuu': {
domain: 'archive.nyafuu.org',
http: true,
https: true,
software: 'foolfuuka',
boards: ['c', 'w', 'wg'],
files: ['c', 'w', 'wg']
},
'Rebecca Black Tech': {
domain: 'rbt.asia',
http: true,
https: true,
software: 'fuuka',
boards: ['cgl', 'g', 'mu', 'w'],
files: ['cgl', 'g', 'mu', 'w']
},
'The Dark Cave': {
domain: 'archive.thedarkcave.org',
http: true,
https: true,
software: 'foolfuuka',
boards: ['c', 'int', 'out', 'po'],
files: ['c', 'po']
},
'warosu': {
'domain': 'fuuka.warosu.org',
'http': true,
'https': true,
'software': 'fuuka',
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'vr']
},
'worldathleticproject': {
'domain': 'fuuka.worldathleticproject.org',
'http': true,
'https': true,
'software': 'foolfuuka',
'boards': ['e', 'h', 'p', 's', 'u'],
'files': ['e', 'h', 'p', 's', 'u']
domain: 'fuuka.warosu.org',
http: true,
https: true,
software: 'fuuka',
boards: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr'],
files: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
}
},
to: function(dest, data) {
var archive;
archive = (dest === 'search' ? Redirect.thread : Redirect[dest])[data.boardID];
archive = (dest === 'search' ? Redirect.data.thread : Redirect.data[dest])[data.boardID];
if (!archive) {
return '';
}

109
json/archives.json Normal file
View File

@ -0,0 +1,109 @@
[{
"uid": 0,
"name": "Foolz",
"domain": "archive.foolz.us",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["a", "co", "gd", "jp", "m", "q", "sp", "tg", "tv", "v", "vg", "vp", "vr", "wsg"],
"files": ["a", "gd", "jp", "m", "q", "tg", "vg", "vp", "vr", "wsg"]
}, {
"uid": 1,
"name": "NSFW Foolz",
"domain": "nsfw.foolz.us",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["u"],
"files": ["u"]
}, {
"uid": 2,
"name": "The Dark Cave",
"domain": "archive.thedarkcave.org",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["c", "int", "out", "po"],
"files": ["c", "po"]
}, {
"uid": 3,
"name": "4plebs",
"domain": "archive.4plebs.org",
"http": true,
"https": false,
"software": "foolfuuka",
"boards": ["hr", "tg", "tv", "x"],
"files": ["hr", "tg", "tv", "x"]
}, {
"uid": 4,
"name": "Nyafuu",
"domain": "archive.nyafuu.org",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["c", "w", "wg"],
"files": ["c", "w", "wg"]
}, {
"uid": 11,
"name": "Foolz a Shit",
"domain": "archive.foolzashit.com",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["adv", "asp", "cm", "e", "i", "lgbt", "n", "o", "p", "pol", "s", "s4s", "t", "trv", "y"],
"files": ["adv", "asp", "cm", "e", "i", "lgbt", "n", "o", "p", "s", "s4s", "t", "trv", "y"]
}, {
"uid": 12,
"name": "fap archive",
"domain": "fuuka.worldathleticproject.org",
"http": true,
"https": false,
"software": "foolfuuka",
"boards": ["b", "e", "h", "hc", "p", "s", "u"],
"files": ["b", "e", "h", "hc", "p", "s", "u"]
}, {
"uid": 7,
"name": "Install Gentoo",
"domain": "archive.installgentoo.net",
"http": false,
"https": true,
"software": "fuuka",
"boards": ["diy", "g", "sci"],
"files": []
}, {
"uid": 8,
"name": "Rebecca Black Tech",
"domain": "rbt.asia",
"http": true,
"https": true,
"software": "fuuka",
"boards": ["cgl", "g", "mu", "w"],
"files": ["cgl", "g", "mu", "w"]
}, {
"uid": 9,
"name": "Heinessen",
"domain": "archive.heinessen.com",
"http": true,
"https": false,
"software": "fuuka",
"boards": ["an", "fit", "k", "mlp", "r9k", "toy"],
"files": ["an", "fit", "k", "r9k", "toy"]
}, {
"uid": 10,
"name": "warosu",
"domain": "fuuka.warosu.org",
"http": true,
"https": true,
"software": "fuuka",
"boards": ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "q", "tg", "vr"],
"files": ["3", "cgl", "ck", "fa", "ic", "jp", "lit", "q", "tg", "vr"]
}, {
"uid": 13,
"name": "Foolz Beta",
"domain": "beta.foolz.us",
"http": true,
"https": true,
"software": "foolfuuka",
"boards": ["a", "co", "gd", "h", "jp", "m", "mlp", "q", "sp", "tg", "tv", "u", "v", "vg", "vp", "vr", "wsg"],
"files": ["a", "gd", "h", "jp", "m", "q", "tg", "u", "vg", "vp", "vr", "wsg"]
}]

View File

@ -1 +1,5 @@
<<<<<<< HEAD
postMessage({version:'2.2.2'},'*')
=======
postMessage({version:'1.2.25'},'*')
>>>>>>> v3

View File

@ -28,7 +28,8 @@
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-watch": "~0.5.0",
"grunt-shell": "~0.3.1"
"grunt-shell": "~0.3.1",
"matchdep": "~0.1.2"
},
"repository": {
"type": "git",

View File

@ -1,7 +1,8 @@
Redirect =
thread: {}
post: {}
file: {}
data:
thread: {}
post: {}
file: {}
init: ->
for boardID, data of Conf['selectedArchives']
@ -9,122 +10,114 @@ Redirect =
if archive = Redirect.archives[id]
boards = archive[type] or archive['boards']
continue unless boards.contains boardID
Redirect[type][boardID] = archive
Redirect.data[type][boardID] = archive
for name, archive of Redirect.archives
for boardID in archive.boards
unless boardID of Redirect.thread
Redirect.thread[boardID] = archive
unless boardID of Redirect.post or archive.software isnt 'foolfuuka'
Redirect.post[boardID] = archive
unless boardID of Redirect.file or !archive.files.contains boardID
Redirect.file[boardID] = archive
unless boardID of Redirect.data.thread
Redirect.data.thread[boardID] = archive
unless boardID of Redirect.data.post or archive.software isnt 'foolfuuka'
Redirect.data.post[boardID] = archive
unless boardID of Redirect.data.file or !archive.files.contains boardID
Redirect.data.file[boardID] = archive
return
archives:
'Foolz':
'domain': 'archive.foolz.us'
'http': false
'https': true
'software': 'foolfuuka'
'boards': ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg']
'files': ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
'NSFW Foolz':
'domain': 'nsfw.foolz.us'
'http': false
'https': true
'software': 'foolfuuka'
'boards': ['u']
'files': ['u']
'The Dark Cave':
'domain': 'archive.thedarkcave.org'
'http': true
'https': true
'software': 'foolfuuka'
'boards': ['c', 'int', 'out', 'po']
'files': ['c', 'po']
'4plebs':
'domain': 'archive.4plebs.org'
'http': true
'software': 'foolfuuka'
'boards': ['hr', 'tg', 'tv', 'x']
'files': ['hr', 'tg', 'tv', 'x']
domain: 'archive.4plebs.org'
http: true
software: 'foolfuuka'
boards: ['hr', 'tg', 'tv', 'x']
files: ['hr', 'tg', 'tv', 'x']
'Nyafuu':
'domain': 'archive.nyafuu.org'
'http': true
'https': true
'software': 'foolfuuka'
'boards': ['c', 'w', 'wg']
'files': ['c', 'w', 'wg']
'fap archive':
domain: 'fuuka.worldathleticproject.org'
http: true
https: false
software: 'foolfuuka'
boards: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
files: ['b', 'e', 'h', 'hc', 'p', 's', 'u']
'Foolz':
domain: 'archive.foolz.us'
http: false
https: true
software: 'foolfuuka'
boards: ['a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'vp', 'vr', 'wsg']
files: ['a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg']
'Foolz a Shit':
'domain': 'archive.foolzashit.com'
'http': true
'https': true
'software': 'foolfuuka'
'boards': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
'files': ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
domain: 'archive.foolzashit.com'
http: true
https: true
software: 'foolfuuka'
boards: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
files: ['adv', 'asp', 'cm', 'i', 'lgbt', 'n', 'o', 'p', 's4s', 't', 'trv']
'World Athletic Project':
'domain': 'fuuka.worldathleticproject.org'
'http': true
'https': false
'software': 'foolfuuka'
'boards': ['e', 'h', 'p', 's', 'u']
'files': ['e', 'h', 'p', 's', 'u']
'Install Gentoo':
'domain': 'archive.installgentoo.net'
'http': false
'https': true
'software': 'fuuka'
'boards': ['diy', 'g', 'sci']
'files': []
'warosu':
'domain': 'fuuka.warosu.org'
'http': true
'https': true
'software': 'fuuka'
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
'Rebecca Black Tech':
'domain': 'rbt.asia'
'http': true
'https': true
'software': 'fuuka'
'boards': ['cgl', 'g', 'mu', 'w']
'files': ['cgl', 'g', 'mu', 'w']
'Foolz Beta':
domain: 'beta.foolz.us'
http: true
https: true,
software: 'foolfuuka'
boards: ['a', 'co', 'gd', 'h', 'jp', 'm', 'mlp', 'q', 'sp', 'tg', 'tv', 'u', 'v', 'vg', 'vp', 'vr', 'wsg'],
files: ['a', 'gd', 'h', 'jp', 'm', 'q', 'tg', 'u', 'vg', 'vp', 'vr', 'wsg']
'Heinessen':
'domain': 'archive.heinessen.com'
'http': true
'software': 'fuuka'
'boards': ['an', 'fit', 'k', 'mlp', 'r9k', 'toy']
'files': ['an', 'k', 'toy']
domain: 'archive.heinessen.com'
http: true
software: 'fuuka'
boards: ['an', 'fit', 'k', 'mlp', 'r9k', 'toy']
files: ['an', 'k', 'toy']
'Install Gentoo':
domain: 'archive.installgentoo.net'
http: false
https: true
software: 'fuuka'
boards: ['diy', 'g', 'sci']
files: []
'NSFW Foolz':
domain: 'nsfw.foolz.us'
http: false
https: true
software: 'foolfuuka'
boards: ['u']
files: ['u']
'Nyafuu':
domain: 'archive.nyafuu.org'
http: true
https: true
software: 'foolfuuka'
boards: ['c', 'w', 'wg']
files: ['c', 'w', 'wg']
'Rebecca Black Tech':
domain: 'rbt.asia'
http: true
https: true
software: 'fuuka'
boards: ['cgl', 'g', 'mu', 'w']
files: ['cgl', 'g', 'mu', 'w']
'The Dark Cave':
domain: 'archive.thedarkcave.org'
http: true
https: true
software: 'foolfuuka'
boards: ['c', 'int', 'out', 'po']
files: ['c', 'po']
'warosu':
'domain': 'fuuka.warosu.org'
'http': true
'https': true
'software': 'fuuka'
'boards': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
'files': ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'vr']
'worldathleticproject':
'domain': 'fuuka.worldathleticproject.org'
'http': true
'https': true
'software': 'foolfuuka'
'boards': ['e', 'h', 'p', 's', 'u']
'files': ['e', 'h', 'p', 's', 'u']
domain: 'fuuka.warosu.org'
http: true
https: true
software: 'fuuka'
boards: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
files: ['3', 'cgl', 'ck', 'fa', 'ic', 'jp', 'lit', 'q', 'tg', 'vr']
to: (dest, data) ->
archive = (if dest is 'search' then Redirect.thread else Redirect[dest])[data.boardID]
archive = (if dest is 'search' then Redirect.data.thread else Redirect.data[dest])[data.boardID]
return '' unless archive
Redirect[dest] archive, data

View File

@ -133,9 +133,9 @@ Config =
true
'Add sauce links to images.'
]
'Reveal Spoilers': [
'Reveal Spoiler Thumbnails': [
false
'Reveal spoiler thumbnails.'
'Replace spoiler thumbnails with the original image.'
]
'Replace GIF': [
false

View File

@ -219,11 +219,11 @@ $.off = (el, events, handler) ->
$.event = (event, detail, root=d) ->
root.dispatchEvent new CustomEvent event, {bubbles: true, detail}
$.open = (URL) ->
$.open =
<% if (type === 'userscript') { %>
GM_openInTab URL
GM_openInTab
<% } else { %>
window.open URL, '_blank'
(URL) -> window.open URL, '_blank'
<% } %>
$.debounce = (wait, fn) ->

View File

@ -0,0 +1 @@
'use strict';

View File

@ -1,9 +1,9 @@
RevealSpoilers =
init: ->
return if g.VIEW is 'catalog' or !Conf['Reveal Spoilers']
return if g.VIEW is 'catalog' or !Conf['Reveal Spoiler Thumbnails']
Post::callbacks.push
name: 'Reveal Spoilers'
name: 'Reveal Spoiler Thumbnails'
cb: @node
node: ->
return if @isClone or !@file?.isSpoiler

View File

@ -15,7 +15,7 @@ Linkify =
|
[a-z]{3,}:[a-z0-9?]
|
[\S]+@[a-z0-9.-]+\.[a-z0-9]
[^\s@]+@[a-z0-9.-]+\.[a-z0-9]
)
[^\s'"]+
)///gi

View File

@ -136,6 +136,7 @@ Unread =
Unread.update() if e
saveLastReadPost: $.debounce 2 * $.SECOND, ->
return if Unread.thread.isDead
Unread.db.set
boardID: Unread.thread.board.ID
threadID: Unread.thread.ID