Steam Warning

Fake Steam Warning For Funny🤪

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name Steam Warning
// @namespace https://greasyfork.org/zh-CN/users/917529-hkai1221
// @version 0.1.0
// @author hkai1221
// @description Fake Steam Warning For Funny🤪 
// @icon https://sm.ms/image/OSoZxuT4vHMcrk8
// @match https://*.steamcommunity.com/*
// @match https://*.steampowered.com/*
// ==/UserScript==
(function(){
    var styleDom = document.createElement('style');
    styleDom.innerHTML = '.header_installsteam_btn {display: inline-block !important;height: 24px;}';
    document.head.appendChild(styleDom);
    var btnDom = document.getElementsByClassName('header_installsteam_btn header_installsteam_btn_gray')[0];
    btnDom.innerHTML = '<span style="padding: 0 54px">帐户警示</span>';
	btnDom.className = 'header_installsteam_btn global_header_toggle_button yellow';
    btnDom.addEventListener('click',function(){
       console.log('拜托,steam黄信超酷的好吗');
       console.log('Come on, Steam alert banner is so cool, okay?');
       if(btnDom.className.indexOf('yellow') !== -1){
        btnDom.className = 'header_installsteam_btn global_header_toggle_button red';
       }else{
        btnDom.className = 'header_installsteam_btn global_header_toggle_button yellow';
       }
    })
})();