Recruiting & Talents Main page

try to take over the world!

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Recruiting & Talents Main page
// @namespace    http://tampermonkey.net/
// @version      2024-11-10
// @description  try to take over the world!
// @author       Dan is gay
// @match        https://www.lordswm.com/home.php
// @icon         https://www.google.com/s2/favicons?sz=64&domain=lordswm.com
// @grant    GM_addStyle
// ==/UserScript==

(function() {
    GM_addStyle (`
.iframeStyle { height:600px; width:749px; border:none; margin: 0; padding:0; }
.iframeStyle {
    }
.iframeContainerStyle {display: block; width:1500px; position:webkit-center}
`)
    function removeHeaders(){
        let headerSelectors = ["#hwm_header","#new_header","#main_top_table"]
        let iframes = Array.from(document.querySelectorAll('iframe'))
        for (let iframeIndex in iframes){
            for (let index in headerSelectors){
                let header = iframes[iframeIndex].contentDocument.querySelector(headerSelectors[index])
                if (header !== null){
                    header.remove()
                }
            }
        }

    }
    let links = ["https://www.lordswm.com/army.php", "https://www.lordswm.com/skillwheel.php", "https://www.lordswm.com/inventory.php", "https://www.lordswm.com/castle.php?change_faction_dialog=1"]

    let divEle = document.createElement('center')
    divEle.className = 'iframeContainerStyle'

    for (let link in links){
        let iframeEle = document.createElement('iframe')
        iframeEle.className = "iframeStyle"
        iframeEle.src = links[link]
        divEle.append(iframeEle)

    }
    document.body.append(divEle)

    let runs = 0
    let timer = setInterval(function(){
        // Have some code to do something
        runs++
        removeHeaders()
        if(runs>10){
            clearInterval(timer)
        }
    },1000);

})();