Compare commits
4 Commits
089ea3d5ab
...
f3f12282e3
Author | SHA1 | Date |
---|---|---|
Bauke | f3f12282e3 | |
Bauke | 2954c93af5 | |
Bauke | 95ae6d0d40 | |
Bauke | 5f6cf4a6de |
|
@ -18,6 +18,7 @@ async function initialize() {
|
||||||
const start = window.performance.now();
|
const start = window.performance.now();
|
||||||
initializeGlobals();
|
initializeGlobals();
|
||||||
const enabledFeatures = await fromStorage(Data.EnabledFeatures);
|
const enabledFeatures = await fromStorage(Data.EnabledFeatures);
|
||||||
|
window.TildesReExtended.debug = enabledFeatures.value.has(Feature.Debug);
|
||||||
|
|
||||||
// Any features that will use the knownGroups data should be added to this
|
// Any features that will use the knownGroups data should be added to this
|
||||||
// array so that when groups are changed on Tildes, TRX can still update
|
// array so that when groups are changed on Tildes, TRX can still update
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const features: FeatureData[] = [
|
||||||
component: BackToTopSetting,
|
component: BackToTopSetting,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
availableSince: new Date("2023-06-31"),
|
availableSince: new Date("2023-07-01"),
|
||||||
index: 0,
|
index: 0,
|
||||||
key: Feature.HideTopics,
|
key: Feature.HideTopics,
|
||||||
title: "Hide Topics",
|
title: "Hide Topics",
|
||||||
|
|
|
@ -83,7 +83,7 @@ class App extends Component<Props, State> {
|
||||||
// Create the version link for the header.
|
// Create the version link for the header.
|
||||||
const version = manifest.version;
|
const version = manifest.version;
|
||||||
const versionUrl = encodeURI(
|
const versionUrl = encodeURI(
|
||||||
`https://gitlab.com/tildes-community/tildes-reextended/-/tags/${version}`,
|
`https://gitlab.com/tildes-community/tildes-reextended/-/releases/${version}`,
|
||||||
);
|
);
|
||||||
const versionLink = (
|
const versionLink = (
|
||||||
<Link class="version" text={`v${version}`} url={versionUrl} />
|
<Link class="version" text={`v${version}`} url={versionUrl} />
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {createValue} from "@holllo/webextension-storage";
|
import {createValue, type Value} from "@holllo/webextension-storage";
|
||||||
import browser from "webextension-polyfill";
|
import browser from "webextension-polyfill";
|
||||||
import {Data, Feature} from "./enums.js";
|
import {Data, Feature} from "./enums.js";
|
||||||
import {collectHideTopicsData} from "./hide-topics.js";
|
import {collectHideTopicsData} from "./hide-topics.js";
|
||||||
|
|
|
@ -50,6 +50,7 @@ export const migrations: Array<Migration<string>> = [
|
||||||
await version.save();
|
await version.save();
|
||||||
|
|
||||||
const enabledFeatures = await fromStorage(Data.EnabledFeatures);
|
const enabledFeatures = await fromStorage(Data.EnabledFeatures);
|
||||||
|
enabledFeatures.value.clear();
|
||||||
for (const [key, value] of Object.entries(data.features)) {
|
for (const [key, value] of Object.entries(data.features)) {
|
||||||
if (value) {
|
if (value) {
|
||||||
const snakeCasedKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
const snakeCasedKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||||
|
|
Loading…
Reference in New Issue