summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2018-07-11 03:03:30 +0200
committerhackademix2018-07-11 03:03:30 +0200
commit9a0a76ec3c0f2ed02e5fb345e5f9dbfc8e8e004a (patch)
treedbf8c2edd99eef82e0f3944c1f3bc12123aa9514 /src
parent842caf73408a8bf678c0308a06fe56df4a7ecb3b (diff)
downloadnoscript-9a0a76ec3c0f2ed02e5fb345e5f9dbfc8e8e004a.tar.gz
noscript-9a0a76ec3c0f2ed02e5fb345e5f9dbfc8e8e004a.tar.xz
noscript-9a0a76ec3c0f2ed02e5fb345e5f9dbfc8e8e004a.zip
Autosize preset buttons part 2.
Diffstat (limited to 'src')
-rw-r--r--src/ui/ui.css9
-rw-r--r--src/ui/ui.js3
2 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/ui.css b/src/ui/ui.css
index 901a4b1..96f7179 100644
--- a/src/ui/ui.css
+++ b/src/ui/ui.css
@@ -199,12 +199,17 @@ input.preset:active, input.preset:focus, input.preset:hover {
#presets-sizer {
visibility: hidden;
- width: 10px;
- height: 1px;
+
overflow: hidden !important;
border: 1px solid red;
}
+#presets-sizer td.site {
+ display: none;
+}
+#presets-sizer span.url {
+ display: block;
+}
.presets input.preset:checked, #presets input.preset, #presets-sizer input.preset {
opacity: 1;
transform: none;
diff --git a/src/ui/ui.js b/src/ui/ui.js
index 927a712..286d95c 100644
--- a/src/ui/ui.js
+++ b/src/ui/ui.js
@@ -187,7 +187,6 @@ var UI = (() => {
initRow(table = this.table) {
let row = table.querySelector("tr.site");
- debug("initRow: ", new Error().stack);
// PRESETS
{
let presets = row.querySelector(".presets");
@@ -225,7 +224,7 @@ var UI = (() => {
let labelWidth = 0;
for (let l of sizer.querySelectorAll("label.preset")) {
let lw = l.offsetWidth;
- debug("lw", lw);
+ debug("lw", l.textContent, lw);
if (lw > labelWidth) labelWidth = lw;
}