coursecode 0.1.51 → 0.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -203,12 +203,29 @@ function resolveSlideId(contentWindow, slideIdOrIndex) {
|
|
|
203
203
|
// =============================================================================
|
|
204
204
|
|
|
205
205
|
function doReset() {
|
|
206
|
-
// Static/cloud export:
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
// Static/cloud export: unload the AU first so unload/terminate cannot recreate stale LMS state.
|
|
207
|
+
const frame = document.getElementById('stub-player-course-frame');
|
|
208
|
+
let resetStarted = false;
|
|
209
|
+
|
|
210
|
+
const finishReset = () => {
|
|
211
|
+
if (resetStarted) return;
|
|
212
|
+
resetStarted = true;
|
|
213
|
+
|
|
214
|
+
const storageKey = config.storageKey;
|
|
215
|
+
if (storageKey) {
|
|
216
|
+
try { localStorage.removeItem(storageKey); } catch { /* ignore */ }
|
|
217
|
+
}
|
|
218
|
+
window.location.reload();
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
if (frame) {
|
|
222
|
+
frame.addEventListener('load', finishReset, { once: true });
|
|
223
|
+
frame.src = 'about:blank';
|
|
224
|
+
setTimeout(finishReset, 250);
|
|
225
|
+
return;
|
|
210
226
|
}
|
|
211
|
-
|
|
227
|
+
|
|
228
|
+
finishReset();
|
|
212
229
|
}
|
|
213
230
|
|
|
214
231
|
function setupOutsideClickListener(contentPanel) {
|