diff --git a/CHANGELOG.md b/CHANGELOG.md
index abfdda9c4..1c13c7154 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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).
+### 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.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")]
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index e7831a525..c8ba0bbd1 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index 59ca82a34..106510046 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.21.5
+// @version 1.11.22.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index 7e1948df2..8c7815db4 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
-// @version 1.11.21.5
+// @version 1.11.22.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -309,7 +309,7 @@
filesize: '',
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: {
werk: false
},
@@ -434,7 +434,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.21.5',
+ VERSION: '1.11.22.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -552,6 +552,7 @@
extra = {};
}
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();
type || (type = form && 'post' || 'get');
try {
@@ -1079,7 +1080,7 @@
});
};
$.forceSync = function() {};
- } else if ($.hasStorage) {
+ } else if ((typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) || $.hasStorage) {
$.sync = function(key, cb) {
key = g.NAMESPACE + key;
$.syncing[key] = cb;
@@ -5109,6 +5110,7 @@
if (headers == null) {
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 || (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);
@@ -16525,7 +16527,7 @@
}
$.after(passAd, [
$.tn('] ['), $.el('a', {
- href: 'mailto:4chanpass@4chan.org',
+ href: 'mailto:4chanpass@4chan.org?subject=4chan%20Pass%20-%20Purchase%20Support',
textContent: 'Email 4chan',
target: '_blank'
})
@@ -16877,7 +16879,7 @@
return $.onExists(doc, '.ad-cnt', function(ad) {
return $.onExists(ad, 'img', function() {
return cb($.el('li', {
- innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
+ innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
}));
});
});
@@ -17157,17 +17159,20 @@
}
},
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 = {};
+ set = function(key, value) {
+ return data[key] = changes[key] = value;
+ };
compareString = version.replace(/\d+/g, function(x) {
return ('0000' + x).slice(-5);
});
if (compareString < '00001.00011.00008.00000') {
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) {
- 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') {
@@ -17185,8 +17190,7 @@
"fireden.net": 24,
"disabled": null
};
- changes['selectedArchives'] = data['selectedArchives'];
- ref2 = changes['selectedArchives'];
+ ref2 = data['selectedArchives'];
for (boardID in ref2) {
record = ref2[boardID];
for (type in record) {
@@ -17196,12 +17200,13 @@
}
}
}
+ set('selectedArchives', data['selectedArchives']);
}
}
if (compareString < '00001.00011.00016.00000') {
if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[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++) {
key = ref3[k];
if (data[key] == null) {
- changes[key] = key === 'Persistent QR';
+ set(key, key === 'Persistent QR');
}
}
}
if (compareString < '00001.00011.00017.00006') {
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) {
@@ -17234,18 +17239,19 @@
for (key in ref4) {
value = ref4[key];
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 (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;
@@ -17254,7 +17260,7 @@
if (data.version.split('.')[0] === '2') {
data = Settings.convertFrom.loadletter(data);
} 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) {
if (err) {
@@ -17671,11 +17677,8 @@
upgrade: function(items) {
var changes, previousversion;
previousversion = items.previousversion;
- changes = {
- previousversion: g.VERSION
- };
- $.extend(changes, Settings.upgrade(items, previousversion));
- $.extend(items, changes);
+ changes = Settings.upgrade(items, previousversion);
+ items.previousversion = changes.previousversion = g.VERSION;
return $.set(changes, function() {
var el, ref;
if ((ref = items['Show Updated Notifications']) != null ? ref : true) {
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index ff37eb3ca..956691ba4 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index 5881030ec..8773a73ad 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.21.5
+// @version 1.11.22.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -309,7 +309,7 @@
filesize: '',
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: {
werk: false
},
@@ -434,7 +434,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.21.5',
+ VERSION: '1.11.22.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -552,6 +552,7 @@
extra = {};
}
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();
type || (type = form && 'post' || 'get');
try {
@@ -1079,7 +1080,7 @@
});
};
$.forceSync = function() {};
- } else if ($.hasStorage) {
+ } else if ((typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) || $.hasStorage) {
$.sync = function(key, cb) {
key = g.NAMESPACE + key;
$.syncing[key] = cb;
@@ -5109,6 +5110,7 @@
if (headers == null) {
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 || (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);
@@ -16525,7 +16527,7 @@
}
$.after(passAd, [
$.tn('] ['), $.el('a', {
- href: 'mailto:4chanpass@4chan.org',
+ href: 'mailto:4chanpass@4chan.org?subject=4chan%20Pass%20-%20Purchase%20Support',
textContent: 'Email 4chan',
target: '_blank'
})
@@ -16877,7 +16879,7 @@
return $.onExists(doc, '.ad-cnt', function(ad) {
return $.onExists(ad, 'img', function() {
return cb($.el('li', {
- innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
+ innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
}));
});
});
@@ -17157,17 +17159,20 @@
}
},
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 = {};
+ set = function(key, value) {
+ return data[key] = changes[key] = value;
+ };
compareString = version.replace(/\d+/g, function(x) {
return ('0000' + x).slice(-5);
});
if (compareString < '00001.00011.00008.00000') {
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) {
- 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') {
@@ -17185,8 +17190,7 @@
"fireden.net": 24,
"disabled": null
};
- changes['selectedArchives'] = data['selectedArchives'];
- ref2 = changes['selectedArchives'];
+ ref2 = data['selectedArchives'];
for (boardID in ref2) {
record = ref2[boardID];
for (type in record) {
@@ -17196,12 +17200,13 @@
}
}
}
+ set('selectedArchives', data['selectedArchives']);
}
}
if (compareString < '00001.00011.00016.00000') {
if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[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++) {
key = ref3[k];
if (data[key] == null) {
- changes[key] = key === 'Persistent QR';
+ set(key, key === 'Persistent QR');
}
}
}
if (compareString < '00001.00011.00017.00006') {
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) {
@@ -17234,18 +17239,19 @@
for (key in ref4) {
value = ref4[key];
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 (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;
@@ -17254,7 +17260,7 @@
if (data.version.split('.')[0] === '2') {
data = Settings.convertFrom.loadletter(data);
} 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) {
if (err) {
@@ -17671,11 +17677,8 @@
upgrade: function(items) {
var changes, previousversion;
previousversion = items.previousversion;
- changes = {
- previousversion: g.VERSION
- };
- $.extend(changes, Settings.upgrade(items, previousversion));
- $.extend(items, changes);
+ changes = Settings.upgrade(items, previousversion);
+ items.previousversion = changes.previousversion = g.VERSION;
return $.set(changes, function() {
var el, ref;
if ((ref = items['Show Updated Notifications']) != null ? ref : true) {
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 567a7ae53..b1c022422 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index 2dc76d7d3..5546f0f92 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.11.21.5
+// @version 1.11.22.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index dc7c29041..b2960b0d0 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
-// @version 1.11.21.5
+// @version 1.11.22.0
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -309,7 +309,7 @@
filesize: '',
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: {
werk: false
},
@@ -434,7 +434,7 @@
doc = d.documentElement;
g = {
- VERSION: '1.11.21.5',
+ VERSION: '1.11.22.0',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -552,6 +552,7 @@
extra = {};
}
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();
type || (type = form && 'post' || 'get');
try {
@@ -1079,7 +1080,7 @@
});
};
$.forceSync = function() {};
- } else if ($.hasStorage) {
+ } else if ((typeof GM_deleteValue !== "undefined" && GM_deleteValue !== null) || $.hasStorage) {
$.sync = function(key, cb) {
key = g.NAMESPACE + key;
$.syncing[key] = cb;
@@ -5109,6 +5110,7 @@
if (headers == null) {
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 || (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);
@@ -16525,7 +16527,7 @@
}
$.after(passAd, [
$.tn('] ['), $.el('a', {
- href: 'mailto:4chanpass@4chan.org',
+ href: 'mailto:4chanpass@4chan.org?subject=4chan%20Pass%20-%20Purchase%20Support',
textContent: 'Email 4chan',
target: '_blank'
})
@@ -16877,7 +16879,7 @@
return $.onExists(doc, '.ad-cnt', function(ad) {
return $.onExists(ad, 'img', function() {
return cb($.el('li', {
- innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
+ innerHTML: "To protect yourself from malicious ads, you should block ads on 4chan."
}));
});
});
@@ -17157,17 +17159,20 @@
}
},
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 = {};
+ set = function(key, value) {
+ return data[key] = changes[key] = value;
+ };
compareString = version.replace(/\d+/g, function(x) {
return ('0000' + x).slice(-5);
});
if (compareString < '00001.00011.00008.00000') {
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) {
- 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') {
@@ -17185,8 +17190,7 @@
"fireden.net": 24,
"disabled": null
};
- changes['selectedArchives'] = data['selectedArchives'];
- ref2 = changes['selectedArchives'];
+ ref2 = data['selectedArchives'];
for (boardID in ref2) {
record = ref2[boardID];
for (type in record) {
@@ -17196,12 +17200,13 @@
}
}
}
+ set('selectedArchives', data['selectedArchives']);
}
}
if (compareString < '00001.00011.00016.00000') {
if ((rice = Config['usercss'].match(/\/\* Board title rice \*\/(?:\n.+)*/)[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++) {
key = ref3[k];
if (data[key] == null) {
- changes[key] = key === 'Persistent QR';
+ set(key, key === 'Persistent QR');
}
}
}
if (compareString < '00001.00011.00017.00006') {
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) {
@@ -17234,18 +17239,19 @@
for (key in ref4) {
value = ref4[key];
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 (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;
@@ -17254,7 +17260,7 @@
if (data.version.split('.')[0] === '2') {
data = Settings.convertFrom.loadletter(data);
} 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) {
if (err) {
@@ -17671,11 +17677,8 @@
upgrade: function(items) {
var changes, previousversion;
previousversion = items.previousversion;
- changes = {
- previousversion: g.VERSION
- };
- $.extend(changes, Settings.upgrade(items, previousversion));
- $.extend(items, changes);
+ changes = Settings.upgrade(items, previousversion);
+ items.previousversion = changes.previousversion = g.VERSION;
return $.set(changes, function() {
var el, ref;
if ((ref = items['Show Updated Notifications']) != null ? ref : true) {
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index aff6411c6..e74765fd9 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index 0e98d4563..293c58d96 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index 978e6a9b5..a91489a47 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index 1a8b1dcaa..afb3bc790 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.11.21.5",
- "date": "2015-12-25T05:26:40.066Z"
+ "version": "1.11.22.0",
+ "date": "2016-01-11T01:04:20.341Z"
}