Warning: fopen(/www/sites/update.greasyfork.icu/index/store/temp/8d071fe8898ba9ba3d0d00050edeeca4.js): failed to open stream: No space left on device in /www/sites/update.greasyfork.icu/index/scriptControl.php on line 65
// ==UserScript==
// @name ASMRONE跳转Kikoeru
// @namespace http://tampermonkey.net/
// @version 0.8
// @description 检测页面中的RJ号,并在每个RJ号旁边显示跳转按钮,同时根据资源存在情况改变按钮颜色和文本。在 127.0.0.1:8889 页面中创建跳转到 ASMRONE 的按钮。
// @author 你的名字
// @match *://asmr-300.com/*
// @match *://asmr-200.com/*
// @match *://asmr-100.com/*
// @match *://asmr.one/*
// @match *://127.0.0.1:8889/*
// @grant GM_xmlhttpRequest
// @downloadURL https://update.greasyfork.icu/scripts/528830/ASMRONE%E8%B7%B3%E8%BD%ACKikoeru.user.js
// @updateURL https://update.greasyfork.icu/scripts/528830/ASMRONE%E8%B7%B3%E8%BD%ACKikoeru.meta.js
// ==/UserScript==
// 使用严格模式,避免代码中的潜在问题
(function () {
'use strict';
// 判断当前页面是否为 127.0.0.1:8889
const isLocalhost8889 = window.location.hostname === '127.0.0.1' && window.location.port === '8889';
// 如果不是 127.0.0.1:8889,执行原代码
if (!isLocalhost8889) {
// 定义按钮的样式
const style = `
.rdl-button {
display: inline-block; /* 按钮显示为行内块元素 */
padding: 1px 1px; /* 按钮内边距 */
text-decoration: none; /* 去掉文字装饰(如下划线) */
margin-left: 10px; /* 按钮左边距 */
cursor: pointer; /* 鼠标悬停时显示为手型 */
border: none; /* 去掉边框 */
border-radius: 4px; /* 圆角边框 */
font-size: 13px; /* 字体大小 */
color: white; /* 文字颜色为白色 */
}
.rdl-button_green {
background-color: #67c23a; /* 绿色背景 */
}
.rdl-button_red {
background-color: #f56c6c; /* 红色背景 */
}
.rdl-button_blue {
background-color: #409eff; /* 蓝色背景 */
}
`;
// 创建一个