-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsg_format.html
39 lines (35 loc) · 1.32 KB
/
sg_format.html
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
<html>
<head>
</head>
<body>
<a href="
function format() {
window.MAX = window.MAX || {
formatted: false
};
var formatted = window.MAX.formatted;
['docs-header-container', 'docs-menubars', 'viewModeButton'].forEach(function(elementId) {
var element = document.getElementById(elementId);
if (element) {
element.style.display = formatted ? '' : 'none';
}
});
var outerEditPane = document.getElementsByClassName('kix-zoomdocumentplugin-outer')[0];
if (outerEditPane) {
var currentWidth = outerEditPane.style.width.replace('px', '');
var newWidth = formatted ? currentWidth / 1.5 : currentWidth * 1.5;
outerEditPane.style.width = newWidth + 'px';
var currentHeight = outerEditPane.style.height.replace('px', '');
var newHeight = formatted ? currentHeight / 1.5 : currentHeight * 1.5;
outerEditPane.style.height = newHeight + 'px';
}
var innerEditPane = document.getElementsByClassName('kix-zoomdocumentplugin-inner')[0];
if (innerEditPane) {
innerEditPane.style.transform = formatted ? '' : 'scale(1.5)';
}
window.MAX.formatted = !formatted;
}
format();
">Drag Me To Your Bookmarks</a>
</body>
</html>