diff --git a/Archive 2.zip b/Archive 2.zip deleted file mode 100644 index c2edf4e..0000000 Binary files a/Archive 2.zip and /dev/null differ diff --git a/Archive.zip b/Archive.zip index f40634e..fff0c43 100644 Binary files a/Archive.zip and b/Archive.zip differ diff --git a/package-lock.json b/package-lock.json index 5600773..08ad895 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "custom-elements-locator", - "version": "1.4.0", + "version": "1.6.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -716,6 +716,16 @@ "defer-to-connect": "^1.0.1" } }, + "@types/chrome": { + "version": "0.0.123", + "resolved": "https://artifactory.ing.net:443/artifactory/api/npm/releases_npm_all/@types/chrome/-/chrome-0.0.123.tgz", + "integrity": "sha1-O9CUrjs5IOghDKY+a1knNY+vwaU=", + "dev": true, + "requires": { + "@types/filesystem": "*", + "@types/har-format": "*" + } + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -727,6 +737,21 @@ "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==", "dev": true }, + "@types/filesystem": { + "version": "0.0.29", + "resolved": "https://artifactory.ing.net:443/artifactory/api/npm/releases_npm_all/@types/filesystem/-/filesystem-0.0.29.tgz", + "integrity": "sha1-7jdI61vhQNz5gMO9NfEa7F96N0g=", + "dev": true, + "requires": { + "@types/filewriter": "*" + } + }, + "@types/filewriter": { + "version": "0.0.28", + "resolved": "https://artifactory.ing.net:443/artifactory/api/npm/releases_npm_all/@types/filewriter/-/filewriter-0.0.28.tgz", + "integrity": "sha1-wFTor02d11205jq8dviFFocU1LM=", + "dev": true + }, "@types/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", @@ -737,6 +762,12 @@ "@types/node": "*" } }, + "@types/har-format": { + "version": "1.2.4", + "resolved": "https://artifactory.ing.net:443/artifactory/api/npm/releases_npm_all/@types/har-format/-/har-format-1.2.4.tgz", + "integrity": "sha1-MnWEIJWrtg0UtH+nmMyf9wjattQ=", + "dev": true + }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", diff --git a/package.json b/package.json index b0ea38d..4e3533e 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "query-selector-shadow-dom": "^0.3.4" }, "devDependencies": { + "@types/chrome": "0.0.123", "chokidar-cli": "^2.1.0", "mversion": "^2.0.1", "rimraf": "^3.0.0", diff --git a/src/found-element.js b/src/found-element.js index d24ea67..1b8e431 100644 --- a/src/found-element.js +++ b/src/found-element.js @@ -13,6 +13,11 @@ class FoundElement extends LitElement { } } + constructor() { + super(); + this.customElementName = ''; + } + highlight(el) { sendMessage("highlight", el); } diff --git a/src/scripts/content_script.js b/src/scripts/content_script.js index 9d1e0a9..dacdf3e 100644 --- a/src/scripts/content_script.js +++ b/src/scripts/content_script.js @@ -45,7 +45,7 @@ s.innerHTML = ` document.head.append(s); document.addEventListener('__GET_CUSTOM_ELEMENTS', (e) => { - const { href, host, elements } = e.detail; + const { href, host, elements } = /** @type {Object} */ (e).detail; allCustomElements = elements; chrome.runtime.sendMessage({ msg: 'found_new_elements', diff --git a/src/share-element.js b/src/share-element.js index 2d8d753..8f936e0 100644 --- a/src/share-element.js +++ b/src/share-element.js @@ -11,6 +11,8 @@ class ShareElement extends LitElement { constructor() { super(); + this.amount = 0; + this.domain = ''; this.locatorUrl = encodeURI("https://chrome.google.com/webstore/detail/custom-elements-locator/eccplgjbdhhakefbjfibfhocbmjpkafc"); } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2f09581 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "noEmit": true, + "lib": [ + "es2019", "DOM" + ], + "target": "ES2019", + "moduleResolution": "node", + }, + "include": [ + "src" + ] +} \ No newline at end of file