Release 4chan X v1.11.22.1.

This commit is contained in:
ccd0 2016-01-12 02:19:40 -08:00
parent 55da327b10
commit 6cec3f5927
13 changed files with 272 additions and 99 deletions

View File

@ -4,6 +4,11 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
### v1.11.22
**v1.11.22.1** *(2016-01-12)* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.22.1/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.11.22.1/builds/4chan-X-noupdate.crx "Chromium version")]
- Update archive image search URL, avoiding problem with image search on fireden.net.
- Add `%sMD5` (MD5 in URL-safe base64) and `%hMD5` (MD5 in hexadecimal) to available sauce parameters.
- Improve Violentmonkey support.
**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.

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
// @version 1.11.22.0
// @version 1.11.22.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -309,7 +309,7 @@
filesize: '',
MD5: ''
},
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",
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/%sMD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%sMD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/image/%sMD5;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.22.0',
VERSION: '1.11.22.1',
NAMESPACE: '4chan X.',
boards: {}
};
@ -1041,7 +1041,7 @@
if (key in $.syncing) {
delete $.oldValue[key];
if ($.hasStorage) {
return delete localStorage[key];
return localStorage.removeItem(key);
}
}
};
@ -1060,7 +1060,7 @@
if (key in $.syncing) {
delete $.oldValue[key];
}
return delete localStorage[key];
return localStorage.removeItem(key);
};
} else {
$.setValue = function() {};
@ -1088,30 +1088,33 @@
};
(function() {
var onChange;
onChange = function(key) {
var cb, newValue;
onChange = function(arg) {
var cb, key, newValue;
key = arg.key, newValue = arg.newValue;
if (!(cb = $.syncing[key])) {
return;
}
newValue = $.getValue(key);
if (newValue === $.oldValue[key]) {
return;
}
if (newValue != null) {
if (newValue === $.oldValue[key]) {
return;
}
$.oldValue[key] = newValue;
return cb(JSON.parse(newValue), key.slice(g.NAMESPACE.length));
} else {
if ($.oldValue[key] == null) {
return;
}
delete $.oldValue[key];
return cb(void 0, key.slice(g.NAMESPACE.length));
}
};
$.on(window, 'storage', function(arg) {
var key;
key = arg.key;
return onChange(key);
});
$.on(window, 'storage', onChange);
return $.forceSync = function(key) {
return onChange(g.NAMESPACE + key);
key = g.NAMESPACE + key;
return onChange({
key: key,
newValue: $.getValue(key)
});
};
})();
} else {
@ -11528,23 +11531,14 @@
ext = post.file.url.match(/[^.]*$/)[0];
skip = false;
for (key in parts) {
parts[key] = parts[key].replace(/%(T?URL|IMG|MD5|board|name|%|semi)/g, function(parameter) {
parts[key] = parts[key].replace(/%(T?URL|IMG|[sh]?MD5|board|name|%|semi)/g, function(_, parameter) {
var type;
type = {
'%TURL': post.file.thumbURL,
'%URL': post.file.url,
'%IMG': ext === 'gif' || ext === 'jpg' || ext === 'png' ? post.file.url : post.file.thumbURL,
'%MD5': post.file.MD5,
'%board': post.board.ID,
'%name': post.file.name,
'%%': '%',
'%semi': ';'
}[parameter];
type = Sauce.formatters[parameter](post, ext);
if (type == null) {
skip = true;
return '';
}
if (key === 'url' && parameter !== '%%' && parameter !== '%semi') {
if (key === 'url' && (parameter !== '%' && parameter !== 'semi')) {
if (/^javascript:/i.test(parts['url'])) {
type = JSON.stringify(type);
}
@ -11591,6 +11585,60 @@
}
}
return $.add(this.file.text, nodes);
},
formatters: {
TURL: function(post) {
return post.file.thumbURL;
},
URL: function(post) {
return post.file.url;
},
IMG: function(post, ext) {
if (ext === 'gif' || ext === 'jpg' || ext === 'png') {
return post.file.url;
} else {
return post.file.thumbURL;
}
},
MD5: function(post) {
return post.file.MD5;
},
sMD5: function(post) {
var ref;
return (ref = post.file.MD5) != null ? ref.replace(/[+\/=]/g, function(c) {
return {
'+': '-',
'/': '_',
'=': ''
}[c];
}) : void 0;
},
hMD5: function(post) {
if (post.file.MD5) {
return ((function() {
var k, len1, ref, results;
ref = atob(post.file.MD5);
results = [];
for (k = 0, len1 = ref.length; k < len1; k++) {
c = ref[k];
results.push(("0" + (c.charCodeAt(0).toString(16))).slice(-2));
}
return results;
})()).join('');
}
},
board: function(post) {
return post.board.ID;
},
name: function(post) {
return post.file.name;
},
'%': function() {
return '%';
},
semi: function() {
return ';';
}
}
};
@ -14690,9 +14738,17 @@
value = {
'Developer': 'dev'
}[value] || value.toLowerCase();
} else if (type === 'image') {
value = value.replace(/[+\/=]/g, function(c) {
return {
'+': '-',
'/': '_',
'=': ''
}[c];
});
}
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 + "/" : type === 'image' ? boardID + "/image/" + value : boardID + "/?task=search2&search_" + type + "=" + value;
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
},
report: function(archive, arg) {
@ -17314,7 +17370,7 @@
sauce: function(section) {
var ta;
$.extend(section, {
innerHTML: "<div class=\"warning\"><code>Sauce</code> is disabled.</div><div>Lines starting with a <code>#</code> will be ignored.</div><div>You can specify a display text by appending <code>;text:[text]</code> to the URL.</div><div>You can specify the applicable boards by appending <code>;boards:[board1],[board2]</code>.</div><div>You can specify the applicable file types by appending <code>;types:[extension1],[extension2]</code>.</div><div>You can open links with scripts and popups disabled by appending <code>;sandbox</code>.</div><ul>These parameters will be replaced by their corresponding values:<li><code>%TURL</code>: Thumbnail URL.</li><li><code>%URL</code>: Full image URL.</li><li><code>%IMG</code>: Full image URL for GIF, JPG, and PNG; thumbnail URL for other types.</li><li><code>%MD5</code>: MD5 hash.</li><li><code>%name</code>: Original file name.</li><li><code>%board</code>: Current board.</li><li><code>%%</code>, <code>%semi</code>: Literal <code>%</code> and <code>;</code>.</li></ul><textarea name=\"sauces\" class=\"field\" spellcheck=\"false\"></textarea>"
innerHTML: "<div class=\"warning\"><code>Sauce</code> is disabled.</div><div>Lines starting with a <code>#</code> will be ignored.</div><div>You can specify a display text by appending <code>;text:[text]</code> to the URL.</div><div>You can specify the applicable boards by appending <code>;boards:[board1],[board2]</code>.</div><div>You can specify the applicable file types by appending <code>;types:[extension1],[extension2]</code>.</div><div>You can open links with scripts and popups disabled by appending <code>;sandbox</code>.</div><ul>These parameters will be replaced by their corresponding values:<li><code>%TURL</code>: Thumbnail URL.</li><li><code>%URL</code>: Full image URL.</li><li><code>%IMG</code>: Full image URL for GIF, JPG, and PNG; thumbnail URL for other types.</li><li><code>%MD5</code>: MD5 hash in base64.</li><li><code>%sMD5</code>: MD5 hash in base64 using <code>-</code> and <code>_</code>.</li><li><code>%hMD5</code>: MD5 hash in hexadecimal.</li><li><code>%name</code>: Original file name.</li><li><code>%board</code>: Current board.</li><li><code>%%</code>, <code>%semi</code>: Literal <code>%</code> and <code>;</code>.</li></ul><textarea name=\"sauces\" class=\"field\" spellcheck=\"false\"></textarea>"
});
$('.warning', section).hidden = Conf['Sauce'];
ta = $('textarea', section);

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.11.22.0
// @version 1.11.22.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -309,7 +309,7 @@
filesize: '',
MD5: ''
},
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",
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/%sMD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%sMD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/image/%sMD5;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.22.0',
VERSION: '1.11.22.1',
NAMESPACE: '4chan X.',
boards: {}
};
@ -1041,7 +1041,7 @@
if (key in $.syncing) {
delete $.oldValue[key];
if ($.hasStorage) {
return delete localStorage[key];
return localStorage.removeItem(key);
}
}
};
@ -1060,7 +1060,7 @@
if (key in $.syncing) {
delete $.oldValue[key];
}
return delete localStorage[key];
return localStorage.removeItem(key);
};
} else {
$.setValue = function() {};
@ -1088,30 +1088,33 @@
};
(function() {
var onChange;
onChange = function(key) {
var cb, newValue;
onChange = function(arg) {
var cb, key, newValue;
key = arg.key, newValue = arg.newValue;
if (!(cb = $.syncing[key])) {
return;
}
newValue = $.getValue(key);
if (newValue === $.oldValue[key]) {
return;
}
if (newValue != null) {
if (newValue === $.oldValue[key]) {
return;
}
$.oldValue[key] = newValue;
return cb(JSON.parse(newValue), key.slice(g.NAMESPACE.length));
} else {
if ($.oldValue[key] == null) {
return;
}
delete $.oldValue[key];
return cb(void 0, key.slice(g.NAMESPACE.length));
}
};
$.on(window, 'storage', function(arg) {
var key;
key = arg.key;
return onChange(key);
});
$.on(window, 'storage', onChange);
return $.forceSync = function(key) {
return onChange(g.NAMESPACE + key);
key = g.NAMESPACE + key;
return onChange({
key: key,
newValue: $.getValue(key)
});
};
})();
} else {
@ -11528,23 +11531,14 @@
ext = post.file.url.match(/[^.]*$/)[0];
skip = false;
for (key in parts) {
parts[key] = parts[key].replace(/%(T?URL|IMG|MD5|board|name|%|semi)/g, function(parameter) {
parts[key] = parts[key].replace(/%(T?URL|IMG|[sh]?MD5|board|name|%|semi)/g, function(_, parameter) {
var type;
type = {
'%TURL': post.file.thumbURL,
'%URL': post.file.url,
'%IMG': ext === 'gif' || ext === 'jpg' || ext === 'png' ? post.file.url : post.file.thumbURL,
'%MD5': post.file.MD5,
'%board': post.board.ID,
'%name': post.file.name,
'%%': '%',
'%semi': ';'
}[parameter];
type = Sauce.formatters[parameter](post, ext);
if (type == null) {
skip = true;
return '';
}
if (key === 'url' && parameter !== '%%' && parameter !== '%semi') {
if (key === 'url' && (parameter !== '%' && parameter !== 'semi')) {
if (/^javascript:/i.test(parts['url'])) {
type = JSON.stringify(type);
}
@ -11591,6 +11585,60 @@
}
}
return $.add(this.file.text, nodes);
},
formatters: {
TURL: function(post) {
return post.file.thumbURL;
},
URL: function(post) {
return post.file.url;
},
IMG: function(post, ext) {
if (ext === 'gif' || ext === 'jpg' || ext === 'png') {
return post.file.url;
} else {
return post.file.thumbURL;
}
},
MD5: function(post) {
return post.file.MD5;
},
sMD5: function(post) {
var ref;
return (ref = post.file.MD5) != null ? ref.replace(/[+\/=]/g, function(c) {
return {
'+': '-',
'/': '_',
'=': ''
}[c];
}) : void 0;
},
hMD5: function(post) {
if (post.file.MD5) {
return ((function() {
var k, len1, ref, results;
ref = atob(post.file.MD5);
results = [];
for (k = 0, len1 = ref.length; k < len1; k++) {
c = ref[k];
results.push(("0" + (c.charCodeAt(0).toString(16))).slice(-2));
}
return results;
})()).join('');
}
},
board: function(post) {
return post.board.ID;
},
name: function(post) {
return post.file.name;
},
'%': function() {
return '%';
},
semi: function() {
return ';';
}
}
};
@ -14690,9 +14738,17 @@
value = {
'Developer': 'dev'
}[value] || value.toLowerCase();
} else if (type === 'image') {
value = value.replace(/[+\/=]/g, function(c) {
return {
'+': '-',
'/': '_',
'=': ''
}[c];
});
}
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 + "/" : type === 'image' ? boardID + "/image/" + value : boardID + "/?task=search2&search_" + type + "=" + value;
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
},
report: function(archive, arg) {
@ -17314,7 +17370,7 @@
sauce: function(section) {
var ta;
$.extend(section, {
innerHTML: "<div class=\"warning\"><code>Sauce</code> is disabled.</div><div>Lines starting with a <code>#</code> will be ignored.</div><div>You can specify a display text by appending <code>;text:[text]</code> to the URL.</div><div>You can specify the applicable boards by appending <code>;boards:[board1],[board2]</code>.</div><div>You can specify the applicable file types by appending <code>;types:[extension1],[extension2]</code>.</div><div>You can open links with scripts and popups disabled by appending <code>;sandbox</code>.</div><ul>These parameters will be replaced by their corresponding values:<li><code>%TURL</code>: Thumbnail URL.</li><li><code>%URL</code>: Full image URL.</li><li><code>%IMG</code>: Full image URL for GIF, JPG, and PNG; thumbnail URL for other types.</li><li><code>%MD5</code>: MD5 hash.</li><li><code>%name</code>: Original file name.</li><li><code>%board</code>: Current board.</li><li><code>%%</code>, <code>%semi</code>: Literal <code>%</code> and <code>;</code>.</li></ul><textarea name=\"sauces\" class=\"field\" spellcheck=\"false\"></textarea>"
innerHTML: "<div class=\"warning\"><code>Sauce</code> is disabled.</div><div>Lines starting with a <code>#</code> will be ignored.</div><div>You can specify a display text by appending <code>;text:[text]</code> to the URL.</div><div>You can specify the applicable boards by appending <code>;boards:[board1],[board2]</code>.</div><div>You can specify the applicable file types by appending <code>;types:[extension1],[extension2]</code>.</div><div>You can open links with scripts and popups disabled by appending <code>;sandbox</code>.</div><ul>These parameters will be replaced by their corresponding values:<li><code>%TURL</code>: Thumbnail URL.</li><li><code>%URL</code>: Full image URL.</li><li><code>%IMG</code>: Full image URL for GIF, JPG, and PNG; thumbnail URL for other types.</li><li><code>%MD5</code>: MD5 hash in base64.</li><li><code>%sMD5</code>: MD5 hash in base64 using <code>-</code> and <code>_</code>.</li><li><code>%hMD5</code>: MD5 hash in hexadecimal.</li><li><code>%name</code>: Original file name.</li><li><code>%board</code>: Current board.</li><li><code>%%</code>, <code>%semi</code>: Literal <code>%</code> and <code>;</code>.</li></ul><textarea name=\"sauces\" class=\"field\" spellcheck=\"false\"></textarea>"
});
$('.warning', section).hidden = Conf['Sauce'];
ta = $('textarea', section);

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.11.22.0
// @version 1.11.22.1
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -309,7 +309,7 @@
filesize: '',
MD5: ''
},
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",
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/%sMD5/;text:View same on 4plebs\n#https://archive.4plebs.org/%board/search/image/%sMD5/;text:View same on 4plebs /%board/;boards:adv,f,hr,o,pol,s4s,sp,tg,trv,tv,x\n#https://rbt.asia/%board/image/%sMD5;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.22.0',
VERSION: '1.11.22.1',
NAMESPACE: '4chan X.',
boards: {}
};
@ -1041,7 +1041,7 @@
if (key in $.syncing) {
delete $.oldValue[key];
if ($.hasStorage) {
return delete localStorage[key];
return localStorage.removeItem(key);
}
}
};
@ -1060,7 +1060,7 @@
if (key in $.syncing) {
delete $.oldValue[key];
}
return delete localStorage[key];
return localStorage.removeItem(key);
};
} else {
$.setValue = function() {};
@ -1088,30 +1088,33 @@
};
(function() {
var onChange;
onChange = function(key) {
var cb, newValue;
onChange = function(arg) {
var cb, key, newValue;
key = arg.key, newValue = arg.newValue;
if (!(cb = $.syncing[key])) {
return;
}
newValue = $.getValue(key);
if (newValue === $.oldValue[key]) {
return;
}
if (newValue != null) {
if (newValue === $.oldValue[key]) {
return;
}
$.oldValue[key] = newValue;
return cb(JSON.parse(newValue), key.slice(g.NAMESPACE.length));
} else {
if ($.oldValue[key] == null) {
return;
}
delete $.oldValue[key];
return cb(void 0, key.slice(g.NAMESPACE.length));
}
};
$.on(window, 'storage', function(arg) {
var key;
key = arg.key;
return onChange(key);
});
$.on(window, 'storage', onChange);
return $.forceSync = function(key) {
return onChange(g.NAMESPACE + key);
key = g.NAMESPACE + key;
return onChange({
key: key,
newValue: $.getValue(key)
});
};
})();
} else {
@ -11528,23 +11531,14 @@
ext = post.file.url.match(/[^.]*$/)[0];
skip = false;
for (key in parts) {
parts[key] = parts[key].replace(/%(T?URL|IMG|MD5|board|name|%|semi)/g, function(parameter) {
parts[key] = parts[key].replace(/%(T?URL|IMG|[sh]?MD5|board|name|%|semi)/g, function(_, parameter) {
var type;
type = {
'%TURL': post.file.thumbURL,
'%URL': post.file.url,
'%IMG': ext === 'gif' || ext === 'jpg' || ext === 'png' ? post.file.url : post.file.thumbURL,
'%MD5': post.file.MD5,
'%board': post.board.ID,
'%name': post.file.name,
'%%': '%',
'%semi': ';'
}[parameter];
type = Sauce.formatters[parameter](post, ext);
if (type == null) {
skip = true;
return '';
}
if (key === 'url' && parameter !== '%%' && parameter !== '%semi') {
if (key === 'url' && (parameter !== '%' && parameter !== 'semi')) {
if (/^javascript:/i.test(parts['url'])) {
type = JSON.stringify(type);
}
@ -11591,6 +11585,60 @@
}
}
return $.add(this.file.text, nodes);
},
formatters: {
TURL: function(post) {
return post.file.thumbURL;
},
URL: function(post) {
return post.file.url;
},
IMG: function(post, ext) {
if (ext === 'gif' || ext === 'jpg' || ext === 'png') {
return post.file.url;
} else {
return post.file.thumbURL;
}
},
MD5: function(post) {
return post.file.MD5;
},
sMD5: function(post) {
var ref;
return (ref = post.file.MD5) != null ? ref.replace(/[+\/=]/g, function(c) {
return {
'+': '-',
'/': '_',
'=': ''
}[c];
}) : void 0;
},
hMD5: function(post) {
if (post.file.MD5) {
return ((function() {
var k, len1, ref, results;
ref = atob(post.file.MD5);
results = [];
for (k = 0, len1 = ref.length; k < len1; k++) {
c = ref[k];
results.push(("0" + (c.charCodeAt(0).toString(16))).slice(-2));
}
return results;
})()).join('');
}
},
board: function(post) {
return post.board.ID;
},
name: function(post) {
return post.file.name;
},
'%': function() {
return '%';
},
semi: function() {
return ';';
}
}
};
@ -14690,9 +14738,17 @@
value = {
'Developer': 'dev'
}[value] || value.toLowerCase();
} else if (type === 'image') {
value = value.replace(/[+\/=]/g, function(c) {
return {
'+': '-',
'/': '_',
'=': ''
}[c];
});
}
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 + "/" : type === 'image' ? boardID + "/image/" + value : boardID + "/?task=search2&search_" + type + "=" + value;
return "" + (Redirect.protocol(archive)) + archive.domain + "/" + path;
},
report: function(archive, arg) {
@ -17314,7 +17370,7 @@
sauce: function(section) {
var ta;
$.extend(section, {
innerHTML: "<div class=\"warning\"><code>Sauce</code> is disabled.</div><div>Lines starting with a <code>#</code> will be ignored.</div><div>You can specify a display text by appending <code>;text:[text]</code> to the URL.</div><div>You can specify the applicable boards by appending <code>;boards:[board1],[board2]</code>.</div><div>You can specify the applicable file types by appending <code>;types:[extension1],[extension2]</code>.</div><div>You can open links with scripts and popups disabled by appending <code>;sandbox</code>.</div><ul>These parameters will be replaced by their corresponding values:<li><code>%TURL</code>: Thumbnail URL.</li><li><code>%URL</code>: Full image URL.</li><li><code>%IMG</code>: Full image URL for GIF, JPG, and PNG; thumbnail URL for other types.</li><li><code>%MD5</code>: MD5 hash.</li><li><code>%name</code>: Original file name.</li><li><code>%board</code>: Current board.</li><li><code>%%</code>, <code>%semi</code>: Literal <code>%</code> and <code>;</code>.</li></ul><textarea name=\"sauces\" class=\"field\" spellcheck=\"false\"></textarea>"
innerHTML: "<div class=\"warning\"><code>Sauce</code> is disabled.</div><div>Lines starting with a <code>#</code> will be ignored.</div><div>You can specify a display text by appending <code>;text:[text]</code> to the URL.</div><div>You can specify the applicable boards by appending <code>;boards:[board1],[board2]</code>.</div><div>You can specify the applicable file types by appending <code>;types:[extension1],[extension2]</code>.</div><div>You can open links with scripts and popups disabled by appending <code>;sandbox</code>.</div><ul>These parameters will be replaced by their corresponding values:<li><code>%TURL</code>: Thumbnail URL.</li><li><code>%URL</code>: Full image URL.</li><li><code>%IMG</code>: Full image URL for GIF, JPG, and PNG; thumbnail URL for other types.</li><li><code>%MD5</code>: MD5 hash in base64.</li><li><code>%sMD5</code>: MD5 hash in base64 using <code>-</code> and <code>_</code>.</li><li><code>%hMD5</code>: MD5 hash in hexadecimal.</li><li><code>%name</code>: Original file name.</li><li><code>%board</code>: Current board.</li><li><code>%%</code>, <code>%semi</code>: Literal <code>%</code> and <code>;</code>.</li></ul><textarea name=\"sauces\" class=\"field\" spellcheck=\"false\"></textarea>"
});
$('.warning', section).hidden = Conf['Sauce'];
ta = $('textarea', section);

Binary file not shown.

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.22.0' />
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X-beta.crx' version='1.11.22.1' />
</app>
</gupdate>

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.11.22.0' />
<updatecheck codebase='https://www.4chan-x.net/builds/4chan-X.crx' version='1.11.22.1' />
</app>
</gupdate>

View File

@ -1,4 +1,4 @@
{
"version": "1.11.22.0",
"date": "2016-01-11T01:04:20.341Z"
"version": "1.11.22.1",
"date": "2016-01-12T10:18:55.491Z"
}