-
Notifications
You must be signed in to change notification settings - Fork 0
/
Edge_MCQs-01-2023.js
25 lines (24 loc) · 1013 Bytes
/
Edge_MCQs-01-2023.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// ==UserScript==
// @name Edge MCQ
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Solve quiz if quiz exist
// @author You
// @match https://www.bing.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=bing.com
// @grant none
// @run-at document-idle
// ==/UserScript==
window.setTimeout(function(){
if (document.getElementsByClassName("rqQuestion") !== null){
var answers = document.getElementsByClassName("rqQuestion")[0].nextElementSibling.firstChild.lastChild.firstChild.firstChild.firstChild.childNodes;
for (var i=0; i<answers.length; i++){
let ele = answers[i];
let textColor = getComputedStyle(ele.firstChild.lastChild).color
if(textColor !== "rgb(102, 102, 102)") continue;
let correctness = ele.firstChild.getAttribute("iscorrectoption")
if(correctness !== "True") continue;
ele.firstChild.click();
}
}
}, 2000);