ArcGIS Online Pop-up Docker

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

目前为 2019-12-11 提交的版本。查看 最新版本

// ==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://gf.qytechs.cn/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('.esriPopupWrapper {top: 10px !important;}');



    //dock on pop-up maximize click
    addGlobalStyle('.esriPopupMaximized { left:auto !important; right: 340px !important; top: 10px !important;}');
    addGlobalStyle('.esriPopupMaximized .sizer {!important; width:320px !important; max-width:320px !important;}');
    addGlobalStyle('.esriPopupMaximized .sizer .contentPane { height:auto !important;  max-height:600px !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);
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址