// ==UserScript== // @name BDWM PLUS // @version 1.3 // @description BDWM_PLUS by motaguoke // @include http://bbs.pku.edu.cn/* // @include https://bbs.pku.edu.cn/* // @include https://*.bdwm.net/* // @include http://*.bdwm.net/* // @grant GM.getValue // @grant GM.setValue // @namespace https://greasyfork.org/users/284856 // @downloadURL none // ==/UserScript== //设置 var GLOBAL_VERSION = "1.3" //全局变量 var GLOBAL_SEEME_STATUS = false //当前只看某一作者状态 var GLOBAL_SEEME_AUTHOR = "" //当前只看某一作者的作者ID console.log(`BDWM_PLUS by motaguoke Version: ${GLOBAL_VERSION}`) window.onload = BDWM_ADDON_MAIN() async function BDWM_ADDON_MAIN(){ //初始化插件 var observe = new MutationObserver(async function (mutations){ //初始化渲染插件 BDWM_ADDON_SEEME_RENDER() //只看作者插件 BDWM_ADDON_SETTINGINFO() //插件信息插件 bool_GODMODE = await GM.getValue("启用娱乐模式",false) if (bool_GODMODE == true){ //娱乐模式 BDWM_ADDON_GODMODE() } }) observe.observe(document.documentElement,{childList:true,subtree:true}) } document.addEventListener('click',async function(event){ //点击事件钩子 //console.log(event.target.className+" "+event.target.id) if (event.target.className == "only-seeme"){ // BDWM_ADDON_SEEME插件,只看某一作者 if (event.target.innerText == "只看TA"){ //进入只看作者状态 event.target.innerText = "取消只看TA" GLOBAL_SEEME_AUTHOR = event.target.id GLOBAL_SEEME_STATUS = true obj_onlyseeme = document.getElementsByClassName("only-seeme") for (i=0;i