Skip to content

Instantly share code, notes, and snippets.

@zigiprimo
Last active March 16, 2020 23:48
Show Gist options
  • Save zigiprimo/7bd91b1f46d8c95b694c52d03a63b90e to your computer and use it in GitHub Desktop.
Save zigiprimo/7bd91b1f46d8c95b694c52d03a63b90e to your computer and use it in GitHub Desktop.
hide qimagery header - grease/tamper monkey script
// ==UserScript==
// @name qimagery-hide-banner
// @namespace http://www.zigiprimo.dev/
// @version 0.1
// @description Hiding the big banner for a more working space
// @author Sameer Cooshna
// @match https://qimagery.information.qld.gov.au/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const topZero = {top: "0px"};
const zIndexHigh = {zIndex: "100"};
let elements = {
mapContainer: [document.getElementById("mapContainer"), topZero, zIndexHigh],
mainSidebar: [document.getElementById("main-sidebar"), topZero, zIndexHigh]
};
Object.values(elements).forEach(value => {
let element = value.shift();
let styles = value.reduce((styles, style) => {
return {...styles, ...style};
});
Object.assign(element.style, styles);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment