-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstadtplan_wien_dws.js
46 lines (39 loc) · 1.34 KB
/
stadtplan_wien_dws.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
41
42
43
44
45
46
// ==UserScript==
// @name stadtplan wien - don't waste space
// @author Roman Zimmermann
// @namespace http://userscripts.org/users/torotil
// @description Removes copyright notice, the common menu and some other items that take vertical space
// @include http://www.wien.gv.at/stadtplanbeta/
// @include http://www.wien.gv.at/stadtplan/
// ==/UserScript==
function removeElement(elem) {
elem.parentNode.removeChild(elem);
}
function unwrapFirstChild(elem) {
elem.parentNode.replaceChild(elem.firstChild, elem);
}
function $(id) {
return document.getElementById(id);
}
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
(function() {
removeElement($('vie_footer'));
removeElement($('vie_loggedin'));
removeElement($('vie_header'));
removeElement($('gis_viebreadcrumbs'));
unwrapFirstChild($('viennaGisBody').childNodes[1]);
addGlobalStyle('\
#vie_col3_content { padding:0px; }\
.vie-page { padding-bottom:0px; }\
.vie-page #vie_col3_content h1 { font-size:1em; line-height:100%; }\
#viennaGisForm .gis-navigation { margin-top:0; }\
');
})();