您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
12/3/2021, 10:31:05 AM
当前为
// ==UserScript== // @name SHKOLO dark mode // @namespace Violentmonkey Scripts // @match https://app.shkolo.bg/* // @grant none // @version 1.3 // @author RedTTG // @license MIT // @description 12/3/2021, 10:31:05 AM // ==/UserScript== var version = "1.3" var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = 'https://rostshkolo.free.bg/dashboard.css'; link.media = 'all'; head.appendChild(link); var url = window.location.href; if(url.indexOf("dashboard") > -1){ var x = document.getElementsByClassName("page-header"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#202040"; } x = document.getElementsByClassName("page-footer"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#202040"; } x = document.getElementsByClassName("col-md-12"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#202040"; } x = document.getElementsByClassName("col-sm-6"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#202040"; } } else if(url.indexOf("diary") > -1){ var x = document.getElementsByClassName("page-header"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#202040"; } x = document.getElementsByClassName("page-footer"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#202040"; } x = document.getElementsByClassName("portlet light gradesBody"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#404060"; x[i].style.color = "#A0A0F0"; } } else if (url.indexOf("test/result") > -1){ } else if (url.indexOf("app.shkolo.bg") > -1){ var x = document.getElementsByClassName("tab-content"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#606080"; } x = document.getElementsByClassName("auth-tabs"); for(i = 0; i < x.length; i++){ x[i].style.backgroundColor = "#404060"; } x = document.getElementsByClassName("or-login-text"); for(i = 0; i < x.length; i++){ if (x[i].firstElementChild.nodeName == "H4") { x[i].firstElementChild.firstElementChild.style.backgroundColor = "#606080"; } } x = document.getElementsByClassName("auth-tabs"); for(i = 0; i < x.length; i++){ for(kid = 0; kid < x[i].children.length; kid++) { if (x[i].children[kid].nodeName == "LI") { x[i].children[kid].firstElementChild.style.backgroundColor = "#404060"; } } } x = document.getElementsByClassName("phone-label"); for(i = 0; i < x.length; i++){ x[i].style.setProperty("background-color", "#404060", "important"); } //btn btn-xs btn-custom-primary x = document.getElementsByClassName("btn-custom-primary"); for(i = 0; i < x.length; i++){ x[i].style.setProperty("background-color", "#404060", "important"); } } else { console.log("Couldn't find dark mode mod for this page of shkolo, anything besides the background and side menus might be broken."); console.log("Or it could be it doesn't need javascript, and css is enough, in which case enjoy!"); } console.log("Shkolo dark mode, checking for updates...") var urls = "https://greasyfork.org/en/scripts/436501-shkolo-dark-mode"; fetch(urls) .then(function(response) { return response.text(); }).then(function(data) { if (data.includes("<dd class=\"script-show-version\"><span>"+version+"</span></dd>")){ console.log("no update found!"); } else {console.log("update avaliable!");window.open("https://greasyfork.org/scripts/436501-shkolo-dark-mode/code/SHKOLO dark mode.user.js","_blank").focus();} }); console.log("Shkolo Dark Mode finished running for this page."); console.log("Thanks for download!");