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 摘要。