From e07828ff59d8cafb2d2683c3eec8b535afb74e7a Mon Sep 17 00:00:00 2001 From: bocanhcam <35592955+bocanhcam@users.noreply.github.com> Date: Wed, 5 Mar 2025 10:43:05 +0700 Subject: [PATCH 1/6] correct libsoup-3.0-dev package Signed-off-by: bocanhcam <35592955+bocanhcam@users.noreply.github.com> --- bin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/README.md b/bin/README.md index 5072baf..7246dee 100644 --- a/bin/README.md +++ b/bin/README.md @@ -24,7 +24,7 @@ npm install pake-cli -g ```bash sudo apt install libdbus-1-dev \ - libsoup3.0-dev \ + libsoup-3.0-dev \ libjavascriptcoregtk-4.1-dev \ libwebkit2gtk-4.1-dev \ build-essential \ From b1b13de95d54980c9dc4f19f376ab82db3c47adb Mon Sep 17 00:00:00 2001 From: beautifulrem <98527099+beautifulrem@users.noreply.github.com> Date: Sat, 10 May 2025 04:43:30 +0800 Subject: [PATCH 2/6] Update cli.js Signed-off-by: beautifulrem <98527099+beautifulrem@users.noreply.github.com> --- dist/cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/cli.js b/dist/cli.js index 9ddd49f..c56c1f0 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -977,7 +977,7 @@ program .option('--fullscreen', 'Start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen) .option('--hide-title-bar', 'For Mac, hide title bar', DEFAULT_PAKE_OPTIONS.hideTitleBar) .option('--multi-arch', 'For Mac, both Intel and M1', DEFAULT_PAKE_OPTIONS.multiArch) - .option('--inject ', 'Injection of .js or .css files', DEFAULT_PAKE_OPTIONS.inject) + .option('--inject ', 'Injection of .js or .css files', DEFAULT_PAKE_OPTIONS.inject) .option('--debug', 'Debug build and more output', DEFAULT_PAKE_OPTIONS.debug) .addOption(new Option('--proxy-url ', 'Proxy URL for all network requests').default(DEFAULT_PAKE_OPTIONS.proxyUrl).hideHelp()) .addOption(new Option('--user-agent ', 'Custom user agent').default(DEFAULT_PAKE_OPTIONS.userAgent).hideHelp()) From 119c94722f85c7d982a213287fc9de1a045cd796 Mon Sep 17 00:00:00 2001 From: lkieryan Date: Fri, 6 Jun 2025 18:56:34 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=94=A7=20fix:=20update=20tauri-plugin?= =?UTF-8?q?-single-instance=20to=20v2.2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Resolves null pointer dereference crash on Windows platform - Fixes issue where app crashes with STATUS_STACK_BUFFER_OVERRUN - Updates from v2.2.0 to v2.2.4 which includes upstream bugfix - Improves app stability during startup and reload operations --- src-tauri/Cargo.lock | 60 ++++++++++++++++++++++++++++++++++---------- src-tauri/Cargo.toml | 18 ++++++------- src-tauri/pake.json | 2 +- 3 files changed, 57 insertions(+), 23 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 4d237bb..ce52446 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1339,6 +1339,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -1468,9 +1478,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "global-hotkey" -version = "0.6.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fbb3a4e56c901ee66c190fdb3fa08344e6d09593cc6c61f8eb9add7144b271" +checksum = "b9247516746aa8e53411a0db9b62b0e24efbcf6a76e0ba73e5a91b512ddabed7" dependencies = [ "crossbeam-channel", "keyboard-types", @@ -1480,7 +1490,8 @@ dependencies = [ "serde", "thiserror 2.0.11", "windows-sys 0.59.0", - "x11-dl", + "x11rb", + "xkeysym", ] [[package]] @@ -4193,9 +4204,9 @@ dependencies = [ [[package]] name = "tauri-plugin-global-shortcut" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f646a09511e8d283267dcdaa08c2ef27c4116bf271d9114849d9ca215606c3" +checksum = "31919f3c07bcb585afef217c0c33cde80da9ebccf5b8e2c90e0e0a535b14ab47" dependencies = [ "global-hotkey", "log", @@ -4230,9 +4241,9 @@ dependencies = [ [[package]] name = "tauri-plugin-notification" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f8d3ee5207d3359ca2b714545664f24f70374d795bf91f7c1935a494003a57d" +checksum = "c474c7cc524385e682ccc1e149e13913a66fd8586ac4c2319cf01b78f070d309" dependencies = [ "log", "notify-rust", @@ -4264,9 +4275,9 @@ dependencies = [ [[package]] name = "tauri-plugin-shell" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c50a63e60fb8925956cc5b7569f4b750ac197a4d39f13b8dd46ea8e2bad79" +checksum = "69d5eb3368b959937ad2aeaf6ef9a8f5d11e01ffe03629d3530707bbcb27ff5d" dependencies = [ "encoding_rs", "log", @@ -4285,9 +4296,9 @@ dependencies = [ [[package]] name = "tauri-plugin-single-instance" -version = "2.2.1" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c387d4d96690131dc46d1d2827df5c222b896a2bfeb15a16267229a55c50b5" +checksum = "97d0e07b40fb2eb13778e30778f5979347a2bf30e1b9d47f78ff7fe92d2e4b3d" dependencies = [ "serde", "serde_json", @@ -4300,9 +4311,9 @@ dependencies = [ [[package]] name = "tauri-plugin-window-state" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e344b512b0d99d9d06225f235d87d6c66d89496a3bf323d9b578d940596e6c" +checksum = "a27a3fe49de72adbe0d84aee33c89a0b059722cd0b42aaeab29eaaee7f7535cd" dependencies = [ "bitflags 2.8.0", "log", @@ -5674,6 +5685,23 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "gethostname", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + [[package]] name = "xdg-home" version = "1.3.0" @@ -5684,6 +5712,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + [[package]] name = "yoke" version = "0.7.5" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index cbc9b8f..ef1f5e7 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -19,16 +19,16 @@ tauri-build = { version = "2.0.4", features = [] } [dependencies] serde_json = "1.0.134" -serde = { version = "1.0.217", features = ["derive"] } -tokio = { version = "1.42.0", features = ["full"] } -tauri = { version = "2.2.0", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] } -tauri-plugin-window-state = "2.2.0" +serde = { version = "1.0.218", features = ["derive"] } +tokio = { version = "1.43.0", features = ["full"] } +tauri = { version = "2.2.5", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] } +tauri-plugin-window-state = "2.2.2" tauri-plugin-oauth = "2.0.0" -tauri-plugin-http = "2.2.0" -tauri-plugin-global-shortcut = { version = "2.2.0" } -tauri-plugin-shell = "2.2.0" -tauri-plugin-single-instance = "2.2.0" -tauri-plugin-notification = "2.2.0" +tauri-plugin-http = "2.3.0" +tauri-plugin-global-shortcut = { version = "2.2.1" } +tauri-plugin-shell = "2.2.1" +tauri-plugin-single-instance = "2.2.4" +tauri-plugin-notification = "2.2.2" [features] # this feature is used for development builds from development cli diff --git a/src-tauri/pake.json b/src-tauri/pake.json index 304b8e9..512c1e5 100644 --- a/src-tauri/pake.json +++ b/src-tauri/pake.json @@ -1,7 +1,7 @@ { "windows": [ { - "url": "https://weread.qq.com", + "url": "https://github.com", "url_type": "web", "hide_title_bar": true, "fullscreen": false, From 1d43ebeacc88fcfba19d28983dc7b0cbaac696db Mon Sep 17 00:00:00 2001 From: lkieryan Date: Fri, 6 Jun 2025 20:27:01 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=94=97=20fix:=20resolve=20link=20navi?= =?UTF-8?q?gation=20jumping=20to=20external=20browser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed _blank and search links opening external browser in Pake apps • Enhanced same-domain detection including subdomains • Improved window.open() handling for in-app navigation • Added smart cross-domain routing (new window vs external browser) Resolves issues with Bilibili, YouTube, and other packaged applications where internal links would unexpectedly open in system browser. --- src-tauri/src/inject/event.js | 57 +++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/inject/event.js b/src-tauri/src/inject/event.js index 8477741..1691d26 100644 --- a/src-tauri/src/inject/event.js +++ b/src-tauri/src/inject/event.js @@ -186,6 +186,26 @@ document.addEventListener('DOMContentLoaded', () => { }); }; + // Check if URL belongs to the same domain (including subdomains) + const isSameDomain = (url) => { + try { + const linkUrl = new URL(url); + const currentUrl = new URL(window.location.href); + + if (linkUrl.hostname === currentUrl.hostname) return true; + + // Extract root domain (e.g., bilibili.com from www.bilibili.com) + const getRootDomain = (hostname) => { + const parts = hostname.split('.'); + return parts.length >= 2 ? parts.slice(-2).join('.') : hostname; + }; + + return getRootDomain(currentUrl.hostname) === getRootDomain(linkUrl.hostname); + } catch (e) { + return false; + } + }; + const detectAnchorElementClick = e => { const anchorElement = e.target.closest('a'); @@ -195,9 +215,17 @@ document.addEventListener('DOMContentLoaded', () => { const absoluteUrl = hrefUrl.href; let filename = anchorElement.download || getFilenameFromUrl(absoluteUrl); - // Handling external link redirection, _blank will automatically open. + // Handle _blank links: same domain navigates in-app, cross-domain opens new window if (target === '_blank') { e.preventDefault(); + e.stopImmediatePropagation(); + + if (isSameDomain(absoluteUrl)) { + window.location.href = absoluteUrl; + } else { + const newWindow = originalWindowOpen.call(window, absoluteUrl, '_blank', 'width=1200,height=800,scrollbars=yes,resizable=yes'); + if (!newWindow) handleExternalLink(absoluteUrl); + } return; } @@ -210,7 +238,19 @@ document.addEventListener('DOMContentLoaded', () => { // Process download links for Rust to handle. if (isDownloadRequired(absoluteUrl, anchorElement, e) && !isSpecialDownload(absoluteUrl)) { e.preventDefault(); + e.stopImmediatePropagation(); invoke('download_file', { params: { url: absoluteUrl, filename } }); + return; + } + + // Handle regular links: same domain allows normal navigation, cross-domain opens new window + if (!target || target === '_self') { + if (!isSameDomain(absoluteUrl)) { + e.preventDefault(); + e.stopImmediatePropagation(); + const newWindow = originalWindowOpen.call(window, absoluteUrl, '_blank', 'width=1200,height=800,scrollbars=yes,resizable=yes'); + if (!newWindow) handleExternalLink(absoluteUrl); + } } } }; @@ -232,7 +272,20 @@ document.addEventListener('DOMContentLoaded', () => { } else { const baseUrl = window.location.origin + window.location.pathname; const hrefUrl = new URL(url, baseUrl); - handleExternalLink(hrefUrl.href); + const absoluteUrl = hrefUrl.href; + + // Apply same domain logic as anchor links + if (isSameDomain(absoluteUrl)) { + // Same domain: navigate in app or open new window based on specs + if (name === '_blank' || !name) { + return originalWindowOpen.call(window, absoluteUrl, '_blank', 'width=1200,height=800,scrollbars=yes,resizable=yes'); + } else { + location.href = absoluteUrl; + } + } else { + // Cross domain: open in external browser + handleExternalLink(absoluteUrl); + } } // Call the original window.open function to maintain its normal functionality. return originalWindowOpen.call(window, url, name, specs); From c64cb6784d811f822629290ed4e8081c93c4cb13 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 26 Jul 2025 21:39:26 +0800 Subject: [PATCH 5/6] docs(contributor): contrib-readme-action has updated readme --- README.md | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 336d21f..630e772 100644 --- a/README.md +++ b/README.md @@ -300,21 +300,14 @@ Pake's development can not be without these Hackers. They contributed a lot of c GoodbyeNJN - - - eltociear -
- Ikko Eltociear Ashimine -
- - mattbajorek
Matt Bajorek
- + + QingZ11 @@ -356,15 +349,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Null
- - + imabutahersiddik
Abu Taher Siddik
- + + kidylee @@ -406,15 +399,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Jiaqi Gu
- - + Milo123459
Milo
- + + princemaple @@ -422,6 +415,20 @@ Pake's development can not be without these Hackers. They contributed a lot of c Po Chen + + + beautifulrem +
+ Xie Ruiqi +
+ + + + bocanhcam +
+ Null +
+ geekvest @@ -449,15 +456,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Liudonghua
- + + liusishan
Liusishan
- - + piaoyidage From adec8d3c8f119fdc0ac142b98683c93c9d7fb563 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Tue, 5 Aug 2025 14:36:53 +0800 Subject: [PATCH 6/6] docs(contributor): contrib-readme-action has updated readme --- README.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 630e772..64d7c5e 100644 --- a/README.md +++ b/README.md @@ -329,6 +329,13 @@ Pake's development can not be without these Hackers. They contributed a lot of c Yi Xin + + + lkieryan +
+ Kieran +
+ exposir @@ -349,15 +356,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Null
- + + imabutahersiddik
Abu Taher Siddik
- - + kidylee @@ -399,15 +406,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Jiaqi Gu
- + + Milo123459
Milo
- - + princemaple @@ -449,15 +456,15 @@ Pake's development can not be without these Hackers. They contributed a lot of c
Null
- + + liudonghua123
Liudonghua
- - + liusishan