Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/third_party/fancier-settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Store } from "./lib/store.js";
import { ElementWrapper } from "./js/classes/utils.js";

import { TextExpander } from "../../options/textExpander.js";
import {
import {
KEY_AUTOCOMPLETE,
KEY_AUTOCOMPLETE_ON_ENTER,
KEY_AUTOCOMPLETE_ON_TAB,
Expand Down Expand Up @@ -101,7 +101,7 @@ function importUserDictFileSelected(settings) {
const word = line.trim();
if (word && wordRegex.test(word)) {
settings.manifest.userDictionaryList.add(word, false);
count +=1;
count += 1;
}
});
settings.manifest.userDictionaryList.store();
Expand Down Expand Up @@ -151,12 +151,12 @@ const themePresets = {
compact: {
tributeBgLight: "rgba(255, 255, 255, 0.85)",
tributeTextLight: "#1a202c",
tributeHighlightBgLight: "rgba(237, 242, 247, 0.9)",
tributeHighlightBgLight: "rgba(226, 232, 240, 0.9)",
tributeHighlightTextLight: "#1a202c",
tributeBorderLight: "rgba(226, 232, 240, 0.7)",
tributeBgDark: "rgba(45, 55, 72, 0.85)",
tributeTextDark: "#f7fafc",
tributeHighlightBgDark: "rgba(74, 85, 104, 0.9)",
tributeHighlightBgDark: "rgba(113, 128, 150, 0.9)",
tributeHighlightTextDark: "#f7fafc",
tributeBorderDark: "rgba(74, 85, 104, 0.7)",
tributeFontSize: "0.85rem",
Expand Down Expand Up @@ -209,9 +209,9 @@ window.addEventListener("DOMContentLoaded", function () {
// User dictionary add action
settings.manifest.addUserWordBtn.addEvent("action", function () {
if (settings.manifest.userDictionary.element.element.checkValidity()) {
const word = settings.manifest.userDictionary.get();
settings.manifest.userDictionaryList.add(word);
settings.manifest.userDictionary.element.element.value = "";
const word = settings.manifest.userDictionary.get();
settings.manifest.userDictionaryList.add(word);
settings.manifest.userDictionary.element.element.value = "";
}
});
// User dictionary remove action
Expand Down Expand Up @@ -255,13 +255,13 @@ window.addEventListener("DOMContentLoaded", function () {
);

const importUserDictElem =
settings.manifest.importUserDictButton.element.element;
settings.manifest.importUserDictButton.element.element;
importUserDictElem.type = "file";
importUserDictElem.accept = ".txt";
importUserDictElem.addEventListener(
"input",
importUserDictFileSelected.bind(null, settings)
);
"input",
importUserDictFileSelected.bind(null, settings)
);

// Theme preset buttons
settings.manifest[KEY_USE_DEFAULT_THEME_BTN].addEvent("action", function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/BackgroundServiceWorker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jest.unstable_mockModule("../src/background/TabMessenger", () => ({
import type { BackgroundServiceWorker as BackgroundServiceWorkerType } from "../src/background/background";

describe("BackgroundServiceWorker", () => {
let BackgroundServiceWorkerClass: { new(): BackgroundServiceWorkerType };
let BackgroundServiceWorkerClass: { new (): BackgroundServiceWorkerType };
let worker: BackgroundServiceWorkerType;

beforeAll(async () => {
Expand Down
10 changes: 6 additions & 4 deletions tests/e2e/puppeteer-extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ describe("Chrome Extension E2E Test", () => {
// Ensure textarea is focused and clear
await page.evaluate(
() =>
(document.querySelector("#test-textarea") as HTMLTextAreaElement)
.value = "",
((
document.querySelector("#test-textarea") as HTMLTextAreaElement
).value = ""),
);
await textarea!.type(testData.input);
// Wait for predictions to update after typing
Expand All @@ -220,8 +221,9 @@ describe("Chrome Extension E2E Test", () => {
// Cleanup for next iteration
await page.evaluate(
() =>
(document.querySelector("#test-textarea") as HTMLTextAreaElement)
.value = "",
((
document.querySelector("#test-textarea") as HTMLTextAreaElement
).value = ""),
);
// Wait for predictions to disappear
// Note: Tribute might not remove the container, just hide it.
Expand Down
Loading