// ==UserScript== // @name 编程猫主页优化 // @namespace http://tampermonkey.net/ // @version 1.2.1.13 // @description 对于编程猫主页的部分优化 // @author 小鱼yuzifu // @match https://shequ.codemao.cn/* // @icon https://shequ.codemao.cn/favicon.ico // @grant GM_xmlhttpRequest // @require https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js // @license MIT // @downloadURL none // ==/UserScript== (function () { 'use strict'; GM_xmlhttpRequest({ method: "get", url: "https://shequ.codemao.cn/", data: document.cookie, binary: true, async onload({ response }) { $("li[data-watch_event='下载APP-入口tab']").after(`
  • 设置
  • `); document.documentElement.style.setProperty('--main-color', localStorage.getItem('main-color') || '#fec433'); document.documentElement.style.setProperty('--second-color', localStorage.getItem('second-color') || '#f6b206'); document.documentElement.style.setProperty('--person-color', localStorage.getItem('person-color') || '#000'); $("head").after(` `); $("li[data-watch_event='设置-入口tab']").click(function () { $(".c-dialog--dialog_cover").after(`
    首要主题色

    次要主题色

    个人主页背景色

    `); $("#yzf-close").click(() => { $('.c-dialog--dialog_wrap').removeClass('c-dialog--visiable c-dialog--show') }) $("#main-color").val(localStorage.getItem('main-color') || '#fec433') $("#second-color").val(localStorage.getItem('second-color') || '#f6b206') $("#person-color").val(localStorage.getItem('person-color') || '#000') $(".c-dialog--dialog_wrap").addClass('c-dialog--visiable c-dialog--show') }); } }) $("head").after(` `); })();