AdguardTeam / AdguardTeam/Scriptlets

Fix 'href-sanitizer' — performance issue

未關閉
#466 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug Priority: P4
主要語言
JavaScript
星號
195
分支
33
PR 合併指標
30 天內沒有已合併 PR

描述

AdGuard 4.4.41
Scriptlets v1.12.1

### Details

https://hentai-id.tv/ uses URL shortener for analytics

![image](https://github.com/user-attachments/assets/33c87a67-b69b-44c8-b0d5-fb7028025aaf)

Following rule removes redirection
`hentai-id.tv#%#//scriptlet('href-sanitizer', 'a[href*="://ouo.io/"]', '?s')`

Example
```
https://ouo.io/s/lbH3iXRW?s=https://hentai-id.tv/my-weekend-sex-buddy-my-female-boss-only-i-know-the-other-side-of-julia/
```
changed to
```
https://hentai-id.tv/my-weekend-sex-buddy-my-female-boss-only-i-know-the-other-side-of-julia/
```

### Problem details

I need to wait until the page will be loaded completely.
It can be reproduce with throttling as 3G using the DevTools.

Details

![image](https://github.com/user-attachments/assets/9926b7bb-ee1b-4d48-ac5d-d7c752cc72fb)

### Proposed solution

Probably mutation observer can be used to scan elements, or just scan every 0.5-1 second.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。