Greasy Fork is available in English.
open one's eyes to see the world.
当前为
// ==UserScript==
// @name weihl_test
// @namespace http://tampermonkey.net/
// @version 0.2
// @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');
// 查找并切换到特定的 iframe
const iframe = document.querySelector("iframe[@class='body-iframe']");
if (iframe) {
iframe.contentWindow.document.body;
}
// 模拟等待时间
setTimeout(() => {
// 查找弹窗元素
const popupWindow = document.querySelector("//div[@id='logModal']//div[@class='modal-dialog modal-lg']");
if (popupWindow) {
// 找到关闭按钮
const closeButton = popupWindow.querySelector(".//div[@class='modal-header']/button[@class='close']");
if (closeButton) {
closeButton.click();
}
}
}, 10000); // 等待 10 秒,可根据实际情况调整等待时间
});
})();