Skip to content

Instantly share code, notes, and snippets.

@CobreDev
Last active November 8, 2021 14:46
Show Gist options
  • Save CobreDev/81a6480874bc4b195a35b4ceca4c971f to your computer and use it in GitHub Desktop.
Save CobreDev/81a6480874bc4b195a35b4ceca4c971f to your computer and use it in GitHub Desktop.
Injects js into certain websites
if( window.location['pathname'] === '/StudentFunctions/Interface/acellus_engine.html') {
// if the "top-navbar acellus-logo" class is present set theme to #4D6F9D
if (document.getElementsByClassName("top-navbar acellus-logo").length){
$('head').append($('<meta name="theme-color" content="#4D6F9D">'))
}
// if the "top-navbar exam" class is present set theme to #98CD88
if (document.getElementsByClassName("top-navbar exam").length){
$('head').append($('<meta name="theme-color" content="#98CD88">'))
}
// if the "top-navbar review" class is present set theme to #85C4E6
if (document.getElementsByClassName("top-navbar review").length){
$('head').append($('<meta name="theme-color" content="#85C4E6">'))
}
}
if( window.location['pathname'] === '/StudentFunctions/selectclass.html') {
$('head').append($('<meta name="theme-color" content="#E9E9E9">'))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment