From 4de61e452c8a0ce0c5d48ccd4fc5886b4f8ac053 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Mon, 16 May 2022 13:20:47 -0500 Subject: [PATCH] hdzero - codacy cleanup --- src/css/main.css | 10 ++++++---- src/css/tabs/osd.css | 45 ++++++++++++++++++++++---------------------- src/js/tabs/osd.js | 4 ++-- 3 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/css/main.css b/src/css/main.css index db61b8eb1..0a576f935 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -1208,11 +1208,13 @@ dialog { float: left; width: 33%; } + .third_left_osd { float: left; - width: calc(50% - 360px); - min-width: 23%; + width: calc(50% - 360px); + min-width: 23%; } + .third_center { display: inline-block; width: 34%; @@ -1224,7 +1226,7 @@ dialog { } .third_right_osd { - min-width: 68%; + min-width: 68%; } .fourth { float: left; @@ -1248,7 +1250,7 @@ dialog { .twothird_osd { float: left; - width: 60%; + width: 60%; } /* Columns END> */ diff --git a/src/css/tabs/osd.css b/src/css/tabs/osd.css index 4e1c1cbe6..8891f2307 100644 --- a/src/css/tabs/osd.css +++ b/src/css/tabs/osd.css @@ -1,3 +1,6 @@ +/* eslint + + .tab-osd .info { margin: 10px 0 0 0; position: relative; @@ -256,20 +259,20 @@ } .tab-osd .preview .gui_box_titlebar label { - max-width: 100px; - overflow: hidden; - text-overflow: ellipsis; - display: inline-block; - white-space: nowrap; - vertical-align: text-bottom; + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; + display: inline-block; + white-space: nowrap; + vertical-align: text-bottom; } .tab-osd .preview .gui_box_titlebar select { - max-width: 100px; - border-radius: 2px; - font-size: 11px; - font-weight: normal; - font-family: 'open_sansregular', 'Segoe UI', Tahoma, sans-serif; + max-width: 100px; + border-radius: 2px; + font-size: 11px; + font-weight: normal; + font-family: 'open_sansregular', 'Segoe UI', Tahoma, sans-serif; } .tab-osd .preview .gui_box_bottombar { @@ -446,12 +449,11 @@ button { } .tab-osd .third_left { - float: left; - /* width: calc(50% - 197px); */ + float: left; + /* width: calc(50% - 197px); */ width: 32%; max-width: 300px; margin-right: 5px; - } .tab-osd .third_center { @@ -464,11 +466,11 @@ button { } .tab-osd .third_right { - float: left; - /* width: calc(50% - 197px); */ - width: 32%; - max-width: 300px; - margin-left: 20px; + float: left; + /* width: calc(50% - 197px); */ + width: 32%; + max-width: 300px; + margin-left: 20px; } .tab-osd .preview { @@ -476,7 +478,6 @@ button { float: left; /* position: sticky; */ top: 0px; - /* please don't copy the generic background image from another project * and replace the one that @nathantsoi took :) */ @@ -484,9 +485,7 @@ button { background-size: cover; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; - /* left: calc(50% - 197px); */ - } .tab-osd .preview_hd { @@ -495,7 +494,7 @@ button { } .tab-osd .preview_hd_side { -/* width: calc(50% - 317px) !important; */ + /* width: calc(50% - 317px) !important; */ } .tab-osd .alarms label { diff --git a/src/js/tabs/osd.js b/src/js/tabs/osd.js index 21e049f03..703772af4 100644 --- a/src/js/tabs/osd.js +++ b/src/js/tabs/osd.js @@ -1816,9 +1816,9 @@ OSD.msp = { display_item.isVisible = []; for (let osd_profile = 0; osd_profile < OSD.getNumberOfProfiles(); osd_profile++) { if (semver.gte(CONFIG.apiVersion, "1.52.0")) { - display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE << osd_profile)) != 0; //x2000 no matter SD/HD + display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE << osd_profile)) !== 0; //x2000 no matter SD/HD } else { - display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE_SD << osd_profile)) != 0; //legacy 0x800 + display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE_SD << osd_profile)) !== 0; //legacy 0x800 } } } else {