(string, key)
| 106 | } |
| 107 | |
| 108 | function extractNumericValue(string, key) { |
| 109 | const regex = new RegExp(`${key}(\\d+)`); |
| 110 | const match = string.match(regex); |
| 111 | |
| 112 | return match ? match[1] : ""; |
| 113 | } |
| 114 | |
| 115 | function getDomainAndId(url) { |
| 116 | const cid = extractNumericValue(url, "course_id=") || |