This is a hacky script to fix an issue several students at BYU-Idaho are having with I-Know. I-Know has a space limit of 5mb and there are a couple courses at BYU-Idaho that are exceeding that limit. There is a fix released to the Chrome Webstore but it may take weeks for it to be released to every student.
The issue is caused by the extension running out of space before saving course information. There is a way to disable courses in the settings of I-Know but because I-Know runs out of space before saving that list, students are not able to fix the issue themselves.
This script disables courses that ended before March 1st 2020, which is generally what students end up doing anyway.
Make sure you are signed into Canvas then go to this url in Chrome:
chrome-extension://oobphcndhljfbmllppplinbdagpnfbjp/index.html
You can do this by hitting F12 on windows or Option+Command+J on Mac. You can also right click anywhere on the page and click inspect element.
A scary window will appear. Do not worry, you are a professional. Make sure you are in the console tab of that window.
// clear out old information stored by the chrome extension for previous courses.
for (let key in localStorage)
if (key.startsWith("user")) delete localStorage[key];
// load the list of courses from I-Learn
json = await fetch(
"https://byui.instructure.com/api/v1/courses?enrollment_type=student&per_page=100",
{ headers: { "content-type": "application/json; charset=utf-8" } }
).then((x) => x.text());
courses = JSON.parse(json.replace("while(1);", ""));
// find courses that ended before march 1st 2020
hiddenEnrollments = courses
.filter((course) => Date.parse(course.end_at) < Date.parse("March 1 2020"))
.map((course) => `https://byui.instructure.com|${course.id}`);
// tell I-Know to not load these courses anymore
localStorage.hiddenEnrollments = JSON.stringify(hiddenEnrollments);
console.log('It worked 🎉');
I-Know should be able to load your current courses.