🐛 xiaohongshu style and jump fixed
This commit is contained in:
@@ -1,76 +0,0 @@
|
||||
{
|
||||
"apps": [
|
||||
{
|
||||
"name": "programmusic",
|
||||
"title": "ProgramMusic",
|
||||
"name_zh": "ProgramMusic",
|
||||
"url": "https://musicforprogramming.net/"
|
||||
},
|
||||
{
|
||||
"name": "twitter",
|
||||
"title": "Twitter",
|
||||
"name_zh": "推特",
|
||||
"url": "https://twitter.com/"
|
||||
},
|
||||
{
|
||||
"name": "youtube",
|
||||
"title": "YouTube",
|
||||
"name_zh": "YouTube",
|
||||
"url": "https://www.youtube.com"
|
||||
},
|
||||
{
|
||||
"name": "coderunner",
|
||||
"title": "CodeRunner",
|
||||
"name_zh": "CodeRunner",
|
||||
"url": "https://riju.codes/"
|
||||
},
|
||||
{
|
||||
"name": "chatgpt",
|
||||
"title": "ChatGPT",
|
||||
"name_zh": "ChatGPT",
|
||||
"url": "https://chatgpt.com/"
|
||||
},
|
||||
{
|
||||
"name": "flomo",
|
||||
"title": "Flomo",
|
||||
"name_zh": "浮墨",
|
||||
"url": "https://v.flomoapp.com/mine"
|
||||
},
|
||||
{
|
||||
"name": "qwerty",
|
||||
"title": "Qwerty",
|
||||
"name_zh": "Qwerty",
|
||||
"url": "https://qwerty.kaiyi.cool/"
|
||||
},
|
||||
{
|
||||
"name": "lizhi",
|
||||
"title": "LiZhi",
|
||||
"name_zh": "李志",
|
||||
"url": "https://lizhi.turkyden.com/?from=pake"
|
||||
},
|
||||
{
|
||||
"name": "xiaohongshu",
|
||||
"title": "XiaoHongShu",
|
||||
"name_zh": "小红书",
|
||||
"url": "https://www.xiaohongshu.com/explore"
|
||||
},
|
||||
{
|
||||
"name": "poe",
|
||||
"title": "Poe",
|
||||
"name_zh": "Poe",
|
||||
"url": "https://poe.com/"
|
||||
},
|
||||
{
|
||||
"name": "youtubemusic",
|
||||
"title": "YouTubeMusic",
|
||||
"name_zh": "YouTubeMusic",
|
||||
"url": "https://music.youtube.com/"
|
||||
},
|
||||
{
|
||||
"name": "weread",
|
||||
"title": "WeRead",
|
||||
"name_zh": "微信阅读",
|
||||
"url": "https://weread.qq.com/"
|
||||
}
|
||||
]
|
||||
}
|
||||
74
default_app_list.json
Normal file
74
default_app_list.json
Normal file
@@ -0,0 +1,74 @@
|
||||
[
|
||||
{
|
||||
"name": "programmusic",
|
||||
"title": "ProgramMusic",
|
||||
"name_zh": "ProgramMusic",
|
||||
"url": "https://musicforprogramming.net/"
|
||||
},
|
||||
{
|
||||
"name": "twitter",
|
||||
"title": "Twitter",
|
||||
"name_zh": "推特",
|
||||
"url": "https://twitter.com/"
|
||||
},
|
||||
{
|
||||
"name": "youtube",
|
||||
"title": "YouTube",
|
||||
"name_zh": "YouTube",
|
||||
"url": "https://www.youtube.com"
|
||||
},
|
||||
{
|
||||
"name": "coderunner",
|
||||
"title": "CodeRunner",
|
||||
"name_zh": "CodeRunner",
|
||||
"url": "https://riju.codes/"
|
||||
},
|
||||
{
|
||||
"name": "chatgpt",
|
||||
"title": "ChatGPT",
|
||||
"name_zh": "ChatGPT",
|
||||
"url": "https://chatgpt.com/"
|
||||
},
|
||||
{
|
||||
"name": "flomo",
|
||||
"title": "Flomo",
|
||||
"name_zh": "浮墨",
|
||||
"url": "https://v.flomoapp.com/mine"
|
||||
},
|
||||
{
|
||||
"name": "qwerty",
|
||||
"title": "Qwerty",
|
||||
"name_zh": "Qwerty",
|
||||
"url": "https://qwerty.kaiyi.cool/"
|
||||
},
|
||||
{
|
||||
"name": "lizhi",
|
||||
"title": "LiZhi",
|
||||
"name_zh": "李志",
|
||||
"url": "https://lizhi.turkyden.com/?from=pake"
|
||||
},
|
||||
{
|
||||
"name": "xiaohongshu",
|
||||
"title": "XiaoHongShu",
|
||||
"name_zh": "小红书",
|
||||
"url": "https://www.xiaohongshu.com/explore"
|
||||
},
|
||||
{
|
||||
"name": "poe",
|
||||
"title": "Poe",
|
||||
"name_zh": "Poe",
|
||||
"url": "https://poe.com/"
|
||||
},
|
||||
{
|
||||
"name": "youtubemusic",
|
||||
"title": "YouTubeMusic",
|
||||
"name_zh": "YouTubeMusic",
|
||||
"url": "https://music.youtube.com/"
|
||||
},
|
||||
{
|
||||
"name": "weread",
|
||||
"title": "WeRead",
|
||||
"name_zh": "微信阅读",
|
||||
"url": "https://weread.qq.com/"
|
||||
}
|
||||
]
|
||||
31
src-tauri/src/inject/event.js
vendored
31
src-tauri/src/inject/event.js
vendored
@@ -51,11 +51,6 @@ function isDownloadLink(url) {
|
||||
return downloadLinkPattern.test(url);
|
||||
}
|
||||
|
||||
// No need to go to the download link.
|
||||
function externalDownLoadLink() {
|
||||
return ['quickref.me'].indexOf(location.hostname) > -1;
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const tauri = window.__TAURI__;
|
||||
const appWindow = tauri.window.getCurrentWindow();
|
||||
@@ -192,35 +187,31 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleDownloadLink = (e, url, filename) => {
|
||||
e.preventDefault();
|
||||
invoke('download_file', { params: { url, filename } });
|
||||
};
|
||||
|
||||
const detectAnchorElementClick = e => {
|
||||
const anchorElement = e.target.closest('a');
|
||||
|
||||
if (anchorElement && anchorElement.href) {
|
||||
|
||||
const target = anchorElement.target;
|
||||
const hrefUrl = new URL(anchorElement.href);
|
||||
const absoluteUrl = hrefUrl.href;
|
||||
let filename = anchorElement.download || getFilenameFromUrl(absoluteUrl);
|
||||
|
||||
// Handling external link redirection, _blank will automatically open.
|
||||
if (isExternalLink(absoluteUrl) && (['_new'].includes(anchorElement.target))) {
|
||||
if (target === '_blank') {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
if (target === '_new') {
|
||||
e.preventDefault();
|
||||
handleExternalLink(absoluteUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
// Process download links for Rust to handle.
|
||||
if (isDownloadRequired(absoluteUrl, anchorElement, e) && !externalDownLoadLink() && !isSpecialDownload(absoluteUrl)) {
|
||||
handleDownloadLink(e, absoluteUrl, filename);
|
||||
return;
|
||||
}
|
||||
|
||||
// App internal jump.
|
||||
if (!anchorElement.target) {
|
||||
location.href = anchorElement.href;
|
||||
if (isDownloadRequired(absoluteUrl, anchorElement, e) && !isSpecialDownload(absoluteUrl)) {
|
||||
e.preventDefault();
|
||||
invoke('download_file', { params: { url: absoluteUrl, filename } });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
7
src-tauri/src/inject/style.js
vendored
7
src-tauri/src/inject/style.js
vendored
@@ -119,7 +119,8 @@ window.addEventListener('DOMContentLoaded', _event => {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#react-root [data-testid="DMDrawer"] {
|
||||
#react-root [data-testid="DMDrawer"],
|
||||
#root > main > footer.justify-center.ease-in {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
@@ -386,6 +387,10 @@ window.addEventListener('DOMContentLoaded', _event => {
|
||||
.lark > .main-wrapper [data-testid="aside"] {
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
#global > div.header-container > .mask-paper {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#background.ytd-masthead {
|
||||
height: 68px;
|
||||
|
||||
Reference in New Issue
Block a user