Skip to content

Commit

Permalink
Added date reference to chart tile
Browse files Browse the repository at this point in the history
removed unused option
  • Loading branch information
wycre committed Sep 18, 2023
1 parent 6fecdca commit b51a9bb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
3 changes: 0 additions & 3 deletions chromium/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ <h1>Connecteam Position View Options</h1>
<label for="DebugMode">Debug Mode:</label>
<input type="checkbox" id="DebugModeElem"><br><br>

<label for="DebugMode">Funny Noise Mode:</label>
<input type="checkbox" id="FunnyModeElem"><br><br>

<div class="save-area">
<input type="submit" value="Save" id="SaveButtonElem">
</div>
Expand Down
6 changes: 1 addition & 5 deletions chromium/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ document.addEventListener('DOMContentLoaded', function () {
// Store the necessary elements on the form page
const form = document.querySelector('form');
const debugModeCheckbox = document.getElementById('DebugModeElem');
const funnyModeCheckbox = document.getElementById('FunnyModeElem');

// Load the current setting from Chrome Storage and update the field state
chrome.storage.sync.get(['debugModeSet', 'funnyModeSet'], function (result) {
chrome.storage.sync.get(['debugModeSet'], function (result) {
// Debugmode
debugModeCheckbox.checked = result.debugModeSet;

// Funny boing sound mode
funnyModeCheckbox.checked = result.funnyModeSet;
});


Expand All @@ -23,7 +20,6 @@ document.addEventListener('DOMContentLoaded', function () {
// Store the updated setting in Chrome Storage
chrome.storage.sync.set({
debugModeSet: debugModeCheckbox.checked,
funnyModeSet: debugModeCheckbox.checked
});

// Tell the background script to reload the connecteam page
Expand Down
6 changes: 3 additions & 3 deletions chromium/pageAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const observer = new MutationObserver(async (mutList) => {


// Get user set options
let debugMode;
let debugMode; // not doing anything right now

chrome.storage.sync.get(['debugModeSet'], function (result) {
debugMode = result.debugModeSet;
Expand Down Expand Up @@ -153,7 +153,7 @@ async function getShifts() {

// Check if the response is ok
if (!res.ok) {
console.log("Error fetching shifts");
alert("Error fetching shifts");
return;
}

Expand Down Expand Up @@ -188,7 +188,7 @@ async function getJobsAndUsers() {

// Check if the response is ok
if (!res.ok) {
console.log("Error fetching job ids");
alert("Error fetching job ids");
return;
}

Expand Down
3 changes: 1 addition & 2 deletions chromium/popup/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,12 @@ function createPlot(shifts) {
];

dateReference = startTimes[0];
console.log(dateReference);

// Set layout
//let chartHeight = $("#chart").offsetHeight;
let chartWidth = $("#chart").offsetWidth;
const layout = {
title: `<b>${titleCase(currentDay)} Schedule</b>`,
title: `<b>${titleCase(currentDay)} Schedule (${new Date(dateReference).toISOString().slice(0, 10)})</b>`,
width: chartWidth, //window.screen.availWidth * 0.89,
height: window.screen.availHeight * 0.9,
xaxis: {
Expand Down

0 comments on commit b51a9bb

Please sign in to comment.