diff --git a/content_script.js b/content_script.js index 2335d0b..50b0cd7 100644 --- a/content_script.js +++ b/content_script.js @@ -198,7 +198,7 @@ const matchDropdown = (mut, testName, openOrClose) => { return mut.target.parentNode.parentNode.classList.contains(testName) && Array.from(nodes).some( n => n.nodeType === Node.ELEMENT_NODE && - n.classList.contains("db-web-dropdown-outer-container")) + n.classList.contains("db-web-transition-dropdown_outer-container")) } /**@param {MutationRecord} mut */ @@ -225,7 +225,7 @@ const startClaim = { const fillData = { name: "fillData", - match: node => node.classList.contains("fahrgastrechte-bahn-card-auswahl"), + match: node => node.classList.contains("bahncard-auswahl"), execute: node => { settings.get(["bcnum", "bday"]).then(cfg => { for (const [k, v] of Object.entries(cfg)) { @@ -245,7 +245,7 @@ const clickContinue = { name: "clickContinue", match: () => $('#fahrgastrechte-bahn-card-auswahl-geburts-datum--db-web-text-input').value !== "", execute: e => { - const continueButton = $('.fahrgastrechte-bahn-card-auswahl button.fahrgastrechte-continue-button'); + const continueButton = $('.bahncard-auswahl button.fahrgastrechte-continue-button'); if (continueButton instanceof Element) { continueButton.dispatchEvent(_clickEv()); return true; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..795bba1 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,10 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; + + +export default [ + { plugins: globals.webextensions.browser }, + {files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}}, + {languageOptions: { globals: globals.browser }}, + pluginJs.configs.recommended, +]; \ No newline at end of file diff --git a/package.json b/package.json index a8987ea..fc7f5d1 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,13 @@ { "devDependencies": { + "@eslint/js": "^9.5.0", "@types/firefox-webext-browser": "^111.0.2", + "eslint": "~9.5.0", + "globals": "^15.6.0", "web-ext": "^7.8.0", "webextension-polyfill": "github:mozilla/webextension-polyfill" }, "scripts": { "start:firefox": "web-ext run" - }, - "dependencies": { - "luhn": "^2.4.1", - "typescript": "^5.2.2" } } diff --git a/web-ext-config.cjs b/web-ext-config.mjs similarity index 95% rename from web-ext-config.cjs rename to web-ext-config.mjs index e66ee29..9f07780 100644 --- a/web-ext-config.cjs +++ b/web-ext-config.mjs @@ -1,4 +1,4 @@ -module.exports = { +export default { ignoreFiles: [ "README.md", "package.json",