Steam Store - Open App in Steam Client

Adds Link in Steam Store Page to open page in the Steam Client, look for the green button to the right of the game title.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name       Steam Store - Open App in Steam Client
// @namespace  url://none
// @version    0.1
// @description	Adds Link in Steam Store Page to open page in the Steam Client, look for the green button to the right of the game title.
// @match      http://store.steampowered.com/app/*
// @copyright  Oddity
// ==/UserScript==

var locEl = document.querySelector("div.apphub_OtherSiteInfo"),
    appid = document.location.pathname.match(/\d+/),
	storeurl = "steam://store/"+appid,
    linkel = document.createElement("a");

linkel.setAttribute('href',storeurl);
linkel.className ="btnv6_green_white_innerfade btn_medium";
linkel.setAttribute('style',"font-size: 15px");
//linkel.text = "";
linkel.innerHTML ='<span><img src="http://store.akamai.steamstatic.com/public/images/v5/globalheader_logo.png" width="44" height="11">&#11016;</span>';
locEl.appendChild(linkel);