Compare commits
No commits in common. "dfb6d66c105470382e208dbdad1c2b7bb12f532b" and "8bfab0e01d86091f4b2e120947a391b4b16e64a2" have entirely different histories.
dfb6d66c10
...
8bfab0e01d
|
@ -1,20 +1,3 @@
|
|||
# Set TARGET using duckscript rather than the usual `env_not_set` way as there's
|
||||
# currently a potential bug with using decode maps and conditions.
|
||||
# https://github.com/sagiegurari/cargo-make/issues/1018
|
||||
env_scripts = ["""
|
||||
#!@duckscript
|
||||
|
||||
target = get_env TARGET
|
||||
if is_empty ${target}
|
||||
browser = get_env BROWSER
|
||||
if eq ${browser} "firefox"
|
||||
set_env TARGET "firefox-desktop"
|
||||
else
|
||||
set_env TARGET ${browser}
|
||||
end
|
||||
end
|
||||
"""]
|
||||
|
||||
[env]
|
||||
# Set BROWSER="firefox" if not already defined.
|
||||
# All browser targets are defined in `source/types.d.ts` as a global `$browser`.
|
||||
|
@ -79,16 +62,10 @@ args = ["install", "--silent"]
|
|||
[tasks.run]
|
||||
clear = true
|
||||
command = "pnpm"
|
||||
args = [
|
||||
"web-ext",
|
||||
"run",
|
||||
# Set --target explicitly, since web-ext for some reason doesn't use the target
|
||||
# set in the configuration file. https://github.com/mozilla/web-ext/issues/1862
|
||||
"--target=${TARGET}",
|
||||
"--config=build/web-ext-${BROWSER}.json",
|
||||
"--adb-device=${ADB_DEVICE}",
|
||||
"--firefox-apk=org.mozilla.fenix"
|
||||
]
|
||||
# Set --target explicitly, since web-ext for some reason doesn't use the target
|
||||
# set in the configuration file. https://github.com/mozilla/web-ext/issues/1862
|
||||
env = { TARGET = { source = "${BROWSER}", default_value = "${BROWSER}", mapping = { "firefox" = "firefox-desktop" } } }
|
||||
args = ["web-ext", "run", "--target=${TARGET}", "--config=build/web-ext-${BROWSER}.json"]
|
||||
|
||||
# Alias for `WATCH=true makers build`.
|
||||
[tasks.watch]
|
||||
|
|
12
flake.lock
12
flake.lock
|
@ -5,11 +5,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"lastModified": 1687171271,
|
||||
"narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -20,11 +20,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1704842529,
|
||||
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
|
||||
"lastModified": 1687488839,
|
||||
"narHash": "sha256-7JDjuyHwUvGJJge9jxfRJkuYyL5G5yipspc4J3HwjGA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5",
|
||||
"rev": "f9e94676ce6c7531c44d38da61d2669ebec0f603",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
39
package.json
39
package.json
|
@ -5,35 +5,35 @@
|
|||
"@holllo/migration-helper": "^0.1.4",
|
||||
"@holllo/webextension-storage": "^0.2.0",
|
||||
"caret-pos": "^2.0.0",
|
||||
"debounce": "^2.0.0",
|
||||
"debounce": "^1.2.1",
|
||||
"fast-diff": "^1.3.0",
|
||||
"modern-normalize": "^2.0.0",
|
||||
"platform": "^1.3.6",
|
||||
"preact": "^10.19.3",
|
||||
"preact": "^10.15.1",
|
||||
"webextension-polyfill": "^0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@bauke/eslint-config": "^0.1.4",
|
||||
"@bauke/prettier-config": "^0.1.4",
|
||||
"@bauke/stylelint-config": "^0.1.4",
|
||||
"@bauke/eslint-config": "^0.1.3",
|
||||
"@bauke/prettier-config": "^0.1.3",
|
||||
"@bauke/stylelint-config": "^0.1.3",
|
||||
"@holllo/test": "^0.2.1",
|
||||
"@types/debounce": "^1.2.4",
|
||||
"@types/node": "^20.11.0",
|
||||
"@types/platform": "^1.3.6",
|
||||
"@types/webextension-polyfill": "^0.10.7",
|
||||
"concurrently": "^8.2.2",
|
||||
"cssnano": "^6.0.3",
|
||||
"esbuild": "^0.19.11",
|
||||
"@types/debounce": "^1.2.1",
|
||||
"@types/node": "^20.3.3",
|
||||
"@types/platform": "^1.3.4",
|
||||
"@types/webextension-polyfill": "^0.10.1",
|
||||
"concurrently": "^8.2.0",
|
||||
"cssnano": "^6.0.1",
|
||||
"esbuild": "^0.18.11",
|
||||
"esbuild-copy-static-files": "^0.1.0",
|
||||
"esbuild-sass-plugin": "^2.16.1",
|
||||
"postcss": "^8.4.33",
|
||||
"sass": "^1.69.7",
|
||||
"esbuild-sass-plugin": "^2.10.0",
|
||||
"postcss": "^8.4.24",
|
||||
"sass": "^1.63.6",
|
||||
"stylelint": "^15.9.0",
|
||||
"trash-cli": "^5.0.0",
|
||||
"tsx": "^4.7.0",
|
||||
"typescript": "^5.3.3",
|
||||
"web-ext": "^7.10.0",
|
||||
"xo": "^0.56.0"
|
||||
"tsx": "^3.12.7",
|
||||
"typescript": "^5.1.6",
|
||||
"web-ext": "^7.6.2",
|
||||
"xo": "^0.54.2"
|
||||
},
|
||||
"prettier": "@bauke/prettier-config",
|
||||
"stylelint": {
|
||||
|
@ -43,7 +43,6 @@
|
|||
"extends": "@bauke/eslint-config",
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
||||
"complexity": "off",
|
||||
"no-await-in-loop": "off"
|
||||
},
|
||||
|
|
3553
pnpm-lock.yaml
3553
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -41,7 +41,7 @@ async function generateReplacements(
|
|||
data: AnonymizeUsernamesData,
|
||||
): Promise<Record<string, string>> {
|
||||
const usernames = new Set(
|
||||
elements.map((element) => usernameFromElement(element).replaceAll("@", "")),
|
||||
elements.map((element) => usernameFromElement(element).replace(/@/g, "")),
|
||||
);
|
||||
|
||||
const replacements: Record<string, string> = {};
|
||||
|
|
|
@ -39,7 +39,7 @@ function applyEnhancements(): number {
|
|||
}
|
||||
|
||||
// Remove any excess whitespace.
|
||||
text = text.replaceAll(/\s+/, " ").trim();
|
||||
text = text.replace(/\s+/g, " ").trim();
|
||||
|
||||
// Remove the editor's name too as we already have that.
|
||||
text = text.slice(text.indexOf(" ") + 1);
|
||||
|
@ -166,7 +166,7 @@ function transformText(text: string): TransformedText {
|
|||
);
|
||||
|
||||
if (removed !== undefined) {
|
||||
const tags = removed.replaceAll("'", "").split(", ");
|
||||
const tags = removed.replace(/'/g, "").split(", ");
|
||||
spans.push(
|
||||
...tags.map((tag) => (
|
||||
<>
|
||||
|
@ -180,7 +180,7 @@ function transformText(text: string): TransformedText {
|
|||
}
|
||||
|
||||
if (added !== undefined) {
|
||||
const tags = added.replaceAll("'", "").split(", ");
|
||||
const tags = added.replace(/'/g, "").split(", ");
|
||||
spans.push(
|
||||
...tags.map((tag) => (
|
||||
<>
|
||||
|
|
|
@ -82,7 +82,7 @@ export class UserLabelsFeature extends Component<Props, State> {
|
|||
});
|
||||
|
||||
for (const element of elements) {
|
||||
let username: string = element.textContent!.replaceAll("@", "");
|
||||
let username: string = element.textContent!.replace(/@/g, "");
|
||||
|
||||
if (this.props.anonymizeUsernamesEnabled) {
|
||||
username = element.dataset.trxUsername ?? username;
|
||||
|
|
|
@ -54,7 +54,6 @@ async function importFileHandler(event: Event): Promise<void> {
|
|||
reader.abort();
|
||||
});
|
||||
|
||||
// eslint-disable-next-line unicorn/prefer-blob-reading-methods
|
||||
reader.readAsText(fileList[0]);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ export class AnonymizeUsernamesSetting extends Component<SettingProps, State> {
|
|||
const replacementTypeOptions = Object.values(ReplacementType).map((key) => (
|
||||
<option selected={key === replacementType} value={key}>
|
||||
{key
|
||||
.replaceAll("-", " ")
|
||||
.replaceAll(/(\b[a-z])/gi, (character) => character.toUpperCase())}
|
||||
.replace(/-/g, " ")
|
||||
.replace(/(\b[a-z])/gi, (character) => character.toUpperCase())}
|
||||
</option>
|
||||
));
|
||||
|
||||
|
|
|
@ -135,8 +135,8 @@ export class HideTopicsSetting extends Component<SettingProps, State> {
|
|||
const matcherOptions = Object.values(HideTopicMatcher).map((key) => (
|
||||
<option selected={predicate.matcher === key} value={key}>
|
||||
{key
|
||||
.replaceAll("-", " ")
|
||||
.replaceAll(/(\b[a-z])/gi, (character) => character.toUpperCase())}
|
||||
.replace(/-/g, " ")
|
||||
.replace(/(\b[a-z])/gi, (character) => character.toUpperCase())}
|
||||
</option>
|
||||
));
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {Component, type ComponentChildren, type JSX} from "preact";
|
||||
// eslint-disable-next-line n/file-extension-in-import
|
||||
import {useContext} from "preact/hooks";
|
||||
import {AppContext} from "../context.js";
|
||||
import {type Feature} from "../../storage/exports.js";
|
||||
|
|
|
@ -126,10 +126,8 @@ export class MiscellaneousSetting extends Component<SettingProps, State> {
|
|||
onClick={clickHandler}
|
||||
/>
|
||||
{feature
|
||||
.replaceAll("-", " ")
|
||||
.replaceAll(/(\b[a-z])/gi, (character) =>
|
||||
character.toUpperCase(),
|
||||
)}
|
||||
.replace(/-/g, " ")
|
||||
.replace(/(\b[a-z])/gi, (character) => character.toUpperCase())}
|
||||
</label>
|
||||
<FeatureDescription feature={feature} />
|
||||
</li>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
border: 1px solid var(--border-color);
|
||||
font-size: 80%;
|
||||
max-height: 8rem;
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
overflow-y: hidden;
|
||||
position: absolute;
|
||||
|
||||
li {
|
||||
|
|
|
@ -253,6 +253,6 @@ export function processSnippetShortcut(
|
|||
alt: components.includes("alt"),
|
||||
ctrl: components.includes("ctrl"),
|
||||
shift: components.includes("shift"),
|
||||
key: components.at(-1),
|
||||
key: components[components.length - 1],
|
||||
} satisfies ProcessedSnippetShortcut;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ export const migrations: Array<Migration<string>> = [
|
|||
enabledFeatures.value.clear();
|
||||
for (const [key, value] of Object.entries(data.features)) {
|
||||
if (value) {
|
||||
const snakeCasedKey = key.replaceAll(/([A-Z])/g, "-$1").toLowerCase();
|
||||
const snakeCasedKey = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
||||
if (Object.values(Feature).includes(snakeCasedKey as Feature)) {
|
||||
enabledFeatures.value.add(snakeCasedKey as Feature);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue