From 52b96557d6c48890daef6652862e01095403a132 Mon Sep 17 00:00:00 2001 From: Maciek Baron Date: Fri, 21 Jan 2022 15:24:46 +0000 Subject: [PATCH] Use *= instead of ^= for reliability --- README.md | 2 ++ package.json | 2 +- src/content.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 91083ed..53c0947 100644 --- a/README.md +++ b/README.md @@ -32,5 +32,7 @@ The code is licensed under GPL v3. The [source clown image](https://commons.wiki All clowns are randomly generated. Any resemblance or offensive connotation is purely coincidental. ## Changelog +### 0.0.2 +* Changing selector to a slightly slower but more reliable one ### 0.0.1 * Initial release diff --git a/package.json b/package.json index c9fb6b1..90318e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bird-site-clown", - "version": "0.2.1", + "version": "0.0.2", "description": "Clownifies NFT bird site", "main": "content.js", "scripts": { diff --git a/src/content.ts b/src/content.ts index a9e6e6e..2545bf5 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2,7 +2,7 @@ import makeClown from './clown'; const MUTATION_CONFIG = { childList: true, subtree: true }; const DEBOUNCE_TIME = 100; -const ELEMENT_SELECTOR = 'a>[style^=\'clip-path: url("#hex-hw-shapeclip\']:first-child'; +const ELEMENT_SELECTOR = 'a>[style*=\'clip-path: url("#hex-hw-shapeclip\']:first-child'; window.addEventListener('load', () => { let debounceTimeout: number;