fix: teacher name format, non-bold total, total row spacing, year-level show/custom/smart settings
This commit is contained in:
@@ -19,13 +19,21 @@ $('#masterToggle').addEventListener('change', async (e) => {
|
||||
});
|
||||
|
||||
// ---- PDF settings: truncate long course descriptions (default ON) ----
|
||||
async function loadTruncate() {
|
||||
const { truncateDescription } = await browser.storage.local.get('truncateDescription');
|
||||
$('#truncateToggle').checked = truncateDescription !== false;
|
||||
async function loadPdfSettings() {
|
||||
const s = await browser.storage.local.get(['truncateDescription', 'showYearLevel', 'customYearLevel']);
|
||||
$('#truncateToggle').checked = s.truncateDescription !== false;
|
||||
$('#showYearToggle').checked = s.showYearLevel !== false;
|
||||
$('#customYear').value = s.customYearLevel || '';
|
||||
}
|
||||
$('#truncateToggle').addEventListener('change', async (e) => {
|
||||
await browser.storage.local.set({ truncateDescription: e.target.checked });
|
||||
});
|
||||
$('#showYearToggle').addEventListener('change', async (e) => {
|
||||
await browser.storage.local.set({ showYearLevel: e.target.checked });
|
||||
});
|
||||
$('#customYear').addEventListener('change', async (e) => {
|
||||
await browser.storage.local.set({ customYearLevel: e.target.value.trim() });
|
||||
});
|
||||
|
||||
// ---- Profiles ----
|
||||
async function getProfiles() {
|
||||
@@ -113,6 +121,6 @@ $('#saveProfile').addEventListener('click', async () => {
|
||||
// ---- Init ----
|
||||
(async function init() {
|
||||
await loadMaster();
|
||||
await loadTruncate();
|
||||
await loadPdfSettings();
|
||||
renderProfiles(await getProfiles());
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user