Clutch152 / scripts

Collection of scripts for the lazy ... >.>
164 stars 81 forks source link

Anybody got a working code for jko in 2023? #80

Open NanikaWEEB opened 11 months ago

bjgonzal commented 11 months ago

Try this one been working on it for a while let me know if if works: // Safely attempt to set the completion status. if (typeof API_1484_11 !== 'undefined' && typeof API_1484_11.SetValue === 'function') { API_1484_11.SetValue('cmi.completion_status', 'completed'); }

// Cache the potentially repeated DOM lookups. var courseHeaders = document.getElementsByName("courseheader"); if (courseHeaders.length > 0) { var contentDocument = courseHeaders[0].contentDocument || courseHeaders[0].contentWindow.document; var elementC = contentDocument.getElementById("c");

// Check if element exists and has a submit function before calling it.
if (elementC && typeof elementC.submit === 'function') {
    elementC.submit();
}

}

tylerdotrar commented 10 months ago

Regarding @bjgonzal's post, this code didn't manage to give me the certificate but it would at least auto-complete the video/learning sections.

As always, just start the section, hit F12, and paste into the developer console:

// Safely attempt to set the completion status.
if (typeof API_1484_11 !== 'undefined' && typeof API_1484_11.SetValue === 'function') {
API_1484_11.SetValue('cmi.completion_status', 'completed');
}
// Cache the potentially repeated DOM lookups.
var courseHeaders = document.getElementsByName("courseheader");
if (courseHeaders.length > 0) {
var contentDocument = courseHeaders[0].contentDocument || courseHeaders[0].contentWindow.document;
var elementC = contentDocument.getElementById("c");
// Check if element exists and has a submit function before calling it.
if (elementC && typeof elementC.submit === 'function') {
    elementC.submit();
}
}
BryPR commented 6 months ago

I deleted the comment. I don't know how to delete your name tho.