Echo Dark Theme Night Mode

Adds a "dark theme" concept to hillcrest Echo

// ==UserScript==
// @name        Echo Dark Theme Night Mode
// @namespace    http://tampermonkey.net/
// @include     *://hillcresths.echo-ntn.org/*
// @version     1.15
// @run-at document-start
// @grant       GM_addStyle
// @grant       GM_setValue
// @grant       GM_getValue
// @description Adds a "dark theme" concept to hillcrest Echo
// ==/UserScript==



var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '  html  body, html  ,body, .buzz-activity-ct  {/*\n*/    background: #272727;/*\n*/    color: #1d2129;/*\n*/  /*\n*/}html   ._4sp8 {/*\n*/    background-color: #969696;/*\n*/ /*\n*/    font-size: 14px;/*\n*/    min-width: 500px;/*\n*/}._1htf {/*\n*/    color: rgb(83, 83, 83);/*\n*/    font-size: 13px;/*\n*/    font-weight: 400;/*\n*/}html   ._hh7 {/*\n*/    background-color: #b7b7b7;/*\n*/    color: rgba(0, 0, 0, 1);/*\n*/    /*\n*/}._4rv6 ,._4rv3 ._4rv4 ._5vn8,a._4ce_ , ._2o-b ,._4rv7, ._4rv3 ._5s2p , ._4rv3 ._yht{/*\n*/    /*\n*/    opacity: .73;/*\n*/  /*\n*/    filter: invert(100%);/*\n*/}._2f5n {/*\n*/    background-color: #747474;/*\n*/    border: 1px solid rgba(0, 0, 0, .1);/*\n*/ /*\n*/}._aou {/*\n*/    align-items: center;/*\n*/    background: #353535;/*\n*/    /*\n*/    color: #b3b3b3;/*\n*/    /*\n*/}.sp_N1ER1bkS1OC{filter:sepia(100%);opacity:1;} ._ih3  {    color: rgba(255, 255, 255, 0.4) !important ;   } body, html, html body {/*\n*/    background: #272727   !important /*\n*/    background-color: #272727   !important /*\n*/    background-image: none   !important /*\n*/}._2sdm {/*\n*/    background-color: #272727    !important /*\n*/    /*\n*/}html ._4sp8 {/*\n*/    background-color: #272727    !important /*\n*/   /*\n*/}._o46 {/*\n*/ /*\n*/    filter: invert(100%)hue-rotate(180deg)    !important /*\n*/}._497p {/*\n*/    color: rgba(255, 255, 255, 0.4)    !important /*\n*/   /*\n*/}._1ht6 {/*\n*/    color: rgb(255, 255, 255)    !important /*\n*/    /*\n*/}._1htf {/*\n*/    color: rgb(181, 181, 181)    !important /*\n*/     /*\n*/}._2jnv, ._2jnx, ._2jnz, ._2jnx ._30e7 ._5j5f {/*\n*/    color: rgb(255, 255, 255)    !important /*\n*/   /*\n*/}._1lj0 {/*\n*/     color: rgba(255, 255, 255, 0.4) !important /*\n*/    /*\n*/}._3szq {/*\n*/    color: rgb(239, 239, 239) !important /*\n*/    /*\n*/}._3x6v {/*\n*/    color: rgba(255, 255, 255, 0.4) !important /*\n*/    /*\n*/}._364g {/*\n*/    color: rgb(255, 255, 255) !important /*\n*/    /*\n*/}._5rh4, ._5qsj {/*\n*/    color: rgba(255, 255, 255, 0.4) !important /*\n*/    /*\n*/}._4rph ._4rpj {/*\n*/    color: rgb(239, 239, 239) !important /*\n*/    /*\n*/}._1ht7 {/*\n*/    color: rgba(255, 255, 255, 0.4) !important /*\n*/     /*\n*/}._1mj {/*\n*/    /*\n*/    color: #ccc !important /*\n*/}._4rv3 {/*\n*/    border-top: 1px solid rgba(121, 121, 121, 0.22) !important /*\n*/    /*\n*/}._4_j4 .chatAttachmentShelf {/*\n*/    background-color: #565656 !important /*\n*/    border-top: 1px solid #525252 !important /*\n*/   /*\n*/}._17w2 {/*\n*/    color: rgb(206, 206, 206) !important /*\n*/   /*\n*/}._225b {/*\n*/    /*\n*/    color: rgba(255, 255, 255, 0.4) !important /*\n*/   /*\n*/}.sp_0oduRWyKGT_ {/*\n*/    /*\n*/    filter: invert(100%) !important /*\n*/}._2y8y {/*\n*/    border-bottom: 1px solid rgb(109, 109, 109) !important ;/*\n*/  /*\n*/}._2y8y _5l-3 input,._2y8y _5l-3 span {color:#ccc !important ;}._2y8z {/*\n*/    color: rgba(220, 220, 220, 0.56) !important ;/*\n*/   /*\n*/} ._2y8_ {/*\n*/    background-color: #585858 !important ;/*\n*/    /*\n*/}._14-7._14-7 ._58al {/*\n*/ /*\n*/    color: #ccc !important ;/*\n*/}._3q35 {/*\n*/    color: rgba(239, 239, 239, 0.4) !important ;/*\n*/    /*\n*/}._3q34 {/*\n*/    color: rgb(234, 234, 234) !important ;/*\n*/   /*\n*/}h1, h2, h3, h4, h5, h6 {/*\n*/    color: #e0e0e0 !important ;/*\n*/   /*\n*/}._1ht3 ._1ht6, ._1ht3 ._1htf {     zoom: 1.15;    filter: sepia(80%)brightness(95%)hue-rotate(162deg);}     ';
document.getElementsByTagName('head')[0].appendChild(style);
var tfbackground = "";
var tfbackground1 = "";
var lightgrayback = "";
var graycolor = "";
var whitecolor = "";
var darkgraycolor = "";
var blackcolor = "";
var lol = 0;
function ex() {
    if(GM_getValue("backgroundimage") == undefined) {GM_setValue("backgroundimage","https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg")}
    if(document.getElementsByClassName("app-theme")[0] != null) {window.mainTheme = document.getElementsByClassName("app-theme")[0].className.split("app-theme-")[1];}
    if(document.getElementsByClassName('tab-content')[0] != null) {document.getElementsByClassName('tab-content')[0].style.background = tfbackground1; document.getElementsByClassName('tab-content')[0].style.backgroundAttachment = "fixed"; document.getElementsByClassName('tab-content')[0].style.backgroundSize = "100% 100%"}
    if(document.getElementsByTagName('mat-card')[0] != null) {for(var i = 0; i < document.getElementsByTagName('mat-card').length; i++) {document.getElementsByTagName('mat-card')[i].style.background = lightgrayback;}}
    if(document.getElementsByClassName("to-do-title")[0] != null) {for(var i2 = 0; i2 < document.getElementsByClassName("to-do-title").length; i2++) {document.getElementsByClassName("to-do-title")[i2].style.color = graycolor;}}
    if(document.getElementsByClassName("to-do-course-title")[0] != null) {for(var i3 = 0; i3 < document.getElementsByClassName("to-do-course-title").length; i3++) {document.getElementsByClassName("to-do-course-title")[i3].children[0].style.color = whitecolor;}}
    if(document.getElementsByClassName("to-do-date")[0] != null) {for(var i4 = 0; i4 < document.getElementsByClassName("to-do-date").length; i4++) {document.getElementsByClassName("to-do-date")[i4].children[0].style.color = whitecolor}}
    if(document.getElementsByClassName("mat-menu-content")[0] != null) {for(var i5 = 0; i5 < document.getElementsByClassName("mat-menu-content").length; i5++) {document.getElementsByClassName("mat-menu-content")[i5].style.background = lightgrayback}}
    if(document.getElementsByClassName("mat-drawer-inner-container")[0] != null) {for(var i6 = 0; i6 < document.getElementsByClassName("mat-drawer-inner-container").length; i6++) {document.getElementsByClassName("mat-drawer-inner-container")[i6].style.background = tfbackground}}
    if(document.getElementsByClassName("mat-list-item-content")[0] != null) {for(var i7 = 0; i7 < document.getElementsByClassName("mat-list-item-content").length; i7++) {document.getElementsByClassName("mat-list-item-content")[i7].style.background = tfbackground}}
    if(document.getElementsByClassName("course-title")[0] != null) {for(var i8 = 0; i8 < document.getElementsByClassName("course-title").length; i8++) {document.getElementsByClassName("course-title")[i8].style.color = whitecolor}}
    if(document.getElementsByClassName("description")[0] != null) {for(var i9 = 0; i9 < document.getElementsByClassName("description").length; i9++) {document.getElementsByClassName("description")[i9].style.color = whitecolor}}
    if(document.getElementsByClassName("mat-icon")[0] != null) {for(var i10 = 0; i10 < document.getElementsByClassName("mat-icon").length; i10++) {document.getElementsByClassName("mat-icon")[i10].style.color = whitecolor}}
    if(document.getElementsByClassName("ng-scope")[1] != null) {document.getElementsByClassName("ng-scope")[1].style.background = tfbackground; document.getElementsByClassName("ng-scope")[1].style.color = whitecolor;}
    if(document.getElementsByClassName("xli-item-title")[0] != null) {for(var i11 = 0; i11 < document.getElementsByClassName("xli-item-title").length; i11++) {document.getElementsByClassName("xli-item-title")[i11].style.color = whitecolor}}
    if(document.getElementsByClassName("buzz-course-home")[0] != null) {document.getElementsByClassName("buzz-course-home")[0].style.background = tfbackground1; document.getElementsByClassName("buzz-course-home")[0].style.backgroundAttachment = "fixed"; document.getElementsByClassName("buzz-course-home")[0].style.backgroundSize = "100% 100%"}
    if(document.getElementsByClassName("buzz-course-summary")[0] != null) {for(var i12 = 0; i12 < document.getElementsByClassName("buzz-course-summary").length; i12++) {document.getElementsByClassName("buzz-course-summary")[i12].style.background = lightgrayback; document.getElementsByClassName("buzz-course-summary")[i12].style.opacity = "0.9"}}
    if(document.getElementsByClassName("xli-date-group")[0] != null) {for(var i13 = 0; i13 < document.getElementsByClassName("xli-date-group").length; i13++) {document.getElementsByClassName("xli-date-group")[i13].style.background = darkgraycolor}}
    if(document.getElementsByClassName("xli-inner-ct")[0] != null) {for(var i14 = 0; i14 < document.getElementsByClassName("xli-inner-ct").length; i14++) {document.getElementsByClassName("xli-inner-ct")[i14].getElementsByClassName("text-only")[0].style.color = whitecolor}}
    if(document.getElementsByClassName("xli-completed")[0] != null) {for(var i15 = 0; i15 < document.getElementsByClassName("xli-completed").length; i15++) {document.getElementsByClassName("xli-completed")[i15].style.background = lightgrayback; document.getElementsByClassName("xli-completed")[i15].style.borderRadius = '3px'}}
    if(document.getElementById("agenda-label") != null) {document.getElementById("agenda-label").children[0].style.color = mainTheme}
    if(document.getElementsByClassName("xli-flex-body xli-row-title")[0] != null) {for(var i16 = 0; i16 < document.getElementsByClassName("xli-flex-body xli-row-title").length; i16++) {document.getElementsByClassName("xli-flex-body xli-row-title")[i16].style.color = whitecolor;}}
    if(document.getElementsByClassName("xli-lower-description")[0] != null) {for(var i17 = 0; i17 < document.getElementsByClassName("xli-lower-description").length; i17++) {document.getElementsByClassName("xli-lower-description")[i17].children[0].style.color = mainTheme;}}
    if(document.getElementsByClassName("menu-subentry")[0] != null) {for(var i18 = 0; i18 < document.getElementsByClassName("menu-subentry").length; i18++) {document.getElementsByClassName("menu-subentry")[i18].children[0].getElementsByTagName("span")[0].style.color = whitecolor;}}
    if(document.getElementsByTagName("span")[0] != null) {for(var l1 = 0; l1 < document.getElementsByTagName("span").length; l1++) {document.getElementsByTagName("span")[l1].style.color = whitecolor; document.getElementsByTagName("span")[l1].style.background = 'transparent'}}
    if(document.getElementsByClassName("xli-flex-body buzz-activity-ct")[0] != null) {document.getElementsByClassName("xli-flex-body buzz-activity-ct")[0].style.background = tfbackground}
    if(document.getElementsByClassName("buzz-page-title")[0] != null) {document.getElementsByClassName("buzz-page-title")[0].style.color = whitecolor;}
    if(document.getElementsByClassName("xli-item-content xli-flex-body")[0] != null) {document.getElementsByClassName("xli-item-content xli-flex-body")[0].style.color = whitecolor;}
    if(document.getElementsByClassName("xli-item-dropbox panel")[0] != null) {document.getElementsByClassName("xli-item-dropbox panel")[0].style.background = tfbackground}
    if(document.getElementsByClassName("buzz-folder-home")[0] != null) {document.getElementsByClassName("buzz-folder-home")[0].style.background = tfbackground;}
    if(document.getElementsByClassName("buzz-folder-title")[0] != null) {document.getElementsByClassName("buzz-folder-title")[0].style.color = whitecolor;}
    if(document.getElementsByTagName("p")[0] != null) {for(var d3 = 0; d3 < document.getElementsByTagName("p").length; d3++) {document.getElementsByTagName("p")[d3].style.background = 'transparent'}}
    if(document.getElementsByTagName("li")[0] != null) {for(var d4 = 0; d4 < document.getElementsByTagName("li").length; d4++) {document.getElementsByTagName("li")[d4].style.background = 'transparent'}}
    if(document.getElementsByTagName("mat-nav-list")[1] != null) {if(document.getElementById("darkmode") == null) {document.getElementsByTagName("mat-nav-list")[1].style.background = '#272727'; document.getElementsByTagName("mat-nav-list")[1].style.borderRadius = '5px'; document.getElementsByTagName("mat-nav-list")[1].style.border = 'solid 1px #272727'; document.getElementsByTagName("mat-nav-list")[1].innerHTML = "<b style='color: white; margin-left: 5px'>Dark Mode</b> <input id='darkmode' type='checkbox'>"}}
    if(document.getElementsByClassName("score fail-color")[0] != null) {for(var x3 = 0; x3 < document.getElementsByClassName("score fail-color").length; x3++) {if(document.getElementsByClassName("score fail-color")[x3].getElementsByClassName('injected')[0] == null) {document.getElementsByClassName("score fail-color")[x3].innerHTML = document.getElementsByClassName("score fail-color")[x3].innerHTML + "<p class='injected' style='display: inline; color: red;'> Failing</p>";}}}
    if(document.getElementsByClassName("mat-table ng-star-inserted")[0] != null) {document.getElementsByClassName("mat-table ng-star-inserted")[0].style.background = tfbackground;}
    if(document.getElementsByClassName("mat-header-cell")[0] != null) {for(var z1 = 0; z1 < document.getElementsByClassName("mat-header-cell").length; z1++) {document.getElementsByClassName("mat-header-cell")[z1].style.color = whitecolor}}
    if(document.getElementsByClassName("mat-cell")[0] != null) {for(var z2 = 0; z2 < document.getElementsByClassName("mat-cell").length; z2++) {document.getElementsByClassName("mat-cell")[z2].style.color = whitecolor}}
    if(document.getElementsByClassName("mat-table")[0] != null) {for(var z3 = 0; z3 < document.getElementsByClassName("mat-table").length; z3++) {if(document.getElementsByClassName("mat-table")[z3].getAttribute("aria-label") == "Assigned activities") {document.getElementsByClassName("mat-table")[z3].style.background = tfbackground}}}
    if(document.getElementsByClassName("xli-student-activity-header")[0] != null) {for(var z4 = 0; z4 < document.getElementsByClassName("xli-student-activity-header").length; z4++) {document.getElementsByClassName("xli-student-activity-header")[z4].style.color = blackcolor;}}
    if(document.getElementsByTagName("app-gradebook-dashboard")[0] != null) {document.getElementsByTagName("app-gradebook-dashboard")[0].style.background = tfbackground;}
    if(document.getElementsByClassName("mat-toolbar mat-toolbar-single-row ng-pristine")[0] != null) {document.getElementsByClassName("mat-toolbar mat-toolbar-single-row ng-pristine")[0].style.background = graycolor;}
    if(document.getElementsByClassName("score pass-color")[0] != null) {for(var z5 = 0; z5 < document.getElementsByClassName("score pass-color").length; z5++) {if(document.getElementsByClassName("score pass-color")[z5].getElementsByClassName("injected passing")[0] == null) {document.getElementsByClassName("score pass-color")[z5].innerHTML = "<p class='injected passing' style='color: green; display: inline;'>Passing </p>" + document.getElementsByClassName("score pass-color")[z5].innerHTML}}}

    if(document.getElementsByClassName("app-title")[0] != null) {if(document.getElementById("backgroundInput") == null) {document.getElementsByClassName("app-title")[0].innerHTML += "<input id='backgroundInput' style='color: black; width: 100px; border-radius: 10px' value='" + GM_getValue('backgroundimage') + "'></input> <input id='backgroundcheck' type='checkbox' checked></input><p style='display: inline; color: white;'> Set background</p>"}}
    if(lol == 0) {if(document.getElementById("backgroundInput") != null) {console.log("GM Value " + GM_getValue('backgroundimage')); console.log("Input value " + document.getElementById("backgroundInput").value); lol = 1;}}
    if(document.getElementById("backgroundInput") != null) {window.tempdata = document.getElementById("backgroundInput").value; GM_setValue('backgroundimage',window.tempdata);}
}

var callInterval = setInterval(function() {ex();},10);
setInterval(function() {if(document.getElementById("darkmode") != null) {if(document.getElementById("darkmode").checked) {tfbackground = "#272727"; lightgrayback = "lightgray"; graycolor = "gray"; whitecolor = "white"; darkgraycolor = "darkgray"; blackcolor = "black";}}},10);
setInterval(function() {if(document.getElementById("darkmode") != null) {if(!document.getElementById("darkmode").checked) {tfbackground = ""; lightgrayback = ""; graycolor = ""; whitecolor = ""; darkgraycolor = ""; blackcolor = "";}}},10);
setInterval(function() {if(document.getElementById("backgroundcheck") != null) {if(document.getElementById("backgroundcheck").checked) {tfbackground1 = "url('" + GM_getValue('backgroundimage') + "'"}}},10);
setInterval(function() {if(document.getElementById("backgroundcheck") != null) {if(!document.getElementById("backgroundcheck").checked) {tfbackground1 = tfbackground;}}},10);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址