GeoGuessr Bigger Map on Map-Maker

Enables the user to have a bigger map when using the map-maker // It also hides the Search Bar and the Sidebar when using the map-maker

当前为 2020-07-25 提交的版本,查看 最新版本

// ==UserScript==
// @name         GeoGuessr Bigger Map on Map-Maker
// @namespace    https://bitbucket.org/MrAmericanMike/
// @version      0.3.1
// @description  Enables the user to have a bigger map when using the map-maker // It also hides the Search Bar and the Sidebar when using the map-maker
// @author       MrAmericanMike
// @include      https://www.geoguessr.com/map-maker
// @grant        none
// @run-at       document-end
// ==/UserScript==

console.log("GeoGuessr Bigger Map on Map-Maker");

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.replace(/;/g, ' !important;');
    head.appendChild(style);
}

addGlobalStyle (`

.container {
	--width: 100%;
}

.layout {
  --layout-content-padding-top: 0.5rem;
  --layout-content-padding-bottom: 2.5rem;
	--layout-content-horizontal-padding: 0.5rem;
}

.layout--always-show-sidebar-on-large-devices {
	grid-template-columns: 0rem 1fr;
}

aside, .title {
	display: none;
}

.map-maker-map {
  width: 100%;
  height: 90vh;
  padding-bottom: 0%;
  position: relative;
}

.streetview-panel {
  width: 50rem;
  height: 100%;
  max-height: 100%;
  right: 0;
  top: 0;
  position: absolute;
}

`);