fix: remove bootstrap content side effects
This commit is contained in:
parent
74a2eca0ac
commit
037423853a
@ -1,21 +1 @@
|
|||||||
const MARKET_ORIGIN = "https://xingtu.cn";
|
export {};
|
||||||
const MARKET_PATH_PREFIX = "/ad/creator/market";
|
|
||||||
|
|
||||||
function isMarketPage(locationUrl: URL): boolean {
|
|
||||||
return (
|
|
||||||
locationUrl.origin === MARKET_ORIGIN &&
|
|
||||||
locationUrl.pathname.startsWith(MARKET_PATH_PREFIX)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bootstrap(): void {
|
|
||||||
const locationUrl = new URL(window.location.href);
|
|
||||||
|
|
||||||
if (!isMarketPage(locationUrl)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.debug("[star-chart-search-enhancer] content script bootstrapped");
|
|
||||||
}
|
|
||||||
|
|
||||||
bootstrap();
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user