您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Enables the Dev Tools menu in settings on grok.com
当前为
// ==UserScript== // @name Grok Dev Tools // @namespace http://tampermonkey.net/ // @version 1.0 // @description Enables the Dev Tools menu in settings on grok.com // @author Blankspeaker // @match https://grok.com/* // @grant none // @license GNU GPLv3 // ==/UserScript== (function() { 'use strict'; try { // Check localStorage availability let localStorageAvailable = true; try { localStorage.setItem("test", "test"); localStorage.removeItem("test"); } catch (error) { localStorageAvailable = false; console.warn("localStorage is restricted:", error); } // Get current flags or initialize let rawFlags = localStorageAvailable ? localStorage.getItem("local_feature_flags") : null; let currentFlags = rawFlags ? JSON.parse(rawFlags) : {}; // Set SHOW_MODEL_CONFIG_OVERRIDE flag currentFlags['SHOW_MODEL_CONFIG_OVERRIDE'] = true; currentFlags['show_model_config_override'] = true; // Save updated flags if (localStorageAvailable) { localStorage.setItem("local_feature_flags", JSON.stringify(currentFlags)); console.log("SHOW_MODEL_CONFIG_OVERRIDE enabled and saved."); } else { console.warn("SHOW_MODEL_CONFIG_OVERRIDE set in memory due to localStorage restrictions."); } } catch (error) { console.error("Error setting SHOW_MODEL_CONFIG_OVERRIDE:", error); } })();