From 0e8bee57da4a11540d7ed1bf7f401852f63ef821 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Sun, 18 Jan 2015 18:06:39 +0100 Subject: [PATCH] CORS first try --- bookmarklet.js | 13 +++++++------ card.html | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 card.html diff --git a/bookmarklet.js b/bookmarklet.js index e8cd82a..2beed02 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -13,7 +13,7 @@ if (window.jQuery === undefined) { appendScript('//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js'); } -// wait untill all other scripts loaded +// wait untill all scripts loaded appendScript('https://qoomon.github.io/void', function(){ init(); main(); @@ -25,7 +25,10 @@ function init(){ addStringFunctions(); addDateFunctions(); - printScopeDeviderToken = "Attachment" + printScopeDeviderToken = "Attachment"; + + cors = "https://cors-anywhere.herokuapp.com/"; + //$("#card").load("https://cors-anywhere.herokuapp.com/"+"https://qoomon.github.io/Jira-Issue-Card-Printer/card.html"); console.logLevel = console.INFO; } @@ -274,6 +277,8 @@ function fillCardWithJSONData(card, data) { // http://www.cssdesk.com/T9hXg function printOverlayHTML(){ + + var result = jQuery(document.createElement('div')) .attr("id","card-print-overlay") .html(multilineString(function() { @@ -801,10 +806,6 @@ body { //############################################################################################################################ //############################################################################################################################ -function getCORS(url, callback){ - $.get('https://cors-anywhere.herokuapp.com/' + url, callback); -} - function appendScript(url, callback){ var head = document.getElementsByTagName('head')[0]; diff --git a/card.html b/card.html new file mode 100644 index 0000000..7822034 --- /dev/null +++ b/card.html @@ -0,0 +1,28 @@ +
+
Bengt Brodersen - qoomon.com
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+ +