diff --git a/popup/popup.css b/popup/popup.css index bbeb1994..9e0e509a 100644 --- a/popup/popup.css +++ b/popup/popup.css @@ -8,12 +8,6 @@ --outer-padding: 9px; } -html { - /* Chrome 66-?? adds a gap equal to the scrollbar width, - which looks like a bug, see https://crbug.com/821143 */ - overflow: overlay; -} - html, body { height: min-content; max-height: 600px; diff --git a/popup/popup.js b/popup/popup.js index 5eed6582..24d36ce0 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -1,5 +1,5 @@ /* global configDialog hotkeys msg - getActiveTab FIREFOX URLS API onDOMready $ $$ prefs + getActiveTab CHROME FIREFOX URLS API onDOMready $ $$ prefs setupLivePrefs template t $create animateElement tryJSONparse CHROME_HAS_BORDER_BUG */ @@ -15,6 +15,10 @@ const ABOUT_BLANK = 'about:blank'; const ENTRY_ID_PREFIX_RAW = 'style-'; const ENTRY_ID_PREFIX = '#' + ENTRY_ID_PREFIX_RAW; +if (CHROME >= 3345 && CHROME < 3533) { // Chrome 66-69 adds a gap, https://crbug.com/821143 + document.head.appendChild($create('style', 'html { overflow: overlay }')); +} + toggleSideBorders(); initTabUrls()