refactor: 更新瞬间链接打开方式
- 将瞬间链接的 href 属性从实际 URL 改为 "javascript:void(0)" - 在 main.js 中硬编码瞬间链接的 URL - 这种改动可以提高用户体验,避免直接在新标签页打开链接
This commit is contained in:
@@ -147,7 +147,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="navigation__item">
|
||||
<a href="https://moments.hehouhui.cn/" class="moments-link"
|
||||
<a href="javascript:void(0)" class="moments-link"
|
||||
title="瞬间" target="_blank">
|
||||
<j class="fab fa-qq"></j>
|
||||
<span class="label">瞬间</span>
|
||||
|
||||
@@ -94,7 +94,7 @@ $('.moments-link').on('click', function (e) {
|
||||
e.preventDefault(); // 阻止默认跳转
|
||||
|
||||
// 获取链接地址
|
||||
var url = $(this).attr('href');
|
||||
var url = "https://moments.hehouhui.cn";
|
||||
console.log("当前用户UA-", navigator.userAgent)
|
||||
// 判断是否是移动端
|
||||
var isMobile = /iPhone|Android/i.test(navigator.userAgent);
|
||||
|
||||
Reference in New Issue
Block a user