blob: 94261146db504fc344dd15a1126fb66f22a83e38 (
plain)
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
|
var viewport = document.getElementById('viewport');
var root = document.getElementById('root');
var y = new MutationObserver(function(mutations) {
viewport.removeAttribute('style');
root.removeAttribute('style');
})
y.observe(viewport, {
attributes: true
});
y.observe(root, {
attributes: true
});
var x = new MutationObserver(function(mutations) {
if (document.getElementsByClassName('mSideMenu').length) {
x.disconnect();
console.log('Found side menu');
var menu = document.getElementsByClassName('mSideMenu')[0];
while (root.firstChild)
root.removeChild(root.firstChild);
while (menu.childNodes.length)
root.appendChild(menu.childNodes[0]);
setTimeout(function() {
y.disconnect();
console.log('Unhook styler');
}, 500)
}
});
x.observe(document.getElementById('mJewelNav'), {
childList: true,
subtree: true
});
document.getElementById('bookmarks_jewel').getElementsByTagName('a')[0].click();
|