28 lines
685 B
TypeScript
28 lines
685 B
TypeScript
import type { PlasmoCSConfig } from "plasmo";
|
|
|
|
export const config: PlasmoCSConfig = {
|
|
matches: ["https://c.pc.qq.com/*"],
|
|
};
|
|
|
|
const url = new URL(location.href);
|
|
const redirectUrl = url.searchParams.get("url");
|
|
|
|
const titleEl = document.querySelector(".container .title");
|
|
const descEl = document.querySelector(".container .p");
|
|
|
|
if (titleEl) {
|
|
if (titleEl.innerHTML === "已停止访问该网页") {
|
|
titleEl.innerHTML = "傻逼腾讯,我就要访问这个网页!";
|
|
}
|
|
}
|
|
|
|
if (descEl) {
|
|
descEl.innerHTML = "小窝工具箱扩展,将自动为你跳转到对应的链接";
|
|
}
|
|
|
|
setTimeout(() => {
|
|
if (redirectUrl) {
|
|
window.location.href = redirectUrl;
|
|
}
|
|
}, 1000);
|