Add support for ixquick-proxy.com

Fix #1
This commit is contained in:
Les De Ridder 2016-07-11 00:26:42 +02:00
parent cb9043f36f
commit 4b5450f9b2
1 changed files with 12 additions and 1 deletions

View File

@ -169,6 +169,13 @@ function getBetterUrl(url, callback) {
callback(webmUrl); callback(webmUrl);
}; };
request.send(); request.send();
} else if(isIxquickProxyUrl(url)) {
//ugh
var query = getQueryObject(url);
var base = 'https://ixquick.com/cgi-bin/serveimage';
callback(base + "?url=" + encodeURI(query.oiu) + "&sp=" + query.sp);
} else { } else {
callback(url); callback(url);
} }
@ -258,6 +265,10 @@ function isGfycatUrl(url) {
return url.indexOf('gfycat.com/') != -1; return url.indexOf('gfycat.com/') != -1;
} }
function isIxquickProxyUrl(url) {
return url.indexOf('ixquick-proxy.com/do/spg/show_picture.pl') != -1;
}
function isCoolUrl(url, callback) { function isCoolUrl(url, callback) {
var proxiedUrl = getProxiedUrl(url); var proxiedUrl = getProxiedUrl(url);
if(proxiedUrl != null) { if(proxiedUrl != null) {
@ -282,7 +293,7 @@ function isCoolUrl(url, callback) {
console.log('blacklist disabled!'); console.log('blacklist disabled!');
} }
callback(validExtensions.indexOf(extension) != -1 || isInstagramUrl(url) || isPixivUrl(url) || isSkypeUrl(url) || isGfycatUrl(url)); callback(validExtensions.indexOf(extension) != -1 || isInstagramUrl(url) || isPixivUrl(url) || isSkypeUrl(url) || isGfycatUrl(url) || isIxquickProxyUrl(url));
}); });
} }