Last active
October 15, 2021 18:24
-
-
Save Pigpog/b66cb4cf3fd914fb1c3824670701ab07 to your computer and use it in GitHub Desktop.
dark theme for the d2l lms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name D2L Dark Theme | |
// @version 0.1 | |
// @description A dark theme for D2L | |
// @author Jared | |
// @match https://*.desire2learn.com/* | |
// @exclude https://*.desire2learn.com/d2l/lms/selfassess/* | |
// @exclude https://*.desire2learn.com/content/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
setTimeout(function changeD2lCards(){ | |
var d2lCards=document.getElementsByClassName("d2l-card"); | |
for (var i = 0; i < d2lCards.length; i++){ | |
d2lCards[i].style="background-color:#000000;"; | |
} | |
},5000) | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle(` | |
#d2l_body { | |
background-color: #000000 !important; | |
} | |
.d2l-typography { | |
color: #B6B3B1 !important; | |
} | |
.d2l-navigation-s { | |
background-color: #000000 !important; | |
} | |
.d2l-branding-navigation-dark-foreground-color a.d2l-navigation-s-link, .d2l-branding-navigation-dark-foreground-color a.d2l-navigation-s-link:link, .d2l-branding-navigation-dark-foreground-color a.d2l-navigation-s-link:visited, .d2l-branding-navigation-dark-foreground-color div.d2l-navigation-s-item>span { | |
color: #B6B3B1 !important; | |
} | |
.d2l-branding-navigation-background-color { | |
background-color: #000000 !important; | |
} | |
.d2l-branding-navigation-dark-foreground-color .d2l-navigation-s-group .d2l-navigation-s-group-text { | |
color: #B6B3B1 !important; | |
} | |
html{ | |
--d2l-table-body-background-color: #000000 !important; | |
--d2l-table-header-background-color: #000000 !important; | |
--d2l-color-regolith: #000000 !important; | |
--d2l-table-header_-_color: #B6B3B1 !important; | |
--d2l-input-background-color: #000000 !important; | |
} | |
.daylight .ds_b{ | |
color: #B6B3B1 !important; | |
} | |
.daylight label .ds_i { | |
color: #B6B3B1 !important; | |
} | |
.daylight .d2l-grid[type=data] > :only-child > tr.d_ggl2 > td, .daylight .d2l-grid[type=data] > :only-child > tr.d_ggl2 > th, .daylight .d2l-grid[type=list] > :only-child > tr.d_ggl2 > td, .daylight .d2l-grid[type=list] > :only-child > tr.d_ggl2 > th { | |
background-color: #060400 !important; | |
} | |
.d2l-button, .d2l-button[active][disabled], .d2l-button[disabled]:focus, .d2l-button[disabled]:hover { | |
background-color: #060400 !important; | |
color: #B6B3B1 !important; | |
} | |
.d2l-tile { background-color: #000000 !important; } | |
.dco_c { background-color: #000000 !important; } | |
.d2l_1_77_60 { background-color: #000000 !important; } | |
.d2l_1_77_818 { background-color: #000000 !important; } | |
.d2l-collapsepane { background: #000000 !important;} | |
.d2l-collapsepane-content { background: #000000 !important; } | |
.vui-list>.vui-active { background-color: #170D06 !important; } | |
.daylight .d2l-collapsepane .d2l-collapsepane-header { background: #000000 !important; } | |
.d2l_1_77_180 {background-color:#000000 !important;} | |
.d2l-tiles-container { background-color: #060400 !important; } | |
body { | |
background-color: #060400 !important; | |
} | |
d2l-card { | |
background-color: #000000 !important; | |
background: #000000 !important; | |
} | |
.d2l-twopanelselector-side-bg.d2l-twopanelselector-side-sep, .d2l-twopanelselector-side.d2l-twopanelselector-side-sep{ | |
background: #000000 !important; | |
} | |
.daylight #ContentModuleTree a.d2l-le-TreeAccordionItem-anchor, .daylight #ContentModuleTree a.d2l-le-TreeAccordionItem-anchor:link, .daylight #ContentModuleTree a.d2l-le-TreeAccordionItem-anchor:visited, .daylight #ContentModuleTree a.d2l-le-TreeAccordionItem-anchor:hover, .daylight #ContentModuleTree a.d2l-le-TreeAccordionItem-anchor:focus { | |
color: #B6B3B1 !important; | |
} | |
.daylight .d2l-msg-container{ | |
background-color: #060400 !important; | |
} | |
.d2l-column-flip .d2l-column-side-bg { | |
background: #000000 !important; | |
} | |
.d2l-panel { | |
background: #000000 !important; | |
} | |
.d2l-column-flip-side { | |
background: #000000 !important; | |
} | |
d2l-table-wrapper{ | |
background-color: #000000 !important; | |
} | |
.daylight .d2l-editable-placeholder{ | |
background-color: #000000 !important; | |
} | |
.d2l-floating-buttons-container.d2l-floating-buttons-floating{ | |
background-color: #131313 !important; | |
} | |
.d2l-card-container{ | |
background-color: #000000 !important; | |
} | |
.daylight #ContentModuleTree .d2l-le-TreeAccordionItem.d2l-le-TreeAccordionItem-Selected > a.d2l-le-TreeAccordionItem-anchor::before, .daylight #ContentModuleTree .d2l-le-TreeAccordionItem.d2l-le-TreeAccordionItem-Selected > a.d2l-le-TreeAccordionItem-anchor:link::before, .daylight #ContentModuleTree .d2l-le-TreeAccordionItem.d2l-le-TreeAccordionItem-Selected > a.d2l-le-TreeAccordionItem-anchor:visited::before, .daylight #ContentModuleTree .d2l-le-TreeAccordionItem.d2l-le-TreeAccordionItem-Selected > a.d2l-le-TreeAccordionItem-anchor:hover::before, .daylight #ContentModuleTree .d2l-le-TreeAccordionItem.d2l-le-TreeAccordionItem-Selected > a.d2l-le-TreeAccordionItem-anchor:focus::before { | |
background: #444444 !important; | |
} | |
.d2l-course-selector-item { | |
background: #000000 !important; | |
} | |
.daylight .d_ggl1 { | |
background-color: #000000 !important; | |
} | |
iframe { | |
background: #ffffff !important; | |
} | |
d2l-card { | |
background-color: #212121 !important; | |
} | |
.d2l-page-header { | |
background-color: #131313 !important; | |
} | |
.d2l-page-header-dark { | |
background-color: #131313 !important; | |
} | |
.d2l-courseselector-wrapper { | |
background-color: #000000 !important; | |
} | |
.vui-button { | |
background-color:#000000 !important; | |
} | |
.d2l-datalist .vui-list{ | |
background-color:#000000 !important; | |
} | |
.d2l-le-disc-post, .d2l-le-disc-post-border { | |
background-color: #000000 !important; | |
} | |
.d2l-fileinput-add { | |
background-color: #000000 !important; | |
} | |
.ddial_o2 { | |
background-color: #000000 !important; | |
} | |
.dcs_r vui-changed { | |
background-color: #0a0a0a !important; | |
} | |
d2l-list-item-generic-layout { | |
background: black !important; | |
} | |
.d2l-table>tbody, .d2l-table>tfoot { | |
background-color: black !important; | |
} | |
`) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment