点击登录
  • 📢 主要更新维护已完成 点击展开 ▼
    以下功能仍需注意🔔 / 不可用🚫
    1. 付款功能可用,支付后需手动刷新方可查看购买后内容(后续修复),若出现未到账情况请及时发起工单进行处理
    如果你遇到任何其他问题/BUG🛠️ 请通过 https://wj.qq.com/s2/15351411/ad2a/ 向我们反馈
  • 米坛百万注册特别活动
    了解详情

闲聊酒馆 致力为米坛做得更好!!! For 2.0

淘汰郎

𝗟𝗩114514
🔥社区作者
普通成员
米坛社区五周年纪念勋章 热心市民
首頁私信
螢幕擷取畫面 2024-09-15 114848.png
连结跳转功能
螢幕擷取畫面 2024-09-15 115118.png

篡改猴 (Tampermonkey)
JavaScript:
// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      2024-06-18
// @description  try to take over the world!
// @author       You
// @match        *://www.bandbbs.cn/
// @match        *://www.bandbbs.cn/direct-messages/?value=temp
// @match        *://www.bandbbs.cn/threads/*
// @match        *://www.bandbbs.cn/resources/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bandbbs.cn
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    window.onload=function() {
        var url = window.location.href;
        if (url === "http://www.bandbbs.cn/" || url === "https://www.bandbbs.cn/") {
            // 創建一個新的style元素並設置其內部CSS
            let styleElement = document.createElement('style');
            styleElement.innerHTML = `
            .block-container2 {
               color: #212121;
               background: #fff;
               border-width: 0;
               border-style: solid;
               border-top-color: #e0e0e0;
               border-right-color: #e0e0e0;
               border-bottom-color: #e0e0e0;
               border-left-color: #e0e0e0;
               border-radius: 8px;
               background: 0 0;
               border: 1px solid #e0e0e0;
               padding: 10px;
               height: 630px;
           }

           .block-container2.block-container2--none {
               background: 0 0;
               border: none;
               color: #212121;
               padding: 0;
               box-shadow: none
           }

           @media(min-width: 900px) {

               .block-container2:not(.block-container2--noStripRadius)>:first-child,
               .block-topRadiusContent,
               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.blockLink:first-child {
                   border-top-left-radius: 7px;
                   border-top-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>:last-child,
               .block-bottomRadiusContent,
               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child>.blockLink:last-child,
               .block-container2:not(.block-container2--noStripRadius)>.tabPanes:last-child>[role=tabpanel]>:last-child,
               .block-container2:not(.block-container2--noStripRadius)>.tabPanes:last-child>[role=tabpanel]>.block-body>:last-child {
                   border-bottom-left-radius: 7px;
                   border-bottom-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:first-child,
               .block-topRadiusContent.dataList tbody:first-child .dataList-row:first-child>.dataList-cell:first-child,
               .block-topRadiusContent>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:first-child,
               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:first-child,
               .block-topRadiusContent.dataList thead:first-child .dataList-row:first-child>.dataList-cell:first-child,
               .block-topRadiusContent>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:first-child {
                   border-top-left-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:last-child,
               .block-topRadiusContent.dataList tbody:first-child .dataList-row:first-child>.dataList-cell:last-child,
               .block-topRadiusContent>.dataList:first-child tbody:first-child .dataList-row:first-child>.dataList-cell:last-child,
               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:last-child,
               .block-topRadiusContent.dataList thead:first-child .dataList-row:first-child>.dataList-cell:last-child,
               .block-topRadiusContent>.dataList:first-child thead:first-child .dataList-row:first-child>.dataList-cell:last-child {
                   border-top-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.formRow:first-child>dt,
               .block-topRadiusContent.formRow>dt,
               .block-topRadiusContent>.formRow:first-child>dt {
                   border-top-left-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:first-child>.formRow:first-child>dd,
               .block-topRadiusContent.formRow>dd,
               .block-topRadiusContent>.formRow:first-child>dd {
                   border-top-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:first-child,
               .block-bottomRadiusContent.dataList tbody:last-child .dataList-row:last-child>.dataList-cell:first-child,
               .block-bottomRadiusContent>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:first-child {
                   border-bottom-left-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:last-child,
               .block-bottomRadiusContent.dataList tbody:last-child .dataList-row:last-child>.dataList-cell:last-child,
               .block-bottomRadiusContent>.dataList:last-child tbody:last-child .dataList-row:last-child>.dataList-cell:last-child {
                   border-bottom-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child>.formRow:last-child>dt,
               .block-bottomRadiusContent.formRow>dt,
               .block-bottomRadiusContent>.formRow:last-child>dt {
                   border-bottom-left-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child>.formRow:last-child>dd,
               .block-bottomRadiusContent.formRow>dd,
               .block-bottomRadiusContent>.formRow:last-child>dd {
                   border-bottom-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child .formSubmitRow:not(.is-sticky)>dt,
               .block-container2:not(.block-container2--noStripRadius)>.formSubmitRow:not(.is-sticky):last-child>dt,
               .block-bottomRadiusContent>.formSubmitRow:not(.is-sticky)>dt {
                   border-bottom-left-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child .formSubmitRow:not(.is-sticky)>dd,
               .block-container2:not(.block-container2--noStripRadius)>.formSubmitRow:not(.is-sticky):last-child>dd,
               .block-bottomRadiusContent>.formSubmitRow:not(.is-sticky)>dd {
                   border-bottom-right-radius: 7px
               }

               .block-container2:not(.block-container2--noStripRadius)>.block-body:last-child .formSubmitRow:not(.is-sticky) .formSubmitRow-bar,
               .block-container2:not(.block-container2--noStripRadius)>.formSubmitRow:not(.is-sticky):last-child .formSubmitRow-bar,
               .block-bottomRadiusContent>.formSubmitRow:not(.is-sticky) .formSubmitRow-bar {
                   border-bottom-left-radius: 7px;
                   border-bottom-right-radius: 7px
               }
           }

           @media(max-width: 900px) {

               .block-container2,
               .blockMessage {
                   margin-left: -10px;
                   border-radius: 20px;
                   margin-right: -10px;
                   border-radius: 0;
                   border-left: none;
                   border-right: none
               }
           }
       `;
            // 將style元素添加到head中
            document.head.appendChild(styleElement);

            // 創建一個新的div元素
            let newElement = document.createElement('div');
            newElement.className = 'block-container2 node-body';
            newElement.innerHTML = `
                <h3 class="block-minorHeader">
                    <a href="https://www.bandbbs.cn/direct-messages/" importance="low" rel="nofollow">私信</a>
                </h3>
                <iframe id="iFrame" title="私信" style="overflow:hidden;height:90%;margin-bottom: 10px;width:60%" height="90%" width="100%"
                    sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation"
                    src="https://www.bandbbs.cn/direct-messages/?value=temp">
                </iframe>
            `;

            // 選擇要插入新元素的元素
            let targetElement = document.querySelector("#top > div.p-body > div > div > div.p-body-content > div > div:nth-child(2) > div > div:nth-child(1)")

            // 將新元素插入到目標元素的下方
            targetElement.parentNode.insertBefore(newElement, targetElement.nextSibling);
        }
        else if (url === "http://www.bandbbs.cn/direct-messages/?value=temp" || url === "https://www.bandbbs.cn/direct-messages/?value=temp") {
           document.querySelector("#footer").remove();
            document.querySelector("#top > div.p-body > div.p-body-inner > div.p-body-header").remove();
          
           // document.querySelector("#top > div.uix_tabBar").remove();
            //document.querySelector("#top > div.p-navSticky.p-navSticky--all").remove();
            //document.querySelector("#top > div.p-body > div.p-body-inner > div > div > div.p-body-sidebar").remove();
            //document.querySelector("#top > div.p-body > div.uix_sidebarNav").remove();
            document.querySelector("#top > div.p-nav-mobile-bottom").remove()
            document.querySelector("#top > div.p-body > div > div > div.p-body-content > div > div > div.block-container > div.block-filterBar").remove()
            document.querySelector("#top > div.p-navSticky.p-navSticky--primary").remove()
        }
        else if((/https?:\/\/www\.bandbbs\.cn\/resources\/\d+\/.*/).test(url)||(/https?:\/\/www\.bandbbs\.cn\/threads\/\d+\/.*/).test(url)){
            var span = document.querySelector("#top > div.p-body > div > div.p-body-header > div.p-title > h1 > span")
            if(!span){
            span=document.querySelector("#top > div.p-body > div > div.p-body-header > div > div.contentRow-main > div:nth-child(3) > h2 > span > span")
            }
            var spanClass=span.className
            var spantext = span.innerHTML
            console.log(spantext)
            var link=document.querySelector("div > ul > li:nth-child(4) > a").href
            var newtag = document.createElement('span')
            span.innerHTML=`<a href=${link} target="_blank" style="color: inherit;">${spantext}</a>`

        }
    }
})();
 

*这是一则由 Google AdSense 自动推荐的广告,与本站无关,不对其真实性与可靠性负责

Home 首页
News 发现
Account 我的
顶部