1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-05 04:47:49 +02:00

Border issue with sections

This commit is contained in:
kkapsner 2018-01-08 17:08:36 +01:00
parent 2b92481004
commit 10d9c022e0
3 changed files with 16 additions and 6 deletions

View File

@ -55,7 +55,7 @@ header .bookmarkNotice {
margin-right: 0.6em; margin-right: 0.6em;
} }
.settings .section + .settingRow .content { .settings .section + .settingRow .content, .settings .settingRow.firstVisible .content {
border-top: 0 solid black; border-top: 0 solid black;
} }

View File

@ -88,11 +88,20 @@
body.appendChild(row); body.appendChild(row);
}, },
updateDisplay: function(){ updateDisplay: function(){
body.classList[( var anyVisible = false;
rows.some(function(row){ rows.forEach(function(row){
return !row.classList.contains("hidden"); var isHidden = row.classList.contains("hidden");
}) if (!isHidden){
)? "remove": "add"]("hidden"); if (anyVisible){
row.classList.remove("firstVisible");
}
else {
anyVisible = true;
row.classList.add("firstVisible");
}
}
});
body.classList[anyVisible? "remove": "add"]("hidden");
} }
}; };
lastSection = section; lastSection = section;

View File

@ -5,6 +5,7 @@ Version 0.4.5:
new features: new features:
- Added way to inspect canvas content in ask mode while being asked - Added way to inspect canvas content in ask mode while being asked
- Open options page on install or update if the options page cannot be accessed in another way - Open options page on install or update if the options page cannot be accessed in another way
- Added sections in options
fixes: fixes:
- prevent possible double faking - prevent possible double faking