MCPcopy Create free account
hub / github.com/Eltaurus-Lt/CourseDump2022 / getDomainAndId

Function getDomainAndId

menu.js:115–128  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

113}
114
115function getDomainAndId(url) {
116 const cid = extractNumericValue(url, "course_id=") ||
117 extractNumericValue(url, "category_id=") ||
118 extractNumericValue(url, "course/");
119 let domain = "";
120 //if (url.includes("app.memrise.com")) {
121 // domain = "app.memrise.com";
122 //} else
123 if (url.includes("community-courses.memrise.com")) {
124 domain = "community-courses.memrise.com";
125 }
126
127 return {domain, cid}
128}
129
130async function getCurrentTab() {
131 try {

Callers 1

menu.jsFile · 0.85

Calls 1

extractNumericValueFunction · 0.85

Tested by

no test coverage detected