weihl_test

open one's eyes to see the world.

目前为 2024-10-14 提交的版本。查看 最新版本

// ==UserScript==
// @name         weihl_test
// @namespace    http://tampermonkey.net/
// @version      V0.1
// @description  open one's eyes to see the world.
// @author       weihule
// @match        https://pmos.sd.sgcc.com.cn:18080/trade/main/index.do*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant        none
// @license      AGPL-3.0
// ==/UserScript==

(function() {
    'use strict';
    window.addEventListener('load', function() {
        alert('Hello World');

        console.log("开始进入iframe");
        // 查找并切换到特定的 iframe
        const iframe = document.querySelector("iframe.body-iframe");
        if (iframe) {
            iframe.contentWindow.document.body;
        }
        console.log("已经进入iframe");

        let close_btn = document.querySelector("#logModal > div > div > div.modal-header > button");
        console.log("获取到close_btn");
        close_btn.click()
    });
})();