Greasy Fork

Greasy Fork is available in English.

Steam自动勾选同意用户协议

Steam自动勾选同意用户协议复选框

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Steam自动勾选同意用户协议
// @namespace    https://github.com/shiquda/shiquda_UserScript
// @supportURL   https://github.com/shiquda/shiquda_UserScript/issues
// @version      0.2.5
// @description  Steam自动勾选同意用户协议复选框
// @author       shiquda
// @include      https://store.steampowered.com/*
// @include      https://steamcommunity.com/*
// @license      MIT
// ==/UserScript==
(function() {
    'use strict';
    //读取网址
    var $href = window.location.href
    if ($href.indexOf('checkout') != -1){
        //console.log('checkout')
        $('accept_ssa').defaultChecked = true
        var tab1 = document.querySelector(".cart_totals_area"),
        tab2 = document.querySelector("#checkout_content_review"),
        a = document.querySelector("#cart_area")
        a.insertBefore(tab2,a.firstChild)
        a.insertBefore(tab1,a.firstChild)
    }
    else if ($href.indexOf('inventory') != -1){
        //console.log('inventory')
        window.onload = function(){
        var marketsell = document.getElementById('market_sell_dialog_accept_ssa')
        marketsell.checked = true
        }
    }
    else if ($href.indexOf('store.steampowered.com/cart') != -1){
        var tab3 = document.querySelector("div.checkout_content.cart.cart_totals")
        var head = document.querySelector("div.page_background > div.page_content")
        head.insertBefore(tab3,head.firstChild)
    }
})()