Skip to content

Commit 78c9ead

Browse files
author
dsward2
committed
In index.html and custom.css, the backface-visibility property was removed from styles where it was used.
In localradio.js, the updateStatusDisplay() function was optimized for usage depending of the presence of the element with id="now-playing-details". Also in updateStatusDisplay, a CSS style attribute - position: relative - was added to the HTML output to fix scrolling for the status text.
1 parent b8f362e commit 78c9ead

5 files changed

Lines changed: 74 additions & 98 deletions

File tree

LocalRadio/Web/css/custom.css

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@
250250
color: #222; }
251251
.has-docked-nav .navbar {
252252
position: fixed;
253-
backface-visibility: hidden;
254253
top: 0;
255254
left: 0; }
256255
.has-docked-nav .navbar-spacer {
@@ -332,7 +331,6 @@ a.button.button-primary.two.columns {
332331
color: #33C3F0; }
333332
.has-docked-nav .navbar {
334333
position: fixed;
335-
backface-visibility: hidden;
336334
top: 0;
337335
left: 0; }
338336
.has-docked-nav .navbar-spacer {
@@ -455,7 +453,6 @@ a.button.button-primary.two.columns {
455453
color: #33C3F0; }
456454
.has-docked-nav .navbar {
457455
position: fixed;
458-
backface-visibility: hidden;
459456
top: 0;
460457
left: 0; }
461458
.has-docked-nav .navbar-spacer {

LocalRadio/Web/index.html

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767

6868
div#navigationbar {
6969
position: fixed;
70-
backface-visibility: hidden;
7170
top: 0;
7271
left: 0;
7372
width: 100%;
@@ -77,44 +76,21 @@
7776
background-color: lightgray;
7877
}
7978

80-
/* div#root is no longer used */
81-
div#root {
82-
position: fixed;
83-
backface-visibility: hidden;
84-
top: 50px;
85-
left: 0;
86-
width: 100%;
87-
height: calc(100% - 100px);
88-
-webkit-overflow-scrolling: touch;
89-
overflow-x: hidden;
90-
overflow-y: scroll;
91-
}
92-
9379
div#content_frame {
9480
position: fixed;
95-
backface-visibility: hidden;
81+
border: none;
9682
top: 50px;
9783
left: 0;
9884
width: 100%;
9985
height: calc(100% - 100px);
10086
-webkit-overflow-scrolling: touch;
10187
overflow-x: hidden;
10288
overflow-y: scroll;
103-
}
104-
105-
div#content_frame_old {
106-
position: absolute;
107-
top: 0;
108-
left: 0;
109-
width: 100%;
110-
height: 100%;
111-
border: none;
112-
overflow: auto;
89+
word-wrap: break-word;
11390
}
11491

11592
div#audioplayer {
11693
position: fixed;
117-
backface-visibility: hidden;
11894
top: calc(100% - 50px);
11995
left: 0;
12096
width: 100%;
@@ -449,7 +425,7 @@
449425

450426
audioPlayer.autoplay=true;
451427

452-
setTimeout(function(){periodicUpdate();}, 1.0); // a one-shot call to periodicUpdate() for "Now Playing"
428+
setTimeout(function(){periodicUpdate();}, 1000); // a one-shot call to periodicUpdate() for "Now Playing"
453429
}
454430
}
455431

LocalRadio/Web/js/localradio.js

Lines changed: 68 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -911,74 +911,77 @@ function updateStatusDisplay(statusData)
911911
tuner_gain = statusObj.scan_tuner_gain;
912912
}
913913

914-
var statusHtml = "<br><br>";
915-
916-
if (rtlsdr_task_mode == "scan")
917-
{
918-
statusHtml += "<span id='now-playing-details' style='overflow-x: scroll; white-space: nowrap;'>";
919-
920-
statusHtml += "name: ";
921-
statusHtml += station_name;
922-
statusHtml += "<br>";
923-
924-
statusHtml += "</span>"
925-
}
926-
927-
statusHtml += "frequency: ";
928-
statusHtml += short_frequency;
929-
statusHtml += "<br>";
930-
statusHtml += "signal level: ";
931-
statusHtml += signal_level;
932-
statusHtml += "<br>";
933-
934-
if (rtlsdr_task_mode == "scan")
935-
{
936-
statusHtml += "<br><br>CATEGORY SCANNER SETTINGS: <br>";
937-
}
938-
939-
statusHtml += "squelch level: ";
940-
statusHtml += squelch_level;
941-
statusHtml += "<br>";
942-
statusHtml += "modulation: ";
943-
statusHtml += modulation;
944-
statusHtml += "<br>";
945-
statusHtml += "sample rate: ";
946-
statusHtml += sample_rate;
947-
statusHtml += "<br>";
948-
statusHtml += "sampling mode: ";
949-
statusHtml += sampling_mode;
950-
statusHtml += "<br>";
951-
statusHtml += "oversampling: ";
952-
statusHtml += oversampling;
953-
statusHtml += "<br>";
954-
statusHtml += "tuner gain: ";
955-
statusHtml += tuner_gain;
956-
statusHtml += "<br>";
957-
statusHtml += "tuner agc: ";
958-
statusHtml += tuner_agc;
959-
statusHtml += "<br>";
960-
statusHtml += "rtl-sdr options: pad ";
961-
statusHtml += options;
962-
statusHtml += "<br>";
963-
statusHtml += "fir size: ";
964-
statusHtml += fir_size;
965-
statusHtml += "<br>";
966-
statusHtml += "atan math: ";
967-
statusHtml += atan_math;
968-
statusHtml += "<br>";
969-
statusHtml += "audio output filter: rate 48000 ";
970-
statusHtml += audio_output_filter;
971-
statusHtml += "<br>";
972-
statusHtml += "audio output: ";
973-
statusHtml += audio_output;
974-
statusHtml += "<br>";
975-
statusHtml += "stream source: ";
976-
statusHtml += stream_source;
977-
statusHtml += "<br>";
978-
979914
var nowPlayingDetails = document.getElementById("now-playing-details");
980915
if (nowPlayingDetails != null)
981916
{
917+
var statusHtml = "<div style=\"position: relative;\">";
918+
statusHtml += "<br><br>";
919+
920+
921+
if (rtlsdr_task_mode == "scan")
922+
{
923+
statusHtml += "<span id='now-playing-details' style='overflow-x: scroll; white-space: nowrap;'>";
924+
925+
statusHtml += "name: ";
926+
statusHtml += station_name;
927+
statusHtml += "<br>";
928+
929+
statusHtml += "</span>"
930+
}
931+
932+
statusHtml += "frequency: ";
933+
statusHtml += short_frequency;
934+
statusHtml += "<br>";
935+
statusHtml += "signal level: ";
936+
statusHtml += signal_level;
937+
statusHtml += "<br>";
938+
939+
if (rtlsdr_task_mode == "scan")
940+
{
941+
statusHtml += "<br><br>CATEGORY SCANNER SETTINGS: <br>";
942+
}
943+
944+
statusHtml += "squelch level: ";
945+
statusHtml += squelch_level;
946+
statusHtml += "<br>";
947+
statusHtml += "modulation: ";
948+
statusHtml += modulation;
949+
statusHtml += "<br>";
950+
statusHtml += "sample rate: ";
951+
statusHtml += sample_rate;
952+
statusHtml += "<br>";
953+
statusHtml += "sampling mode: ";
954+
statusHtml += sampling_mode;
955+
statusHtml += "<br>";
956+
statusHtml += "oversampling: ";
957+
statusHtml += oversampling;
958+
statusHtml += "<br>";
959+
statusHtml += "tuner gain: ";
960+
statusHtml += tuner_gain;
961+
statusHtml += "<br>";
962+
statusHtml += "tuner agc: ";
963+
statusHtml += tuner_agc;
964+
statusHtml += "<br>";
965+
statusHtml += "rtl-sdr options: pad ";
966+
statusHtml += options;
967+
statusHtml += "<br>";
968+
statusHtml += "fir size: ";
969+
statusHtml += fir_size;
970+
statusHtml += "<br>";
971+
statusHtml += "atan math: ";
972+
statusHtml += atan_math;
973+
statusHtml += "<br>";
974+
statusHtml += "audio output filter: rate 48000 ";
975+
statusHtml += audio_output_filter;
976+
statusHtml += "<br>";
977+
statusHtml += "audio output: ";
978+
statusHtml += audio_output;
979+
statusHtml += "<br>";
980+
statusHtml += "stream source: ";
981+
statusHtml += stream_source;
982+
statusHtml += "<br>";
983+
statusHtml += "<div>";
984+
982985
nowPlayingDetails.innerHTML = statusHtml;
983986
}
984987

LocalRadio/Web/nowplaying.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<section class="header">
99
<h2 class="title">LocalRadio</h2>
1010
<h3 id="now-playing-name" class="title">%%NOW_PLAYING_NAME%%</h3>
11-
<span id="now-playing-details">
11+
<div id="now-playing-details">
1212
%%NOW_PLAYING_DETAILS%%
13-
</span>
13+
</div>
1414
<br>
1515
%%OPEN_AUDIO_PLAYER_PAGE_BUTTON%%
1616
</section>

LocalRadio/WebServerConnection.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ - (NSString *)generateNavBar
16341634
@" <ul class=\"navbar-list\">\n"
16351635
@" <li class=\"navbar-item\"><a class=\"navbar-link\" href=\"#\" onclick=\"backButtonClicked(self);\" title=\"Click the Back button to return to the previous page in the web interface\">Back</a></li>\n"
16361636
@" <li class=\"navbar-item\"><a class=\"navbar-link\" href=\"#\" onclick=\"loadContent('index2.html');\" title=\"Click the Top button to reload the LocalRadio web interface.\">Top</a></li>\n"
1637-
@" <li class=\"navbar-item\"><a class=\"navbar-link\" id=\"nowPlayingNavBarLink\" href=\"#\" onclick=\"loadContent('nowplaying.html');\" target=\"content_frame\" title=\"Click the Now Playing button to see the current activity on the radio, including the live Signal Level, which can be helpful for setting the correct Squelch Level. Note that the Now Playing page will generate more network traffic, and consume more energy on mobile devices.\">Now Playing</a></li>\n"
1637+
@" <li class=\"navbar-item\"><a class=\"navbar-link\" id=\"nowPlayingNavBarLink\" href=\"#\" onclick=\"loadContent('nowplaying.html');\" title=\"Click the Now Playing button to see the current activity on the radio, including the live Signal Level, which can be helpful for setting the correct Squelch Level. Note that the Now Playing page will generate more network traffic, and consume more energy on mobile devices.\">Now Playing</a></li>\n"
16381638
@" </ul>\n"
16391639
@" </div>\n"
16401640
@" </nav>\n";

0 commit comments

Comments
 (0)