Open In Steam

Open In Steam adds a button to all Steam sites to open the page in Steam.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name           Open In Steam
// @namespace      http://tampermonkey.net/
// @version        0.2
// @description    Open In Steam adds a button to all Steam sites to open the page in Steam.
// @author         rf5860
// @match          /https:\/\/.*steam.*\.com\/.*/
// @match          http*://steamcommunity.com/*
// @match          http*://store.steampowered.com/*
// @icon           https://www.google.com/s2/favicons?domain=steampowered.com
// @grant          none
// @license        MIT
// ==/UserScript==

var language_pulldown = document.querySelector("#language_pulldown");
var openInSteamLink = document.createElement('a');
openInSteamLink.appendChild(document.createTextNode("Open in steam"));
openInSteamLink.className = "global_action_link";
openInSteamLink.title = "Open in steam";
openInSteamLink.href = `steam://openurl/${document.location.href}`;
language_pulldown.parentElement.insertBefore(openInSteamLink, language_pulldown);