keymailer辅助

keymailer增加一个跳转到steam商店页面的按钮

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         keymailer辅助
// @namespace    龟龟
// @version      0.1
// @description  keymailer增加一个跳转到steam商店页面的按钮
// @author       兰屿绿蠵龟
// @match        https://www.keymailer.co/g/games/*
// @grant        GM_addStyle
// ==/UserScript==
anniu();
anniu1();
var appid = document.getElementsByClassName("orbit-figure")[0].children[0].currentSrc.match(/\d+/);
function anniu() {
    var anniu2 = document.createElement('style');
    anniu2.type = 'text/css';
    anniu2.innerHTML = "#Steam_page{position:fixed;bottom:50%;right:1px;border:1px solid gray;padding:3px;width:120px;font-size:36px;cursor:pointer;border-radius: 10px;background-color: #9cbf00;}";
    document.getElementsByTagName('head')[0].appendChild(anniu2);
}

function anniu1() {
     $(document.body).append("<div id='Steam_page'>Steam page</div>");
     $('#Steam_page').click(function (){window.location.href="https://store.steampowered.com/app/" + appid;})};