Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Commit

Permalink
fix: 修复QQ邮箱失效的问题 close #40
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Jan 10, 2019
1 parent 9b7eaed commit ce9a6c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app.ts
Expand Up @@ -31,7 +31,8 @@ export class App {
new Date().getFullYear(),
"\n" + "Author @Axetroy"
);
console.log("[anti-redirect]: 如果发现页面重定向未去除,欢迎反馈!");
console.log("[Anti-redirect]: 如果发现页面重定向未去除,欢迎反馈!");
console.log(`%c[Anti-redirect]: 支付宝搜索 "%c511118132%c" 领取红包支持作者!`, "font-size: 12px;" ,"font-size: 16px;color: red", "font-size: 12px;");
}
private isMatchProvider(
aElement: HTMLAnchorElement,
Expand Down
10 changes: 7 additions & 3 deletions src/sites/qq.mail.ts
Expand Up @@ -2,12 +2,16 @@ import { IProvider } from "../provider";

export class QQMailProvider implements IProvider {
public test = true;
private container = document.querySelector("#contentDiv0");
private container: HTMLElement;
public resolve(aElement: HTMLAnchorElement) {
this.container = document.querySelector("#contentDiv")
if (this.container && this.container.contains(aElement)) {
if (aElement.onclick) {
aElement.onclick = () => {
//
aElement.onclick = (e) => {
// 阻止事件冒泡, 因为上层元素绑定的click事件会重定向
if (e.stopPropagation) {
e.stopPropagation()
}
};
}
}
Expand Down

0 comments on commit ce9a6c0

Please sign in to comment.