A岛-PLUS

try to take over the world!

目前為 2020-07-07 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         A岛-PLUS
// @namespace    adplus_ccq
// @version      0.4
// @description  try to take over the world!
// @author       ccq
// @match        https://adnmb2.com/t/*
// @match        https://adnmb2.com/f/*
// @grant        none
// @note         https://github.com/chucongqing/greasy_scripts/edit/master/adplus.js
// ==/UserScript==
'use strict';

function t_func() {
     // Your code here...
    let mainThread = $(".h-threads-item-main")
    let poerId = mainThread.find(".h-threads-info-uid").text();
    console.log(`poerId > ${poerId}`)

    let replys = $(".h-threads-item-reply")

    for(let i = 0; i < replys.length; i++){
        var reply = $(replys[i])
        var repId = reply.find(".h-threads-info-uid").text()
        if(repId == poerId){
            //reply.css("background-color","#55ee66")
            reply.find(".h-threads-item-reply-main").css("background-color","rgb(255,237,191")
        }
    }

    $(".h-threads-info-id").css("font-size","19px")
}

function f_func() {
    var cl = $(".h-threads-list")
    var d = cl.children("div")
    for(var i = 0 ; i < d.length; i++ ) {
        var aa = $(d[i])
        //console.log(`id = ${ aa.attr("data-threads-id")}`)
        let wt = aa.find("span.warn_txt2")
        var rep = aa.find("span.h-threads-info-reply-btn")
        let href = rep.children("a").attr("href")

        var wttxt = wt.text()
        wt.text("")
        wt.append(`<a href="${href}">${wttxt}</a>`)

    }
}

(function() {
   
     var pathname = window.location.pathname;

     if(pathname.indexOf("/f/") >= 0 ) {
        f_func()
     }
    else if( pathname.indexOf("/t/") >= 0 ) {
        t_func()
    }

})();