Jump to content

Please consider either by default or with an option switching the forum's theme based on the user's browser settings. Websites like Wikipedia and Google have this available so that if you enable automatic light/dark, the website will switch based on the system/browser setting.

 

This would not require implementing any new theme, just activating the existing dark theme when the browser requests it. Selecting light or dark inside of the forum would override.

Link to comment
https://linustechtips.com/topic/1635003-use-system-dark-theme-setting/
Share on other sites

Link to post
Share on other sites

23 hours ago, Adonnen said:

Please consider either by default or with an option switching the forum's theme based on the user's browser settings. Websites like Wikipedia and Google have this available so that if you enable automatic light/dark, the website will switch based on the system/browser setting.

 

This would not require implementing any new theme, just activating the existing dark theme when the browser requests it. Selecting light or dark inside of the forum would override.

The site has the option located at the bottom of the page [easy to find], once you switch, it stays that way. I can't say I have ever had a situation where the theme reverted back to light theme.

COMMUNITY STANDARDS   |   TECH NEWS POSTING GUIDELINES   |   FORUM STAFF

LTT Folding Users Tips, Tricks and FAQ   |   F@H & BOINC Badge Request   |   F@H Contribution    My Rig   |   Project Steamroller

I am a Moderator, but I am fallible. Discuss or debate with me as you will but please do not argue with me as that will get us nowhere.

 

Spoiler

Character is like a Tree and Reputation like its Shadow. The Shadow is what we think of it; The Tree is the Real thing.  ~ Abraham Lincoln

You have enemies? Good. That means you've stood up for something, sometime in your life.  ~ Winston Churchill

Reputation is a Lifetime to create but takes only seconds to destroy.

Docendo discimus - "to teach is to learn"

 

  

 CHRISTIAN MEMBER 

 
 
 
 
 
 

 

Link to post
Share on other sites

On 4/5/2026 at 6:06 AM, SansVarnic said:

The site has the option located at the bottom of the page [easy to find], once you switch, it stays that way. I can't say I have ever had a situation where the theme reverted back to light theme.

Some people prefer dynamic theming, typically: light during the day and dark in the evening.
https://learn.microsoft.com/en-us/windows/powertoys/light-switch

Link to post
Share on other sites

12 minutes ago, Biohazard777 said:

Some people prefer dynamic theming, typically: light during the day and dark in the evening.
https://learn.microsoft.com/en-us/windows/powertoys/light-switch

Admittedly, I've never used the light switch feature. I just use dark mode/theme at all times. 🤷‍♂️

COMMUNITY STANDARDS   |   TECH NEWS POSTING GUIDELINES   |   FORUM STAFF

LTT Folding Users Tips, Tricks and FAQ   |   F@H & BOINC Badge Request   |   F@H Contribution    My Rig   |   Project Steamroller

I am a Moderator, but I am fallible. Discuss or debate with me as you will but please do not argue with me as that will get us nowhere.

 

Spoiler

Character is like a Tree and Reputation like its Shadow. The Shadow is what we think of it; The Tree is the Real thing.  ~ Abraham Lincoln

You have enemies? Good. That means you've stood up for something, sometime in your life.  ~ Winston Churchill

Reputation is a Lifetime to create but takes only seconds to destroy.

Docendo discimus - "to teach is to learn"

 

  

 CHRISTIAN MEMBER 

 
 
 
 
 
 

 

Link to post
Share on other sites

19 minutes ago, SansVarnic said:

Admittedly, I've never used the light switch feature. I just use dark mode/theme at all times. 🤷‍♂️

Yeah, same, everything on dark mode all the time.
The only exception is Google Maps when connected to Android Auto, though I don’t recall setting that up to be dynamic.
I believe it’s dynamic by default, and is actually usefull.

Anyhow, I guess dynamic makes sense for people who spend their work hours outdoors & looking at their screens: smartphones/tablets/laptops. I don’t see much use for it on desktops.

Link to post
Share on other sites

9 hours ago, Adonnen said:

I dynamically switch on light/dark mode.

Since it is unlikely the forum will have that feature any time soon... the way I see it you have two options:

1) Set the theme to light and use dark reader instead for this forum, which has that feature.

2) Use a custom JavaScript injected code (be it via extension that does that, or via ad-blockers - which also support injecting JS), which will execute on page load and after a certain period while on the same page. Check the current forum theme and compare it to your OS, if different trigger the theme change found in the top right menu.
Something like this:
 

(function () {
  const CHECK_INTERVAL = 60 * 1000; // 1 minute

  function getOSTheme() {
    return window.matchMedia('(prefers-color-scheme: dark)').matches
      ? 'dark'
      : 'light';
  }

  function getCurrentTheme() {
    const checkedItem = document.querySelector(
      '#elUserMenuThemeLink_menu .ipsMenu_itemChecked button'
    );

    if (!checkedItem) return null;

    const text = checkedItem.textContent.toLowerCase();
    if (text.includes('night') || text.includes('dark')) return 'dark';
    if (text.includes('day') || text.includes('light')) return 'light';

    return null;
  }

  function switchTheme(targetTheme) {
    const buttons = [
      ...document.querySelectorAll('#elUserMenuThemeLink_menu button'),
    ];

    const btn = buttons.find((b) => {
      const text = b.textContent.toLowerCase();
      return targetTheme === 'dark'
        ? text.includes('night') || text.includes('dark')
        : text.includes('day') || text.includes('light');
    });

    if (btn) {
      console.log('[Theme Sync] Switching to:', targetTheme);
      btn.click();
    }
  }

  function syncTheme() {
    const osTheme = getOSTheme();
    const currentTheme = getCurrentTheme();

    console.log('[Theme Sync]', { osTheme, currentTheme });

    if (!currentTheme) return;

    if (osTheme !== currentTheme) {
      switchTheme(osTheme);
    }
  }

  function init() {
    // Run once on load
    syncTheme();

    // Run periodically
    setInterval(syncTheme, CHECK_INTERVAL);
  }

  init();
})();

* Note 1: LLM generated code, I've done minimal verification & validation (on Linux & Brave browser).
* Note 2: If you are in the middle of typing out a reply and the periodic theme checking switches your theme it will trigger a page reload, anything not saved by the editor will be lost.

Edit:
*Note 3... this could have been done better via a BroadcastChannel or SharedWorker so you aren't nedlessly sending post requests to LTT forums from all the tabs. If you feel like tinkering explore those options. LLMs will gladly implement the bare minimum or just outright bad code, you have to prod them to get any semblance of quality out of them 😄

Edited by Biohazard777

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×