diff --git a/background.html b/background.html index 6c71c17..33e2561 100644 --- a/background.html +++ b/background.html @@ -1,7 +1,7 @@  - + \ No newline at end of file diff --git a/background.js b/background.js index 31d1da9..76637b5 100644 --- a/background.js +++ b/background.js @@ -20,12 +20,12 @@ function showNotification(notifStamp){ // query exact and edition ISBNs for CPL holdings function cplQuery(isbn,notifStamp){ - $.getJSON('http://www.cantonpl.org/apis/cat.php?type=i&callback=?',{q: isbn},function(data){ + $.getJSON('https://www.cantonpl.org/apis/cat.php?type=i&callback=?',{q: isbn},function(data){ window.notificationData[notifStamp] = resultFormatter(data["0"]); showNotification(notifStamp); }) .error(function(){ - $.getJSON('http://www.cantonpl.org/apis/frbr.php?callback=?',{i: isbn,results: 1},function(data){ + $.getJSON('https://www.cantonpl.org/apis/frbr.php?callback=?',{i: isbn,results: 1},function(data){ window.notificationData[notifStamp] = resultFormatter(data["0"]); showNotification(notifStamp); }); @@ -63,7 +63,7 @@ chrome.omnibox.onInputChanged.addListener(function(text,suggest){ t = setTimeout(function(){ if(text.length >= 4){ var results = new Array(); - $.getJSON('http://www.cantonpl.org/apis/cat.php?type=t&callback=?',{q: text},function(data){ + $.getJSON('https://www.cantonpl.org/apis/cat.php?type=t&callback=?',{q: text},function(data){ delete data.type; $.each(data,function(i,item){ var title = $("
").text(item.title).html(), openBrace = title.indexOf('['), slash = title.indexOf('/'); diff --git a/manifest.json b/manifest.json index 2e74192..75682e2 100644 --- a/manifest.json +++ b/manifest.json @@ -18,6 +18,7 @@ "js": ["content-script.js"], "exclude_globs": ["*cantonpl*"] }], +"content_security_policy": "script-src 'self' https://ajax.googleapis.com https://www.cantonpl.org; object-src 'self'", "homepage_url": "http://www.cantonpl.org/tools", "omnibox": {"keyword" : "__MSG_searchKeyword__"}, "permissions": ["notifications","tabs"] diff --git a/notification.html b/notification.html index 0ade681..0123a57 100644 --- a/notification.html +++ b/notification.html @@ -11,7 +11,7 @@ a span.author{color:#aaa;} a .title{display:block;text-decoration:underline;} - + Loading message...