Add fuck tencent logic
This commit is contained in:
parent
df179792e7
commit
cdcc2c3172
|
|
@ -5,9 +5,9 @@ export default {
|
||||||
printWidth: 80,
|
printWidth: 80,
|
||||||
tabWidth: 2,
|
tabWidth: 2,
|
||||||
useTabs: false,
|
useTabs: false,
|
||||||
semi: false,
|
semi: true,
|
||||||
singleQuote: false,
|
singleQuote: false,
|
||||||
trailingComma: "none",
|
trailingComma: "all",
|
||||||
bracketSpacing: true,
|
bracketSpacing: true,
|
||||||
bracketSameLine: true,
|
bracketSameLine: true,
|
||||||
plugins: ["@ianvs/prettier-plugin-sort-imports"],
|
plugins: ["@ianvs/prettier-plugin-sort-imports"],
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
Loading…
Reference in New Issue