diff --git a/LICENSE b/LICENSE index d1c6b57b..e042229a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2021 Aaron Opell and Glen Husman +Copyright (c) 2017-2023 Aaron Opell and Glen Husman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/js/all.js b/js/all.js index 8ea3db7d..ebdcd58e 100644 --- a/js/all.js +++ b/js/all.js @@ -106,8 +106,8 @@ bottom.appendChild(createElement("span", ["footer-divider"], { textContent: "|" document.documentElement.style.setProperty("--default-visibility", "visible"); -let verboseModalFooterText = `© Aaron Opell, Glen Husman 2017-2021 | Schoology Plus v${chrome.runtime.getManifest().version_name || chrome.runtime.getManifest().version}${getBrowser() != "Chrome" || chrome.runtime.getManifest().update_url ? '' : ' dev'} | Discord Server | GitHub | Contributors | Privacy Policy | Changelog`; -let modalFooterText = "Schoology Plus © Aaron Opell, Glen Husman 2017-2021"; +let verboseModalFooterText = `© Schoology Plus Contributors 2017-2023 | Schoology Plus v${chrome.runtime.getManifest().version_name || chrome.runtime.getManifest().version}${getBrowser() != "Chrome" || chrome.runtime.getManifest().update_url ? '' : ' dev'} | Discord Server | GitHub | Contributors | Privacy Policy | Changelog`; +let modalFooterText = "Schoology Plus © Schoology Plus Contributors 2017-2023"; let frame = document.createElement("iframe"); frame.src = `https://schoologypl.us/changelog?version=${chrome.runtime.getManifest().version}`; diff --git a/js/analytics.js b/js/analytics.js index d0e2214b..7a07558f 100644 --- a/js/analytics.js +++ b/js/analytics.js @@ -95,7 +95,15 @@ var trackEvent = function (eventName, { page_location: location.href.replace(/\/\d{3,}\b/g, "/*"), page_path: location.pathname.replace(/\/\d{3,}\b/g, "/*"), page_title: null, - user_id: randomUserId + user_id: randomUserId, + user_properties: { + extensionVersion: chrome.runtime.getManifest().version, + domain: location.host, + theme: selectedTheme, + modernTheme: document.documentElement.getAttribute("modern"), + activeBeta: beta, + lastEnabledVersion: newVersion, + } }); let trackEventOld = function (target, action, label = undefined, value = undefined) { @@ -115,12 +123,6 @@ var trackEvent = function (eventName, { } = {}) { trackEventOld(legacyTarget, legacyAction, legacyLabel, legacyValue); let eventData = { - extensionVersion: chrome.runtime.getManifest().version, - domain: location.host, - theme: selectedTheme, - modernTheme: document.documentElement.getAttribute("modern"), - activeBeta: beta, - lastEnabledVersion: newVersion, id, context, value, diff --git a/js/grades.js b/js/grades.js index e2691791..75946958 100644 --- a/js/grades.js +++ b/js/grades.js @@ -886,7 +886,7 @@ var fetchQueue = []; let perRow = Array.prototype.find.call(this[0].parentElement.getElementsByTagName("tr"), e => e.dataset.id == perId); let courseId = perRow.dataset.parentId; - + recalculateCategoryScore(catRow, -scoreVal, -maxVal, true, courseId); recalculatePeriodScore(perRow, -scoreVal, -maxVal, true, courseId); }; @@ -1088,9 +1088,9 @@ var fetchQueue = []; let perId = catRow.dataset.parentId; let perRow = Array.prototype.find.call(this[0].parentElement.getElementsByTagName("tr"), e => e.dataset.id == perId); - + let courseId = perRow.dataset.parentId; - + recalculateCategoryScore(catRow, scoreVal, maxVal, true, courseId); recalculatePeriodScore(perRow, scoreVal, maxVal, true, courseId); } @@ -1275,7 +1275,7 @@ var fetchQueue = []; createElement( "span", ["rounded-grade"], - {title: String(jsonAssignment.grade), textContent: String(jsonAssignment.grade)} + { title: String(jsonAssignment.grade), textContent: String(jsonAssignment.grade) } ) ] ); diff --git a/js/icons.js b/js/icons.js index b825887e..b69d699c 100644 --- a/js/icons.js +++ b/js/icons.js @@ -7,7 +7,7 @@ })(); var icons = [ - { regex: "\\bPE\\b|Phys(ical)? Edu?(cation)?|\\bSRLA\\b|TRK|TRACK FIELD|CROSS C|ADV COND|MV BD AWR|ATHLETIC|SPORTS|FITNESS", url: "https://cdn-icons-png.flaticon.com/512/2553/2553967.png", source: "exercise_2553967" }, + { regex: "\\bPE\\b|Phys(ical)? Edu?(cation)?|\\bSRLA\\b|TRK|TRACK FIELD|CROSS C|ADV COND|MO?V BD AWR|ATHLETIC|SPORTS|FITNESS|PHYS FIT", url: "https://cdn-icons-png.flaticon.com/512/2553/2553967.png", source: "exercise_2553967" }, { regex: "WO?R?LD HIST?(ORY)?|WHG|WLD LANG|LAT AM|INTL REL", url: "https://cdn-icons-png.flaticon.com/512/174/174249.png", source: "internet_174249" }, { regex: "ANIMAL", url: "https://cdn-icons-png.flaticon.com/512/2109/2109342.png", source: "barn_2109342" }, { regex: "ANIM", url: "https://cdn-icons-png.flaticon.com/512/2037/2037876.png", source: "animation_2037876" }, @@ -24,13 +24,13 @@ var icons = [ { regex: "CHEER|DRILL", url: "https://cdn-icons-png.flaticon.com/512/2185/2185584.png", source: "cheerleaders_2185584" }, { regex: "CHEM", url: "https://cdn-icons-png.flaticon.com/512/123/123381.png", source: "flask_123381" }, { regex: "GAME DESG?N|GAME DESIGN", url: "https://cdn-icons-png.flaticon.com/512/1737/1737285.png", source: "computer_1737285" }, - { regex: "COMP SCI?|COMPUTER|INTRO COMP|COMP PRO?G|INTRO PROG|CODING|INTE?R?NE?T|DIGITAL LIT", url: "https://cdn-icons-png.flaticon.com/512/626/626570.png", source: "binary-code_626570" }, + { regex: "COMP SCI?|COMPUTER|INTRO COMP|COMP PRO?G|INTRO PROG|CODING|INTE?R?NE?T|DIGITAL LIT|JAVA", url: "https://cdn-icons-png.flaticon.com/512/626/626570.png", source: "binary-code_626570" }, { regex: "US HIST|AMER(ICAN?)?|AM DEM|AM IMAGE|IB HS AMR", url: "https://cdn-icons-png.flaticon.com/512/149/149513.png", source: "united-states-of-america_149513" }, - { regex: "HE?A?LTH|MEDICAL|MED INTERVEN|MEDICINE|HOSP", url: "https://cdn-icons-png.flaticon.com/512/179/179555.png", source: "first-aid-kit_179555" }, + { regex: "HE?A?LTH|MEDICAL|MED INTERVEN|MEDICINE|HOSP|PATIENT", url: "https://cdn-icons-png.flaticon.com/512/179/179555.png", source: "first-aid-kit_179555" }, { regex: "CERAMICS|AM IND", url: "https://cdn-icons-png.flaticon.com/512/123/123458.png", source: "pot_123458" }, { regex: "FLOR|FLOWER", url: "https://cdn-icons-png.flaticon.com/512/346/346167.png", source: "flower_346167" }, { regex: "MARINE|ZOOLOGY|OCEAN", url: "https://cdn-icons-png.flaticon.com/512/146/146718.png", source: "turtle_146718" }, - { regex: "MAND|CHINESE|CHINA", url: "https://cdn-icons-png.flaticon.com/512/2448/2448781.png", source: "flag_2448781" }, + { regex: "MAND|CHINESE|CHINA|CHIN LANG", url: "https://cdn-icons-png.flaticon.com/512/2448/2448781.png", source: "flag_2448781" }, { regex: "KOREA", url: "https://cdn-icons-png.flaticon.com/512/1999/1999610.png", source: "korea_1999610" }, { regex: "PSYC|IB THEORY", url: "https://cdn-icons-png.flaticon.com/512/552/552408.png", source: "creativity_552408" }, { regex: "PIANO|KEYBOARD", url: "https://cdn-icons-png.flaticon.com/512/1973/1973888.png", source: "keyboard_1973888" }, @@ -46,29 +46,29 @@ var icons = [ { regex: "(^|\\b)LIT(ERATURE)?\\b|READ|L & L|LIBRARY", url: "https://cdn-icons-png.flaticon.com/512/167/167755.png", source: "open-book_167755" }, { regex: "STAGE|THEATRE DSN|TH DSN WKSP|CHORPROC", url: "https://cdn-icons-png.flaticon.com/512/2673/2673346.png", source: "spotlight_2673346" }, { regex: "ADVT DES", url: "https://cdn-icons-png.flaticon.com/512/1055/1055664.png", source: "ads_1055664" }, - { regex: "ECON(O(MICS)?)?|AP MA ECO", url: "https://cdn-icons-png.flaticon.com/512/712/712743.png", source: "profit_712743" }, + { regex: "ECON(O(MICS)?)?|AP MA ECO|FIN MGMT|FINANCIAL", url: "https://cdn-icons-png.flaticon.com/512/712/712743.png", source: "profit_712743" }, { regex: "STAT(STICS|ISTCS)|STATS?|STATISTICS", url: "https://cdn-icons-png.flaticon.com/512/1006/1006636.png", source: "analysis_1006636" }, - { regex: "FILM(MAKING)?\\b|VIDEO|VID PRD|BRDCST|CINEMA", url: "https://cdn-icons-png.flaticon.com/512/321/321799.png", source: "video-camera_321799" }, + { regex: "FILM(MAKING)?\\b|VIDEO|VID PRD|BRDCST|CINEMA|SCREEN PLAY", url: "https://cdn-icons-png.flaticon.com/512/321/321799.png", source: "video-camera_321799" }, { regex: "(FIR|1)ST RESPONDER", url: "https://cdn-icons-png.flaticon.com/512/119/119083.png", source: "ambulance_119083" }, { regex: "GEOLOGY", url: "https://cdn-icons-png.flaticon.com/512/184/184647.png", source: "science_184647" }, { regex: "COOK|CULINARY|FOOD|CATER", url: "https://cdn-icons-png.flaticon.com/512/1142/1142696.png", source: "cooking_1142696" }, - { regex: "\\bGOVT\\b|YOU ADM JUS", url: "https://cdn-icons-png.flaticon.com/512/167/167718.png", source: "university_167718" }, + { regex: "\\bGOVT\\b|YOU ADM JUS|JUSTICE", url: "https://cdn-icons-png.flaticon.com/512/167/167718.png", source: "university_167718" }, { regex: "GEOM", url: "https://cdn-icons-png.flaticon.com/512/258/258316.png", source: "office-material_258316" }, - { regex: "GUIT(AR)?", url: "https://cdn-icons-png.flaticon.com/512/1586/1586234.png", source: "guitar_1586234" }, - { regex: "MYP ST TECH|SEM(INAR)?\\b|ENGINEER|\\bENG DE\\b|INTRO ENGIN|CREAT EXP|STEA?M|MULTICRAFT CORE", url: "https://cdn-icons-png.flaticon.com/512/1460/1460471.png", source: "idea_1460471" }, + { regex: "GUIT(AR)?|MARIACHI|UKELELE", url: "https://cdn-icons-png.flaticon.com/512/1586/1586234.png", source: "guitar_1586234" }, + { regex: "MYP ST TECH|\\bCTE\\b|SEM(INAR)?\\b|ENGINEER|\\bENG DE\\b|INTRO ENGIN|CREAT EXP|STEA?M|MULTICRAFT CORE", url: "https://cdn-icons-png.flaticon.com/512/1460/1460471.png", source: "idea_1460471" }, { regex: "FLIGHT|SPACE|AEROSPA?CE", url: "https://cdn-icons-png.flaticon.com/512/744/744502.png", source: "globe_744502" }, - { regex: "ENG(LISH)?\\b|CREAT(IVE)? WRI?T(ING)?|\\bCOMP(OSITION)?\\b|\\bERWC\\b|LANGUAGE ARTS|LNG ART", url: "https://cdn-icons-png.flaticon.com/512/254/254022.png", source: "signing_254022" }, - { regex: "SPAN(ISH)?\\b", url: "https://cdn-icons-png.flaticon.com/512/206/206724.png", source: "spain_206724" }, + { regex: "ENG(LISH)?\\b|CREAT(IVE)? WRI?T(ING)?|\\bCOMP(OSITION)?\\b|\\bERWC\\b|LANGUAGE ARTS|LNG ART|\\bELA\\b", url: "https://cdn-icons-png.flaticon.com/512/254/254022.png", source: "signing_254022" }, + { regex: "SPAN(ISH)?\\b|SP LANG", url: "https://cdn-icons-png.flaticon.com/512/8081/8081829.png", source: "spanish-language_8081829" }, { regex: "FREN(CH)?\\b|AP FR LANG", url: "https://cdn-icons-png.flaticon.com/512/206/206657.png", source: "france_206657" }, { regex: "ITALIAN", url: "https://cdn-icons-png.flaticon.com/512/555/555668.png", source: "italy_555668" }, { regex: "ENV", url: "https://cdn-icons-png.flaticon.com/512/291/291211.png", source: "recycle_291211" }, - { regex: "ROBOT|MFG|INTRO PHYS COMPUTING|MACHINING", url: "https://cdn-icons-png.flaticon.com/512/1546/1546683.png", source: "robotic-arm_1546683" }, + { regex: "ROBOT|MFG|INTRO PHYS COMPUTING|MACHINING|MACHI?NI?ST", url: "https://cdn-icons-png.flaticon.com/512/1546/1546683.png", source: "robotic-arm_1546683" }, { regex: "MEDIA", url: "https://cdn-icons-png.flaticon.com/512/1649/1649092.png", source: "media-player_1649092" }, { regex: "CYBER", url: "https://cdn-icons-png.flaticon.com/512/2084/2084028.png", source: "cyber-security_2084028" }, { regex: "GEOG|HUMAN GEO", url: "https://cdn-icons-png.flaticon.com/512/717/717982.png", source: "globe_717982" }, { regex: "(^|\\b)ART\\b|DES CRAFT|CRAFTS", url: "https://cdn-icons-png.flaticon.com/512/1497/1497573.png", source: "creativity_1497573" }, { regex: "AM SIGN LNG", url: "https://cdn-icons-png.flaticon.com/512/2014/2014363.png", source: "sign-language_2014363" }, - { regex: "DANCE?|DN CH|DNC CMNTY", url: "https://cdn-icons-png.flaticon.com/512/493/493507.png", source: "dancing_493507" }, + { regex: "DANCE?|DN CH|DNC CMP?NT?Y|BALLET?", url: "https://cdn-icons-png.flaticon.com/512/493/493507.png", source: "dancing_493507" }, { regex: "APP CREAT", url: "https://cdn-icons-png.flaticon.com/512/186/186239.png", source: "smartphone_186239" }, { regex: "MUSEUM", url: "https://cdn-icons-png.flaticon.com/512/252/252032.png", source: "banks_252032" }, { regex: "GOLF", url: "https://cdn-icons-png.flaticon.com/512/1584/1584143.png", source: "golf_1584143" }, @@ -76,19 +76,19 @@ var icons = [ { regex: "MEX", url: "https://cdn-icons-png.flaticon.com/512/206/206600.png", source: "mexico_206600" }, { regex: "RUSSIA", url: "https://cdn-icons-png.flaticon.com/512/206/206604.png", source: "russia_206604" }, { regex: "(^|\\b)ELD\\b|(^|\\b)ELS\\b|(^|\\b)ELL\\b", url: "https://cdn-icons-png.flaticon.com/512/947/947478.png", source: "book_947478" }, - { regex: "(^|\\b)THEA(T[ER][ER])?\\b|DRAMA", url: "https://cdn-icons-png.flaticon.com/512/214/214351.png", source: "theater_214351" }, + { regex: "(^|\\b)THEA(T[ER][ER])?\\b|DRAMA|PERFORM ART", url: "https://cdn-icons-png.flaticon.com/512/214/214351.png", source: "theater_214351" }, { regex: "LEADER", url: "https://cdn-icons-png.flaticon.com/512/1534/1534091.png", source: "government_1534091" }, - { regex: "SERVICE|T\\.A\\.|PEER COUNSELING|TUTOR|AVID|ETHNIC|INTERACTIONS|ANTHRO|SOCI|DECATHLON|PENTATHLON", url: "https://cdn-icons-png.flaticon.com/512/1402/1402119.png", source: "collaboration_1402119" }, + { regex: "SERVICE|T\\.A\\.|PEER COUNSELING|TUTOR|AVID|ETHNIC|ETHN STUDIES|INTERACTIONS|ANTHRO|SOCI|DECATHLON|PENTATHLON|AFRO-AM", url: "https://cdn-icons-png.flaticon.com/512/4337/4337288.png", source: "idea_4337288" }, { regex: "LATIN|\\bLAW\\b|CALLIGRAPHY", url: "https://cdn-icons-png.flaticon.com/512/1020/1020074.png", source: "manuscript_1020074" }, { regex: "HUMANITI?E?S?|LIFE (MGMT|SKI?L?LS)|PHIL", url: "https://cdn-icons-png.flaticon.com/512/1205/1205495.png", source: "discussion_1205495" }, { regex: "YEARBOOK|DIG IMAG|PHOTO", url: "https://cdn-icons-png.flaticon.com/512/1006/1006107.png", source: "memories_1006107" }, { regex: "NETWORKING", url: "https://cdn-icons-png.flaticon.com/512/1554/1554377.png", source: "network_1554377" }, { regex: "RES(EA)?RCH", url: "https://cdn-icons-png.flaticon.com/512/164/164996.png", source: "research_164996" }, { regex: "COL(LEGE)?\\b|CLASS OF", url: "https://cdn-icons-png.flaticon.com/512/167/167743.png", source: "mortarboard_167743" }, - { regex: "CAREER|JOB|GEN WRK|\\bWORK\\b|ENTERP", url: "https://cdn-icons-png.flaticon.com/512/149/149018.png", source: "briefcase_149018" }, + { regex: "CAREER|JOB|GEN WRK|\\bWORK\\b|ENTERP|SMALL BUS", url: "https://cdn-icons-png.flaticon.com/512/149/149018.png", source: "briefcase_149018" }, { regex: "ADVIS|HOME|SOCIAL COM|GRADE \\d|BOOKS", url: "https://cdn-icons-png.flaticon.com/512/167/167729.png", source: "desk_167729" }, { regex: "SWIM", url: "https://cdn-icons-png.flaticon.com/512/124/124212.png", source: "swimming_124212" }, - { regex: "CONSTRUCTION|WOOD|CARPENTRY", url: "https://cdn-icons-png.flaticon.com/512/1973/1973946.png", source: "woodworking_1973946" }, + { regex: "CONSTRUCTION|WOOD|CARPENTRY?", url: "https://cdn-icons-png.flaticon.com/512/1973/1973946.png", source: "woodworking_1973946" }, { regex: "VO?LLE?YBA?LL?", url: "https://cdn-icons-png.flaticon.com/512/68/68175.png", source: "volley-ball_68175" }, { regex: "FOOTBALL", url: "https://cdn-icons-png.flaticon.com/512/167/167741.png", source: "american-football_167741" }, { regex: "JOURNALI?SM", url: "https://cdn-icons-png.flaticon.com/512/1720/1720094.png", source: "communication_1720094" }, @@ -102,13 +102,13 @@ var icons = [ { regex: "HORT|LANDSCAP", url: "https://cdn-icons-png.flaticon.com/512/346/346195.png", source: "sprout_346195" }, { regex: "ARABIC", url: "https://cdn-icons-png.flaticon.com/512/1704/1704491.png", source: "pattern_1704491" }, { regex: "GERMAN", url: "https://cdn-icons-png.flaticon.com/512/555/555613.png", source: "germany_555613" }, - { regex: "HIST", url: "https://cdn-icons-png.flaticon.com/512/1501/1501478.png", source: "parchment_1501478" }, + { regex: "HIST|ANCT CIVL", url: "https://cdn-icons-png.flaticon.com/512/1501/1501478.png", source: "parchment_1501478" }, { regex: "SCULPT", url: "https://cdn-icons-png.flaticon.com/512/2071/2071211.png", source: "sculpture_2071211" }, { regex: "SCI|ISCS", url: "https://cdn-icons-png.flaticon.com/512/167/167733.png", source: "microscope_167733" }, { regex: "(BASE|SOFT)BALL", url: "https://cdn-icons-png.flaticon.com/512/1668/1668514.png", source: "baseball_1668514" }, { regex: "PHYSIO|HUM BODY|BOD DYN|KINESIOLOGY", url: "https://cdn-icons-png.flaticon.com/512/2044/2044715.png", source: "x-ray_2044715" }, { regex: "(^|\\b)MATH|IB MTH", url: "https://cdn-icons-png.flaticon.com/512/1284/1284095.png", source: "mathematics_1284095" }, - { regex: "DRAW|2D|3D|DESIGN|DE?SN|DRAFT ARC|SCREEN PRINT|EXPL ARCH", url: "https://cdn-icons-png.flaticon.com/512/681/681560.png", source: "sketch_681560" }, + { regex: "DRAW|2D|3D|DESIGN|DE?SN|DRAFT ARC|SCREEN PRINT|EXPL ARCH|DRAFT TEC", url: "https://cdn-icons-png.flaticon.com/512/681/681560.png", source: "sketch_681560" }, { regex: "SANDBOX", url: "https://cdn-icons-png.flaticon.com/512/1588/1588745.png", source: "sandbox_1588745" }, { regex: "DRIVER|DRIVING", url: "https://cdn-icons-png.flaticon.com/512/741/741407.png", source: "car_741407" }, { regex: ".", url: "https://cdn-icons-png.flaticon.com/512/164/164949.png", source: "bookshelf_164949" } diff --git a/manifest.json b/manifest.json index 89400b7f..827bb355 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "update_url": "https://schoologypl.us/firefox_updates.json" } }, - "version": "7.7.1", + "version": "7.7.2", "icons": { "128": "imgs/icon@128.png", "64": "imgs/icon@64.png", diff --git a/theme-editor.html b/theme-editor.html index 07abdc18..fcf53f6d 100644 --- a/theme-editor.html +++ b/theme-editor.html @@ -761,9 +761,8 @@