Skip to content

Instantly share code, notes, and snippets.

@S4WA
Last active December 14, 2022 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save S4WA/6a5f809fc06935b3e35174eb6b9643a6 to your computer and use it in GitHub Desktop.
Save S4WA/6a5f809fc06935b3e35174eb6b9643a6 to your computer and use it in GitHub Desktop.
when you open a steam page on web browser, it adds "steamopenurl://" so that you can open the same thing on steam client.
// ==UserScript==
// @name SteamOpenURL
// @namespace https://akiba.cloud/
// @version 0.1
// @description try to take over the world!
// @author Drip
// @match http*://steamcommunity.com/*
// @match http*://steampowered.com/*
// @match http*://store.steampowered.com/*
// @grant window.close
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// ==/UserScript==
(function() {
'use strict';
window.location.href = "steam://openurl/" + window.location.href;
window.close();
})();
@S4WA
Copy link
Author

S4WA commented Feb 19, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment