aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--html/display_panel/content/main_panel.js14
-rw-r--r--html/display_panel/content/panel-styles.css2
3 files changed, 9 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index b7da9fb..e72c357 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*~
old/
*.zip
-SDK LibreJS source/ \ No newline at end of file
+SDK LibreJS source/
+*# \ No newline at end of file
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 3bcb164..2becb4e 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -36,6 +36,7 @@ function generate_HTML(blocked_data){
var button_allow_all = '<a id="allow-button" class="button white" href="#"><span>Allow all scripts in this page</span></a>';
var button_block_nonfree = '<a id="disallow-button" class="button white" href="#"><span>Block all nonfree/nontrivial scripts from this page</span></a>';
var button_new_tab = '<a id="open-in-tab" class="button white" href="#"><span>Open this report in a new tab</span></a>';
+ var button_whitelist = '<div style="float:right"><input id="temp" type="button" value="whitelist"></input></div>';
var htmlDoc = document;// Not neccessary
var accept = htmlDoc.getElementById("accepted");
var blocked = htmlDoc.getElementById("blocked");
@@ -44,14 +45,12 @@ function generate_HTML(blocked_data){
accept.innerHTML = '<li>LibreJS did not allow the execution of any scripts on this page: \n\n<ul><li>There may be no scripts on this page (check source, C-u)</li><li>The inline and on-page JavaScript code may not be free and/or may not have proper license information and external scripts (if present) may have been removed by default.</li><li>External scripts may not be free and/or may not have proper licensing and are not part of the whitelist of free JavaScript libraries.</li></ul></li>';
} else{
accept.innerHTML = "";
- accept.innerHTML = '<h2 class="accepted-js">List of <div style="color: green;">ACCEPTED</div> javascript in '+a["url"]+':</h2>';
+ accept.innerHTML = '<h2 class="accepted-js">List of <div style="display:inline; color: green;">ACCEPTED</div> javascript in '+a["url"]+':</h2>';
accept.innerHTML += '<ul class="accepted-js">';
}
// Iterate over a["accepted"] and generate bulleted list
for(var i = 0; i < a["accepted"].length; i++){
- accept.innerHTML += "<li>";
- accept.innerHTML += a["accepted"][i][0] + "<br>" + a["accepted"][i][1];
- accept.innerHTML += "</li>";
+ accept.innerHTML += "<li>" + a["accepted"][i][0] + "<br>" + a["accepted"][i][1] + "</li>";
}
if(a["accepted"].length != 0){
accept.innerHTML += "</ul>";
@@ -61,14 +60,13 @@ function generate_HTML(blocked_data){
blocked.innerHTML += '<li>LibreJS did not block any scripts on this page: \n\n<ul><li>There may be no scripts on this page (check source, C-u).</li><li>All the scripts on this page may be trivial and/or free.</li><li>You may have whitelisted this domain name or url from the preferences (Type about:addons in your location bar to check)</li><li>You may have clicked the "allow all scripts" button, which causes LibreJS to load all JavaScript on a page regardless of whether it is free, trivial, nontrivial or nonfree. This policy is effective for the entire duration of a Firefox session.</li><li>If for any reason you think LibreJS should have blocked JavaScript code on this page, please report this issue to: <a id="report" href="mailto:bug-librejs@gnu.org" target="_blank">bug-librejs@gnu.org</a></li></ul></li>';
} else{
blocked.innerHTML = "";
- blocked.innerHTML = "<h2 class='blocked-js'>List of <div style='color: red;'>BLOCKED</div> javascript in" + a["url"]+":</h2>";
+ blocked.innerHTML = "<h2 class='blocked-js'>List of <div style='display:inline; color: red;'>BLOCKED</div> javascript in" + a["url"]+":</h2>";
blocked.innerHTML += '<ul class="blocked-js">';
}
// Iterate over a["blocked"] and generate bulleted list
for(var i = 0; i < a["blocked"].length; i++){
- blocked.innerHTML += "<li>";
- blocked.innerHTML += a["blocked"][i][0]+ "<br>" + a["blocked"][i][1];
- blocked.innerHTML += "</li>";
+ blocked.innerHTML += "<li>"+a["blocked"][i][0]+ "<br>" + a["blocked"][i][1]+"\n"+button_whitelist+"</li>";
+ document.getElementById("temp").id = "wl_"+i;
}
if(a["blocked"].length != 0){
blocked.innerHTML += "</ul>";
diff --git a/html/display_panel/content/panel-styles.css b/html/display_panel/content/panel-styles.css
index 2e5223b..075c0d2 100644
--- a/html/display_panel/content/panel-styles.css
+++ b/html/display_panel/content/panel-styles.css
@@ -187,4 +187,4 @@ span.blocked {
margin-top: 8px;
font-size: 14px;
list-style-type: disc;
-} \ No newline at end of file
+}