From 22254e369a0937a1b0aa7d88614cb7e360578685 Mon Sep 17 00:00:00 2001 From: arnoudkooi Date: Thu, 17 Oct 2024 23:02:22 +0200 Subject: [PATCH] Minor fixes #548 --- CHANGELOG.md | 7 ++++++- css/background.css | 5 +++++ inject_next.js | 8 +++++--- js/bgscriptmodern.js | 2 +- manifest.json | 2 +- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce1d058..e00dbc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ # CHANGELOG.md + +## 8.2.1.1 (2024-10-1) +Fixes / changes: + - Change Monaco editor height in modern BG Script to use more viewport height (Slack) + - Prevent hidding search bar in Next Experience when Updatset Pickers are shown (Issue #548) + ## 8.2.1.0 (2024-10-10) Fixes / changes: - - Hide search in studio when navigator collapsed (Issue #536) - Prevent WindowsKey-S to save record (Meta key in windows) (LinkedIn Company Page DM) - Allow encodedquery to have hyphen (-) in encodedquery (Follow up on issue #460 via Slack) - Allow /rnd command on portal assesment page (Discussion #539) diff --git a/css/background.css b/css/background.css index 0e354e9..676df2b 100644 --- a/css/background.css +++ b/css/background.css @@ -95,3 +95,8 @@ h4, .result_header { #resultbar a { text-decoration: none; } + + +#div_script:not(.code-editor) { + height: calc(100vh - 300px) !important; +} \ No newline at end of file diff --git a/inject_next.js b/inject_next.js index 7a1d9d3..17895d4 100644 --- a/inject_next.js +++ b/inject_next.js @@ -492,9 +492,11 @@ grSPC.deleteMultiple();`; searchInput.addEventListener('blur', (event) => { if (searchInput.value == '') { setTimeout(() => { - querySelectorShadowDom.querySelectorDeep('.sn-global-typeahead-control-container, .search-combobox--header').style.width = '32px'; - querySelectorShadowDom.querySelectorDeep('#snuSpacer').style.display = 'inline'; - }, 100); + if (!querySelectorShadowDom.querySelectorDeep('#global-search-context-control button.is-opened')){ //do not hide if context switcher is selected #548 + querySelectorShadowDom.querySelectorDeep('.sn-global-typeahead-control-container, .search-combobox--header').style.width = '32px'; + querySelectorShadowDom.querySelectorDeep('#snuSpacer').style.display = 'inline'; + } + }, 500); } }, true); var snuSpacer = document.createElement('div'); diff --git a/js/bgscriptmodern.js b/js/bgscriptmodern.js index de9f8e5..53eb1fa 100644 --- a/js/bgscriptmodern.js +++ b/js/bgscriptmodern.js @@ -161,7 +161,7 @@ function snuDividePage() {
Results will show here.
`; document.querySelectorAll('.row').forEach(el => { - el.style.setProperty('margin-inline-start', '-8px', 'important'); //remove unneded padding + el.style.setProperty('margin-inline-start', '-8px', 'important'); //remove uneeded padding el.style.setProperty('margin-inline-end', '-8px', 'important'); el.style.setProperty('margin-bottom', '5px'); el.style.setProperty('min-height', '29px'); diff --git a/manifest.json b/manifest.json index efa3fde..e5c89e2 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "short_name": "SN Utils", "description": "Productivity tools for ServiceNow. (Personal work, not affiliated to ServiceNow)", "author": "Arnoud Kooi / arnoudkooi.com", - "version": "8.2.1.0", + "version": "8.2.1.2", "manifest_version": 3, "permissions": [ "activeTab",