Greasy Fork 还支持 简体中文。

Chrome Gaming Optimization

Optimizes Chrome browser settings for gaming performance.

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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);