-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The script is starting but the answers arent showing #17
Comments
One of my friends wanted me to look at it; it seemed like a promise error. Pretty scuffed. But here is a quick fix, just replace the window.fetch with the one below. (Tested in tamper monkey, chrome) window.fetch = function() {
return originalFetch.apply(this, arguments).then(async (res) => {
if (res.url.includes("/getAssessmentItem")) {
const clone = res.clone();
const json = await clone.json()
let item, question;
try {
item = json.data.assessmentItem.item.itemData;
question = JSON.parse(item).question;
} catch {
let errorIteration = () => {
return localStorage.getItem("error_iter") || 0;
}
localStorage.setItem("error_iter", errorIteration() + 1);
if (errorIteration() < 4) {
return location.reload();
} else {
return console.log("%c An error occurred", "color: red; font-weight: bolder; font-size: 20px;");
}
}
if (!question) return;
Object.keys(question.widgets).map(widgetName => {
switch (widgetName.split(" ")[0]) {
case "numeric-input":
return freeResponseAnswerFrom(question).log();
case "radio":
return multipleChoiceAnswerFrom(question).log();
case "expression":
return expressionAnswerFrom(question).log();
case "dropdown":
return dropdownAnswerFrom(question).log();
}
});
}
if (!window.loaded) {
console.clear();
console.log("%c Answer Revealer ", "color: mediumvioletred; -webkit-text-stroke: .5px black; font-size:40px; font-weight:bolder; padding: .2rem;");
console.log("%cCreated by Alex Dubov (@adubov1)", "color: white; -webkit-text-stroke: .5px black; font-size:15px; font-weight:bold;");
window.loaded = true;
}
return res;
})
} |
I tried this I replaced the window.fetch but it still doesnt work. Maybe its because I use tamper monkey but idk |
Doesn't work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of showing the answers, it shows two error messages (corresponding to the answers):
Uncaught (in promise) DOMException: The user aborted a request.
can anyone help me?
The text was updated successfully, but these errors were encountered: