美文网首页
解决ESXI8.0在edge浏览器无法弹出窗口的问题

解决ESXI8.0在edge浏览器无法弹出窗口的问题

作者: BugChang | 来源:发表于2023-11-23 15:55 被阅读0次

esxi的弹出窗口会应用一个modal-backdrop的类,这个类edge浏览器兼容有问题,把他删了能正常使用,弹出的位置和遮罩会有点问题,不过不影响功能,可以先用着

需要用到油猴脚本:

// ==UserScript==
// @name         EDGE兼容ESXI
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://esxi.bugchang.top/*  这个根据自己实际的ESXI地址更改
// @icon
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var observer = new MutationObserver((mutationsList) => {
        mutationsList.forEach(mutationRecord => {
            mutationRecord.addedNodes.forEach(node => {
                if(node.classList.contains('modal-backdrop')) node.classList.remove('modal-backdrop')
            });
        });
    });

    observer.observe(document.body, {childList:true});
})();

相关文章

网友评论

      本文标题:解决ESXI8.0在edge浏览器无法弹出窗口的问题

      本文链接:https://www.haomeiwen.com/subject/tglgwdtx.html