Skip to content

Commit

Permalink
URL Scheme工具箱改为匹配部分页面, 避免跳转Chrome功能跳转很多不相干的页面;
Browse files Browse the repository at this point in the history
  • Loading branch information
LonelyWindG committed Dec 27, 2024
1 parent a089a11 commit 31e8e49
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions url_scheme_utility.user.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
// ==UserScript==
// @name URL Scheme工具箱
// @namespace http://tampermonkey.net/
// @version 0.1
// @version 2024-12-27
// @description 提供部分URL Scheme快捷跳转功能
// @author Wind
// @match https://*/*
// @match https://www.microsoft.com/*
// @match https://www.xbox.com/*
// @match https://microsoft.com/*
// @match https://xbox.com/*
// @match https://keylol.com/t*
// @match https://store.epicgames.com/*
// @icon https://www.tampermonkey.net/favicon.ico
// @run-at document-start
// @grant GM_registerMenuCommand
Expand Down Expand Up @@ -77,8 +82,8 @@ function TryRegisterOpenInChromeCmd()
}

GM_registerMenuCommand("在Chrome中打开", function(){
console.log("openinchrome://" + document.URL);
window.open("openinchrome://" + document.URL);
console.log("openinchrome://" + window.location.href);
window.open("openinchrome://" + window.location.href);
}, 'c');
}

Expand Down

0 comments on commit 31e8e49

Please sign in to comment.