docs: fix incorrect syntax for MatchPattern (#1148)

This commit is contained in:
jasonbla
2024-11-13 22:56:58 +09:00
committed by GitHub
parent b121ed2fe2
commit 63dee97ac3
+1 -1
View File
@@ -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);
});
},
});