// ==UserScript== // @name 妖火网增强脚本Plus // @namespace https://www.yaohuo.me/ // @version 0.9.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, // 显示一键回到顶部/底部 hideXunzhang: true, // 隐藏勋章 showBookViewUbb: false, // 发帖 ubb 展开 showHuifuUbb: false, // 回帖 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; } .custom-toggle-btn{ background-image: linear-gradient(#f4f4f4,#ececec); display: inline-block; overflow: visible; margin: 0 5px 7px; padding: .5em 1em; outline: 0; border: 1px solid #d4d4d4; color: orangered; text-decoration: none; white-space: nowrap; font: 11px/normal sans-serif; cursor: pointer; border-radius: 5px; } .facelist-img{ width:50px; height:50px; } .ubb-list-div{ display:flex; flex-wrap: wrap; padding:0px 10px; font-size:12px; } .ubb-item{ height:20px; line-height:20px; margin:0 5px 5px 0; padding:0 10px; display:inline-block; border: 1px solid #1abc9c; color: #555; text-decoration: none; border-radius:30px; } `; // 论坛自带表情 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: "有鬼", }, ]; // 增强 ubb const bookViewUbbList = [ { name: "超链接", ubb: "[url=网址]文字说明[/url]" }, { name: "图片", ubb: "[img]图片链接[/img]", inputOrUpload: true, clickFunc: (e) => {} }, { name: "视频", ubb: "[movie]视频直链地址[/movie]", inputOrUpload: true, clickFunc: (e) => {} }, { name: "文字颜色", ubb: "[forecolor=red]红色文字[/forecolor]" }, { name: "代码", ubb: "[text]代码内容[/text]" }, { name: "换行", ubb: "///" }, { name: "分割线", ubb: "[hr]" }, { name: "加粗", ubb: "[b]文字[/b]" }, { name: "斜体", ubb: "[i]文字[/i]" }, { name: "下划线", ubb: "[u]文字[/u]" }, { name: "删除线", ubb: "[strike]文字[/strike]" }, { name: "拨号", ubb: "[call]手机号码[/call]" }, { name: "发短信", ubb: "[url=sms:手机号码?body=短信内容]点此发送[/url]" }, { name: "日期&时间", ubb: "[now]" }, { name: "倒计时天数", ubb: "[codo]2030-01-01[/codo]" }, { name: "音频", ubb: "[audio]音频直链地址[/audio]" }, { name: "抖音解析", ubb: "", needInput: true }, { name: "快手解析", ubb: "", needInput: true }, { name: "B站解析", ubb: "", needInput: true }, { name: "屋舍文件", ubb: "", clickFunc: (e) => {} }, { name: "短链生成", ubb: "", needInput: true }, ]; // 回帖增强 const huifuUbbList = [ { name: "你真该死", ubb: "[audio]https://file.uhsea.com/2304/3deb45e90564252bf281f47c7b47a153KJ.mp3[/audio]", }, { name: "卧槽", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0300fg10000c39llkp400egrpaivp30&ratio=1080p[/audio]", }, { name: "我不信", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200ff10000bop9e9evld7780im485g&ratio=1080p[/audio]", }, { name: "啊~", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0300fg10000c27pgb9j1vdnlib21bmg&ratio=1080p[/audio]", }, { name: "举报", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200fg10000clgc3l3c77u37ec4o06g&ratio=1080p[/audio]", }, { name: "双手插兜", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0d00fg10000cl3317rc77uboqgts6s0&ratio=1080p[/audio]", }, { name: "你干嘛~", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0300fg10000ckbjafrc77uc4heo85r0&ratio=1080p[/audio]", }, { name: "天才", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0d00fg10000cco09b3c77ufcav057og&ratio=1080p[/audio]", }, { name: "垃圾", ubb: "[audio]https://aweme.snssdk.com/aweme/v1/play/?video_id=v0300fg10000ckei8ejc77u3qug3fnc0&ratio=1080p[/audio]", }, ]; /* ================================================== 变量结束 ================================================== */ (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); executeFunctionForURL(/^\/bbs\/book_view_.*\.aspx$/, bookViewAddUbb, true); executeFunctionForURL(/^\/bbs-.*\.html$/, huifuAddUbb, true); // bookViewAddUbb(); loadEmoji(); changeImgSize(); }); })(); // 回帖UBB增强 function huifuAddUbb() { createToggleEle(); createUbbListEle(); if (getUserSetting("showHuifuUbb")) { $(".custom-toggle-btn+.ubb-btn").text("折叠 UBB"); } else { $(".ubb-list-div").hide(); } function createUbbListEle() { const ubbListHtml = []; const tempList = [...huifuUbbList, ...bookViewUbbList]; tempList.forEach((ubbItem) => { const { name, ubb } = ubbItem; const span = $(`${name}`); $(span).click(() => insetCustomContent(ubb, ".viewContent .retextarea", true)); ubbListHtml.push(span); }); $(".viewContent .sticky").after('
'); $(".ubb-list-div").append(ubbListHtml); } function createToggleEle() { const toggleEle = $('展开 UBB'); toggleEle.click(function () { const showHuifuUbb = getUserSetting("showHuifuUbb"); if (showHuifuUbb) { saveUserSetting("showHuifuUbb", false); $(this).text("展开 UBB"); $(".ubb-list-div").hide(); } else { saveUserSetting("showHuifuUbb", true); $(this).text("折叠 UBB"); $(".ubb-list-div").show(); } }); $(".viewContent .kuaisuhuifu").append(toggleEle); } } // 发帖UBB增强 function bookViewAddUbb() { createToggleEle(); createUbbListEle(); if (getUserSetting("showBookViewUbb")) { $(".custom-toggle-btn").text("折叠 UBB"); } else { $(".ubb-list-div").hide(); } function createUbbListEle() { const ubbListHtml = []; bookViewUbbList.forEach((ubbItem) => { const { name, ubb } = ubbItem; const span = $(`${name}`); $(span).click(() => insetCustomContent(ubb, ".content [name='book_content']", true)); ubbListHtml.push(span); }); $(".content br").eq(1).after('
'); $(".ubb-list-div").append(ubbListHtml); } function createToggleEle() { const toggleEle = $('展开 UBB'); toggleEle.click(function () { const showBookViewUbb = getUserSetting("showBookViewUbb"); if (showBookViewUbb) { saveUserSetting("showBookViewUbb", false); $(this).text("展开 UBB"); $(".ubb-list-div").hide(); } else { saveUserSetting("showBookViewUbb", true); $(this).text("折叠 UBB"); $(".ubb-list-div").show(); } }); $(".content input[name='g']").after(toggleEle); } } // 修改图片大小 function changeImgSize() { const imgThumbWidth = getUserSetting("imgThumbWidth"); $("head").append(`