From 181e5194a418d0cf9f876710f559e6dc80590989 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Fri, 27 Apr 2018 17:21:11 -0400 Subject: Fixes to the CSS plus showing links instead of hashes --- html/display_panel/content/display-panel.html | 47 ++++++++++++++------------- html/display_panel/content/main_panel.js | 30 ++++++++++++++--- html/display_panel/content/panel-styles.css | 45 +++++++++++-------------- 3 files changed, 68 insertions(+), 54 deletions(-) (limited to 'html/display_panel') diff --git a/html/display_panel/content/display-panel.html b/html/display_panel/content/display-panel.html index 5f5ed18..79126a0 100644 --- a/html/display_panel/content/display-panel.html +++ b/html/display_panel/content/display-panel.html @@ -9,6 +9,8 @@ * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. * * * Copyright (C) 2011, 2012, 2014 Loic J. Duros + * Copyright (C) 2017, 2018 NateN1222 + * Copyright (C) 2018 Ruben Rodriguez * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,40 +30,39 @@ - -
-
- -

LibreJS

-
+ +

    -

      -

        diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js index 899f0d8..7c1170d 100644 --- a/html/display_panel/content/main_panel.js +++ b/html/display_panel/content/main_panel.js @@ -1,5 +1,25 @@ -//TODO: there is a known bug involving "forget preference" not working correctly. + /** + * GNU LibreJS - A browser add-on to block nonfree nontrivial JavaScript. + * * + * Copyright (C) 2017, 2018 NateN1222 + * Copyright (C) 2018 Ruben Rodriguez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +//TODO: there is a known bug involving "forget preference" not working correctly. /** * @@ -58,9 +78,9 @@ function new_debug_button(name_text,callback){ */ function write_elements(data,name,color){ var url = data["url"]; - var button_html = '

        '; - var button_html_2 = '

        '; - var button_html_3 = '

        '; + var button_html = '
        '; + var button_html_2 = '
        '; + var button_html_3 = '
        '; var heading = document.getElementById(name).getElementsByTagName("h2")[0]; var list = document.getElementById(name).getElementsByTagName("ul")[0]; if(typeof(data[name]) == "undefined" || data[name].length == 0){ @@ -72,7 +92,7 @@ function write_elements(data,name,color){ } // Iterate over data[name] and generate list for(var i = 0; i < data[name].length; i++){ - list.innerHTML += "
      • "+data[name][i][0]+ ":
        " + data[name][i][1]+"\n"+button_html+"

        \n"+button_html_2+"

        \n"+button_html_3+"
      • "; + list.innerHTML += "
      • "+data[name][i][0]+ ":
        " + data[name][i][1]+"
        "+button_html+"\n"+button_html_2+"\n"+button_html_3+"
      • "; document.getElementById("temp").id = name+"_"+i; document.getElementById("temp2").id = name+"_2_"+i; document.getElementById("temp3").id = name+"_3_"+i; diff --git a/html/display_panel/content/panel-styles.css b/html/display_panel/content/panel-styles.css index 01d2696..c077a31 100644 --- a/html/display_panel/content/panel-styles.css +++ b/html/display_panel/content/panel-styles.css @@ -18,31 +18,31 @@ * */ html { - padding:10px; + padding:0px; + margin:0px; color:#000 !important; background:url('background-panel.png') !important; } -document { - padding:10px; -} body { - padding:10px; - font-size:67.5%; - overflow-x:hidden; - overflow-y:visible; + padding:0; + margin:10px 30px 10px 20px; color:#000; +width:500px; } + +#header{ +display:block; +width:500px; +} + .libre { width:230px; height:104px; display:block; - margin-bottom: 4px; } h1.libre { font-size:1.5em; font-weight:normal; - font-family:Arial; - margin:-20px 0 0 0; padding:0; font-weight:bold; background:url('librejs-title.png') no-repeat top left; @@ -50,13 +50,12 @@ h1.libre { overflow:hidden; } h2 { - font-size:1.5em; + font-size:1.1em; font-weight:bold; font-family:arial; border-bottom:4px solid #444; padding-bottom:0; - margin:30px 0 0 0; - width:710px; + margin:10px 0 0 0; line-height:140%; } code { @@ -73,7 +72,6 @@ ul.blocked-js li, ul.accepted-js li, ul.dryrun-js li { padding:5px; border-bottom:2px solid #CCC; margin:0; - width:700px; } ul ul { @@ -83,17 +81,10 @@ ul ul { ul.blocked-js ul li, ul.accepted-js ul li, ul.dryrun-js ul li { padding:5px; border-bottom:0; - width:auto; } #info { clear:both; } -.button { - float:right; - padding:10px; - display:none; - margin:10px; -} /* Pure JS button styles below taken from: @@ -105,9 +96,10 @@ ul.blocked-js ul li, ul.accepted-js ul li, ul.dryrun-js ul li { cursor: pointer; text-align: center; text-decoration: none; - font: 10px/100% Arial, Helvetica, sans-serif; - padding: .5em 2em .55em; + font-size: 1 em; border-radius: .5em; + float:right; + padding:10px; } .small.button { font-size:11px; @@ -167,8 +159,9 @@ span.blocked { } .title-area { - width: 230px; - text-align: center; + width: 250px; + float:left !important; + text-align: center !important; } .title-area #librejs-web-link { -- cgit v1.2.3