File size: 4,557 Bytes
9a7b5fb 9449cd5 9a7b5fb 7eb443b 9a7b5fb db1ad32 194d205 db1ad32 a3107ab db1ad32 a3107ab 4a76902 b5d112c 12da3bc 6a68eab b5d112c db1ad32 a3107ab db1ad32 935b458 12da3bc 935b458 6a68eab 9a7b5fb 7eb443b db1ad32 6a68eab 34f66b7 9449cd5 db1ad32 6a68eab 34f66b7 9449cd5 db1ad32 6a68eab 34f66b7 9a7b5fb db1ad32 b411748 db1ad32 6a68eab 194d205 12da3bc 194d205 935b458 cefd414 9a7b5fb e2a14eb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>API可用调用地址</title>
<style>
body {
font-family: Arial, sans-serif;
background-size: cover;
background-repeat: no-repeat;
transition: background-image 1s ease-in-out;
text-align: center;
padding: 50px;
}
.address {
margin: 40px;
padding: 10px;
border: 2px solid #ccc;
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.6);
transition: transform 0.3s, background-color 0.3s, opacity 0.3s;
width: 400px; /* 增加宽度以适应长地址 */
display: block;
margin-left: auto;
margin-right: auto;
position: relative;
white-space: nowrap; /* 确保地址在一行显示 */
overflow: hidden;
text-overflow: ellipsis;
}
.address:hover {
transform: scale(1.05);
background-color: rgba(255, 255, 255, 0.85);
}
.unavailable {
text-decoration: line-through;
color: #999;
}
.available {
font-weight: bold;
color: #4CAF50;
}
.address a {
color: black;
text-decoration: none;
opacity: 1;
}
.status {
position: absolute;
top: 10px;
left: 10px;
padding: 2px 5px;
border-radius: 5px;
color: white;
font-size: 12px;
}
.usable {
background-color: #4CAF50;
}
.disable {
background-color: #f44336;
}
</style>
</head>
<body>
<h1>API可用调用地址</h1>
<div id="address1" class="address unavailable">
<span class="status disable">disable</span>
<p>地址1:<a href="#" onclick="copyToClipboard('https://api.hongshi-app.us.kg/')">https://api.hongshi-app.us.kg/</a></p>
</div>
<div id="address2" class="address unavailable">
<span class="status disable">disable</span>
<p>地址2:<a href="#" onclick="copyToClipboard('https://error418-new-api/ai')">https://error418-new-api/ai</a></p>
</div>
<div id="address3" class="address unavailable">
<span class="status disable">disable</span>
<p>地址3:<a href="#" onclick="copyToClipboard('https://new-api.hongshi-app.us.kg/')">https://new-api.hongshi-app.us.kg/</a></p>
</div>
<script>
// 修改这里以选择可用的地址
var availableAddress = 2; // 选择1, 2, 或 3
var addressElement = document.getElementById('address' + availableAddress);
addressElement.classList.remove('unavailable');
addressElement.classList.add('available');
var statusElement = addressElement.querySelector('.status');
statusElement.classList.remove('disable');
statusElement.classList.add('usable');
statusElement.textContent = 'usable';
// 设置可变背景
var backgroundIndex = 1;
function changeBackground() {
document.body.style.backgroundImage = 'url(background' + backgroundIndex + '.jpg)';
backgroundIndex = (backgroundIndex % 15) + 1;
}
setInterval(changeBackground, 15000); // 每15秒更换一次背景
changeBackground(); // 初始化背景
// 复制地址到剪贴板
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(function() {
alert('地址已复制到剪贴板:' + text);
}, function(err) {
alert('复制失败:', err);
});
}
// 检测链接延迟
function checkLinkDelay(url, callback) {
var startTime = new Date().getTime();
var img = new Image();
img.onload = function() {
var endTime = new Date().getTime();
var delay = endTime - startTime;
callback(delay);
};
img.onerror = function() {
callback('无法检测');
};
img.src = url + '?t=' + startTime; // 防止缓存
}
// 示例:检测地址1的延迟
checkLinkDelay('https://api.hongshi-app.us.kg/', function(delay) {
console.log('地址1的延迟:' + delay + 'ms');
});
</script>
</body>
</html>
|