From af1ad2abde1ce3875fc852c4b2ff05549ec11b94 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Thu, 17 Dec 2015 10:14:38 +0100 Subject: [PATCH] Revert "refactor: switch to yahoo YQL for CORS" This reverts commit b1b40f5c988690354756acc600ff58f28158804d. --- bookmarklet.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bookmarklet.js b/bookmarklet.js index db3acca..b64a7d4 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -627,16 +627,9 @@ document.cookie = name + "=" + value; } - function httpGetCORS(url){ - var query = "select * from html where url='" + url + "'"; - var yqlUrl = "https://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(query); - return Promise.resolve(jQuery.ajax({ - url: yqlUrl, - dataType: "jsonp", - crossDomain: true, - })).then(function(data){ - return data.results[0].replace(/(\n|.)*/g, '').replace(/<\/body>(\n|.)*/g, ''); - }); + function httpGetCORS(){ + arguments[0] = 'https://jsonp.afeld.me/?url=' + arguments[0]; + return httpGet.apply(this, arguments); } function httpGet(){