-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmultiSparx.js
35 lines (31 loc) · 1.08 KB
/
multiSparx.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
// ==UserScript==
// @name MultiSparx
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Remove text overlays on SparxMaths so that multiple tabs of Sparx to be open at the same time.
// @author Gallium-Gonzollium
// @match *://*.sparxmaths.uk/*
// @match *://*.sparxreader.uk/*
// @match *://*.sparxscience.uk/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function cleanUp() {
document.querySelectorAll('*').forEach(e => {
const classList = Array.from(e.classList);
if (classList.some(
cls => cls.startsWith('_Content_13')
|| cls.startsWith('_Overlay_13'))
|| (classList.some(
cls => cls.startsWith('_Description_13'))
&& e.textContent.includes("Looks like you've logged in somewhere else")
))
{
e.remove();
}
});
document.body.style = '';
}
setInterval(cleanUp, 200);
})();