-
Notifications
You must be signed in to change notification settings - Fork 6
/
script.js
40 lines (33 loc) Β· 1.53 KB
/
script.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
window.onload = function () {
/* TOEFL section */
/* Remove blocking box */
document.querySelectorAll('.shield-box').forEach(s => s.remove());
/* Select the nodes to remove the blur and login block */
const targetNodes = document.querySelectorAll('.questions-tools, .practice-container');
console.log(targetNodes);
// Options for the observer (which mutations to observe)
const config = {
attributes: true,
childList: true,
subtree: true
};
for (let targetNode of targetNodes) {
// Callback function to execute when mutations are observed
let callback = function (e) {
document.querySelectorAll('.login-cont').forEach(s => s.remove());
document.querySelectorAll('.blur').forEach(b => {
b.classList.remove('blur')
});
};
// Create an observer instance linked to the callback function
let observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);
}
/* GMAT section */
/* Remove blocking box and text for single practice questions*/
document.querySelectorAll('.dart .mark-text').forEach(e => e.remove());
document.querySelectorAll('.dart .mark-no-copyright').forEach(e => e.classList.remove('mark-no-copyright'));
/* Remove disable tab and text for mock section*/
document.querySelectorAll('.tab-forbidden[data-type="PREP"]').forEach(e => e.classList.remove('tab-forbidden'));
}();