mirror of
https://github.com/GuySandler/CanvasRefined.git
synced 2026-06-21 18:09:55 +02:00
gpa presets
This commit is contained in:
parent
d37d2f565b
commit
27218d1119
@ -299,3 +299,6 @@ here is some proof the lisence was changed and this is based on the reverted MIT
|
|||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
Copyright (c) 2026 Guy Sandler
|
||||||
|
|
||||||
|
|||||||
@ -696,8 +696,9 @@
|
|||||||
The letter grade will be calculated as greater than or equal to the percentage given. <br><br>
|
The letter grade will be calculated as greater than or equal to the percentage given. <br><br>
|
||||||
If your school doesn't use the +/- system, you can enter 101 for those grades to remove them from the
|
If your school doesn't use the +/- system, you can enter 101 for those grades to remove them from the
|
||||||
calculation. (for example A+ = 101, A = 90, A- = 101)
|
calculation. (for example A+ = 101, A = 90, A- = 101)
|
||||||
<button class="big-button gpa-plus-minus">+/- GPA Scale</button>
|
<h3 class="header-small" style="margin-top: 20px;">GPA Scale Presets 0-4</h3>
|
||||||
<button class="big-button gpa-by-letter">By Letter GPA Scale</button>
|
<button class="big-button" id="gpa-plus-minus">+/- GPA Scale</button>
|
||||||
|
<button class="big-button" id="gpa-by-letter">By Letter GPA Scale</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
41
js/popup.js
41
js/popup.js
@ -563,6 +563,47 @@ function setup() {
|
|||||||
// document.getElementById("view-submissions-btn").addEventListener("click", displayMySubmissions);
|
// document.getElementById("view-submissions-btn").addEventListener("click", displayMySubmissions);
|
||||||
document.getElementById("submit-form-btn").addEventListener("click", displayThemeSubmissionForm);
|
document.getElementById("submit-form-btn").addEventListener("click", displayThemeSubmissionForm);
|
||||||
|
|
||||||
|
document.getElementById("gpa-plus-minus").addEventListener("click", () => {
|
||||||
|
applyGPAPreset({
|
||||||
|
"A+": { "cutoff": 97, "gpa": 4.0 },
|
||||||
|
"A": { "cutoff": 93, "gpa": 4.0 },
|
||||||
|
"A-": { "cutoff": 90, "gpa": 3.7 },
|
||||||
|
"B+": { "cutoff": 87, "gpa": 3.3 },
|
||||||
|
"B": { "cutoff": 83, "gpa": 3.0 },
|
||||||
|
"B-": { "cutoff": 80, "gpa": 2.7 },
|
||||||
|
"C+": { "cutoff": 77, "gpa": 2.3 },
|
||||||
|
"C": { "cutoff": 73, "gpa": 2.0 },
|
||||||
|
"C-": { "cutoff": 70, "gpa": 1.7 },
|
||||||
|
"D+": { "cutoff": 67, "gpa": 1.3 },
|
||||||
|
"D": { "cutoff": 63, "gpa": 1.0 },
|
||||||
|
"D-": { "cutoff": 60, "gpa": 0.7 },
|
||||||
|
"F": { "cutoff": 0, "gpa": 0 }
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.getElementById("gpa-by-letter").addEventListener("click", () => {
|
||||||
|
applyGPAPreset({
|
||||||
|
"A+": { "cutoff": 90, "gpa": 4.0 },
|
||||||
|
"A": { "cutoff": 80, "gpa": 4.0 },
|
||||||
|
"A-": { "cutoff": 70, "gpa": 4.0 },
|
||||||
|
"B+": { "cutoff": 65, "gpa": 3.0 },
|
||||||
|
"B": { "cutoff": 60, "gpa": 3.0 },
|
||||||
|
"B-": { "cutoff": 55, "gpa": 3.0 },
|
||||||
|
"C+": { "cutoff": 50, "gpa": 2.0 },
|
||||||
|
"C": { "cutoff": 45, "gpa": 2.0 },
|
||||||
|
"C-": { "cutoff": 40, "gpa": 2.0 },
|
||||||
|
"D+": { "cutoff": 35, "gpa": 1.0 },
|
||||||
|
"D": { "cutoff": 30, "gpa": 1.0 },
|
||||||
|
"D-": { "cutoff": 25, "gpa": 1.0 },
|
||||||
|
"F": { "cutoff": 0, "gpa": 0 }
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function applyGPAPreset(bounds) {
|
||||||
|
chrome.storage.sync.set({ "gpa_calc_bounds": bounds }, () => {
|
||||||
|
displayGPABounds();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setupCustomStyle(initial) {
|
function setupCustomStyle(initial) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user