Comments (2)
Also if i refresh the page with quiz, hook not work. To solve this problem, need to disable cache in browser dev tools.
from writeup-on-scorm-cheat.
Heya
I'm unsure what the issue is. But if you do not care about the correct answer and just want to get full marks I can suggest just modifying the function that allocates your score:
// ==UserScript==
...
// ==/UserScript==
let count = 0;
const oldsplit = window.String.prototype.split; // Grab original function
window.String.prototype.split = function(){ // Redefine the function
if (typeof arguments.callee.caller.caller == 'function' && arguments.callee.caller.caller.toString().includes("reviewWithCorrectAnswers") && count == 0) {
count = 1;
let temp = arguments.callee.caller.caller.toString();
const reg = /k=h==f.selected\(\)\;f.selected\(\)\&\&\(a\+=g.score\(\)\)\;/
temp = temp.replace(reg, 'k=true;(a+=g.score());');
let newfunction = new Function(temp.substring(temp.indexOf('{')+1,temp.lastIndexOf('}')));
newfunction();
return;
}
return oldsplit.apply(this, arguments); // Use .apply to continue as normal
}
What I did was basically always add the full marks to your score. You can find the function using the regex k=h==f.selected\(\)\;f.selected\(\)\&\&\(a\+=g.score\(\)\)\;
on your the unformatted quizplayer.js if you want to have a closer look at the function.
Let me know if it works.
Cheers! ~\(โงโฝโฆ)/~
from writeup-on-scorm-cheat.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from writeup-on-scorm-cheat.