Chrome Gaming Optimization

Optimizes Chrome browser settings for gaming performance.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name       Chrome Gaming Optimization
// @namespace  Violentmonkey Scripts
// @author     TheBaker0
// @version    1.1
// @description Optimizes Chrome browser settings for gaming performance.
// @match      *://*/*
// @grant      none
// @license    Copyright (C) TheBaker0
// ==/UserScript==

// Disable unnecessary features
function disableFeatures() {
  // ... (code for disabling unnecessary features)
}

// Optimize browser settings
function optimizeSettings() {
  // ... (code for optimizing browser settings)

  // Adjust browser settings for gaming
  if (typeof document !== 'undefined') {
    // Disable hardware acceleration
    document.documentElement.style.setProperty('--disable-gpu', 'true');

    // Enable high-performance power plan
    function enableHighPerformancePlan() {
      // Check the user agent to determine the operating system
      const userAgent = navigator.userAgent.toLowerCase();

      // Enable high-performance plan for Windows
      if (userAgent.indexOf('windows') !== -1) {
        const shell = new ActiveXObject('WScript.Shell');
        shell.Run('powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c');
      }

      // Enable high-performance plan for Chromebooks
      if (userAgent.indexOf('chromebook') !== -1) {
        chrome.runtime.sendMessage({ command: 'setPowerPlan', plan: 'performance' });
      }
    }

    // Run the function to enable high-performance power plan
    enableHighPerformancePlan();
  }

  // ... (more settings optimizations)
}

// Execute the optimization functions
function optimizeChrome() {
  disableFeatures();
  optimizeSettings();
}

// Run the optimization on page load
window.addEventListener('load', optimizeChrome);