diff --git a/src/about.html b/src/about.html index 9ea23bf..02b6768 100644 --- a/src/about.html +++ b/src/about.html @@ -13,8 +13,9 @@ ul { +
-

uMatrix

+

uMatrix

-

+

@@ -44,12 +45,15 @@ ul {

- - - - - +
+
+ + + + + +
diff --git a/src/css/codemirror.css b/src/css/codemirror.css index 06fa7a0..9dbedbf 100644 --- a/src/css/codemirror.css +++ b/src/css/codemirror.css @@ -5,7 +5,6 @@ position: relative; } .CodeMirror { - border: 1px solid #ddd; box-sizing: border-box; flex-grow: 1; height: 100%; diff --git a/src/css/dashboard-common.css b/src/css/dashboard-common.css index 0696406..67d8814 100644 --- a/src/css/dashboard-common.css +++ b/src/css/dashboard-common.css @@ -3,27 +3,14 @@ body { box-sizing: border-box; color: #000; margin: 0; - padding: 0 0.5em 0.5em 0.5em; + padding: 0; font: 14px/1.4 sans-serif; } body > *:first-child { margin-top: 0; } -h2, h3 { - margin: 1em 0; - font-family: sans-serif; - } -h2 { - font-size: 18px; - } -h2:nth-of-type(1) { - margin-top: 0; - } -h3 { - font-size: 16px; - } -h2 + * { - padding: 0; +div.body { + padding: 0 0.5em 0.5em 0.5em; } html.ltr h2 + * { margin: 0 0 0 1em; diff --git a/src/css/dashboard.css b/src/css/dashboard.css index 0b728ca..44f6b9b 100644 --- a/src/css/dashboard.css +++ b/src/css/dashboard.css @@ -1,21 +1,19 @@ body { - margin: 0; border: 0; - padding: 0; + display: flex; + flex-direction: column; font: 15px sans-serif; - position: relative; - width: 100vw; height: 100vh; + margin: 0; overflow: hidden; + padding: 0; + width: 100vw; } #dashboard-nav { - margin: 0; border: 0; + margin: 0; padding: 0; - position: absolute; - top: 0; width: 100vw; - height: 50px; z-index: 10; } #dashboard-nav-widgets { @@ -55,13 +53,11 @@ body { background-color: white; } iframe { - margin: 0; - border: 0; - padding: 0; background-color: transparent; + border: 0; + flex-grow: 1; + margin: 0; overflow: auto; - position: absolute; - top: 50px; + padding: 0; width: 100%; - height: calc(100% - 50px); } diff --git a/src/css/raw-settings.css b/src/css/raw-settings.css index 4d9e49d..9dd6895 100644 --- a/src/css/raw-settings.css +++ b/src/css/raw-settings.css @@ -1,8 +1,10 @@ -body { +div.body { + box-sizing: border-box; display: flex; flex-direction: column; height: 100vh; justify-content: space-between; + overflow: hidden; } p { margin: 0.5em 0; diff --git a/src/css/user-rules.css b/src/css/user-rules.css index 963e5a1..578ac12 100644 --- a/src/css/user-rules.css +++ b/src/css/user-rules.css @@ -1,4 +1,4 @@ -body { +html { height: 100vh; overflow: hidden; } @@ -22,7 +22,7 @@ body { } #diff .ruleActions h3 { font-weight: normal; - margin: 0.5em 0; + margin: 0 0 0.5em 0; } #ruleFilter { direction: ltr; @@ -70,7 +70,7 @@ body[dir="rtl"] #commitButton:before { .codeMirrorContainer { box-sizing: border-box; - padding: 0 0 0.5em 0; + padding: 0; } .CodeMirror-merge, .CodeMirror-merge-pane, .CodeMirror-merge .CodeMirror { box-sizing: border-box; diff --git a/src/hosts-files.html b/src/hosts-files.html index 9df8e52..3978743 100644 --- a/src/hosts-files.html +++ b/src/hosts-files.html @@ -9,6 +9,7 @@ +

@@ -61,6 +62,8 @@

+ + diff --git a/src/js/dashboard.js b/src/js/dashboard.js index 9c488f2..c0e3ae8 100644 --- a/src/js/dashboard.js +++ b/src/js/dashboard.js @@ -1,6 +1,6 @@ /******************************************************************************* - uMatrix - a Chromium browser extension to black/white list requests. + uMatrix - a browser extension to black/white list requests. Copyright (C) 2014-2018 Raymond Hill This program is free software: you can redistribute it and/or modify diff --git a/src/js/user-rules.js b/src/js/user-rules.js index c45a6fd..8246d4b 100644 --- a/src/js/user-rules.js +++ b/src/js/user-rules.js @@ -1,6 +1,6 @@ /******************************************************************************* - uMatrix - a Chromium browser extension to block requests. + uMatrix - a browser extension to block requests. Copyright (C) 2014-2018 Raymond Hill This program is free software: you can redistribute it and/or modify @@ -32,22 +32,37 @@ // Move to dashboard-common.js if needed (function() { - if ( document.querySelector('.vfill-available') === null ) { return; } - var timer; - var resize = function() { + let timer; + let resize = function() { timer = undefined; - let prect = document.body.getBoundingClientRect(); let child = document.querySelector('.vfill-available'); + if ( child === null ) { return; } + let prect = document.documentElement.getBoundingClientRect(); let crect = child.getBoundingClientRect(); - let height = Math.max(prect.bottom - crect.top, 80); - child.style.height = height + 'px'; - }; - resize(); - window.addEventListener('resize', function() { - if ( timer === undefined ) { - timer = vAPI.setTimeout(resize, 66); + let cssHeight = Math.max(prect.bottom - crect.top, 80) + 'px'; + if ( child.style.height !== cssHeight ) { + child.style.height = cssHeight; + if ( typeof mergeView !== 'undefined' ) { + mergeView.leftOriginal().refresh(); + mergeView.editor().refresh(); + } } + }; + let resizeAsync = function(delay) { + if ( timer === undefined ) { + timer = vAPI.setTimeout( + resize, + typeof delay === 'number' ? delay : 66 + ); + } + }; + window.addEventListener('resize', resizeAsync); + var observer = new MutationObserver(resizeAsync); + observer.observe(document.querySelector('.body'), { + childList: true, + subtree: true }); + resizeAsync(1); })(); /******************************************************************************/ diff --git a/src/raw-settings.html b/src/raw-settings.html index 48c60fa..9fd5ec1 100644 --- a/src/raw-settings.html +++ b/src/raw-settings.html @@ -10,12 +10,17 @@ +
+

+ +
+ diff --git a/src/settings.html b/src/settings.html index d60adcd..8f4c58f 100644 --- a/src/settings.html +++ b/src/settings.html @@ -30,8 +30,9 @@ ul > li.separator { +
-

+

-

+

-

+

+
+ diff --git a/src/user-rules.html b/src/user-rules.html index 501c596..8b72025 100644 --- a/src/user-rules.html +++ b/src/user-rules.html @@ -15,9 +15,12 @@ +
+
+