diff --git a/.prettierrc.mjs b/.prettierrc.mjs index 77f84c2..4b7b403 100644 --- a/.prettierrc.mjs +++ b/.prettierrc.mjs @@ -5,9 +5,9 @@ export default { printWidth: 80, tabWidth: 2, useTabs: false, - semi: false, + semi: true, singleQuote: false, - trailingComma: "none", + trailingComma: "all", bracketSpacing: true, bracketSameLine: true, plugins: ["@ianvs/prettier-plugin-sort-imports"], diff --git a/contents/fuckTx.ts b/contents/fuckTx.ts new file mode 100644 index 0000000..ff76770 --- /dev/null +++ b/contents/fuckTx.ts @@ -0,0 +1,27 @@ +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);