diff --git a/docs/guide/essentials/content-scripts.md b/docs/guide/essentials/content-scripts.md index 727ed096..e8b350d9 100644 --- a/docs/guide/essentials/content-scripts.md +++ b/docs/guide/essentials/content-scripts.md @@ -603,7 +603,7 @@ export default defineContentScript({ matches: ['*://*.youtube.com/*'], main(ctx) { ctx.addEventListener(window, 'wxt:locationchange', ({ newUrl }) => { - if (watchPattern.matches(newUrl)) mainWatch(ctx); + if (watchPattern.includes(newUrl)) mainWatch(ctx); }); }, });