MethodGrab / firefox-custom-new-tab-page

A Firefox extension that allows you to specify a custom new-tab URL
https://addons.mozilla.org/firefox/addon/custom-new-tab-page
ISC License
76 stars 18 forks source link

Theme option, prevent flash of wrong system theme and other changes #40

Open will-lol opened 1 year ago

will-lol commented 1 year ago

Add theme option

I added an option that uses the theme.getCurrent() API to match the background of the tab before loading to that of the current theme.

Prevent flash of wrong system theme

When the system was in dark mode, the previous behavior would flash a white page before loading the page. Now the body color matches that of the default Firefox light and dark themes depending on the prefers-color-scheme media query. This does not override a custom color that may be set, it only applies to the 'none' setting.

Additional changes

I changed the light and dark colors to match that of the default Firefox light and dark themes.