Release 4chan X v1.11.22.0.

This commit is contained in:
ccd0 2016-01-10 17:05:08 -08:00
parent afbd1142fc
commit 1794e4254a
13 changed files with 104 additions and 87 deletions

View File

@ -2,6 +2,14 @@
Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0). Sometimes the changelog has notes (not comprehensive) acknowledging people's work. This does not mean the changes are their fault, only that their code was used. All changes to the script are chosen by and the fault of the maintainer (ccd0).
### v1.11.22
**v1.11.22.0** *(2016-01-10)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.22.0/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.22.0/builds/4chan-X-noupdate.crx "Chromium version")]
- Based on v1.11.21.5.
- Disable safe search in Google image search links.
- Work around EasyList false positives on /adv/.
- Minor bugfixes.
### v1.11.21 ### v1.11.21
**v1.11.21.5** *(2015-12-24)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.21.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.21.5/builds/4chan-X-noupdate.crx "Chromium version")] **v1.11.21.5** *(2015-12-24)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.21.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.21.5/builds/4chan-X-noupdate.crx "Chromium version")]

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.11.21.5 // @version 1.11.22.0
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X beta // @name 4chan X beta
// @version 1.11.21.5 // @version 1.11.22.0
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -309,7 +309,7 @@
filesize: '', filesize: '',
MD5: '' MD5: ''
}, },
sauces: "https://www.google.com/searchbyimage?image_url=%IMG%3Fs.jpg\n//iqdb.org/?url=%IMG\nhttp://eye.swfchan.com/search/?q=%name;types:swf;sandbox\n#//tineye.com/search?url=%IMG\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//saucenao.com/search.php?url=%IMG\n#http://3d.iqdb.org/?url=%IMG\n# tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n# uploaders:\n#//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur\n# \"View Same\" in archives:\n#https://archive.4plebs.org/_/search/image/%MD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%MD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/?task=search2&search_media_hash=%MD5;text:View same on RBT /%board/;boards:cgl,g,mu,qa,w", sauces: "https://www.google.com/searchbyimage?image_url=%IMG&safe=off\n//iqdb.org/?url=%IMG\nhttp://eye.swfchan.com/search/?q=%name;types:swf;sandbox\n#//tineye.com/search?url=%IMG\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//saucenao.com/search.php?url=%IMG\n#http://3d.iqdb.org/?url=%IMG\n# tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n# uploaders:\n#//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur\n# \"View Same\" in archives:\n#https://archive.4plebs.org/_/search/image/%MD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%MD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/?task=search2&search_media_hash=%MD5;text:View same on RBT /%board/;boards:cgl,g,mu,qa,w",
FappeT: { FappeT: {
werk: false werk: false
}, },
@ -434,7 +434,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.11.21.5', VERSION: '1.11.22.0',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -552,6 +552,7 @@
extra = {}; extra = {};
} }
type = extra.type, whenModified = extra.whenModified, upCallbacks = extra.upCallbacks, form = extra.form; type = extra.type, whenModified = extra.whenModified, upCallbacks = extra.upCallbacks, form = extra.form;
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
r = new XMLHttpRequest(); r = new XMLHttpRequest();
type || (type = form && 'post' || 'get'); type || (type = form && 'post' || 'get');
try { try {
@ -1079,7 +1080,7 @@
}); });
}; };
$.forceSync = function() {}; $.forceSync = function() {};
} else if ($.hasStorage) { } else if ((typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) || $.hasStorage) {
$.sync = function(key, cb) { $.sync = function(key, cb) {
key = g.NAMESPACE + key; key = g.NAMESPACE + key;
$.syncing[key] = cb; $.syncing[key] = cb;
@ -5109,6 +5110,7 @@
if (headers == null) { if (headers == null) {
headers = {}; headers = {};
} }
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version);
workaround || (workaround = /PaleMoon\//.test(navigator.userAgent)); workaround || (workaround = /PaleMoon\//.test(navigator.userAgent));
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null); workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
@ -16525,7 +16527,7 @@
} }
$.after(passAd, [ $.after(passAd, [
$.tn('] ['), $.el('a', { $.tn('] ['), $.el('a', {
href: 'mailto:4chanpass@4chan.org', href: 'mailto:4chanpass@4chan.org?subject=4chan%20Pass%20-%20Purchase%20Support',
textContent: 'Email 4chan', textContent: 'Email 4chan',
target: '_blank' target: '_blank'
}) })
@ -16877,7 +16879,7 @@
return $.onExists(doc, '.ad-cnt', function(ad) { return $.onExists(doc, '.ad-cnt', function(ad) {
return $.onExists(ad, 'img', function() { return $.onExists(ad, 'img', function() {
return cb($.el('li', { return cb($.el('li', {
innerHTML: "To protect yourself from <a href=\"//boards.4chan.org/qa/thread/362590\" target=\"_blank\">malicious ads</a>, you should <a href=\"https://github.com/gorhill/uBlock\" target=\"_blank\">block ads</a> on 4chan." innerHTML: "To protect yourself from <a href=\"https://archive.rebeccablacktech.com/qa/thread/362590\" target=\"_blank\">malicious ads</a>, you should <a href=\"https://github.com/gorhill/uBlock#ublock-origin\" target=\"_blank\">block ads</a> on 4chan."
})); }));
}); });
}); });
@ -17157,17 +17159,20 @@
} }
}, },
upgrade: function(data, version) { upgrade: function(data, version) {
var boardID, changes, compareString, k, key, len1, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, type, uids, value; var boardID, changes, compareString, k, key, len1, name, record, ref, ref1, ref2, ref3, ref4, ref5, rice, set, type, uids, value;
changes = {}; changes = {};
set = function(key, value) {
return data[key] = changes[key] = value;
};
compareString = version.replace(/\d+/g, function(x) { compareString = version.replace(/\d+/g, function(x) {
return ('0000' + x).slice(-5); return ('0000' + x).slice(-5);
}); });
if (compareString < '00001.00011.00008.00000') { if (compareString < '00001.00011.00008.00000') {
if (data['Fixed Thread Watcher'] == null) { if (data['Fixed Thread Watcher'] == null) {
changes['Fixed Thread Watcher'] = (ref = data['Toggleable Thread Watcher']) != null ? ref : true; set('Fixed Thread Watcher', (ref = data['Toggleable Thread Watcher']) != null ? ref : true);
} }
if (data['Exempt Archives from Encryption'] == null) { if (data['Exempt Archives from Encryption'] == null) {
changes['Exempt Archives from Encryption'] = (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false; set('Exempt Archives from Encryption', (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false);
} }
} }
if (compareString < '00001.00011.00010.00001') { if (compareString < '00001.00011.00010.00001') {
@ -17185,8 +17190,7 @@
"fireden.net": 24, "fireden.net": 24,
"disabled": null "disabled": null
}; };
changes['selectedArchives'] = data['selectedArchives']; ref2 = data['selectedArchives'];
ref2 = changes['selectedArchives'];
for (boardID in ref2) { for (boardID in ref2) {
record = ref2[boardID]; record = ref2[boardID];
for (type in record) { for (type in record) {
@ -17196,12 +17200,13 @@
} }
} }
} }
set('selectedArchives', data['selectedArchives']);
} }
} }
if (compareString < '00001.00011.00016.00000') { if (compareString < '00001.00011.00016.00000') {
if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0])) { if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0])) {
if ((data['usercss'] != null) && data['usercss'].indexOf(rice) < 0) { if ((data['usercss'] != null) && data['usercss'].indexOf(rice) < 0) {
changes['usercss'] = rice + '\n\n' + data['usercss']; set('usercss', rice + '\n\n' + data['usercss']);
} }
} }
} }
@ -17210,13 +17215,13 @@
for (k = 0, len1 = ref3.length; k < len1; k++) { for (k = 0, len1 = ref3.length; k < len1; k++) {
key = ref3[k]; key = ref3[k];
if (data[key] == null) { if (data[key] == null) {
changes[key] = key === 'Persistent QR'; set(key, key === 'Persistent QR');
} }
} }
} }
if (compareString < '00001.00011.00017.00006') { if (compareString < '00001.00011.00017.00006') {
if (data['sauces'] != null) { if (data['sauces'] != null) {
changes['sauces'] = data['sauces'].replace(/^(#?\s*)http:\/\/iqdb\.org\//mg, '$1//iqdb.org/'); set('sauces', data['sauces'].replace(/^(#?\s*)http:\/\/iqdb\.org\//mg, '$1//iqdb.org/'));
} }
} }
if (compareString < '00001.00011.00019.00003' && !Settings.overlay) { if (compareString < '00001.00011.00019.00003' && !Settings.overlay) {
@ -17234,18 +17239,19 @@
for (key in ref4) { for (key in ref4) {
value = ref4[key]; value = ref4[key];
if (data[key] == null) { if (data[key] == null) {
changes[key] = value; set(key, value);
} }
} }
} }
if (compareString < '00001.00011.00020.00004' || compareString === '00001.00011.00021.00000') {
if (data['sauces'] != null) {
changes['sauces'] = ((ref5 = changes['sauces']) != null ? ref5 : data['sauces']).replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL)(?=$|;)/mg, '$&%3Fs.jpg');
}
}
if (compareString < '00001.00011.00021.00003') { if (compareString < '00001.00011.00021.00003') {
if (data['Remember Your Posts'] == null) { if (data['Remember Your Posts'] == null) {
changes['Remember Your Posts'] = (ref6 = data['Mark Quotes of You']) != null ? ref6 : true; set('Remember Your Posts', (ref5 = data['Mark Quotes of You']) != null ? ref5 : true);
}
}
if (compareString < '00001.00011.00022.00000') {
if (data['sauces'] != null) {
set('sauces', data['sauces'].replace(/^(#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL))%3Fs\.jpg/mg, '$1'));
set('sauces', data['sauces'].replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|T?URL)(?=$|;)/mg, '$&&safe=off'));
} }
} }
return changes; return changes;
@ -17254,7 +17260,7 @@
if (data.version.split('.')[0] === '2') { if (data.version.split('.')[0] === '2') {
data = Settings.convertFrom.loadletter(data); data = Settings.convertFrom.loadletter(data);
} else if (data.version !== g.VERSION) { } else if (data.version !== g.VERSION) {
$.extend(data.Conf, Settings.upgrade(data.Conf, data.version)); Settings.upgrade(data.Conf, data.version);
} }
return $.clear(function(err) { return $.clear(function(err) {
if (err) { if (err) {
@ -17671,11 +17677,8 @@
upgrade: function(items) { upgrade: function(items) {
var changes, previousversion; var changes, previousversion;
previousversion = items.previousversion; previousversion = items.previousversion;
changes = { changes = Settings.upgrade(items, previousversion);
previousversion: g.VERSION items.previousversion = changes.previousversion = g.VERSION;
};
$.extend(changes, Settings.upgrade(items, previousversion));
$.extend(items, changes);
return $.set(changes, function() { return $.set(changes, function() {
var el, ref; var el, ref;
if ((ref = items['Show Updated Notifications']) != null ? ref : true) { if ((ref = items['Show Updated Notifications']) != null ? ref : true) {

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.11.21.5 // @version 1.11.22.0
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -309,7 +309,7 @@
filesize: '', filesize: '',
MD5: '' MD5: ''
}, },
sauces: "https://www.google.com/searchbyimage?image_url=%IMG%3Fs.jpg\n//iqdb.org/?url=%IMG\nhttp://eye.swfchan.com/search/?q=%name;types:swf;sandbox\n#//tineye.com/search?url=%IMG\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//saucenao.com/search.php?url=%IMG\n#http://3d.iqdb.org/?url=%IMG\n# tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n# uploaders:\n#//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur\n# \"View Same\" in archives:\n#https://archive.4plebs.org/_/search/image/%MD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%MD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/?task=search2&search_media_hash=%MD5;text:View same on RBT /%board/;boards:cgl,g,mu,qa,w", sauces: "https://www.google.com/searchbyimage?image_url=%IMG&safe=off\n//iqdb.org/?url=%IMG\nhttp://eye.swfchan.com/search/?q=%name;types:swf;sandbox\n#//tineye.com/search?url=%IMG\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//saucenao.com/search.php?url=%IMG\n#http://3d.iqdb.org/?url=%IMG\n# tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n# uploaders:\n#//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur\n# \"View Same\" in archives:\n#https://archive.4plebs.org/_/search/image/%MD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%MD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/?task=search2&search_media_hash=%MD5;text:View same on RBT /%board/;boards:cgl,g,mu,qa,w",
FappeT: { FappeT: {
werk: false werk: false
}, },
@ -434,7 +434,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.11.21.5', VERSION: '1.11.22.0',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -552,6 +552,7 @@
extra = {}; extra = {};
} }
type = extra.type, whenModified = extra.whenModified, upCallbacks = extra.upCallbacks, form = extra.form; type = extra.type, whenModified = extra.whenModified, upCallbacks = extra.upCallbacks, form = extra.form;
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
r = new XMLHttpRequest(); r = new XMLHttpRequest();
type || (type = form && 'post' || 'get'); type || (type = form && 'post' || 'get');
try { try {
@ -1079,7 +1080,7 @@
}); });
}; };
$.forceSync = function() {}; $.forceSync = function() {};
} else if ($.hasStorage) { } else if ((typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) || $.hasStorage) {
$.sync = function(key, cb) { $.sync = function(key, cb) {
key = g.NAMESPACE + key; key = g.NAMESPACE + key;
$.syncing[key] = cb; $.syncing[key] = cb;
@ -5109,6 +5110,7 @@
if (headers == null) { if (headers == null) {
headers = {}; headers = {};
} }
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version);
workaround || (workaround = /PaleMoon\//.test(navigator.userAgent)); workaround || (workaround = /PaleMoon\//.test(navigator.userAgent));
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null); workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
@ -16525,7 +16527,7 @@
} }
$.after(passAd, [ $.after(passAd, [
$.tn('] ['), $.el('a', { $.tn('] ['), $.el('a', {
href: 'mailto:4chanpass@4chan.org', href: 'mailto:4chanpass@4chan.org?subject=4chan%20Pass%20-%20Purchase%20Support',
textContent: 'Email 4chan', textContent: 'Email 4chan',
target: '_blank' target: '_blank'
}) })
@ -16877,7 +16879,7 @@
return $.onExists(doc, '.ad-cnt', function(ad) { return $.onExists(doc, '.ad-cnt', function(ad) {
return $.onExists(ad, 'img', function() { return $.onExists(ad, 'img', function() {
return cb($.el('li', { return cb($.el('li', {
innerHTML: "To protect yourself from <a href=\"//boards.4chan.org/qa/thread/362590\" target=\"_blank\">malicious ads</a>, you should <a href=\"https://github.com/gorhill/uBlock\" target=\"_blank\">block ads</a> on 4chan." innerHTML: "To protect yourself from <a href=\"https://archive.rebeccablacktech.com/qa/thread/362590\" target=\"_blank\">malicious ads</a>, you should <a href=\"https://github.com/gorhill/uBlock#ublock-origin\" target=\"_blank\">block ads</a> on 4chan."
})); }));
}); });
}); });
@ -17157,17 +17159,20 @@
} }
}, },
upgrade: function(data, version) { upgrade: function(data, version) {
var boardID, changes, compareString, k, key, len1, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, type, uids, value; var boardID, changes, compareString, k, key, len1, name, record, ref, ref1, ref2, ref3, ref4, ref5, rice, set, type, uids, value;
changes = {}; changes = {};
set = function(key, value) {
return data[key] = changes[key] = value;
};
compareString = version.replace(/\d+/g, function(x) { compareString = version.replace(/\d+/g, function(x) {
return ('0000' + x).slice(-5); return ('0000' + x).slice(-5);
}); });
if (compareString < '00001.00011.00008.00000') { if (compareString < '00001.00011.00008.00000') {
if (data['Fixed Thread Watcher'] == null) { if (data['Fixed Thread Watcher'] == null) {
changes['Fixed Thread Watcher'] = (ref = data['Toggleable Thread Watcher']) != null ? ref : true; set('Fixed Thread Watcher', (ref = data['Toggleable Thread Watcher']) != null ? ref : true);
} }
if (data['Exempt Archives from Encryption'] == null) { if (data['Exempt Archives from Encryption'] == null) {
changes['Exempt Archives from Encryption'] = (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false; set('Exempt Archives from Encryption', (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false);
} }
} }
if (compareString < '00001.00011.00010.00001') { if (compareString < '00001.00011.00010.00001') {
@ -17185,8 +17190,7 @@
"fireden.net": 24, "fireden.net": 24,
"disabled": null "disabled": null
}; };
changes['selectedArchives'] = data['selectedArchives']; ref2 = data['selectedArchives'];
ref2 = changes['selectedArchives'];
for (boardID in ref2) { for (boardID in ref2) {
record = ref2[boardID]; record = ref2[boardID];
for (type in record) { for (type in record) {
@ -17196,12 +17200,13 @@
} }
} }
} }
set('selectedArchives', data['selectedArchives']);
} }
} }
if (compareString < '00001.00011.00016.00000') { if (compareString < '00001.00011.00016.00000') {
if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0])) { if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0])) {
if ((data['usercss'] != null) && data['usercss'].indexOf(rice) < 0) { if ((data['usercss'] != null) && data['usercss'].indexOf(rice) < 0) {
changes['usercss'] = rice + '\n\n' + data['usercss']; set('usercss', rice + '\n\n' + data['usercss']);
} }
} }
} }
@ -17210,13 +17215,13 @@
for (k = 0, len1 = ref3.length; k < len1; k++) { for (k = 0, len1 = ref3.length; k < len1; k++) {
key = ref3[k]; key = ref3[k];
if (data[key] == null) { if (data[key] == null) {
changes[key] = key === 'Persistent QR'; set(key, key === 'Persistent QR');
} }
} }
} }
if (compareString < '00001.00011.00017.00006') { if (compareString < '00001.00011.00017.00006') {
if (data['sauces'] != null) { if (data['sauces'] != null) {
changes['sauces'] = data['sauces'].replace(/^(#?\s*)http:\/\/iqdb\.org\//mg, '$1//iqdb.org/'); set('sauces', data['sauces'].replace(/^(#?\s*)http:\/\/iqdb\.org\//mg, '$1//iqdb.org/'));
} }
} }
if (compareString < '00001.00011.00019.00003' && !Settings.overlay) { if (compareString < '00001.00011.00019.00003' && !Settings.overlay) {
@ -17234,18 +17239,19 @@
for (key in ref4) { for (key in ref4) {
value = ref4[key]; value = ref4[key];
if (data[key] == null) { if (data[key] == null) {
changes[key] = value; set(key, value);
} }
} }
} }
if (compareString < '00001.00011.00020.00004' || compareString === '00001.00011.00021.00000') {
if (data['sauces'] != null) {
changes['sauces'] = ((ref5 = changes['sauces']) != null ? ref5 : data['sauces']).replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL)(?=$|;)/mg, '$&%3Fs.jpg');
}
}
if (compareString < '00001.00011.00021.00003') { if (compareString < '00001.00011.00021.00003') {
if (data['Remember Your Posts'] == null) { if (data['Remember Your Posts'] == null) {
changes['Remember Your Posts'] = (ref6 = data['Mark Quotes of You']) != null ? ref6 : true; set('Remember Your Posts', (ref5 = data['Mark Quotes of You']) != null ? ref5 : true);
}
}
if (compareString < '00001.00011.00022.00000') {
if (data['sauces'] != null) {
set('sauces', data['sauces'].replace(/^(#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL))%3Fs\.jpg/mg, '$1'));
set('sauces', data['sauces'].replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|T?URL)(?=$|;)/mg, '$&&safe=off'));
} }
} }
return changes; return changes;
@ -17254,7 +17260,7 @@
if (data.version.split('.')[0] === '2') { if (data.version.split('.')[0] === '2') {
data = Settings.convertFrom.loadletter(data); data = Settings.convertFrom.loadletter(data);
} else if (data.version !== g.VERSION) { } else if (data.version !== g.VERSION) {
$.extend(data.Conf, Settings.upgrade(data.Conf, data.version)); Settings.upgrade(data.Conf, data.version);
} }
return $.clear(function(err) { return $.clear(function(err) {
if (err) { if (err) {
@ -17671,11 +17677,8 @@
upgrade: function(items) { upgrade: function(items) {
var changes, previousversion; var changes, previousversion;
previousversion = items.previousversion; previousversion = items.previousversion;
changes = { changes = Settings.upgrade(items, previousversion);
previousversion: g.VERSION items.previousversion = changes.previousversion = g.VERSION;
};
$.extend(changes, Settings.upgrade(items, previousversion));
$.extend(items, changes);
return $.set(changes, function() { return $.set(changes, function() {
var el, ref; var el, ref;
if ((ref = items['Show Updated Notifications']) != null ? ref : true) { if ((ref = items['Show Updated Notifications']) != null ? ref : true) {

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.11.21.5 // @version 1.11.22.0
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript // Generated by CoffeeScript
// ==UserScript== // ==UserScript==
// @name 4chan X // @name 4chan X
// @version 1.11.21.5 // @version 1.11.22.0
// @minGMVer 1.14 // @minGMVer 1.14
// @minFFVer 26 // @minFFVer 26
// @namespace 4chan-X // @namespace 4chan-X
@ -309,7 +309,7 @@
filesize: '', filesize: '',
MD5: '' MD5: ''
}, },
sauces: "https://www.google.com/searchbyimage?image_url=%IMG%3Fs.jpg\n//iqdb.org/?url=%IMG\nhttp://eye.swfchan.com/search/?q=%name;types:swf;sandbox\n#//tineye.com/search?url=%IMG\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//saucenao.com/search.php?url=%IMG\n#http://3d.iqdb.org/?url=%IMG\n# tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n# uploaders:\n#//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur\n# \"View Same\" in archives:\n#https://archive.4plebs.org/_/search/image/%MD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%MD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/?task=search2&search_media_hash=%MD5;text:View same on RBT /%board/;boards:cgl,g,mu,qa,w", sauces: "https://www.google.com/searchbyimage?image_url=%IMG&safe=off\n//iqdb.org/?url=%IMG\nhttp://eye.swfchan.com/search/?q=%name;types:swf;sandbox\n#//tineye.com/search?url=%IMG\n#https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG\n#//saucenao.com/search.php?url=%IMG\n#http://3d.iqdb.org/?url=%IMG\n# tools:\n#http://regex.info/exif.cgi?imgurl=%URL\n#//imgops.com/%URL;types:gif,jpg,png\n# uploaders:\n#//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur\n# \"View Same\" in archives:\n#https://archive.4plebs.org/_/search/image/%MD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%MD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/?task=search2&search_media_hash=%MD5;text:View same on RBT /%board/;boards:cgl,g,mu,qa,w",
FappeT: { FappeT: {
werk: false werk: false
}, },
@ -434,7 +434,7 @@
doc = d.documentElement; doc = d.documentElement;
g = { g = {
VERSION: '1.11.21.5', VERSION: '1.11.22.0',
NAMESPACE: '4chan X.', NAMESPACE: '4chan X.',
boards: {} boards: {}
}; };
@ -552,6 +552,7 @@
extra = {}; extra = {};
} }
type = extra.type, whenModified = extra.whenModified, upCallbacks = extra.upCallbacks, form = extra.form; type = extra.type, whenModified = extra.whenModified, upCallbacks = extra.upCallbacks, form = extra.form;
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
r = new XMLHttpRequest(); r = new XMLHttpRequest();
type || (type = form && 'post' || 'get'); type || (type = form && 'post' || 'get');
try { try {
@ -1079,7 +1080,7 @@
}); });
}; };
$.forceSync = function() {}; $.forceSync = function() {};
} else if ($.hasStorage) { } else if ((typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) || $.hasStorage) {
$.sync = function(key, cb) { $.sync = function(key, cb) {
key = g.NAMESPACE + key; key = g.NAMESPACE + key;
$.syncing[key] = cb; $.syncing[key] = cb;
@ -5109,6 +5110,7 @@
if (headers == null) { if (headers == null) {
headers = {}; headers = {};
} }
url = url.replace(/^((?:https?:)?\/\/(?:\w+\.)?4c(?:ha|d)n\.org)\/adv\//, '$1//adv/');
workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version); workaround = $.engine === 'gecko' && (typeof GM_info !== "undefined" && GM_info !== null) && /^[0-2]\.|^3\.[01](?!\d)/.test(GM_info.version);
workaround || (workaround = /PaleMoon\//.test(navigator.userAgent)); workaround || (workaround = /PaleMoon\//.test(navigator.userAgent));
workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null); workaround || (workaround = (typeof GM_info !== "undefined" && GM_info !== null ? (ref = GM_info.script) != null ? ref.includeJSB : void 0 : void 0) != null);
@ -16525,7 +16527,7 @@
} }
$.after(passAd, [ $.after(passAd, [
$.tn('] ['), $.el('a', { $.tn('] ['), $.el('a', {
href: 'mailto:4chanpass@4chan.org', href: 'mailto:4chanpass@4chan.org?subject=4chan%20Pass%20-%20Purchase%20Support',
textContent: 'Email 4chan', textContent: 'Email 4chan',
target: '_blank' target: '_blank'
}) })
@ -16877,7 +16879,7 @@
return $.onExists(doc, '.ad-cnt', function(ad) { return $.onExists(doc, '.ad-cnt', function(ad) {
return $.onExists(ad, 'img', function() { return $.onExists(ad, 'img', function() {
return cb($.el('li', { return cb($.el('li', {
innerHTML: "To protect yourself from <a href=\"//boards.4chan.org/qa/thread/362590\" target=\"_blank\">malicious ads</a>, you should <a href=\"https://github.com/gorhill/uBlock\" target=\"_blank\">block ads</a> on 4chan." innerHTML: "To protect yourself from <a href=\"https://archive.rebeccablacktech.com/qa/thread/362590\" target=\"_blank\">malicious ads</a>, you should <a href=\"https://github.com/gorhill/uBlock#ublock-origin\" target=\"_blank\">block ads</a> on 4chan."
})); }));
}); });
}); });
@ -17157,17 +17159,20 @@
} }
}, },
upgrade: function(data, version) { upgrade: function(data, version) {
var boardID, changes, compareString, k, key, len1, name, record, ref, ref1, ref2, ref3, ref4, ref5, ref6, rice, type, uids, value; var boardID, changes, compareString, k, key, len1, name, record, ref, ref1, ref2, ref3, ref4, ref5, rice, set, type, uids, value;
changes = {}; changes = {};
set = function(key, value) {
return data[key] = changes[key] = value;
};
compareString = version.replace(/\d+/g, function(x) { compareString = version.replace(/\d+/g, function(x) {
return ('0000' + x).slice(-5); return ('0000' + x).slice(-5);
}); });
if (compareString < '00001.00011.00008.00000') { if (compareString < '00001.00011.00008.00000') {
if (data['Fixed Thread Watcher'] == null) { if (data['Fixed Thread Watcher'] == null) {
changes['Fixed Thread Watcher'] = (ref = data['Toggleable Thread Watcher']) != null ? ref : true; set('Fixed Thread Watcher', (ref = data['Toggleable Thread Watcher']) != null ? ref : true);
} }
if (data['Exempt Archives from Encryption'] == null) { if (data['Exempt Archives from Encryption'] == null) {
changes['Exempt Archives from Encryption'] = (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false; set('Exempt Archives from Encryption', (ref1 = data['Except Archives from Encryption']) != null ? ref1 : false);
} }
} }
if (compareString < '00001.00011.00010.00001') { if (compareString < '00001.00011.00010.00001') {
@ -17185,8 +17190,7 @@
"fireden.net": 24, "fireden.net": 24,
"disabled": null "disabled": null
}; };
changes['selectedArchives'] = data['selectedArchives']; ref2 = data['selectedArchives'];
ref2 = changes['selectedArchives'];
for (boardID in ref2) { for (boardID in ref2) {
record = ref2[boardID]; record = ref2[boardID];
for (type in record) { for (type in record) {
@ -17196,12 +17200,13 @@
} }
} }
} }
set('selectedArchives', data['selectedArchives']);
} }
} }
if (compareString < '00001.00011.00016.00000') { if (compareString < '00001.00011.00016.00000') {
if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0])) { if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[0])) {
if ((data['usercss'] != null) && data['usercss'].indexOf(rice) < 0) { if ((data['usercss'] != null) && data['usercss'].indexOf(rice) < 0) {
changes['usercss'] = rice + '\n\n' + data['usercss']; set('usercss', rice + '\n\n' + data['usercss']);
} }
} }
} }
@ -17210,13 +17215,13 @@
for (k = 0, len1 = ref3.length; k < len1; k++) { for (k = 0, len1 = ref3.length; k < len1; k++) {
key = ref3[k]; key = ref3[k];
if (data[key] == null) { if (data[key] == null) {
changes[key] = key === 'Persistent QR'; set(key, key === 'Persistent QR');
} }
} }
} }
if (compareString < '00001.00011.00017.00006') { if (compareString < '00001.00011.00017.00006') {
if (data['sauces'] != null) { if (data['sauces'] != null) {
changes['sauces'] = data['sauces'].replace(/^(#?\s*)http:\/\/iqdb\.org\//mg, '$1//iqdb.org/'); set('sauces', data['sauces'].replace(/^(#?\s*)http:\/\/iqdb\.org\//mg, '$1//iqdb.org/'));
} }
} }
if (compareString < '00001.00011.00019.00003' && !Settings.overlay) { if (compareString < '00001.00011.00019.00003' && !Settings.overlay) {
@ -17234,18 +17239,19 @@
for (key in ref4) { for (key in ref4) {
value = ref4[key]; value = ref4[key];
if (data[key] == null) { if (data[key] == null) {
changes[key] = value; set(key, value);
} }
} }
} }
if (compareString < '00001.00011.00020.00004' || compareString === '00001.00011.00021.00000') {
if (data['sauces'] != null) {
changes['sauces'] = ((ref5 = changes['sauces']) != null ? ref5 : data['sauces']).replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL)(?=$|;)/mg, '$&%3Fs.jpg');
}
}
if (compareString < '00001.00011.00021.00003') { if (compareString < '00001.00011.00021.00003') {
if (data['Remember Your Posts'] == null) { if (data['Remember Your Posts'] == null) {
changes['Remember Your Posts'] = (ref6 = data['Mark Quotes of You']) != null ? ref6 : true; set('Remember Your Posts', (ref5 = data['Mark Quotes of You']) != null ? ref5 : true);
}
}
if (compareString < '00001.00011.00022.00000') {
if (data['sauces'] != null) {
set('sauces', data['sauces'].replace(/^(#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|URL))%3Fs\.jpg/mg, '$1'));
set('sauces', data['sauces'].replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(?:IMG|T?URL)(?=$|;)/mg, '$&&safe=off'));
} }
} }
return changes; return changes;
@ -17254,7 +17260,7 @@
if (data.version.split('.')[0] === '2') { if (data.version.split('.')[0] === '2') {
data = Settings.convertFrom.loadletter(data); data = Settings.convertFrom.loadletter(data);
} else if (data.version !== g.VERSION) { } else if (data.version !== g.VERSION) {
$.extend(data.Conf, Settings.upgrade(data.Conf, data.version)); Settings.upgrade(data.Conf, data.version);
} }
return $.clear(function(err) { return $.clear(function(err) {
if (err) { if (err) {
@ -17671,11 +17677,8 @@
upgrade: function(items) { upgrade: function(items) {
var changes, previousversion; var changes, previousversion;
previousversion = items.previousversion; previousversion = items.previousversion;
changes = { changes = Settings.upgrade(items, previousversion);
previousversion: g.VERSION items.previousversion = changes.previousversion = g.VERSION;
};
$.extend(changes, Settings.upgrade(items, previousversion));
$.extend(items, changes);
return $.set(changes, function() { return $.set(changes, function() {
var el, ref; var el, ref;
if ((ref = items['Show Updated Notifications']) != null ? ref : true) { if ((ref = items['Show Updated Notifications']) != null ? ref : true) {

Binary file not shown.

View File

@ -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://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.21.5' /> <updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.22.0' />
</app> </app>
</gupdate> </gupdate>

View File

@ -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://www.4chan-x.net/builds/4chan-X.crx' version='1.11.21.5' /> <updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.11.22.0' />
</app> </app>
</gupdate> </gupdate>

View File

@ -1,4 +1,4 @@
{ {
"version": "1.11.21.5", "version": "1.11.22.0",
"date": "2015-12-25T05:26:40.066Z" "date": "2016-01-11T01:04:20.341Z"
} }