Replaces functionality of maximize button in ArcGIS Online webmap & app pop-ups, to dock the pop-up in top-right corner instead of filling the whole screen uselessly
目前為
// ==UserScript==
// @name ArcGIS Online Pop-up Docker
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Replaces functionality of maximize button in ArcGIS Online webmap & app pop-ups, to dock the pop-up in top-right corner instead of filling the whole screen uselessly
// @author mky
// @supportURL https://greasyfork.org/en/scripts/375717-arcgis-online-pop-up-docker/feedback
// @match *.maps.arcgis.com/*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
//dock on pop-up click --disabled on default
//addGlobalStyle('.esriPopupVisible { top:auto !important; left:auto !important; right: 306px !important; top: 10px !important; }');
//addGlobalStyle('.esriPopup .outerPointer {display:none !important}');
//addGlobalStyle('.esriPopup .pointer {display:none !important}');
//dock on pop-up maximize click
addGlobalStyle('.esriPopupWrapper {top: 10px !important; left: 16px !important}');
addGlobalStyle('.esriPopupMaximized { left:auto !important; right: 356px !important; top: 10px !important;}');
addGlobalStyle('.esriPopupMaximized .sizer {!important; width:320px !important; max-width:320px !important;}');
addGlobalStyle('.esriPopupMaximized .sizer .contentPane { height:auto !important; max-height:550px !important;}');
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);
}
})();