Greasy Fork is available in English.
自定义相关网站的样式
当前为
// ==UserScript==
// @name 自定义网站样式
// @namespace http://tampermonkey.net/
// @version 0.1.3
// @description 自定义相关网站的样式
// @author myaijarvis
// @icon http://greasyfork.icu/packs/media/images/blacklogo16-5421a97c75656cecbe2befcec0778a96.png
// @match http://localhost:8888/lab/*
// @match https://*.blog.csdn.net/article/details/*
// @match https://blog.csdn.net/*/article/details/*
// @match http://greasyfork.icu/zh-CN/scripts/*/versions/new
// @require https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
// Your code here...
let url=document.URL || '';
if (url.includes('blog.csdn.net')){
let color_code='#df4cd4'; // 代码注释的颜色
$('.token.comment').css({'color':color_code});
$('.hljs-comment').css({'color':color_code});
return;
}
if (url.includes('localhost:8888/lab')){
setInterval(setMaxHeight,2000);
return;
}
function setMaxHeight(){
$('.jp-OutputArea-output pre').css('max-height','30em')
//console.info("setMaxHeight")
}
if (url.match('greasyfork\.org\/(.*?)\/scripts\/(.*?)\/versions\/new')){
console.info("setMaxHeight")
let height='500px'; // textarea的高度
$('#script-version-additional-info-0').css({'height':height});
$('#script_version_changelog').css({'height':'200px'});
return;
}
})();