Is there a way to hide the sidebar by default

Whenever I open flightaware in a browser at the dump1090 screen the sidebar is showing. I want it to be minimized. Is there a way I can select that by default?

You’ll have to modify the javascript (/usr/share/dump1090-fa/html/script.js):

Add the 3rd of those lines. (you’ll find the “kick off” easily)

        // And kick off one refresh immediately.
        fetchData();
        toggleSidebarVisibility(); 

Modify this function:

function toggleSidebarVisibility(e) {                                                                                                  
    e.preventDefault();

to look like this:

function toggleSidebarVisibility(e) {
    if (e)                                                                                                                             
        e.preventDefault();

Don’t forget to Ctrl-F5 refresh the page

That modification does what you want, at least for me.

I’m have modified my own web interface quite a bit: GitHub - wiedehopf/tar1090: Provides an improved webinterface for use with ADS-B decoders readsb / dump1090-fa

It will remember if the bar is hidden for the next visit, but changing the default for new visitors will be similar to the procedure above.

Many thanks. That worked a charm.

Note any updates to dump1090-fa will overwrite this modification.

I can’t get this to work, I’ve triple-checked the code changes but when I refresh the sidebar re-appears

See my previous post, you need to make sure you’re not using the version cached by the browser.

OK, I’m on a MAC, it took me a while to find the equivalent (Command+Shift+R) and something seems to have changed but it’s not consistently working as I keep getting the sidebar.

Is this code correct for the function please:

function toggleSidebarVisibility(e) {
if (e)
e.preventDefault();
$( **"#sidebar_container"** ).toggle();
$( **"#expand_sidebar_control"** ).toggle();
$( **"#toggle_sidebar_button"** ).toggleClass( **"show_sidebar"** );
$( **"#toggle_sidebar_button"** ).toggleClass( **"hide_sidebar"** );
updateMapSize();
}

Did you do that part?

Where did those stars come from, i suppose just from the forum doing stuff?

Wrong thread?

It’s probably not incorrect if they send the appropriate message types.

you’re right. I will remove

Yeah, must be the forum, they aren’t there in the code. It’s working now, I must have been pressing the wrong buttons, thanks for your help @wiedehopf

I finally managed to track this down and the folder /usr/share/dump1090-fa/html/script.js does not exist anymore. Is there a new location for the file?
Thanks,.

Yes,
It is:
/usr/share/skyaware/html/script.js