Skip to content

Commit 24ed84e

Browse files
Merge pull request #94 from kallewesterling/main
Hardened logic to avoid user mistakes
2 parents 95faf25 + 010cb02 commit 24ed84e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

production/skilljar-theme-v2.1.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,18 @@ function styleCatalog() {
14001400
*/
14011401
function style404() {
14021402
console.log("Running style404");
1403+
1404+
if (window.location.href.includes("/page/partners")) {
1405+
let hr = Object.assign(document.createElement("hr"), {
1406+
style: "width: 100%",
1407+
});
1408+
let p = Object.assign(document.createElement("p"), {
1409+
classList: "sj-text-page-not-found-explanation",
1410+
innerHTML: `If you are a partner and trying to access our Partner courses, you have to first <a href="/auth/login?next=%2Fpage%2Fpartners">sign in or sign up for our Courses platform</a>.`,
1411+
style: "margin-top: 5px",
1412+
});
1413+
document.querySelector(".message").append(...[hr, p])
1414+
}
14031415
}
14041416

14051417
/**

0 commit comments

Comments
 (0)