// ==UserScript== // @name 妖火网增强脚本Plus // @namespace https://www.yaohuo.me/ // @version 0.8.1 // @description 让妖火再次变得伟大(手动狗头.jpg) // @author 柠檬没有汁@27894 // @match *://yaohuo.me/* // @match *://*.yaohuo.me/* // @icon https://yaohuo.me/css/favicon.ico // @run-at document-body // @license MIT // @grant none // @noframes // @homepage https://www.yaohuo.me/bbs/userinfo.aspx?touserid=27894 // @supportURL https://www.yaohuo.me/bbs/userinfo.aspx?touserid=27894 // @require https://code.jquery.com/jquery-3.7.1.min.js // @downloadURL none // ==/UserScript== /* ================================================== 变量开始 ================================================== */ // 脚本默认设置 const defaultSetting = { firstLoadScript: true, // 第一次加载脚本 showSettingIcon: true, // 显示设置 logo settingIconSize: 50, // 设置 logo 大小 showTopAndDownBtn: true, // 显示一键回到顶部/底部 showMoreUbb: true, // 发帖 ubb 增强 hideXunzhang: true, // 隐藏勋章 // 回帖 ubb 展开 imgThumbWidth: 100, // 图片缩小后显示宽度 showFaceList: true, // 回帖表情展开 superbedToken: "", // 聚合图床token,为空时使用游客身份上传 // 站内图片增强 showMoreSetting: true, // 高级设置 oneClickCollectMoney: true, // 一键吃肉 showChuiniuHistory: true, // 显示吹牛发布者历史 showHuifuCopy: true, // 复读机(回复+1) }; // 自定义样式 const customCSS = ` .reset{ margin:0; padding:0; } .setting-div ul li{ display:flex; margin:10px auto; justify-content: center; align-items: center; } .setting-div ul li + .setting-li-between{ padding:0 10px; justify-content: space-between; } .setting-div ul li + .setting-li-tips{ font-size:12px; justify-content: flex-start; padding:0 10px; margin:-10px 0 0; } .setting-li-title hr{ flex:1; } .setting-li-title hr:nth-of-type(1){ margin-right:10px; } .setting-li-title hr:nth-of-type(2){ margin-left:10px; } .setting-cancel-btn { background-color: #999; color: #fff; border-radius:5px; padding: 5px 10px; } .setting-confirm-btn { background-color: #1677ff; color: #fff; border-radius:5px; padding: 5px 10px; margin-left: 10px; } .setting-li-input{ width:80px; padding-left:10px; height:15px; } .switch { position: relative; float: left; width: 96px; margin: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; } .switch-checkbox {display: none;} .switch-label { display: block; overflow: hidden; cursor: pointer; border: 2px solid #999999; border-radius: 20px; } .switch-inner { display: block; width: 200%; margin-left: -100%; transition: margin 0.3s ease-in 0s; } .switch-inner::before, .switch-inner::after { display: block; float: right; width: 50%; height: 20px; line-height: 20px; padding: 0; font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; box-sizing: border-box; } .switch-inner::after { content: attr(data-on); padding-left: 10px; background-color: #00e500; color: #FFFFFF; text-align:left; } .switch-inner::before { content: attr(data-off); padding-right: 10px; background-color: #EEEEEE; color: #999999; text-align: right; } .switch-switch { position: absolute; display: block; width: 14px; height: 14px; margin: 3px; background: #FFFFFF; top: 0; bottom: 0; right: 72px; border: 2px solid #999999; border-radius: 50%; transition: all 0.3s ease-in 0s; } .switch-checkbox:checked + .switch-label .switch-inner { margin-left: 0; } .switch-checkbox:checked + .switch-label .switch-switch { right: 0px; } .huifu-copy{ padding:5px 10px; text-align:center; color:#fff; margin-left:20px; background-color: #407088; border-radius: 5px; white-space:nowrap; } .facelist-img{ width:40px; height:40px; } `; // 论坛自带表情 const defaultFaceList = [ { name: "踩", url: "face/踩.gif" }, { name: "狂踩", url: "face/狂踩.gif" }, { name: "淡定", url: "face/淡定.gif" }, { name: "囧", url: "face/囧.gif" }, { name: "不要", url: "face/不要.gif" }, { name: "重拳出击", url: "face/重拳出击.gif" }, { name: "砳砳", url: "face/砳砳.gif" }, { name: "滑稽砳砳", url: "face/滑稽砳砳.gif" }, { name: "沙发", url: "face/沙发.gif" }, { name: "汗", url: "face/汗.gif" }, { name: "亲亲", url: "face/亲亲.gif" }, { name: "太开心", url: "face/太开心.gif" }, { name: "酷", url: "face/酷.gif" }, { name: "思考", url: "face/思考.gif" }, { name: "发呆", url: "face/发呆.gif" }, { name: "得瑟", url: "face/得瑟.gif" }, { name: "哈哈", url: "face/哈哈.gif" }, { name: "泪流满面", url: "face/泪流满面.gif" }, { name: "放电", url: "face/放电.gif" }, { name: "困", url: "face/困.gif" }, { name: "超人", url: "face/超人.gif" }, { name: "害羞", url: "face/害羞.gif" }, { name: "呃", url: "face/呃.gif" }, { name: "哇哦", url: "face/哇哦.gif" }, { name: "要死了", url: "face/要死了.gif" }, { name: "谢谢", url: "face/谢谢.gif" }, { name: "抓狂", url: "face/抓狂.gif" }, { name: "无奈", url: "face/无奈.gif" }, { name: "不好笑", url: "face/不好笑.gif" }, { name: "呦呵", url: "face/呦呵.gif" }, { name: "感动", url: "face/感动.gif" }, { name: "喜欢", url: "face/喜欢.gif" }, { name: "疑问", url: "face/疑问.gif" }, { name: "委屈", url: "face/委屈.gif" }, { name: "你不行", url: "face/你不行.gif" }, { name: "流口水", url: "face/流口水.gif" }, { name: "潜水", url: "face/潜水.gif" }, { name: "咒骂", url: "face/咒骂.gif" }, { name: "耶耶", url: "face/耶耶.gif" }, { name: "被揍", url: "face/被揍.gif" }, { name: "抱走", url: "face/抱走.gif" }, ]; // 增强表情 const diyFaceList = [ { url: "http://static2.51gonggui.com/FhBfMfl4sGC3QJVTMaLqEKkE90Ia#.gif", name: "摸鱼", }, { url: "http://static2.51gonggui.com/FmNyrjU8Wq0m3PiwHQJwDhHdv-EJ#.gif", name: "稽舞", }, { url: "http://static2.51gonggui.com/FoKvdu89eiq0q-24IfOM2mFB0vIq#.gif", name: "色稽", }, { url: "http://static2.51gonggui.com/FrZ6GDJiOAz3pp4e5_8uSShSXXXk#.gif", name: "撒娇", }, { url: "http://static2.51gonggui.com/FiZiSSyXSa8eCzwOXmIfOOpfA_7a#.gif", name: "稽狗", }, { url: "http://static2.51gonggui.com/FqNDzswUNJ-AsSHXyxXB4Qm1X0y-#.gif", name: "没钱", }, { url: "http://static2.51gonggui.com/Fsq-HyBc5lP6vZY_qeWofOM9mRVH#.gif", name: "骚舞", }, { url: "http://static2.51gonggui.com/FhCk4emkrO9f8ICFxKlm8wBcTOgT#.gif", name: "吃屎", }, { url: "http://static2.51gonggui.com/FkEHwSlEfQ7bWya6-wg366Xy91qW#.gif", name: "鄙视", }, { url: "http://static2.51gonggui.com/Fi2hY7M9DPgD9s0aCWemwk2iYUDW#.gif", name: "听歌", }, { url: "http://static2.51gonggui.com/Fhry6EpdUBqFCt3OOyQTkLZMZGFR#.gif", name: "伸头", }, { url: "http://static2.51gonggui.com/FhgYnWJ-apnyjSXOpInJhLbfUQFY#.gif", name: "鼓掌", }, { url: "http://static2.51gonggui.com/FvSxOEIhyA7ID1J8emIME7tBT7Io#.gif", name: "踢腿", }, { url: "http://static2.51gonggui.com/FunDHky9UKkB-4zj-bfSb82u81Xg#.gif", name: "男同", }, { url: "http://static2.51gonggui.com/FgXUeACmKWWMDT9hrpVAnQp4dCqF#.gif", name: "手枪", }, { url: "http://static2.51gonggui.com/Fg_qtra3abNozPxaoEMVKO7VIsuX#.gif", name: "拍头", }, { url: "http://static2.51gonggui.com/FnNg1vOiuOlSe7WFWRyNZfO_4H3U#.gif", name: "躺平", }, { url: "http://static2.51gonggui.com/Fj7WAkv87tpL1I26WQgSaXlsyYBL#.gif", name: "追稽", }, { url: "http://static2.51gonggui.com/FgwFBazeUavJcw-SL7FS6wUkcUTk#.gif", name: "司稽", }, { url: "http://static2.51gonggui.com/FjXNVx-MUgAVq62aNqekSPOUjDAC#.gif", name: "乞讨", }, { url: "http://static2.51gonggui.com/FjudMlJdd8dLXuGjyASN7JldAxqe#.gif", name: "跪稽", }, { url: "http://static2.51gonggui.com/Fm8DQQwyYthk8Q97ZLScgCDXsv4_#.gif", name: "刀你", }, { url: "http://static2.51gonggui.com/FqTaBgs1l8bqeDYBxcWzxF4Wgt6_#.gif", name: "冲刺", }, { url: "http://static2.51gonggui.com/Fmw152FIzN1gpFrbCKlp7cmqlCxc#.gif", name: "转圈", }, { url: "http://static2.51gonggui.com/Fmf5aWS5yqycKebxTno7un53h9HW#.gif", name: "吃稽", }, { url: "http://static2.51gonggui.com/FhUkLD2khZ7hn1uzArWkT47Pd9jq#.gif", name: "犯贱", }, { url: "http://static2.51gonggui.com/FihrjZwpB1jMdOF9QvtQG3J32z4q#.gif", name: "牛掰", }, { url: "http://static2.51gonggui.com/FlX6e1Ip6Z8gvl7lkimmCifwBhFt#.gif", name: "拥抱", }, { url: "http://static2.51gonggui.com/FoIs-hNK7fhW8jwxEgDLRxARFcve#.gif", name: "拍头", }, { url: "http://static2.51gonggui.com/Fgx4XlxG9461Y_TJsg0hGxPTylYi#.gif", name: "摇头", }, { url: "http://static2.51gonggui.com/Fvrng91QU_PKY9Uwat77VTVouj5k#.gif", name: "挠头", }, { url: "http://static2.51gonggui.com/FkyiMRaJI1BfuA6T3w4Z9mJh1qbg#.gif", name: "上学", }, { url: "http://static2.51gonggui.com/FpZEifxiFGs1BWtHjFsk5tJJNKSE#.gif", name: "流汗", }, { url: "http://static2.51gonggui.com/FiBZZ6mBTB5R5bu5lGkybboOwLwm#.gif", name: "摩擦", }, { url: "http://static2.51gonggui.com/FmMtly844_wS6LfLLtLSwgzcXSqg#.gif", name: "喝饮料", }, { url: "http://static2.51gonggui.com/FqyckEvAxFVyD1SmA9m2jInv_Crb#.gif", name: "猛狗", }, { url: "http://static2.51gonggui.com/FmfsKjv4ymuWR80UGY-sea-I_Ey5#.gif", name: "妲己", }, { url: "http://static2.51gonggui.com/FkEmzRCL3eJGlgkHHnHTy94sXwE1#.gif", name: "街舞", }, { url: "http://static2.51gonggui.com/FgiAIOkFg8qG3UZKQx24ImVDrDRj#.gif", name: "功德", }, { url: "http://static2.51gonggui.com/Fl2Zonx2Y8z-xZrSQnGBWzsnRKC9#.gif", name: "晃饮料", }, { url: "http://static2.51gonggui.com/FvMXbnIX8RavSBAhflxf1zomD1ov#.gif", name: "扇子", }, { url: "http://static2.51gonggui.com/FmD3h-QCVdJ-ehjLh8_G-nQzynuv#.gif", name: "膜拜", }, { url: "http://static2.51gonggui.com/FoGXe8yRSIomTZFM78TZVyP-kwlz#.gif", name: "醒醒", }, { url: "http://static2.51gonggui.com/Fim_ZRiJugrWJkDtq4SlqbOziuZ3#.gif", name: "巴掌", }, { url: "http://static2.51gonggui.com/FpVLTimqXFvRJB9PxWDKMherZoRi#.gif", name: "鼓掌", }, { url: "http://static2.51gonggui.com/Fit100hjJ-T5RwQxeNdoVWplvNvU#.gif", name: "该死", }, { url: "http://static2.51gonggui.com/FkeVK5icB5-Pc7mbZitDTX1AqfNO#.gif", name: "红酒", }, { url: "http://static2.51gonggui.com/FnjJRSH3_CLjYyyQzVjD8mtY-PdB#.gif", name: "开心", }, { url: "http://static2.51gonggui.com/Foqd_tGWrk-ARnNrt-XraMCDzhUS#.gif", name: "紧张", }, { url: "http://static2.51gonggui.com/FsCE3iHM0REN077WKr0bssyKiR7Z#.gif", name: "伤心2", }, { url: "https://p6.itc.cn/q_70/images03/20210723/3b9017a6580644e4af8b43d73b92c0a9.gif", name: "看戏", }, { url: "https://p0.itc.cn/q_70/images03/20210723/4874b66b12f04be1aab989d289e8635a.gif", name: "顶你", }, { url: "https://pic2.ziyuan.wang/user/guest/2024/04/kwyjjlck_81f49e01db86c.gif", name: "哭死", }, { url: "https://p2.itc.cn/q_70/images03/20210723/f9c4a2e9879f438c9f151366442f311e.gif", name: "看不见", }, { url: "https://p8.itc.cn/q_70/images03/20210723/189ca0ed210142999a1661d2bd3cf852.gif", name: "蹲坑", }, { url: "https://pic2.zhimg.com/v2-568bb2311e00c3ecbc4dd49ab0709f09_b.gif", name: "磨刀", }, { url: "https://pic.ziyuan.wang/user/sub/2024/04/458ed8da862d4a71bc5ab4c2435711fd_088c2fc6f5680.png", name: "小丑", }, { url: "https://i.piantu.cn/2024/04/14/839386c85e1803d082b11cfe2fe5c33f.gif", name: "有鬼", }, ]; /* ================================================== 变量结束 ================================================== */ (async function () { "use strict"; if (!checkLocation()) return; if (!checkJQueryLoad()) return; await initSetting(); const userSetting = JSON.parse(localStorage.getItem("yaohuoBetterPlusSetting")); if (userSetting["firstLoadScript"]) { alert("请合理/合法使用本脚本,不要影响论坛正常看帖/回帖!!!如因使用本脚本而被封号/小黑屋,雨我无瓜(免责声明.jpg)"); saveUserSetting("firstLoadScript", false); } // 确保在页面加载完成后再执行代码,否则jquery可能会获取不到 document 内容 $(document).ready(() => { addCustomStyle(); removeEle(); createScriptSetting(); userSetting["showTopAndDownBtn"] && addTopAndDown(); userSetting["showChuiniuHistory"] && executeFunctionForURL("/games/chuiniu/doit.aspx", chuiniuHistory); userSetting["oneClickCollectMoney"] && executeFunctionForURL(/^\/bbs-.*\.html$/, speedEatMoney, true); !userSetting["hideXunzhang"] && executeFunctionForURL(/^\/bbs-.*\.html$/, hideXunzhang, true); userSetting["showHuifuCopy"] && executeFunctionForURL(/^\/bbs-.*\.html$/, huifuCopy, true); // bookViewAddUbb(); loadEmoji(); changeImgSize(); }); })(); // 发帖UBB增强 function bookViewAddUbb() { const bookViewPageList = [ "/bbs/book_view_add.aspx", "/bbs/book_view_sendmoney.aspx", "/bbs/book_view_addvote.aspx", "/bbs/book_view_addfile.aspx", "/bbs/book_view_mod.aspx", "/bbs/book_view_addURL.aspx", ]; console.log(window.location.pathname); // if (bookViewPageList.includes(window.location.pathname)) // let targetEle = $('.book_view_add_height'); // console.log(targetEle); // let newEle = $('