aopell/SchoologyPlus

Title of page doesn't change with a course nickname

Opened this issue · 13 comments

Describe the bug
If you give a nickname to a course, the page title doesn't change.

To Reproduce

  1. Give a course a nickname
  2. Look at page title
  3. See error

Expected behavior
Page title to change

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Should be something simple, like document.title = document.title.replace(courseName, nickname)

Info: Edge 87.0.664.66, with Windows build 19042, at https://nsd.schoology.com/, 6.7.1

Thanks for reporting this! We'll add it to the roadmap.

In theory we already do this. Do you see any errors in console which might help track down the cause?

Also @KTibow can you add platform information (browser, browser version, OS, Schoology instance if you're comfortable, Schoology Plus version and/or commit ID) to all your bug tickets?

Sure. I'll add the info.

Here's my logs:

+ Loaded Schoology Plus version 6.7.1
contentscript.js:24 contentscript.js: https://nsd.schoology.com/course/2806426476/materials 
5HTML Imports is deprecated and has now been removed as of M80. See <URL> for more details.
www.google-analytics.com/collect?v=1&_v=j81&a=1883290138&t=pageview&_s=1&dl=https%3A%2F%2Fnsd.schoology.com%2Fcourse%2F2806426476%2Fmaterials&dp=%2Fcourse%2F*%2Fmaterials&ul=en-us&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1405x937&je=0&_u=SACAAEABE~&jid=&gjid=&cid=227095740.1609782147&tid=UA-55873395-2&_gid=2046841909.1609886479&cd1=6.7.1&cd2=nsd.schoology.com&cd3=Theme%20with%20icons&z=482181569:1 GET https://www.google-analytics.com/collect?v=1&_v=j81&a=1883290138&t=pageview&_s=1&dl=https%3A%2F%2Fnsd.schoology.com%2Fcourse%2F2806426476%2Fmaterials&dp=%2Fcourse%2F*%2Fmaterials&ul=en-us&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1405x937&je=0&_u=SACAAEABE~&jid=&gjid=&cid=227095740.1609782147&tid=UA-55873395-2&_gid=2046841909.1609886479&cd1=6.7.1&cd2=nsd.schoology.com&cd3=Theme%20with%20icons&z=482181569 net::ERR_BLOCKED_BY_CLIENT
Image (async)
ta @ analytics.js:26
wc @ analytics.js:35
ba @ analytics.js:35
Sa @ analytics.js:40
Ha.D @ analytics.js:38
pc.send @ analytics.js:74
X.b.<computed> @ analytics.js:50
Z.v @ analytics.js:82
Z.D @ analytics.js:81
N @ analytics.js:82
enableAnalytics @ analytics.js:48
(anonymous) @ analytics.js:29
DevTools failed to load SourceMap: Could not load content for https://assets.powerschool.com/pds/20.2.0/js/shim.min.js.map: HTTP error: status code 403, net::ERR_HTTP_RESPONSE_CODE_FAILURE
contentscript.js:24 contentscript.js: https://docs.google.com/drawings/d/1oek8KtcROs5qYsOJvDjQfSKxVlXSub4sRlhPH6QFvn0/preview?h=512&ouid=101806336032015809351 [iframe]
VM569:9 JQMIGRATE: Migrate is installed, version 1.4.1
powerschool-design-system-toolkit-bundled.min.js:14 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
(anonymous) @ powerschool-design-system-toolkit-bundled.min.js:14
powerschool-design-system-toolkit-bundled.min.js:8 [Violation] 'DOMContentLoaded' handler took 260ms
[Violation] 'DOMContentLoaded' handler took 230ms
[Violation] Forced reflow while executing JavaScript took 154ms
all.js:396 + Forcing Schoology-default icons for 0 courses
DevTools failed to load SourceMap: Could not load content for chrome-extension://fflijjibhgbhdgjgjkbbnamafdelcoal/lib/js/jquery.contextMenu.min.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
jquery-migrate-3.0.1.js:48 JQMIGRATE: Migrate is installed with logging active, version 3.0.1
DevTools failed to load SourceMap: Could not load content for chrome-extension://fflijjibhgbhdgjgjkbbnamafdelcoal/lib/js/pdf.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
jquery-migrate-3.0.1.js:76 JQMIGRATE: jQuery.fn.bind() is deprecated
migrateWarn @ jquery-migrate-3.0.1.js:76
bind @ jquery-migrate-3.0.1.js:499
$.fn.tipsy @ jquery.tipsy.js:267
processDocumentElement @ materials.js:106
(anonymous) @ materials.js:224
(anonymous) @ materials.js:383
jquery-migrate-3.0.1.js:78 console.trace
migrateWarn @ jquery-migrate-3.0.1.js:78
bind @ jquery-migrate-3.0.1.js:499
$.fn.tipsy @ jquery.tipsy.js:267
processDocumentElement @ materials.js:106
(anonymous) @ materials.js:224
(anonymous) @ materials.js:383
preload.js:378 + Fetching API key for user 95883797
contentscript.js:24 contentscript.js: https://schoologypl.us/changelog?version=6.7.1 [iframe]
changelog?version=6.7.1:6 GET https://www.googletagmanager.com/gtag/js?id=UA-55873395-1 net::ERR_BLOCKED_BY_CLIENT
6[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>
contentscript.js:24 contentscript.js: https://asset-cdn.schoology.com/sites/all/modules/schoology_core/session-tracker.html?id=95883797 [iframe]
preload.js:386 + API key already generated - storing
contentscript.js:24 contentscript.js: https://nsd.schoology.com/assets/bundles/js/pdftron-webviewer/a40e90ba/html5-min/ReaderControl.html#pdf=auto&streaming=true&config=https%3A%2F%2Fasset-cdn.schoology.com%2Fassets%2Fbundles%2Fjs%2Freact-common%2Fpdftron-config-9e0e359b3a0d64a3b5db.js&custom=%7B%22asset_path%22%3A%22https%3A%5C%2F%5C%2Fasset-cdn.schoology.com%5C%2Fassets%5C%2Fbundles%5C%2Fjs%5C%2Fpdftron-webviewer%5C%2Fa40e90ba%5C%2Fhtml5-min%5C%2F%22%7D&filepicker=0&preloadWorker=1&pdfnet=0&pageHistory=1&useDownloader=0&subzero=1 [iframe]
materials:1 Autofocus processing was blocked because a document's URL has a fragment '#pdf=auto&streaming=true&config=https%3A%2F%2Fasset-cdn.schoology.com%2Fassets%2Fbundles%2Fjs%2Freact-common%2Fpdftron-config-9e0e359b3a0d64a3b5db.js&custom=%7B%22asset_path%22%3A%22https%3A%5C%2F%5C%2Fasset-cdn.schoology.com%5C%2Fassets%5C%2Fbundles%5C%2Fjs%5C%2Fpdftron-webviewer%5C%2Fa40e90ba%5C%2Fhtml5-min%5C%2F%22%7D&filepicker=0&preloadWorker=1&pdfnet=0&pageHistory=1&useDownloader=0&subzero=1'.
all-idle.js:64 + Classes loaded, building alias stylesheet
all-idle.js:83 + Applying aliases
materials.js:384 + Error running materials page modification script:  TypeError: Cannot read property 'grade' of undefined
    at materials.js:347
(anonymous) @ materials.js:384
Promise.catch (async)
(anonymous) @ materials.js:383
/assets/bundles/js/pdftron-webviewer/a40e90ba/html5-min/ReaderControl.html#pdf=auto&streaming=true&config=https%3A%2F%2Fasset-cdn.schoology.com%2Fassets%2Fbundles%2Fjs%2Freact-common%2Fpdftron-config-9e0e359b3a0d64a3b5db.js&custom=%7B%22asset_path%22%3A%22https%3A%5C%2F%5C%2Fasset-cdn.schoology.com%5C%2Fassets%5C%2Fbundles%5C%2Fjs%5C%2Fpdftron-webviewer%5C%2Fa40e90ba%5C%2Fhtml5-min%5C%2F%22%7D&filepicker=0&preloadWorker=1&pdfnet=0&pageHistory=1&useDownloader=0&subzero=1:1 PNaCl modules can only be used on the open web (non-app/extension) when the PNaCl Origin Trial is enabled
CoreControls.js:496 PNaClError: PNaCl seems to be disabled. Falling back to Emscripten.
external.min.js:2 [Violation] 'load' handler took 233ms
materials:1 Autofocus processing was blocked because a document's URL has a fragment '#pdf=auto&streaming=true&config=https%3A%2F%2Fasset-cdn.schoology.com%2Fassets%2Fbundles%2Fjs%2Freact-common%2Fpdftron-config-9e0e359b3a0d64a3b5db.js&custom=%7B%22asset_path%22%3A%22https%3A%5C%2F%5C%2Fasset-cdn.schoology.com%5C%2Fassets%5C%2Fbundles%5C%2Fjs%5C%2Fpdftron-webviewer%5C%2Fa40e90ba%5C%2Fhtml5-min%5C%2F%22%7D&filepicker=0&preloadWorker=1&pdfnet=0&pageHistory=1&useDownloader=0&subzero=1'.
pendo.js:10 [Violation] 'setTimeout' handler took 52ms

Only errors:

www.google-analytics.com/collect?v=1&_v=j81&a=1883290138&t=pageview&_s=1&dl=https%3A%2F%2Fnsd.schoology.com%2Fcourse%2F2806426476%2Fmaterials&dp=%2Fcourse%2F*%2Fmaterials&ul=en-us&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1405x937&je=0&_u=SACAAEABE~&jid=&gjid=&cid=227095740.1609782147&tid=UA-55873395-2&_gid=2046841909.1609886479&cd1=6.7.1&cd2=nsd.schoology.com&cd3=Theme%20with%20icons&z=482181569:1 GET https://www.google-analytics.com/collect?v=1&_v=j81&a=1883290138&t=pageview&_s=1&dl=https%3A%2F%2Fnsd.schoology.com%2Fcourse%2F2806426476%2Fmaterials&dp=%2Fcourse%2F*%2Fmaterials&ul=en-us&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1405x937&je=0&_u=SACAAEABE~&jid=&gjid=&cid=227095740.1609782147&tid=UA-55873395-2&_gid=2046841909.1609886479&cd1=6.7.1&cd2=nsd.schoology.com&cd3=Theme%20with%20icons&z=482181569 net::ERR_BLOCKED_BY_CLIENT
Image (async)
ta @ analytics.js:26
wc @ analytics.js:35
ba @ analytics.js:35
Sa @ analytics.js:40
Ha.D @ analytics.js:38
pc.send @ analytics.js:74
X.b.<computed> @ analytics.js:50
Z.v @ analytics.js:82
Z.D @ analytics.js:81
N @ analytics.js:82
enableAnalytics @ analytics.js:48
(anonymous) @ analytics.js:29
changelog?version=6.7.1:6 GET https://www.googletagmanager.com/gtag/js?id=UA-55873395-1 net::ERR_BLOCKED_BY_CLIENT
materials.js:384 + Error running materials page modification script:  TypeError: Cannot read property 'grade' of undefined
    at materials.js:347
(anonymous) @ materials.js:384
Promise.catch (async)
(anonymous) @ materials.js:383
/assets/bundles/js/pdftron-webviewer/a40e90ba/html5-min/ReaderControl.html#pdf=auto&streaming=true&config=https%3A%2F%2Fasset-cdn.schoology.com%2Fassets%2Fbundles%2Fjs%2Freact-common%2Fpdftron-config-9e0e359b3a0d64a3b5db.js&custom=%7B%22asset_path%22%3A%22https%3A%5C%2F%5C%2Fasset-cdn.schoology.com%5C%2Fassets%5C%2Fbundles%5C%2Fjs%5C%2Fpdftron-webviewer%5C%2Fa40e90ba%5C%2Fhtml5-min%5C%2F%22%7D&filepicker=0&preloadWorker=1&pdfnet=0&pageHistory=1&useDownloader=0&subzero=1:1 PNaCl modules can only be used on the open web (non-app/extension) when the PNaCl Origin Trial is enabled

I will say this works fine for me in Chrome 88, but I'll have to investigate Edge.

Doesn't work with me in Chrome 87 with Plus 6.7.1.
Here's the course name: GRADE HOMEROOM: (YR), A GRADE HOMEROOM(1) (some stuff removed)

I also cannot reproduce in Firefox (on latest develop build, which should match release v7.0). Are there some specific pages where the title change does (or doesn't) work? Try a few, let's see if we can narrow this down. Can you reproduce this on other browsers?

Only errors:

www.google-analytics.com/collect?v=1&_v=j81&a=1883290138&t=pageview&_s=1&dl=https%3A%2F%2Fnsd.schoology.com%2Fcourse%2F2806426476%2Fmaterials&dp=%2Fcourse%2F*%2Fmaterials&ul=en-us&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1405x937&je=0&_u=SACAAEABE~&jid=&gjid=&cid=227095740.1609782147&tid=UA-55873395-2&_gid=2046841909.1609886479&cd1=6.7.1&cd2=nsd.schoology.com&cd3=Theme%20with%20icons&z=482181569:1 GET https://www.google-analytics.com/collect?v=1&_v=j81&a=1883290138&t=pageview&_s=1&dl=https%3A%2F%2Fnsd.schoology.com%2Fcourse%2F2806426476%2Fmaterials&dp=%2Fcourse%2F*%2Fmaterials&ul=en-us&de=UTF-8&sd=24-bit&sr=1920x1080&vp=1405x937&je=0&_u=SACAAEABE~&jid=&gjid=&cid=227095740.1609782147&tid=UA-55873395-2&_gid=2046841909.1609886479&cd1=6.7.1&cd2=nsd.schoology.com&cd3=Theme%20with%20icons&z=482181569 net::ERR_BLOCKED_BY_CLIENT
Image (async)
ta @ analytics.js:26
wc @ analytics.js:35
ba @ analytics.js:35
Sa @ analytics.js:40
Ha.D @ analytics.js:38
pc.send @ analytics.js:74
X.b.<computed> @ analytics.js:50
Z.v @ analytics.js:82
Z.D @ analytics.js:81
N @ analytics.js:82
enableAnalytics @ analytics.js:48
(anonymous) @ analytics.js:29
changelog?version=6.7.1:6 GET https://www.googletagmanager.com/gtag/js?id=UA-55873395-1 net::ERR_BLOCKED_BY_CLIENT
materials.js:384 + Error running materials page modification script:  TypeError: Cannot read property 'grade' of undefined
    at materials.js:347
(anonymous) @ materials.js:384
Promise.catch (async)
(anonymous) @ materials.js:383
/assets/bundles/js/pdftron-webviewer/a40e90ba/html5-min/ReaderControl.html#pdf=auto&streaming=true&config=https%3A%2F%2Fasset-cdn.schoology.com%2Fassets%2Fbundles%2Fjs%2Freact-common%2Fpdftron-config-9e0e359b3a0d64a3b5db.js&custom=%7B%22asset_path%22%3A%22https%3A%5C%2F%5C%2Fasset-cdn.schoology.com%5C%2Fassets%5C%2Fbundles%5C%2Fjs%5C%2Fpdftron-webviewer%5C%2Fa40e90ba%5C%2Fhtml5-min%5C%2F%22%7D&filepicker=0&preloadWorker=1&pdfnet=0&pageHistory=1&useDownloader=0&subzero=1:1 PNaCl modules can only be used on the open web (non-app/extension) when the PNaCl Origin Trial is enabled

It's possible errors in one content script affect others, see:

materials.js:384 + Error running materials page modification script:  TypeError: Cannot read property 'grade' of undefined
    at materials.js:347

Can you check different pages? Like materials page vs attendance page vs list-of-members page (etc) of various courses?

I was able to make this work in my music class, however I can’t get my homeroom class to work.

Did it include a leading space? i.e. Year XX Homeroom? Just found this was an issue (and got a fix lined up)