| 202 | |
| 203 | //initiate download through message to the BG script |
| 204 | async function downloadCourses(cidds) { |
| 205 | const settings = await loadSettings(); |
| 206 | |
| 207 | chrome.runtime.sendMessage({ |
| 208 | type: "coursedump_startDownload", |
| 209 | tab_id: current_tab.id, |
| 210 | settings, |
| 211 | cidd_strings: cidds |
| 212 | }, (response) => { |
| 213 | console.log(response); |
| 214 | if (response.status === "error") { |
| 215 | alert(response.msg); |
| 216 | } |
| 217 | // updOngoingStatus(); |
| 218 | } |
| 219 | ); |
| 220 | |
| 221 | // window.close(); |
| 222 | } |
| 223 | |
| 224 | const buttons = new menuButtons(); |
| 225 | |