1
Fork 0

Compare commits

...

4 Commits

5 changed files with 5 additions and 3 deletions

View File

@ -18,6 +18,7 @@ async function initialize() {
const start = window.performance.now();
initializeGlobals();
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
// array so that when groups are changed on Tildes, TRX can still update

View File

@ -44,7 +44,7 @@ export const features: FeatureData[] = [
component: BackToTopSetting,
},
{
availableSince: new Date("2023-06-31"),
availableSince: new Date("2023-07-01"),
index: 0,
key: Feature.HideTopics,
title: "Hide Topics",

View File

@ -83,7 +83,7 @@ class App extends Component<Props, State> {
// Create the version link for the header.
const version = manifest.version;
const versionUrl = encodeURI(
`https://gitlab.com/tildes-community/tildes-reextended/-/tags/${version}`,
`https://gitlab.com/tildes-community/tildes-reextended/-/releases/${version}`,
);
const versionLink = (
<Link class="version" text={`v${version}`} url={versionUrl} />

View File

@ -1,4 +1,4 @@
import {createValue} from "@holllo/webextension-storage";
import {createValue, type Value} from "@holllo/webextension-storage";
import browser from "webextension-polyfill";
import {Data, Feature} from "./enums.js";
import {collectHideTopicsData} from "./hide-topics.js";

View File

@ -50,6 +50,7 @@ export const migrations: Array<Migration<string>> = [
await version.save();
const enabledFeatures = await fromStorage(Data.EnabledFeatures);
enabledFeatures.value.clear();
for (const [key, value] of Object.entries(data.features)) {
if (value) {
const snakeCasedKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();