Skip to content

Commit

Permalink
Add colour to bookwork code message and fix SUBMIT button
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlostorto committed Apr 1, 2023
1 parent 22e2da1 commit c159ee5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions console/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const themes = {
}

const themeStyles = '.themes-container{display:flex;align-items:center;justify-content:center;flex-direction:column;width:500px}.themes-container ul{border:2px solid #fff;padding:0;display:flex;flex-direction:column;width:100%}.themes-container ul li{list-style-type:none;display:flex;flex-direction:row}.themes-container ul li div{background-color:orange;height:50px;width:25%}.themes-container ul li:hover{cursor:pointer;filter:brightness(80%)}@media (max-width: 1000px){.themes-container{width:60vw}}';
const darkModeStyles = ':root{--orange:#F46815;--grey:#F8F8F7;--dark-grey:#E9E9E9;--darkest:#241E92;--dark:#5432D3;--light:#7B6CF6;--lightest:#E5A5FF}.um-login-container,.package-container,.view-body,.main-view{background:var(--darkest)!important}.entry-area-bubble .text,.answer .markdown.text-container{color:var(--darkest)!important}.package-filter-list,.revision-homework-button-container,.revision-topic-page,.package-list > div > span > ul > div,.rewards-section.insights-lifetime-totals,.rewards-section-header,.rewards-section-content,.rewards-progress-levels,.rewards-faqs .accordion-element-header{background:var(--dark)!important}.package-list > div > span > ul > div,.rewards-section{border-color:var(--dark)!important}.um-header,.package-heading,.footer-cookie-banner-container,.footer-container,.revision-tab,.revision-task,.revision-strand-button,.revision-strand-page,.revision-homework-button,.activity-feed-day,.status-bar,.status-bar-label-text,.btn-menu-item,.question-only,.answer-only,.question-text,.skill-delivery-view .view-body,.wac-text-container .bookwork-code,.insights-lifetime-total,.rewards-section-row,.rewards-progress-level:hover{background:var(--light)!important}.revision-tabs{border-bottom:var(--light)!important}.btn-menu-item,.package-heading,.revision-homework-button{border:1px solid var(--light)!important}.wac-text-container .bookwork-code,.accordion-element-header,.activity-feed-work,.dummytaskitem{border:none!important}.um-login-box__content,.revision-tab.revision-tab-active,.accordion-element-header,.activity-feed-work,.status-bar-menu-item,.status-bar-menu-button,.revision-task-item,#answer-wac-box,.choice-wac-options{background:var(--lightest)!important}.status-bar-menu-button{border:solid var(--lightest)!important}.status-bar-menu-item{border-color:var(--lightest)!important}.school-selector,.revision-strand-button,.accordion-element-header,.revision-substrand-extra,.activity-feed-day > h2,.activity-feed-work,.activity-feed-work-counts,.revision-location-stream,.btn-menu-item,.revision-topic-page,.revision-homework-button,.package-heading,.question-text > div > .text,.result-inner h2,.result-inner .result-subtitle-prominent,.result-inner h1.incorrect,.text-container,.answer-part > div > .text,.wac-header-container,.wac-text,.minigame-description > div,.rewards-section-header-title,.insights-lifetime-total,.rewards-section-row,.rewards-progress-level-label-text{color:var(--grey)!important}.answer-markup.choice-wac-option.choice.choice-answer-markup,.choice-text{background:var(--grey)!important}.revision-location-stream,.revision-strand-button{border-color:var(--grey)!important}.active{border:1px solid var(--grey)!important}.package-filter-arrow{border-left-color:var(--grey)!important}.package-list > div > span > ul > div > .task-title{color:var(--dark-grey)!important}.selected .text,.choice-wac-option.selected,.rewards-progress-level:hover .rewards-progress-level-label-text{color:var(--orange)!important}.rewards-section-header{border-radius:0!important}.revision-strand-icon{filter:grayscale(100%) brightness(5)!important}.status-bar-menu-item:not(:first-child):before{left:-3px!important;width:110%!important;border-bottom:1px solid var(--darkest)!important}.status-bar-menu-item-img{filter:grayscale(100%) brightness(5)!important}.taskitem > .icon{filter:brightness(5)!important}.status-bar-menu-item:hover > .status-bar-menu-item-img{filter:none!important}';
const darkModeStyles = ':root{--orange:#F46815;--grey:#F8F8F7;--dark-grey:#E9E9E9;--darkest:#241E92;--dark:#5432D3;--light:#7B6CF6;--lightest:#E5A5FF;}.um-login-container,.package-container,.view-body,.main-view{background:var(--darkest)!important;}.entry-area-bubble.text,.answer.markdown.text-container{color:var(--darkest)!important;}.package-filter-list,.revision-homework-button-container,.revision-topic-page,.package-list>div>span>ul>div,.rewards-section.insights-lifetime-totals,.rewards-section-header,.rewards-section-content,.rewards-progress-levels,.rewards-faqs.accordion-element-header{background:var(--dark)!important;}.package-list>div>span>ul>div,.rewards-section{border-color:var(--dark)!important;}.um-header,.package-heading,.footer-cookie-banner-container,.footer-container,.revision-tab,.revision-task.revision-strand-button,.revision-strand-page,.revision-homework-button.activity-feed-day,.status-bar,.status-bar-label-text,.btn-menu-item,.question-only,.answer-only,.question-text,.skill-delivery-view.view-body,.wac-text-container.bookwork-code,.insights-lifetime-total,.rewards-section-row,.rewards-progress-level:hover,#pass-wac-box{background:var(--light)!important;}.revision-tabs{border-bottom:var(--light)!important;}.btn-menu-item,.package-heading,.revision-homework-button{border:1pxsolidvar(--light)!important;}.wac-text-container.bookwork-code,.accordion-element-header,.activity-feed-work,.dummytaskitem{border:none!important;}.um-login-box__content,.revision-tab.revision-tab-active,.accordion-element-header,.activity-feed-work,.status-bar-menu-item,.status-bar-menu-button,.revision-task-item,#answer-wac-box,.choice-wac-options{background:var(--lightest)!important;}.status-bar-menu-button{border:solidvar(--lightest)!important;}.status-bar-menu-item{border-color:var(--lightest)!important;}.school-selector,.revision-strand-button,.accordion-element-header,.revision-substrand-extra,.activity-feed-day>h2,.activity-feed-work,.activity-feed-work-counts,.revision-location-stream,.btn-menu-item,.revision-topic-page,.revision-homework-button,.package-heading,.question-text>div>.text,.result-innerh2,.result-inner.result-subtitle-prominent,.result-innerh1.incorrect,.text-container,.answer-part>div>.text,.wac-header-container,.wac-text,.minigame-description>div,.rewards-section-header-title,.insights-lifetime-total,.rewards-section-row,.rewards-progress-level-label-text,.wac-message{color:var(--grey)!important;}.answer-markup.choice-wac-option.choice.choice-answer-markup,.choice-text{background:var(--grey)!important;}.revision-location-stream,.revision-strand-button{border-color:var(--grey)!important;}.active{border:1pxsolidvar(--grey)!important;}.package-filter-arrow{border-left-color:var(--grey)!important;}.package-list>div>span>ul>div>.task-title{color:var(--dark-grey)!important;}.selected.text,.choice-wac-option.selected,.rewards-progress-level:hover.rewards-progress-level-label-text{color:var(--orange)!important;}.rewards-section-header{border-radius:0!important;}.revision-strand-icon{filter:grayscale(100%)brightness(5)!important;}.status-bar-menu-item:not(:first-child):before{left:-3px!important;width:110%!important;border-bottom:1pxsolidvar(--darkest)!important;}.status-bar-menu-item-img{filter:grayscale(100%)brightness(5)!important;}.taskitem>.icon{filter:brightness(5)!important;}.status-bar-menu-item:hover>.status-bar-menu-item-img{filter:none!important;}';

async function fetchDependencies() {
let response = await fetch('https://raw.githubusercontent.com/alexlostorto/sparx/main/release.json');
Expand Down Expand Up @@ -454,7 +454,8 @@ async function main() {
if (questionContainer !== null) {
question = questionContainer.innerText;
questionImages = document.querySelectorAll('[data-test-target="image-img"]');
// console.log(questionImages);

question = question.replace(/\r?\n|\r/g, '');

if (questionImages.length == 0 | questionImages[0]) { return }
else {
Expand Down Expand Up @@ -494,12 +495,12 @@ async function sendAnswerToDatabase() {
}

document.addEventListener("click", function(e) {
console.log(e.target);
if(e.target) {
try {
if (
(e.target.id == "skill-delivery-submit-button" && e.target.innerText == "Submit") ||
(e.target.className == "button-text" && e.target.textContent == "Submit") ||
(e.target.className == "button-all" && e.target.textContent == "Submit") ||
(e.target.className == "button-icon button-icon-right" && e.target.parentElement.innerText == "Submit") ||
(e.target.parentElement.className == "button-icon button-icon-right" && e.target.parentElement.parentElement.innerText == "Submit") ||
(e.target.parentElement.parentElement.className == "button-icon button-icon-right" && e.target.parentElement.parentElement.parentElement.innerText == "Submit")) {
Expand Down

0 comments on commit c159ee5

Please sign in to comment.