dont-track-me-google
Firefox and Chrome extensions to prevent Google from making links ugly.
Change CSS theme with toggle, buttons or select using CSS custom properties and localStorage
Tiny helper for CSS themes.
data-set-theme to set theme theme.data-set-theme controls<script src="https://cdn.jsdelivr.net/npm/theme-change@latest/index.js"></script>
npm i theme-change@latest
import { themeChange } from "theme-change";
themeChange();
Use themeChange(false) when controls are mounted after initial page load.
import { useEffect } from "react";
import { themeChange } from "theme-change";
useEffect(() => {
themeChange(false);
}, []);
import { onMounted } from "vue";
import { themeChange } from "theme-change";
export default {
setup() {
onMounted(() => {
themeChange(false);
});
},
};
import { onMount } from "svelte";
import { themeChange } from "theme-change";
onMount(() => {
themeChange(false);
});
---
import { themeChange } from "theme-change";
---
<script>
themeChange(false);
</script>
Use daisyUI themes, or define your own theme tokens:
:root {
--my-color: #fff;
}
[data-theme="dark"] {
--my-color: #000;
}
[data-theme="pink"] {
--my-color: #ffabc8;
}
body {
background-color: var(--my-color);
}
Notes:
data-key stay in sync.data-act-class<button data-set-theme="" data-act-class="ACTIVE"></button> <button data-set-theme="dark" data-act-class="ACTIVE"></button> <button data-set-theme="pink" data-act-class="ACTIVE"></button>
data-act-attributeLike data-act-class, but sets an arbitrary HTML attribute (instead of a class) on a button while its theme is active, and removes it when inactive. Useful for accessibility state such as aria-pressed or aria-current.
<!-- name:value — active: aria-pressed="true", inactive: attribute removed --> <button data-set-theme="dark" data-act-attribute="aria-pressed:true"></button> <!-- bare name (no colon) — boolean presence: active: aria-current="", inactive: removed --> <button data-set-theme="pink" data-act-attribute="aria-current"></button>
Notes:
name[:value]. Only the first colon splits name and value, so the value may itself contain colons (e.g. data-act-attribute="title:Active: dark").data-act-class — ignored on <select> and checkbox controls.data-act-class on the same element.data-toggle-theme buttons.data-key<select data-set-theme data-key="admin-panel"></select> <button data-set-theme="dark" data-key="front-page"></button> <input type="checkbox" value="pink" data-set-theme data-key="premium-user-theme" />
Legacy v2 attributes still work:
data-toggle-themedata-choose-thememore like this
Firefox and Chrome extensions to prevent Google from making links ugly.
A Light theme for both KDE and GTK based distros, pleasant to the eyes and perfect for your daily workload.
search projects, people, and tags