Release 4chan X v1.10.9.0.
This commit is contained in:
parent
52dfc296cf
commit
194f088587
@ -2,6 +2,13 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
|
|||||||
|
|
||||||
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
|
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
|
||||||
|
|
||||||
|
### v1.10.9
|
||||||
|
|
||||||
|
**v1.10.9.0** *(2015-04-15)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.9.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.9.0/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
- Based on v1.10.8.10.
|
||||||
|
- Support reporting posts to fgts archive.
|
||||||
|
- Add capcode to archive search menu.
|
||||||
|
|
||||||
### v1.10.8
|
### v1.10.8
|
||||||
|
|
||||||
**v1.10.8.10** *(2015-04-13)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.8.10/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.8.10/builds/4chan-X-noupdate.crx "Chromium version")]
|
**v1.10.8.10** *(2015-04-13)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.8.10/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.10.8.10/builds/4chan-X-noupdate.crx "Chromium version")]
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.10.8.10
|
// @version 1.10.9.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X beta
|
// @name 4chan X beta
|
||||||
// @version 1.10.8.10
|
// @version 1.10.9.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -109,7 +109,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, Anonymize, AntiAutoplay, ArchiveLink, Banner, Board, Build, Callbacks, Captcha, CatalogLinks, CatalogThread, Clone, Conf, Config, Connection, CrossOrigin, CustomCSS, DataBoard, DeleteLink, DownloadLink, E, Embedding, ExpandComment, ExpandThread, FappeTyme, Favicon, Fetcher, FileInfo, Filter, Flash, Fourchan, Gallery, Get, Header, IDColor, IDHighlight, ImageCommon, ImageExpand, ImageHover, ImageLoader, Index, Keybinds, Linkify, Main, MarkNewIPs, Menu, Metadata, Nav, Notice, PSAHiding, Polyfill, Post, PostHiding, PostSuccessful, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, ReportLink, RevealSpoilers, Sauce, Settings, ShimSet, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, Volume, c, d, doc, g,
|
var $, $$, Anonymize, AntiAutoplay, ArchiveLink, Banner, Board, Build, Callbacks, Captcha, CatalogLinks, CatalogThread, Clone, Conf, Config, Connection, CrossOrigin, CustomCSS, DataBoard, DeleteLink, DownloadLink, E, Embedding, ExpandComment, ExpandThread, FappeTyme, Favicon, Fetcher, FileInfo, Filter, Flash, Fourchan, Gallery, Get, Header, IDColor, IDHighlight, ImageCommon, ImageExpand, ImageHover, ImageLoader, Index, Keybinds, Linkify, Main, MarkNewIPs, Menu, Metadata, Nav, Notice, PSAHiding, Polyfill, Post, PostHiding, PostSuccessful, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, ShimSet, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, Volume, c, d, doc, g,
|
||||||
slice = [].slice,
|
slice = [].slice,
|
||||||
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; },
|
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; },
|
||||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||||
@ -127,6 +127,7 @@
|
|||||||
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
||||||
'Desktop Notifications': [true, 'Enables desktop notifications across various 4chan X features.'],
|
'Desktop Notifications': [true, 'Enables desktop notifications across various 4chan X features.'],
|
||||||
'404 Redirect': [true, 'Redirect dead threads and images to the archives.'],
|
'404 Redirect': [true, 'Redirect dead threads and images to the archives.'],
|
||||||
|
'Archive Report': [true, 'Enable reporting posts to supported archives.'],
|
||||||
'Except Archives from Encryption': [false, 'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'],
|
'Except Archives from Encryption': [false, 'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'],
|
||||||
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
||||||
'Time Formatting': [true, 'Localize and format timestamps.'],
|
'Time Formatting': [true, 'Localize and format timestamps.'],
|
||||||
@ -396,7 +397,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.8.10',
|
VERSION: '1.10.9.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -5070,18 +5071,18 @@
|
|||||||
},
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var filter, k, key, len1, ref, ref1, result, value;
|
var filter, k, key, len1, ref, ref1, result, value;
|
||||||
if (this.isClone || this.isFetchedQuote) {
|
if (this.isClone) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (key in Filter.filters) {
|
for (key in Filter.filters) {
|
||||||
if ((value = Filter[key](this)) !== false) {
|
if ((value = Filter[key](this)) != null) {
|
||||||
ref = Filter.filters[key];
|
ref = Filter.filters[key];
|
||||||
for (k = 0, len1 = ref.length; k < len1; k++) {
|
for (k = 0, len1 = ref.length; k < len1; k++) {
|
||||||
filter = ref[k];
|
filter = ref[k];
|
||||||
if (!(result = filter(value, this.isReply))) {
|
if (!(result = filter(value, this.isReply))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (result.hide) {
|
if (result.hide && !this.isFetchedQuote) {
|
||||||
if (this.isReply) {
|
if (this.isReply) {
|
||||||
PostHiding.hide(this, result.stub);
|
PostHiding.hide(this, result.stub);
|
||||||
} else if (g.VIEW === 'index') {
|
} else if (g.VIEW === 'index') {
|
||||||
@ -5103,73 +5104,41 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: function(post) {
|
name: function(post) {
|
||||||
if ('name' in post.info) {
|
return post.info.name;
|
||||||
return post.info.name;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
uniqueID: function(post) {
|
uniqueID: function(post) {
|
||||||
if ('uniqueID' in post.info) {
|
return post.info.uniqueID;
|
||||||
return post.info.uniqueID;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
tripcode: function(post) {
|
tripcode: function(post) {
|
||||||
if ('tripcode' in post.info) {
|
return post.info.tripcode;
|
||||||
return post.info.tripcode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
capcode: function(post) {
|
capcode: function(post) {
|
||||||
if ('capcode' in post.info) {
|
return post.info.capcode;
|
||||||
return post.info.capcode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
subject: function(post) {
|
subject: function(post) {
|
||||||
if ('subject' in post.info) {
|
return post.info.subject || void 0;
|
||||||
return post.info.subject || false;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
comment: function(post) {
|
comment: function(post) {
|
||||||
if ('comment' in post.info) {
|
return post.info.comment;
|
||||||
return post.info.comment;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
flag: function(post) {
|
flag: function(post) {
|
||||||
if ('flag' in post.info) {
|
return post.info.flag;
|
||||||
return post.info.flag;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
filename: function(post) {
|
filename: function(post) {
|
||||||
if (post.file) {
|
var ref;
|
||||||
return post.file.name;
|
return (ref = post.file) != null ? ref.name : void 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
dimensions: function(post) {
|
dimensions: function(post) {
|
||||||
var file;
|
var ref;
|
||||||
file = post.file;
|
return (ref = post.file) != null ? ref.dimensions : void 0;
|
||||||
if (file != null ? file.dimensions : void 0) {
|
|
||||||
return file.dimensions;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
filesize: function(post) {
|
filesize: function(post) {
|
||||||
if (post.file) {
|
var ref;
|
||||||
return post.file.size;
|
return (ref = post.file) != null ? ref.size : void 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
MD5: function(post) {
|
MD5: function(post) {
|
||||||
var ref;
|
var ref;
|
||||||
if ((ref = post.file) != null ? ref.MD5 : void 0) {
|
return (ref = post.file) != null ? ref.MD5 : void 0;
|
||||||
return post.file.MD5;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
init: function() {
|
init: function() {
|
||||||
@ -5209,7 +5178,7 @@
|
|||||||
open: function(post) {
|
open: function(post) {
|
||||||
var value;
|
var value;
|
||||||
value = Filter[type](post);
|
value = Filter[type](post);
|
||||||
return value !== false;
|
return value != null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -11444,7 +11413,7 @@
|
|||||||
},
|
},
|
||||||
subEntries: []
|
subEntries: []
|
||||||
};
|
};
|
||||||
ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||||
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
||||||
type = ref1[k];
|
type = ref1[k];
|
||||||
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
||||||
@ -11711,17 +11680,19 @@
|
|||||||
el: a,
|
el: a,
|
||||||
order: 10,
|
order: 10,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
ReportLink.post = post;
|
ReportLink.url = !post.isDead ? "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post : Conf['Archive Report'] ? Redirect.to('report', {
|
||||||
return !post.isDead;
|
boardID: post.board.ID,
|
||||||
|
postID: post.ID
|
||||||
|
}) : void 0;
|
||||||
|
return !!ReportLink.url;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
report: function() {
|
report: function() {
|
||||||
var id, post, set, url;
|
var id, set, url;
|
||||||
post = ReportLink.post;
|
url = ReportLink.url;
|
||||||
url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post;
|
|
||||||
id = Date.now();
|
id = Date.now();
|
||||||
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=285";
|
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=320";
|
||||||
return window.open(url, id, set);
|
return window.open(url, id, set);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -13414,7 +13385,8 @@
|
|||||||
o = {
|
o = {
|
||||||
thread: {},
|
thread: {},
|
||||||
post: {},
|
post: {},
|
||||||
file: {}
|
file: {},
|
||||||
|
report: {}
|
||||||
};
|
};
|
||||||
archives = {};
|
archives = {};
|
||||||
ref = Redirect.archives;
|
ref = Redirect.archives;
|
||||||
@ -13424,17 +13396,19 @@
|
|||||||
archives[name] = data;
|
archives[name] = data;
|
||||||
for (q = 0, len2 = boards.length; q < len2; q++) {
|
for (q = 0, len2 = boards.length; q < len2; q++) {
|
||||||
boardID = boards[q];
|
boardID = boards[q];
|
||||||
if (!(!withCredentials)) {
|
if (!withCredentials) {
|
||||||
continue;
|
if (!(boardID in o.thread)) {
|
||||||
|
o.thread[boardID] = data;
|
||||||
|
}
|
||||||
|
if (!(boardID in o.post || software !== 'foolfuuka')) {
|
||||||
|
o.post[boardID] = data;
|
||||||
|
}
|
||||||
|
if (!(boardID in o.file || indexOf.call(files, boardID) < 0)) {
|
||||||
|
o.file[boardID] = data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!(boardID in o.thread)) {
|
if (name === 'fgts') {
|
||||||
o.thread[boardID] = data;
|
o.report[boardID] = data;
|
||||||
}
|
|
||||||
if (!(boardID in o.post || software !== 'foolfuuka')) {
|
|
||||||
o.post[boardID] = data;
|
|
||||||
}
|
|
||||||
if (!(boardID in o.file || indexOf.call(files, boardID) < 0)) {
|
|
||||||
o.file[boardID] = data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13509,10 +13483,20 @@
|
|||||||
var boardID, path, type, value;
|
var boardID, path, type, value;
|
||||||
boardID = arg.boardID, type = arg.type, value = arg.value;
|
boardID = arg.boardID, type = arg.type, value = arg.value;
|
||||||
type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type;
|
type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type;
|
||||||
|
if (type === 'capcode') {
|
||||||
|
value = {
|
||||||
|
'Developer': 'dev'
|
||||||
|
}[value] || value.toLowerCase();
|
||||||
|
}
|
||||||
value = encodeURIComponent(value);
|
value = encodeURIComponent(value);
|
||||||
path = archive.software === 'foolfuuka' ? boardID + "/search/" + type + "/" + value : boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
|
path = archive.software === 'foolfuuka' ? boardID + "/search/" + type + "/" + value : boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
|
||||||
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
|
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
|
||||||
},
|
},
|
||||||
|
report: function(archive, arg) {
|
||||||
|
var boardID, postID;
|
||||||
|
boardID = arg.boardID, postID = arg.postID;
|
||||||
|
return "https://so.fgts.jp/report/?board=" + boardID + "&no=" + postID;
|
||||||
|
},
|
||||||
securityCheck: function(URL) {
|
securityCheck: function(URL) {
|
||||||
return /^https:\/\//.test(URL) || location.protocol === 'http:' || Conf['Except Archives from Encryption'];
|
return /^https:\/\//.test(URL) || location.protocol === 'http:' || Conf['Except Archives from Encryption'];
|
||||||
},
|
},
|
||||||
@ -15232,6 +15216,38 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Report = {
|
||||||
|
init: function() {
|
||||||
|
var match, postID;
|
||||||
|
if (!(Conf['Archive Report'] && /\bmode=report\b/.test(location.search))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(match = location.search.match(/\bno=(\d+)/))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
postID = +match[1];
|
||||||
|
Redirect.init();
|
||||||
|
if (this.archive = Redirect.to('report', {
|
||||||
|
boardID: g.BOARD.ID,
|
||||||
|
postID: postID
|
||||||
|
})) {
|
||||||
|
return $.ready(this.ready);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ready: function() {
|
||||||
|
var link, message;
|
||||||
|
if ((message = $('h3')) && /Report submitted!/.test(message.textContent)) {
|
||||||
|
location.replace(Report.archive);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
link = $.el('a', {
|
||||||
|
href: Report.archive,
|
||||||
|
textContent: 'Report to fgts'
|
||||||
|
});
|
||||||
|
return $.add(d.body, [$.tn(' ['), link, $.tn(']')]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Time = {
|
Time = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var ref;
|
var ref;
|
||||||
@ -16100,6 +16116,7 @@
|
|||||||
case 'a.4cdn.org':
|
case 'a.4cdn.org':
|
||||||
return;
|
return;
|
||||||
case 'sys.4chan.org':
|
case 'sys.4chan.org':
|
||||||
|
Report.init();
|
||||||
if (g.VIEW === 'post') {
|
if (g.VIEW === 'post') {
|
||||||
PostSuccessful.init();
|
PostSuccessful.init();
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.8.10
|
// @version 1.10.9.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -108,7 +108,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, Anonymize, AntiAutoplay, ArchiveLink, Banner, Board, Build, Callbacks, Captcha, CatalogLinks, CatalogThread, Clone, Conf, Config, Connection, CrossOrigin, CustomCSS, DataBoard, DeleteLink, DownloadLink, E, Embedding, ExpandComment, ExpandThread, FappeTyme, Favicon, Fetcher, FileInfo, Filter, Flash, Fourchan, Gallery, Get, Header, IDColor, IDHighlight, ImageCommon, ImageExpand, ImageHover, ImageLoader, Index, Keybinds, Linkify, Main, MarkNewIPs, Menu, Metadata, Nav, Notice, PSAHiding, Polyfill, Post, PostHiding, PostSuccessful, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, ReportLink, RevealSpoilers, Sauce, Settings, ShimSet, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, Volume, c, d, doc, g,
|
var $, $$, Anonymize, AntiAutoplay, ArchiveLink, Banner, Board, Build, Callbacks, Captcha, CatalogLinks, CatalogThread, Clone, Conf, Config, Connection, CrossOrigin, CustomCSS, DataBoard, DeleteLink, DownloadLink, E, Embedding, ExpandComment, ExpandThread, FappeTyme, Favicon, Fetcher, FileInfo, Filter, Flash, Fourchan, Gallery, Get, Header, IDColor, IDHighlight, ImageCommon, ImageExpand, ImageHover, ImageLoader, Index, Keybinds, Linkify, Main, MarkNewIPs, Menu, Metadata, Nav, Notice, PSAHiding, Polyfill, Post, PostHiding, PostSuccessful, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, ShimSet, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, Volume, c, d, doc, g,
|
||||||
slice = [].slice,
|
slice = [].slice,
|
||||||
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; },
|
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; },
|
||||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||||
@ -126,6 +126,7 @@
|
|||||||
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
||||||
'Desktop Notifications': [true, 'Enables desktop notifications across various 4chan X features.'],
|
'Desktop Notifications': [true, 'Enables desktop notifications across various 4chan X features.'],
|
||||||
'404 Redirect': [true, 'Redirect dead threads and images to the archives.'],
|
'404 Redirect': [true, 'Redirect dead threads and images to the archives.'],
|
||||||
|
'Archive Report': [true, 'Enable reporting posts to supported archives.'],
|
||||||
'Except Archives from Encryption': [false, 'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'],
|
'Except Archives from Encryption': [false, 'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'],
|
||||||
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
||||||
'Time Formatting': [true, 'Localize and format timestamps.'],
|
'Time Formatting': [true, 'Localize and format timestamps.'],
|
||||||
@ -395,7 +396,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.8.10',
|
VERSION: '1.10.9.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -5069,18 +5070,18 @@
|
|||||||
},
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var filter, k, key, len1, ref, ref1, result, value;
|
var filter, k, key, len1, ref, ref1, result, value;
|
||||||
if (this.isClone || this.isFetchedQuote) {
|
if (this.isClone) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (key in Filter.filters) {
|
for (key in Filter.filters) {
|
||||||
if ((value = Filter[key](this)) !== false) {
|
if ((value = Filter[key](this)) != null) {
|
||||||
ref = Filter.filters[key];
|
ref = Filter.filters[key];
|
||||||
for (k = 0, len1 = ref.length; k < len1; k++) {
|
for (k = 0, len1 = ref.length; k < len1; k++) {
|
||||||
filter = ref[k];
|
filter = ref[k];
|
||||||
if (!(result = filter(value, this.isReply))) {
|
if (!(result = filter(value, this.isReply))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (result.hide) {
|
if (result.hide && !this.isFetchedQuote) {
|
||||||
if (this.isReply) {
|
if (this.isReply) {
|
||||||
PostHiding.hide(this, result.stub);
|
PostHiding.hide(this, result.stub);
|
||||||
} else if (g.VIEW === 'index') {
|
} else if (g.VIEW === 'index') {
|
||||||
@ -5102,73 +5103,41 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: function(post) {
|
name: function(post) {
|
||||||
if ('name' in post.info) {
|
return post.info.name;
|
||||||
return post.info.name;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
uniqueID: function(post) {
|
uniqueID: function(post) {
|
||||||
if ('uniqueID' in post.info) {
|
return post.info.uniqueID;
|
||||||
return post.info.uniqueID;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
tripcode: function(post) {
|
tripcode: function(post) {
|
||||||
if ('tripcode' in post.info) {
|
return post.info.tripcode;
|
||||||
return post.info.tripcode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
capcode: function(post) {
|
capcode: function(post) {
|
||||||
if ('capcode' in post.info) {
|
return post.info.capcode;
|
||||||
return post.info.capcode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
subject: function(post) {
|
subject: function(post) {
|
||||||
if ('subject' in post.info) {
|
return post.info.subject || void 0;
|
||||||
return post.info.subject || false;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
comment: function(post) {
|
comment: function(post) {
|
||||||
if ('comment' in post.info) {
|
return post.info.comment;
|
||||||
return post.info.comment;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
flag: function(post) {
|
flag: function(post) {
|
||||||
if ('flag' in post.info) {
|
return post.info.flag;
|
||||||
return post.info.flag;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
filename: function(post) {
|
filename: function(post) {
|
||||||
if (post.file) {
|
var ref;
|
||||||
return post.file.name;
|
return (ref = post.file) != null ? ref.name : void 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
dimensions: function(post) {
|
dimensions: function(post) {
|
||||||
var file;
|
var ref;
|
||||||
file = post.file;
|
return (ref = post.file) != null ? ref.dimensions : void 0;
|
||||||
if (file != null ? file.dimensions : void 0) {
|
|
||||||
return file.dimensions;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
filesize: function(post) {
|
filesize: function(post) {
|
||||||
if (post.file) {
|
var ref;
|
||||||
return post.file.size;
|
return (ref = post.file) != null ? ref.size : void 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
MD5: function(post) {
|
MD5: function(post) {
|
||||||
var ref;
|
var ref;
|
||||||
if ((ref = post.file) != null ? ref.MD5 : void 0) {
|
return (ref = post.file) != null ? ref.MD5 : void 0;
|
||||||
return post.file.MD5;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
init: function() {
|
init: function() {
|
||||||
@ -5208,7 +5177,7 @@
|
|||||||
open: function(post) {
|
open: function(post) {
|
||||||
var value;
|
var value;
|
||||||
value = Filter[type](post);
|
value = Filter[type](post);
|
||||||
return value !== false;
|
return value != null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -11443,7 +11412,7 @@
|
|||||||
},
|
},
|
||||||
subEntries: []
|
subEntries: []
|
||||||
};
|
};
|
||||||
ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||||
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
||||||
type = ref1[k];
|
type = ref1[k];
|
||||||
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
||||||
@ -11710,17 +11679,19 @@
|
|||||||
el: a,
|
el: a,
|
||||||
order: 10,
|
order: 10,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
ReportLink.post = post;
|
ReportLink.url = !post.isDead ? "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post : Conf['Archive Report'] ? Redirect.to('report', {
|
||||||
return !post.isDead;
|
boardID: post.board.ID,
|
||||||
|
postID: post.ID
|
||||||
|
}) : void 0;
|
||||||
|
return !!ReportLink.url;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
report: function() {
|
report: function() {
|
||||||
var id, post, set, url;
|
var id, set, url;
|
||||||
post = ReportLink.post;
|
url = ReportLink.url;
|
||||||
url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post;
|
|
||||||
id = Date.now();
|
id = Date.now();
|
||||||
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=285";
|
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=320";
|
||||||
return window.open(url, id, set);
|
return window.open(url, id, set);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -13413,7 +13384,8 @@
|
|||||||
o = {
|
o = {
|
||||||
thread: {},
|
thread: {},
|
||||||
post: {},
|
post: {},
|
||||||
file: {}
|
file: {},
|
||||||
|
report: {}
|
||||||
};
|
};
|
||||||
archives = {};
|
archives = {};
|
||||||
ref = Redirect.archives;
|
ref = Redirect.archives;
|
||||||
@ -13423,17 +13395,19 @@
|
|||||||
archives[name] = data;
|
archives[name] = data;
|
||||||
for (q = 0, len2 = boards.length; q < len2; q++) {
|
for (q = 0, len2 = boards.length; q < len2; q++) {
|
||||||
boardID = boards[q];
|
boardID = boards[q];
|
||||||
if (!(!withCredentials)) {
|
if (!withCredentials) {
|
||||||
continue;
|
if (!(boardID in o.thread)) {
|
||||||
|
o.thread[boardID] = data;
|
||||||
|
}
|
||||||
|
if (!(boardID in o.post || software !== 'foolfuuka')) {
|
||||||
|
o.post[boardID] = data;
|
||||||
|
}
|
||||||
|
if (!(boardID in o.file || indexOf.call(files, boardID) < 0)) {
|
||||||
|
o.file[boardID] = data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!(boardID in o.thread)) {
|
if (name === 'fgts') {
|
||||||
o.thread[boardID] = data;
|
o.report[boardID] = data;
|
||||||
}
|
|
||||||
if (!(boardID in o.post || software !== 'foolfuuka')) {
|
|
||||||
o.post[boardID] = data;
|
|
||||||
}
|
|
||||||
if (!(boardID in o.file || indexOf.call(files, boardID) < 0)) {
|
|
||||||
o.file[boardID] = data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13508,10 +13482,20 @@
|
|||||||
var boardID, path, type, value;
|
var boardID, path, type, value;
|
||||||
boardID = arg.boardID, type = arg.type, value = arg.value;
|
boardID = arg.boardID, type = arg.type, value = arg.value;
|
||||||
type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type;
|
type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type;
|
||||||
|
if (type === 'capcode') {
|
||||||
|
value = {
|
||||||
|
'Developer': 'dev'
|
||||||
|
}[value] || value.toLowerCase();
|
||||||
|
}
|
||||||
value = encodeURIComponent(value);
|
value = encodeURIComponent(value);
|
||||||
path = archive.software === 'foolfuuka' ? boardID + "/search/" + type + "/" + value : boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
|
path = archive.software === 'foolfuuka' ? boardID + "/search/" + type + "/" + value : boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
|
||||||
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
|
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
|
||||||
},
|
},
|
||||||
|
report: function(archive, arg) {
|
||||||
|
var boardID, postID;
|
||||||
|
boardID = arg.boardID, postID = arg.postID;
|
||||||
|
return "https://so.fgts.jp/report/?board=" + boardID + "&no=" + postID;
|
||||||
|
},
|
||||||
securityCheck: function(URL) {
|
securityCheck: function(URL) {
|
||||||
return /^https:\/\//.test(URL) || location.protocol === 'http:' || Conf['Except Archives from Encryption'];
|
return /^https:\/\//.test(URL) || location.protocol === 'http:' || Conf['Except Archives from Encryption'];
|
||||||
},
|
},
|
||||||
@ -15231,6 +15215,38 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Report = {
|
||||||
|
init: function() {
|
||||||
|
var match, postID;
|
||||||
|
if (!(Conf['Archive Report'] && /\bmode=report\b/.test(location.search))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(match = location.search.match(/\bno=(\d+)/))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
postID = +match[1];
|
||||||
|
Redirect.init();
|
||||||
|
if (this.archive = Redirect.to('report', {
|
||||||
|
boardID: g.BOARD.ID,
|
||||||
|
postID: postID
|
||||||
|
})) {
|
||||||
|
return $.ready(this.ready);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ready: function() {
|
||||||
|
var link, message;
|
||||||
|
if ((message = $('h3')) && /Report submitted!/.test(message.textContent)) {
|
||||||
|
location.replace(Report.archive);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
link = $.el('a', {
|
||||||
|
href: Report.archive,
|
||||||
|
textContent: 'Report to fgts'
|
||||||
|
});
|
||||||
|
return $.add(d.body, [$.tn(' ['), link, $.tn(']')]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Time = {
|
Time = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var ref;
|
var ref;
|
||||||
@ -16099,6 +16115,7 @@
|
|||||||
case 'a.4cdn.org':
|
case 'a.4cdn.org':
|
||||||
return;
|
return;
|
||||||
case 'sys.4chan.org':
|
case 'sys.4chan.org':
|
||||||
|
Report.init();
|
||||||
if (g.VIEW === 'post') {
|
if (g.VIEW === 'post') {
|
||||||
PostSuccessful.init();
|
PostSuccessful.init();
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.8.10
|
// @version 1.10.9.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.10.8.10
|
// @version 1.10.9.0
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -109,7 +109,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var $, $$, Anonymize, AntiAutoplay, ArchiveLink, Banner, Board, Build, Callbacks, Captcha, CatalogLinks, CatalogThread, Clone, Conf, Config, Connection, CrossOrigin, CustomCSS, DataBoard, DeleteLink, DownloadLink, E, Embedding, ExpandComment, ExpandThread, FappeTyme, Favicon, Fetcher, FileInfo, Filter, Flash, Fourchan, Gallery, Get, Header, IDColor, IDHighlight, ImageCommon, ImageExpand, ImageHover, ImageLoader, Index, Keybinds, Linkify, Main, MarkNewIPs, Menu, Metadata, Nav, Notice, PSAHiding, Polyfill, Post, PostHiding, PostSuccessful, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, ReportLink, RevealSpoilers, Sauce, Settings, ShimSet, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, Volume, c, d, doc, g,
|
var $, $$, Anonymize, AntiAutoplay, ArchiveLink, Banner, Board, Build, Callbacks, Captcha, CatalogLinks, CatalogThread, Clone, Conf, Config, Connection, CrossOrigin, CustomCSS, DataBoard, DeleteLink, DownloadLink, E, Embedding, ExpandComment, ExpandThread, FappeTyme, Favicon, Fetcher, FileInfo, Filter, Flash, Fourchan, Gallery, Get, Header, IDColor, IDHighlight, ImageCommon, ImageExpand, ImageHover, ImageLoader, Index, Keybinds, Linkify, Main, MarkNewIPs, Menu, Metadata, Nav, Notice, PSAHiding, Polyfill, Post, PostHiding, PostSuccessful, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, ShimSet, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, Volume, c, d, doc, g,
|
||||||
slice = [].slice,
|
slice = [].slice,
|
||||||
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; },
|
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; },
|
||||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||||
@ -127,6 +127,7 @@
|
|||||||
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
'Announcement Hiding': [true, 'Add button to hide 4chan announcements.'],
|
||||||
'Desktop Notifications': [true, 'Enables desktop notifications across various 4chan X features.'],
|
'Desktop Notifications': [true, 'Enables desktop notifications across various 4chan X features.'],
|
||||||
'404 Redirect': [true, 'Redirect dead threads and images to the archives.'],
|
'404 Redirect': [true, 'Redirect dead threads and images to the archives.'],
|
||||||
|
'Archive Report': [true, 'Enable reporting posts to supported archives.'],
|
||||||
'Except Archives from Encryption': [false, 'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'],
|
'Except Archives from Encryption': [false, 'Permit loading content from, and warningless redirects to, HTTP-only archives from HTTPS pages.'],
|
||||||
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
'Keybinds': [true, 'Bind actions to keyboard shortcuts.'],
|
||||||
'Time Formatting': [true, 'Localize and format timestamps.'],
|
'Time Formatting': [true, 'Localize and format timestamps.'],
|
||||||
@ -396,7 +397,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.10.8.10',
|
VERSION: '1.10.9.0',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -5070,18 +5071,18 @@
|
|||||||
},
|
},
|
||||||
node: function() {
|
node: function() {
|
||||||
var filter, k, key, len1, ref, ref1, result, value;
|
var filter, k, key, len1, ref, ref1, result, value;
|
||||||
if (this.isClone || this.isFetchedQuote) {
|
if (this.isClone) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (key in Filter.filters) {
|
for (key in Filter.filters) {
|
||||||
if ((value = Filter[key](this)) !== false) {
|
if ((value = Filter[key](this)) != null) {
|
||||||
ref = Filter.filters[key];
|
ref = Filter.filters[key];
|
||||||
for (k = 0, len1 = ref.length; k < len1; k++) {
|
for (k = 0, len1 = ref.length; k < len1; k++) {
|
||||||
filter = ref[k];
|
filter = ref[k];
|
||||||
if (!(result = filter(value, this.isReply))) {
|
if (!(result = filter(value, this.isReply))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (result.hide) {
|
if (result.hide && !this.isFetchedQuote) {
|
||||||
if (this.isReply) {
|
if (this.isReply) {
|
||||||
PostHiding.hide(this, result.stub);
|
PostHiding.hide(this, result.stub);
|
||||||
} else if (g.VIEW === 'index') {
|
} else if (g.VIEW === 'index') {
|
||||||
@ -5103,73 +5104,41 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: function(post) {
|
name: function(post) {
|
||||||
if ('name' in post.info) {
|
return post.info.name;
|
||||||
return post.info.name;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
uniqueID: function(post) {
|
uniqueID: function(post) {
|
||||||
if ('uniqueID' in post.info) {
|
return post.info.uniqueID;
|
||||||
return post.info.uniqueID;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
tripcode: function(post) {
|
tripcode: function(post) {
|
||||||
if ('tripcode' in post.info) {
|
return post.info.tripcode;
|
||||||
return post.info.tripcode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
capcode: function(post) {
|
capcode: function(post) {
|
||||||
if ('capcode' in post.info) {
|
return post.info.capcode;
|
||||||
return post.info.capcode;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
subject: function(post) {
|
subject: function(post) {
|
||||||
if ('subject' in post.info) {
|
return post.info.subject || void 0;
|
||||||
return post.info.subject || false;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
comment: function(post) {
|
comment: function(post) {
|
||||||
if ('comment' in post.info) {
|
return post.info.comment;
|
||||||
return post.info.comment;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
flag: function(post) {
|
flag: function(post) {
|
||||||
if ('flag' in post.info) {
|
return post.info.flag;
|
||||||
return post.info.flag;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
filename: function(post) {
|
filename: function(post) {
|
||||||
if (post.file) {
|
var ref;
|
||||||
return post.file.name;
|
return (ref = post.file) != null ? ref.name : void 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
dimensions: function(post) {
|
dimensions: function(post) {
|
||||||
var file;
|
var ref;
|
||||||
file = post.file;
|
return (ref = post.file) != null ? ref.dimensions : void 0;
|
||||||
if (file != null ? file.dimensions : void 0) {
|
|
||||||
return file.dimensions;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
filesize: function(post) {
|
filesize: function(post) {
|
||||||
if (post.file) {
|
var ref;
|
||||||
return post.file.size;
|
return (ref = post.file) != null ? ref.size : void 0;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
MD5: function(post) {
|
MD5: function(post) {
|
||||||
var ref;
|
var ref;
|
||||||
if ((ref = post.file) != null ? ref.MD5 : void 0) {
|
return (ref = post.file) != null ? ref.MD5 : void 0;
|
||||||
return post.file.MD5;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
init: function() {
|
init: function() {
|
||||||
@ -5209,7 +5178,7 @@
|
|||||||
open: function(post) {
|
open: function(post) {
|
||||||
var value;
|
var value;
|
||||||
value = Filter[type](post);
|
value = Filter[type](post);
|
||||||
return value !== false;
|
return value != null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -11444,7 +11413,7 @@
|
|||||||
},
|
},
|
||||||
subEntries: []
|
subEntries: []
|
||||||
};
|
};
|
||||||
ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
ref1 = [['Post', 'post'], ['Name', 'name'], ['Tripcode', 'tripcode'], ['Capcode', 'capcode'], ['Subject', 'subject'], ['Filename', 'filename'], ['Image MD5', 'MD5']];
|
||||||
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
for (k = 0, len1 = ref1.length; k < len1; k++) {
|
||||||
type = ref1[k];
|
type = ref1[k];
|
||||||
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
entry.subEntries.push(this.createSubEntry(type[0], type[1]));
|
||||||
@ -11711,17 +11680,19 @@
|
|||||||
el: a,
|
el: a,
|
||||||
order: 10,
|
order: 10,
|
||||||
open: function(post) {
|
open: function(post) {
|
||||||
ReportLink.post = post;
|
ReportLink.url = !post.isDead ? "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post : Conf['Archive Report'] ? Redirect.to('report', {
|
||||||
return !post.isDead;
|
boardID: post.board.ID,
|
||||||
|
postID: post.ID
|
||||||
|
}) : void 0;
|
||||||
|
return !!ReportLink.url;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
report: function() {
|
report: function() {
|
||||||
var id, post, set, url;
|
var id, set, url;
|
||||||
post = ReportLink.post;
|
url = ReportLink.url;
|
||||||
url = "//sys.4chan.org/" + post.board + "/imgboard.php?mode=report&no=" + post;
|
|
||||||
id = Date.now();
|
id = Date.now();
|
||||||
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=285";
|
set = "toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=685,height=320";
|
||||||
return window.open(url, id, set);
|
return window.open(url, id, set);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -13414,7 +13385,8 @@
|
|||||||
o = {
|
o = {
|
||||||
thread: {},
|
thread: {},
|
||||||
post: {},
|
post: {},
|
||||||
file: {}
|
file: {},
|
||||||
|
report: {}
|
||||||
};
|
};
|
||||||
archives = {};
|
archives = {};
|
||||||
ref = Redirect.archives;
|
ref = Redirect.archives;
|
||||||
@ -13424,17 +13396,19 @@
|
|||||||
archives[name] = data;
|
archives[name] = data;
|
||||||
for (q = 0, len2 = boards.length; q < len2; q++) {
|
for (q = 0, len2 = boards.length; q < len2; q++) {
|
||||||
boardID = boards[q];
|
boardID = boards[q];
|
||||||
if (!(!withCredentials)) {
|
if (!withCredentials) {
|
||||||
continue;
|
if (!(boardID in o.thread)) {
|
||||||
|
o.thread[boardID] = data;
|
||||||
|
}
|
||||||
|
if (!(boardID in o.post || software !== 'foolfuuka')) {
|
||||||
|
o.post[boardID] = data;
|
||||||
|
}
|
||||||
|
if (!(boardID in o.file || indexOf.call(files, boardID) < 0)) {
|
||||||
|
o.file[boardID] = data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!(boardID in o.thread)) {
|
if (name === 'fgts') {
|
||||||
o.thread[boardID] = data;
|
o.report[boardID] = data;
|
||||||
}
|
|
||||||
if (!(boardID in o.post || software !== 'foolfuuka')) {
|
|
||||||
o.post[boardID] = data;
|
|
||||||
}
|
|
||||||
if (!(boardID in o.file || indexOf.call(files, boardID) < 0)) {
|
|
||||||
o.file[boardID] = data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -13509,10 +13483,20 @@
|
|||||||
var boardID, path, type, value;
|
var boardID, path, type, value;
|
||||||
boardID = arg.boardID, type = arg.type, value = arg.value;
|
boardID = arg.boardID, type = arg.type, value = arg.value;
|
||||||
type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type;
|
type = type === 'name' ? 'username' : type === 'MD5' ? 'image' : type;
|
||||||
|
if (type === 'capcode') {
|
||||||
|
value = {
|
||||||
|
'Developer': 'dev'
|
||||||
|
}[value] || value.toLowerCase();
|
||||||
|
}
|
||||||
value = encodeURIComponent(value);
|
value = encodeURIComponent(value);
|
||||||
path = archive.software === 'foolfuuka' ? boardID + "/search/" + type + "/" + value : boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
|
path = archive.software === 'foolfuuka' ? boardID + "/search/" + type + "/" + value : boardID + "/?task=search2&search_" + (type === 'image' ? 'media_hash' : type) + "=" + value;
|
||||||
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
|
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
|
||||||
},
|
},
|
||||||
|
report: function(archive, arg) {
|
||||||
|
var boardID, postID;
|
||||||
|
boardID = arg.boardID, postID = arg.postID;
|
||||||
|
return "https://so.fgts.jp/report/?board=" + boardID + "&no=" + postID;
|
||||||
|
},
|
||||||
securityCheck: function(URL) {
|
securityCheck: function(URL) {
|
||||||
return /^https:\/\//.test(URL) || location.protocol === 'http:' || Conf['Except Archives from Encryption'];
|
return /^https:\/\//.test(URL) || location.protocol === 'http:' || Conf['Except Archives from Encryption'];
|
||||||
},
|
},
|
||||||
@ -15232,6 +15216,38 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Report = {
|
||||||
|
init: function() {
|
||||||
|
var match, postID;
|
||||||
|
if (!(Conf['Archive Report'] && /\bmode=report\b/.test(location.search))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(match = location.search.match(/\bno=(\d+)/))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
postID = +match[1];
|
||||||
|
Redirect.init();
|
||||||
|
if (this.archive = Redirect.to('report', {
|
||||||
|
boardID: g.BOARD.ID,
|
||||||
|
postID: postID
|
||||||
|
})) {
|
||||||
|
return $.ready(this.ready);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ready: function() {
|
||||||
|
var link, message;
|
||||||
|
if ((message = $('h3')) && /Report submitted!/.test(message.textContent)) {
|
||||||
|
location.replace(Report.archive);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
link = $.el('a', {
|
||||||
|
href: Report.archive,
|
||||||
|
textContent: 'Report to fgts'
|
||||||
|
});
|
||||||
|
return $.add(d.body, [$.tn(' ['), link, $.tn(']')]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Time = {
|
Time = {
|
||||||
init: function() {
|
init: function() {
|
||||||
var ref;
|
var ref;
|
||||||
@ -16100,6 +16116,7 @@
|
|||||||
case 'a.4cdn.org':
|
case 'a.4cdn.org':
|
||||||
return;
|
return;
|
||||||
case 'sys.4chan.org':
|
case 'sys.4chan.org':
|
||||||
|
Report.init();
|
||||||
if (g.VIEW === 'post') {
|
if (g.VIEW === 'post') {
|
||||||
PostSuccessful.init();
|
PostSuccessful.init();
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.8.10' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.10.9.0' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.8.10' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.10.9.0' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
"version": "1.10.8.10",
|
"version": "1.10.9.0",
|
||||||
"date": "2015-04-14T03:57:38.704Z",
|
"date": "2015-04-15T09:10:25.239Z",
|
||||||
"repo": "https://github.com/ccd0/4chan-x/",
|
"repo": "https://github.com/ccd0/4chan-x/",
|
||||||
"page": "https://github.com/ccd0/4chan-x",
|
"page": "https://github.com/ccd0/4chan-x",
|
||||||
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
"downloads": "https://ccd0.github.io/4chan-x/builds/",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user