Revert "refactor: switch to yahoo YQL for CORS"
This reverts commit b1b40f5c988690354756acc600ff58f28158804d.
This commit is contained in:
parent
58e3138f23
commit
af1ad2abde
@ -627,16 +627,9 @@
|
|||||||
document.cookie = name + "=" + value;
|
document.cookie = name + "=" + value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function httpGetCORS(url){
|
function httpGetCORS(){
|
||||||
var query = "select * from html where url='" + url + "'";
|
arguments[0] = 'https://jsonp.afeld.me/?url=' + arguments[0];
|
||||||
var yqlUrl = "https://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(query);
|
return httpGet.apply(this, arguments);
|
||||||
return Promise.resolve(jQuery.ajax({
|
|
||||||
url: yqlUrl,
|
|
||||||
dataType: "jsonp",
|
|
||||||
crossDomain: true,
|
|
||||||
})).then(function(data){
|
|
||||||
return data.results[0].replace(/(\n|.)*<body>/g, '').replace(/<\/body>(\n|.)*/g, '');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function httpGet(){
|
function httpGet(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user