From e458c09b12a858aa5daa4bb5f42ce84ed97e1ce9 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Thu, 28 May 2020 16:37:18 -0700 Subject: [PATCH 1/2] Added more blacklisted domains; added icons --- css/all.css | 34 +++++++++++++++++++++++++++++++--- js/all.js | 4 ++-- js/icons.js | 28 +++++++++++++++------------- 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/css/all.css b/css/all.css index 681f638c..b2dfdac4 100644 --- a/css/all.css +++ b/css/all.css @@ -198,7 +198,11 @@ video.easter-egg { .splus-modal-header { padding: 2px 16px; background-color: var(--primary-color); - color: white; + color: white !important; +} + +.splus-modal-title { + color: white !important; } .splus-modal-body { @@ -504,14 +508,37 @@ body #content-left-top .item-list li a, body .popups-tab, body .enrollment-filters span, body .grading-groups-list .grading-group, -body #grading-group- -span.ajax-post-comment, +body #grading-group- span.ajax-post-comment, +span[role=button], .period-row .title, .category-row .title, ._2mWUT a { color: var(--hover-color) !important; } +body #nav ul li a:hover, +body #nav #primary-home a:hover, +body #nav #profile a:hover, +body .primary-activities .clickable:hover, +body .primary-activities .active, +body #nav ul li.active-trail a, +body .ac_results ul .ac_over .ac-top, +body .schoology:hover, +body .ac_over .schoology, +body .action-links a:hover, +body .action-links span:hover, +body .edit-profile-picture-hover:hover, +body .edit-profile-picture-hover.active, +body #sidebar-left .action-links a:hover, +.component-add-link:hover, +body .search-toggle:hover, +#edit-course-switcher-select-nid-menu .ui-selectmenu-group li a:hover, +body #primary-settings .unfold:hover, +#nav ul li a:hover { + background-color: var(--hover-color) !important; + color: white !important; +} + body a.link-btn { color: #333333 !important; } @@ -521,6 +548,7 @@ header li a, .splus-modal-footer-text a, body a.link-btn.active, div.courses-left-menu, +.portfolio-list a.btn, a._3_bfp { color: white !important; } \ No newline at end of file diff --git a/js/all.js b/js/all.js index 4d6319c3..19399069 100644 --- a/js/all.js +++ b/js/all.js @@ -18,10 +18,10 @@ // Check Schoology domain { - const BLACKLISTED_DOMAINS = ["asset-cdn.schoology.com", "ui.schoology.com", "www.schoology.com", "api.schoology.com", "developers.schoology.com", "schoology.com"]; + const BLACKLISTED_DOMAINS = ["asset-cdn.schoology.com", "ui.schoology.com", "www.schoology.com", "api.schoology.com", "developers.schoology.com", "schoology.com", "support.schoology.com"]; let dd = Setting.getValue("defaultDomain"); - if (dd !== window.location.host && !BLACKLISTED_DOMAINS.includes(window.location.host)) { + if (dd !== window.location.host && !BLACKLISTED_DOMAINS.includes(window.location.host) && !dd.match(/.*\.app\.schoology\.com/)) { Setting.setValue("defaultDomain", window.location.host); let bgColor = document.querySelector("#header header").style.backgroundColor; diff --git a/js/icons.js b/js/icons.js index 665327a5..cb031a65 100644 --- a/js/icons.js +++ b/js/icons.js @@ -1,6 +1,6 @@ var icons = [ - { regex: "\\bPE\\b|Phys(ical)? Edu?(cation)?|\\bSRLA\\b|TRK|CROSS C|ADV COND|DECATHLON|MV BD AWR|ATHLETIC|SPORTS", url: "https://image.flaticon.com/icons/svg/181/181017.svg", source: "speed_181017" }, - { regex: "WO?R?LD HIST?(ORY)?|WHG|WLD LANG|LAT AM", url: "https://image.flaticon.com/icons/svg/174/174249.svg", source: "internet_174249" }, + { regex: "\\bPE\\b|Phys(ical)? Edu?(cation)?|\\bSRLA\\b|TRK|TRACK FIELD|CROSS C|ADV COND|DECATHLON|MV BD AWR|ATHLETIC|SPORTS", url: "https://image.flaticon.com/icons/svg/181/181017.svg", source: "speed_181017" }, + { regex: "WO?R?LD HIST?(ORY)?|WHG|WLD LANG|LAT AM|INTL REL", url: "https://image.flaticon.com/icons/svg/174/174249.svg", source: "internet_174249" }, { regex: "ANIMAL", url: "https://image.flaticon.com/icons/svg/2109/2109342.svg", source: "barn_2109342" }, { regex: "ANIM", url: "https://image.flaticon.com/icons/svg/2037/2037876.svg", source: "animation_2037876" }, { regex: "FOREN", url: "https://image.flaticon.com/icons/svg/1616/1616525.svg", source: "forensic-science_1616525" }, @@ -26,36 +26,39 @@ var icons = [ { regex: "KOREA", url: "https://image.flaticon.com/icons/svg/1999/1999610.svg", source: "korea_1999610" }, { regex: "PSYCH|IB THEORY", url: "https://image.flaticon.com/icons/svg/552/552408.svg", source: "creativity_552408" }, { regex: "PIANO|KEYBOARD", url: "https://image.flaticon.com/icons/svg/1973/1973888.svg", source: "keyboard_1973888" }, - { regex: "SEM(INAR)?\\b|CALLIGRAPHY", url: "https://image.flaticon.com/icons/svg/176/176690.svg", source: "writing_176690" }, + { regex: "EXPO TE?XT|SH STORY", url: "https://image.flaticon.com/icons/svg/176/176690.svg", source: "writing_176690" }, { regex: "DISCR", url: "https://image.flaticon.com/icons/svg/251/251986.svg", source: "calculating_251986" }, { regex: "VET", url: "https://image.flaticon.com/icons/svg/2659/2659366.svg", source: "pawprint_2659366" }, { regex: "ORCH|VIOLIN|STRINGS", url: "https://image.flaticon.com/icons/svg/124/124811.svg", source: "violin_124811" }, { regex: "BAND|MAR DYN", url: "https://image.flaticon.com/icons/svg/718/718543.svg", source: "drums_718543" }, { regex: "SOCCER", url: "https://image.flaticon.com/icons/svg/1800/1800944.svg", source: "football_1800944" }, + { regex: "LACROSS", url: "https://image.flaticon.com/icons/svg/2827/2827041.svg", source: "lacrosse_2827041" }, { regex: "MUSIC|JAZZ|CHOIR|INSTRUM|WIND PERC|HARMONY|GLEE|CHORUS|VOC ENSEMBLE", url: "https://image.flaticon.com/icons/svg/579/579496.svg", source: "treble-clef_579496" }, - { regex: "BIO(LOGY|TECH(NOLOGY)?|MED)?\\b", url: "https://image.flaticon.com/icons/svg/620/620366.svg", source: "dna_620366" }, + { regex: "BIO(LOGY|TECH(NOLOGY)?|MED)?\\b|GENETICS", url: "https://image.flaticon.com/icons/svg/620/620366.svg", source: "dna_620366" }, { regex: "(^|\\b)LIT(ERATURE)?\\b|READ|L & L", url: "https://image.flaticon.com/icons/svg/167/167755.svg", source: "open-book_167755" }, { regex: "STAGE|THEATRE DSN|TH DSN WKSP|CHORPROC", url: "https://image.flaticon.com/icons/svg/2673/2673346.svg", source: "spotlight_2673346" }, { regex: "ADVT DES", url: "https://image.flaticon.com/icons/svg/1055/1055664.svg", source: "ads_1055664" }, { regex: "ECON(O(MICS)?)?|AP MA ECO", url: "https://image.flaticon.com/icons/svg/712/712743.svg", source: "profit_712743" }, { regex: "STAT(STICS|ISTCS)|STATS?|STATISTICS", url: "https://image.flaticon.com/icons/svg/1006/1006636.svg", source: "analysis_1006636" }, - { regex: "FILM(MAKING)?\\b|VIDEO|VID PRD", url: "https://image.flaticon.com/icons/svg/321/321799.svg", source: "video-camera_321799" }, + { regex: "FILM(MAKING)?\\b|VIDEO|VID PRD|BRDCST", url: "https://image.flaticon.com/icons/svg/321/321799.svg", source: "video-camera_321799" }, { regex: "(FIR|1)ST RESPONDER", url: "https://image.flaticon.com/icons/svg/119/119083.svg", source: "ambulance_119083" }, { regex: "GEOLOGY", url: "https://image.flaticon.com/icons/svg/184/184647.svg", source: "science_184647" }, { regex: "COOK|CULINARY|FOOD|CATER", url: "https://image.flaticon.com/icons/svg/1142/1142696.svg", source: "cooking_1142696" }, { regex: "\\bGOVT\\b|YOU ADM JUS", url: "https://image.flaticon.com/icons/svg/167/167718.svg", source: "university_167718" }, { regex: "GEOM", url: "https://image.flaticon.com/icons/svg/258/258316.svg", source: "office-material_258316" }, { regex: "GUITAR", url: "https://image.flaticon.com/icons/svg/1586/1586234.svg", source: "guitar_1586234" }, + { regex: "MYP ST TECH|SEM(INAR)?\\b|PRN ENGINEER|\\bENG DE\\b|INTRO ENGIN|CREAT EXP|STEA?M|MULTICRAFT CORE", url: "https://image.flaticon.com/icons/svg/1460/1460471.svg", source: "idea_1460471" }, { regex: "ENG(LISH)?\\b|CREAT(IVE)? WRI?T(ING)?|\\bCOMP(OSITION)?\\b|\\bERWC\\b", url: "https://image.flaticon.com/icons/svg/254/254022.svg", source: "signing_254022" }, { regex: "SPAN(ISH)?\\b", url: "https://image.flaticon.com/icons/svg/206/206724.svg", source: "spain_206724" }, { regex: "FREN(CH)?\\b|AP FR LANG", url: "https://image.flaticon.com/icons/svg/206/206657.svg", source: "france_206657" }, + { regex: "ITALIAN", url: "https://image.flaticon.com/icons/svg/555/555668.svg", source: "italy_555668" }, { regex: "ENV", url: "https://image.flaticon.com/icons/svg/291/291211.svg", source: "recycle_291211" }, - { regex: "ROBOT|MFG|INTRO PHYS COMPUTING", url: "https://image.flaticon.com/icons/svg/1546/1546683.svg", source: "robotic-arm_1546683" }, + { regex: "ROBOT|MFG|INTRO PHYS COMPUTING|MACHINING", url: "https://image.flaticon.com/icons/svg/1546/1546683.svg", source: "robotic-arm_1546683" }, { regex: "MEDIA", url: "https://image.flaticon.com/icons/svg/1649/1649092.svg", source: "media-player_1649092" }, { regex: "CYBER", url: "https://image.flaticon.com/icons/svg/2084/2084028.svg", source: "cyber-security_2084028" }, { regex: "FLIGHT|SPACE", url: "https://image.flaticon.com/icons/svg/744/744502.svg", source: "globe_744502" }, { regex: "GEOG|HUMAN GEO", url: "https://image.flaticon.com/icons/svg/717/717982.svg", source: "globe_717982" }, - { regex: "(^|\\b)ART\\b|DES CRAFT", url: "https://image.flaticon.com/icons/svg/1497/1497573.svg", source: "creativity_1497573" }, + { regex: "(^|\\b)ART\\b|DES CRAFT|CRAFTS", url: "https://image.flaticon.com/icons/svg/1497/1497573.svg", source: "creativity_1497573" }, { regex: "AM SIGN LNG", url: "https://image.flaticon.com/icons/svg/2014/2014363.svg", source: "sign-language_2014363" }, { regex: "DANCE?|DN CH|DNC CMNTY", url: "https://image.flaticon.com/icons/svg/493/493507.svg", source: "dancing_493507" }, { regex: "APP CREAT", url: "https://image.flaticon.com/icons/svg/186/186239.svg", source: "smartphone_186239" }, @@ -67,14 +70,13 @@ var icons = [ { regex: "(^|\\b)ELD\\b|(^|\\b)ELS\\b|(^|\\b)ELL\\b", url: "https://image.flaticon.com/icons/svg/947/947478.svg", source: "book_947478" }, { regex: "(^|\\b)THEA(T[ER][ER])?\\b|DRAMA", url: "https://image.flaticon.com/icons/svg/214/214351.svg", source: "theater_214351" }, { regex: "LEADER", url: "https://image.flaticon.com/icons/svg/1534/1534091.svg", source: "government_1534091" }, - { regex: "SERVICE|PEER COUNSELING|TUTOR|INTRO SOCIO|AVID|ETHNIC|INTERACTIONS|ANTHRO", url: "https://image.flaticon.com/icons/svg/1402/1402119.svg", source: "collaboration_1402119" }, - { regex: "MYP ST TECH|PRN ENGINEER|INTRO ENGIN|CREAT EXP|STEA?M|MULTICRAFT CORE", url: "https://image.flaticon.com/icons/svg/1460/1460471.svg", source: "idea_1460471" }, - { regex: "LATIN|\\bLAW\\b", url: "https://image.flaticon.com/icons/svg/1020/1020074.svg", source: "manuscript_1020074" }, + { regex: "SERVICE|T\\.A\\.|PEER COUNSELING|TUTOR|INTRO SOCIO|AVID|ETHNIC|INTERACTIONS|ANTHRO", url: "https://image.flaticon.com/icons/svg/1402/1402119.svg", source: "collaboration_1402119" }, + { regex: "LATIN|\\bLAW\\b|CALLIGRAPHY", url: "https://image.flaticon.com/icons/svg/1020/1020074.svg", source: "manuscript_1020074" }, { regex: "HUMANITI?E?S?|LIFE (MGMT|SKI?L?LS)|PHIL", url: "https://image.flaticon.com/icons/svg/1205/1205495.svg", source: "discussion_1205495" }, { regex: "YEARBOOK|DIG IMAG|PHOTO", url: "https://image.flaticon.com/icons/svg/1006/1006107.svg", source: "memories_1006107" }, { regex: "NETWORKING", url: "https://image.flaticon.com/icons/svg/1554/1554377.svg", source: "network_1554377" }, { regex: "RES(EA)?RCH", url: "https://image.flaticon.com/icons/svg/164/164996.svg", source: "research_164996" }, - { regex: "COL(LEGE)?\\b", url: "https://image.flaticon.com/icons/svg/167/167743.svg", source: "mortarboard_167743" }, + { regex: "COL(LEGE)?\\b|CLASS OF", url: "https://image.flaticon.com/icons/svg/167/167743.svg", source: "mortarboard_167743" }, { regex: "CAREER|JOB|GEN WRK|ENTERP", url: "https://image.flaticon.com/icons/svg/149/149018.svg", source: "briefcase_149018" }, { regex: "ADVIS|HOME|SOCIAL COM|GRADE \\d|BOOKS", url: "https://image.flaticon.com/icons/svg/167/167756.svg", source: "books_167756" }, { regex: "SWIM", url: "https://image.flaticon.com/icons/svg/124/124212.svg", source: "swimming_124212" }, @@ -85,11 +87,11 @@ var icons = [ { regex: "TENNIS", url: "https://image.flaticon.com/icons/svg/1645/1645793.svg", source: "tennis_1645793" }, { regex: "SPEECH", url: "https://image.flaticon.com/icons/svg/512/512500.svg", source: "speak_512500" }, { regex: "WRESTLING", url: "https://image.flaticon.com/icons/svg/577/577132.svg", source: "wrestling_577132" }, - { regex: "GRAPHIC DESIGN|INTR INT VD", url: "https://image.flaticon.com/icons/svg/148/148862.svg", source: "layers_148862" }, + { regex: "GRAPH(IC)? (DESIGN|COMM|ARTS)|INTR INT VD", url: "https://image.flaticon.com/icons/svg/148/148862.svg", source: "layers_148862" }, { regex: "FASH DSN", url: "https://image.flaticon.com/icons/svg/770/770088.svg", source: "dress_770088" }, { regex: "JROTC", url: "https://image.flaticon.com/icons/svg/942/942444.svg", source: "rank_942444" }, { regex: "WATERPOLO", url: "https://image.flaticon.com/icons/svg/625/625383.svg", source: "water-polo_625383" }, - { regex: "HORT", url: "https://image.flaticon.com/icons/svg/346/346195.svg", source: "sprout_346195" }, + { regex: "HORT|LANDSCAP", url: "https://image.flaticon.com/icons/svg/346/346195.svg", source: "sprout_346195" }, { regex: "ARABIC", url: "https://image.flaticon.com/icons/svg/1704/1704491.svg", source: "pattern_1704491" }, { regex: "HIST", url: "https://image.flaticon.com/icons/svg/1501/1501478.svg", source: "parchment_1501478" }, { regex: "SCULPT", url: "https://image.flaticon.com/icons/svg/2071/2071211.svg", source: "sculpture_2071211" }, From 6b79af6554087eecb254eb9d13051f7626eeb12c Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Thu, 28 May 2020 16:37:39 -0700 Subject: [PATCH 2/2] Bumped version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index bd9f1117..4a40c5ae 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ "id": "schoology.plus@aopell.me" } }, - "version": "6.2.1", + "version": "6.2.2", "icons": { "128": "imgs/icon@128.png", "64": "imgs/icon@64.png",