Skip to content

Commit

Permalink
fix: 🐛 重定向/home在移动端会重复加载
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteSevs committed May 14, 2024
1 parent be2615c commit f5436e1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/抖音优化/SCRIPT_VERSION.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"time": 1715658145192,
"version": "2024.5.14.11"
"time": 1715659292850,
"version": "2024.5.14.12"
}
4 changes: 2 additions & 2 deletions packages/抖音优化/dist/抖音优化.min.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/抖音优化/dist/抖音优化.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name 抖音优化
// @namespace https://github.com/WhiteSevs/TamperMonkeyScript
// @version 2024.5.14.11
// @version 2024.5.14.12
// @author WhiteSevs
// @description 过滤广告、过滤直播、可自定义过滤视频的屏蔽关键字、伪装登录、直播屏蔽弹幕、礼物特效等
// @license GPL-3.0-only
Expand Down Expand Up @@ -2376,7 +2376,7 @@
*/
redirectUrlHomeToRoot() {
if (window.location.pathname === "/home") {
window.location.href = window.location.origin;
window.location.href = window.location.origin + "/?is_from_mobile_home=1&recommend=1";
}
}
};
Expand Down
3 changes: 2 additions & 1 deletion packages/抖音优化/src/main/DouYinRedirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const DouYinRedirect = {
*/
redirectUrlHomeToRoot() {
if (window.location.pathname === "/home") {
window.location.href = window.location.origin;
window.location.href =
window.location.origin + "/?is_from_mobile_home=1&recommend=1";
}
},
};

0 comments on commit f5436e1

Please sign in to comment.