mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
24w18a
This commit is contained in:
parent
a386304d42
commit
1c18ccc363
2 changed files with 42 additions and 3 deletions
|
|
@ -131,6 +131,28 @@
|
|||
text-align: center;
|
||||
line-height: 0.5;
|
||||
}
|
||||
|
||||
#toast {
|
||||
position: fixed;
|
||||
top: 10%;
|
||||
/* 垂直居中 */
|
||||
left: 50%;
|
||||
/* 水平居中 */
|
||||
transform: translate(-50%, -50%);
|
||||
/* 调整使其中心对齐 */
|
||||
background-color: rgba(97, 97, 97, 0.7);
|
||||
/* 半透明黑色背景 */
|
||||
color: white;
|
||||
/* 字体颜色 */
|
||||
padding: 15px 20px;
|
||||
/* 内边距 */
|
||||
border-radius: 10px;
|
||||
/* 圆角 */
|
||||
font-size: 16px;
|
||||
/* 字体大小 */
|
||||
z-index: 1000;
|
||||
/* 确保显示在其他元素上面 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
@ -143,7 +165,7 @@
|
|||
<button class="btn rounded-button" id="formatButton">获取文件链接</button>
|
||||
|
||||
<div class="code" id="outputBlock">
|
||||
<button class="copy-button" id="copyButton" onclick="copyCode(this)">Copy</button>
|
||||
<button class="copy-button" id="copyButton">Copy</button>
|
||||
<pre id="formattedLinkOutput"></pre>
|
||||
</div>
|
||||
<div class="tips">
|
||||
|
|
@ -155,6 +177,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toast" style="display:none;">
|
||||
链接已复制到剪贴板
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function formatGithubLink() {
|
||||
|
|
@ -186,9 +212,20 @@
|
|||
window.getSelection().addRange(range);
|
||||
document.execCommand('copy');
|
||||
window.getSelection().removeAllRanges();
|
||||
alert('链接已复制到剪贴板');
|
||||
//alert('链接已复制到剪贴板');
|
||||
showToast('链接已复制到剪贴板');
|
||||
});
|
||||
|
||||
function showToast(message) {
|
||||
const toast = document.getElementById('toast');
|
||||
toast.textContent = message;
|
||||
toast.style.display = 'block';
|
||||
|
||||
setTimeout(() => {
|
||||
toast.style.display = 'none';
|
||||
}, 3000); // 3秒后隐藏
|
||||
}
|
||||
|
||||
function fetchSizeLimit() {
|
||||
fetch(window.location.origin + '/api/size_limit')
|
||||
.then(response => response.json())
|
||||
|
|
@ -249,7 +286,7 @@
|
|||
Copyright © 2024 WJQSERVER-STUDIO
|
||||
</p>
|
||||
<p>
|
||||
GitHub仓库地址:<a href="https://github.com/WJQSERVER-STUDIO/ghproxy">https://github.com/WJQSERVER-STUDIO/ghproxy</a>
|
||||
GitHub仓库地址:<a href="https://github.com/WJQSERVER-STUDIO/ghproxy">https://github.com/WJQSERVER-STUDIO/ghproxy</a> <br><a href="https://t.me/ghproxy_go">Telegram交流群</a>
|
||||
</p>
|
||||
<div id="visitor-info" style="text-align: center; margin-top: 15px;">
|
||||
<p>您的IP地址: <span id="visitor-ip"></span></p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue