update 2025-01-26 00:23:38
This commit is contained in:
parent
576aacbe19
commit
8ce829e231
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_MAINTAINER:=Thaolga <https://github.com/Thaolga/luci-app-nekobox>
|
||||
PKG_NAME:=luci-app-nekobox
|
||||
PKG_VERSION:=1.6.8
|
||||
PKG_VERSION:=1.6.9
|
||||
PKG_RELEASE:=cn
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Latest Version: v1.6.8">
|
||||
<title>Latest Version: v1.6.8</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Latest Version: v1.6.9">
|
||||
<title>Latest Version: v1.6.9</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Latest Version</text>
|
||||
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Latest Version</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.8</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.8</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.9</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.9</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -1,5 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.8">
|
||||
<title>Current Version: v1.6.8</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="186" height="20" role="img" aria-label="Current Version: v1.6.9">
|
||||
<title>Current Version: v1.6.9</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110">
|
||||
<text aria-hidden="true" x="495" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="700" style="letter-spacing: -5;">Current Version</text>
|
||||
<text x="495" y="140" transform="scale(.1)" fill="#fff" textLength="700" style="letter-spacing: -5;">Current Version</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.8</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.8</text>
|
||||
<text aria-hidden="true" x="1405" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="600" style="letter-spacing: -3;">v1.6.9</text>
|
||||
<text x="1405" y="140" transform="scale(.1)" fill="#fff" textLength="600" style="letter-spacing: -3;">v1.6.9</text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -1075,6 +1075,241 @@ if(typeof checkSiteStatus !== 'undefined') {
|
|||
setInterval(IP.getIpipnetIP, 180000);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
let snowContainer = document.querySelector('#snow-container');
|
||||
|
||||
if (snowContainer) {
|
||||
snowContainer.innerHTML = '';
|
||||
}
|
||||
|
||||
if (snowContainer) {
|
||||
for (let i = 0; i < 80; i++) {
|
||||
let snowflake = document.createElement('div');
|
||||
snowflake.classList.add('snowflake');
|
||||
|
||||
let size = Math.random() * 10 + 5 + 'px';
|
||||
snowflake.style.width = size;
|
||||
snowflake.style.height = size;
|
||||
|
||||
let speed = Math.random() * 3 + 2 + 's';
|
||||
snowflake.style.animationDuration = speed;
|
||||
|
||||
let rotate = Math.random() * 360 + 'deg';
|
||||
let rotateSpeed = Math.random() * 5 + 2 + 's';
|
||||
snowflake.style.animationName = 'fall';
|
||||
snowflake.style.animationDuration = speed;
|
||||
snowflake.style.animationTimingFunction = 'linear';
|
||||
snowflake.style.animationIterationCount = 'infinite';
|
||||
|
||||
let leftPosition = Math.random() * 100 + 'vw';
|
||||
snowflake.style.left = leftPosition;
|
||||
|
||||
snowflake.style.animationDelay = Math.random() * 5 + 's';
|
||||
|
||||
snowContainer.appendChild(snowflake);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const audioPlayer = new Audio();
|
||||
let songs = [];
|
||||
let currentSongIndex = 0;
|
||||
let isPlaying = false;
|
||||
let isReportingTime = false;
|
||||
|
||||
function loadDefaultPlaylist() {
|
||||
fetch('https://raw.githubusercontent.com/Thaolga/Rules/main/Clash/songs.txt')
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('加载播放列表失败');
|
||||
}
|
||||
return response.text();
|
||||
})
|
||||
.then(data => {
|
||||
songs = data.split('\n').filter(url => url.trim() !== '');
|
||||
if (songs.length === 0) {
|
||||
throw new Error('播放列表中没有有效的歌曲');
|
||||
}
|
||||
console.log('播放列表已加载:', songs);
|
||||
restorePlayerState();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('加载播放列表时出错:', error.message);
|
||||
});
|
||||
}
|
||||
|
||||
function loadSong(index) {
|
||||
if (index >= 0 && index < songs.length) {
|
||||
audioPlayer.src = songs[index];
|
||||
audioPlayer.addEventListener('loadedmetadata', () => {
|
||||
const savedState = JSON.parse(localStorage.getItem('playerState'));
|
||||
if (savedState && savedState.currentSongIndex === index) {
|
||||
audioPlayer.currentTime = savedState.currentTime || 0;
|
||||
if (savedState.isPlaying) {
|
||||
audioPlayer.play().catch(error => {
|
||||
console.error('恢复播放失败:', error);
|
||||
});
|
||||
}
|
||||
}
|
||||
}, { once: true });
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('dblclick', function() {
|
||||
if (!isPlaying) {
|
||||
loadSong(currentSongIndex);
|
||||
audioPlayer.play().then(() => {
|
||||
isPlaying = true;
|
||||
savePlayerState();
|
||||
console.log('开始播放');
|
||||
}).catch(error => {
|
||||
console.log('播放失败:', error);
|
||||
});
|
||||
} else {
|
||||
audioPlayer.pause();
|
||||
isPlaying = false;
|
||||
savePlayerState();
|
||||
console.log('播放已暂停');
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.key === 'ArrowLeft') {
|
||||
currentSongIndex = (currentSongIndex - 1 + songs.length) % songs.length;
|
||||
loadSong(currentSongIndex);
|
||||
savePlayerState();
|
||||
if (isPlaying) {
|
||||
audioPlayer.play();
|
||||
}
|
||||
} else if (event.key === 'ArrowRight') {
|
||||
currentSongIndex = (currentSongIndex + 1) % songs.length;
|
||||
loadSong(currentSongIndex);
|
||||
savePlayerState();
|
||||
if (isPlaying) {
|
||||
audioPlayer.play();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function startHourlyAlert() {
|
||||
setInterval(() => {
|
||||
const now = new Date();
|
||||
const hours = now.getHours();
|
||||
|
||||
if (now.getMinutes() === 0 && !isReportingTime) {
|
||||
isReportingTime = true;
|
||||
|
||||
const timeAnnouncement = new SpeechSynthesisUtterance(`整点报时,现在是北京时间 ${hours} 点整`);
|
||||
timeAnnouncement.lang = 'zh-CN';
|
||||
speechSynthesis.speak(timeAnnouncement);
|
||||
|
||||
console.log(`整点报时:现在是北京时间 ${hours} 点整`);
|
||||
}
|
||||
|
||||
if (now.getMinutes() !== 0) {
|
||||
isReportingTime = false;
|
||||
}
|
||||
}, 60000);
|
||||
}
|
||||
|
||||
audioPlayer.addEventListener('ended', function() {
|
||||
currentSongIndex = (currentSongIndex + 1) % songs.length;
|
||||
loadSong(currentSongIndex);
|
||||
savePlayerState();
|
||||
audioPlayer.play();
|
||||
});
|
||||
|
||||
function savePlayerState() {
|
||||
const state = {
|
||||
currentSongIndex,
|
||||
currentTime: audioPlayer.currentTime,
|
||||
isPlaying
|
||||
};
|
||||
localStorage.setItem('playerState', JSON.stringify(state));
|
||||
}
|
||||
|
||||
function restorePlayerState() {
|
||||
const state = JSON.parse(localStorage.getItem('playerState'));
|
||||
if (state) {
|
||||
currentSongIndex = state.currentSongIndex || 0;
|
||||
loadSong(currentSongIndex);
|
||||
}
|
||||
}
|
||||
|
||||
loadDefaultPlaylist();
|
||||
startHourlyAlert();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const websites = [
|
||||
'https://www.youtube.com/',
|
||||
'https://www.google.com/',
|
||||
'https://www.facebook.com/',
|
||||
'https://www.twitter.com/',
|
||||
'https://www.github.com/'
|
||||
];
|
||||
|
||||
function speakMessage(message) {
|
||||
const utterance = new SpeechSynthesisUtterance(message);
|
||||
utterance.lang = 'zh-CN';
|
||||
speechSynthesis.speak(utterance);
|
||||
}
|
||||
|
||||
function getWebsiteStatusMessage(url, status) {
|
||||
const statusMessages = {
|
||||
'https://www.youtube.com/': status ? 'YouTube 网站访问正常。' : '无法访问 YouTube 网站,请检查网络连接。',
|
||||
'https://www.google.com/': status ? 'Google 网站访问正常。' : '无法访问 Google 网站,请检查网络连接。',
|
||||
'https://www.facebook.com/': status ? 'Facebook 网站访问正常。' : '无法访问 Facebook 网站,请检查网络连接。',
|
||||
'https://www.twitter.com/': status ? 'Twitter 网站访问正常。' : '无法访问 Twitter 网站,请检查网络连接。',
|
||||
'https://www.github.com/': status ? 'GitHub 网站访问正常。' : '无法访问 GitHub 网站,请检查网络连接。',
|
||||
};
|
||||
|
||||
return statusMessages[url] || (status ? `${url} 网站访问正常。` : `无法访问 ${url} 网站,请检查网络连接。`);
|
||||
}
|
||||
|
||||
function checkWebsiteAccess(urls) {
|
||||
const statusMessages = [];
|
||||
let requestsCompleted = 0;
|
||||
|
||||
urls.forEach(url => {
|
||||
fetch(url, { mode: 'no-cors' })
|
||||
.then(response => {
|
||||
const isAccessible = response.type === 'opaque';
|
||||
statusMessages.push(getWebsiteStatusMessage(url, isAccessible));
|
||||
})
|
||||
.catch(() => {
|
||||
statusMessages.push(getWebsiteStatusMessage(url, false));
|
||||
})
|
||||
.finally(() => {
|
||||
requestsCompleted++;
|
||||
if (requestsCompleted === urls.length) {
|
||||
speakMessage(statusMessages.join(' '));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
let isDetectionStarted = false;
|
||||
|
||||
document.addEventListener('contextmenu', function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (!isDetectionStarted) {
|
||||
speakMessage('开始检测网站连通性...');
|
||||
checkWebsiteAccess(websites);
|
||||
isDetectionStarted = true;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
if (isset($_POST['enableSnowEffect'])) {
|
||||
$enableSnowEffect = $_POST['enableSnowEffect'] == '1' ? true : false;
|
||||
|
||||
$pingFile = 'ping.php';
|
||||
|
||||
$fileContent = file_get_contents($pingFile);
|
||||
|
||||
if ($enableSnowEffect) {
|
||||
if (strpos($fileContent, '<div id="snow-container"></div>') === false) {
|
||||
$fileContent .= '<div id="snow-container"></div>';
|
||||
file_put_contents($pingFile, $fileContent);
|
||||
}
|
||||
} else {
|
||||
if (strpos($fileContent, '<div id="snow-container"></div>') !== false) {
|
||||
$fileContent = str_replace('<div id="snow-container"></div>', '', $fileContent);
|
||||
file_put_contents($pingFile, $fileContent);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -20,8 +20,8 @@ if(isset($_POST['fw'])){
|
|||
if ($dt == 'disable') shell_exec("uci set neko.cfg.new_interface='0' && uci commit neko");
|
||||
}
|
||||
$fwstatus=shell_exec("uci get neko.cfg.new_interface");
|
||||
$enableSnow = false;
|
||||
?>
|
||||
|
||||
<?php
|
||||
function getSingboxVersion() {
|
||||
$singBoxPath = '/usr/bin/sing-box';
|
||||
|
@ -637,11 +637,11 @@ $razordVersion = getRazordVersion();
|
|||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="bodyBgColor" class="form-label">主背景色</label>
|
||||
<input type="color" class="form-control" name="bodyBgColor" id="bodyBgColor" value="#087990">
|
||||
<input type="color" class="form-control" name="bodyBgColor" id="bodyBgColor" value="#23407e">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="infoBgSubtle" class="form-label">信息背景色</label>
|
||||
<input type="color" class="form-control" name="infoBgSubtle" id="infoBgSubtle" value="#087990">
|
||||
<input type="color" class="form-control" name="infoBgSubtle" id="infoBgSubtle" value="#23407e">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="backgroundColor" class="form-label">表格背景色</label>
|
||||
|
@ -661,15 +661,15 @@ $razordVersion = getRazordVersion();
|
|||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="selectColor" class="form-label">主边框背景色</label>
|
||||
<input type="color" class="form-control" name="selectColor" id="selectColor" value="#087990">
|
||||
<input type="color" class="form-control" name="selectColor" id="selectColor" value="#23407e">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="bodyColor" class="form-label">表格文本色 1</label>
|
||||
<input type="color" class="form-control" name="bodyColor" id="bodyColor" value="#00ccff">
|
||||
<input type="color" class="form-control" name="bodyColor" id="bodyColor" value="#04f153">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="tertiaryColor" class="form-label">表格文本色 2</label>
|
||||
<input type="color" class="form-control" name="tertiaryColor" id="tertiaryColor" value="#00ff00">
|
||||
<input type="color" class="form-control" name="tertiaryColor" id="tertiaryColor" value="#46e1ec">
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="tertiaryRgbColor" class="form-label">表格文本色 3</label>
|
||||
|
@ -724,14 +724,15 @@ $razordVersion = getRazordVersion();
|
|||
<input type="color" class="form-control" name="heading6Color" id="heading6Color" value="#00ffff">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="enableSnowEffect" name="enableSnowEffect" <?php echo $enableSnow ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="enableSnowEffect">启用雪花动画(要禁用重复勾选2次)</label>
|
||||
</div>
|
||||
<div class="mb-3 form-check">
|
||||
<input type="checkbox" class="form-check-input" id="useBackgroundImage" name="useBackgroundImage">
|
||||
<label class="form-check-label" for="useBackgroundImage">使用自定义背景图片</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3" id="backgroundImageContainer" style="display:none; position: relative; left: -1ch;">
|
||||
<label for="backgroundImage" class="form-label">选择背景图片</label>
|
||||
<select class="form-select" id="backgroundImage" name="backgroundImage">
|
||||
<option value="">请选择图片</option>
|
||||
<?php
|
||||
|
@ -790,6 +791,42 @@ $razordVersion = getRazordVersion();
|
|||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const tooltip = document.createElement('div');
|
||||
tooltip.style.position = 'fixed';
|
||||
tooltip.style.top = '10px';
|
||||
tooltip.style.left = '10px';
|
||||
tooltip.style.backgroundColor = 'rgba(0, 128, 0, 0.7)';
|
||||
tooltip.style.color = 'white';
|
||||
tooltip.style.padding = '10px';
|
||||
tooltip.style.borderRadius = '5px';
|
||||
tooltip.style.zIndex = '9999';
|
||||
tooltip.style.display = 'none';
|
||||
document.body.appendChild(tooltip);
|
||||
|
||||
function showTooltip(message) {
|
||||
tooltip.textContent = message;
|
||||
tooltip.style.display = 'block';
|
||||
setTimeout(() => {
|
||||
tooltip.style.display = 'none';
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
showTooltip('双击左键打开播放器,双击右键开启网站连通性检测');
|
||||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
document.getElementById('enableSnowEffect').addEventListener('change', function() {
|
||||
var isChecked = this.checked;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', 'save_snow_status.php', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xhr.send('enableSnowEffect=' + (isChecked ? '1' : '0'));
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="filesModal" tabindex="-1" aria-labelledby="filesModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
||||
<div class="modal-dialog modal-xl">
|
||||
<div class="modal-content">
|
||||
|
@ -912,11 +949,11 @@ function formatSize($size) {
|
|||
document.getElementById('resetButton').addEventListener('click', function() {
|
||||
document.getElementById('primaryColor').value = '#0ceda2';
|
||||
document.getElementById('secondaryColor').value = '#00ffff';
|
||||
document.getElementById('bodyBgColor').value = '#087990';
|
||||
document.getElementById('bodyColor').value = '#00ccff';
|
||||
document.getElementById('infoBgSubtle').value = '#087990';
|
||||
document.getElementById('selectColor').value = '#087990';
|
||||
document.getElementById('tertiaryColor').value = '#00ff00';
|
||||
document.getElementById('bodyBgColor').value = '#23407e';
|
||||
document.getElementById('bodyColor').value = '#04f153';
|
||||
document.getElementById('infoBgSubtle').value = '#23407e';
|
||||
document.getElementById('selectColor').value = '#23407e';
|
||||
document.getElementById('tertiaryColor').value = '#46e1ec';
|
||||
document.getElementById('tertiaryRgbColor').value = '#1e90ff';
|
||||
document.getElementById('heading1Color').value = '#21e4f2';
|
||||
document.getElementById('heading2Color').value = '#65f1fb';
|
||||
|
@ -1769,3 +1806,9 @@ document.getElementById('checkCliverButton').addEventListener('click', function
|
|||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$primaryColor = $_POST['primaryColor'] ?? '#0ceda2';
|
||||
$secondaryColor = $_POST['secondaryColor'] ?? '#00ffff';
|
||||
$bodyBgColor = $_POST['bodyBgColor'] ?? '#087990';
|
||||
$bodyColor = $_POST['bodyColor'] ?? '#00ccff';
|
||||
$infoBgSubtle = $_POST['infoBgSubtle'] ?? '#087990';
|
||||
$bodyBgColor = $_POST['bodyBgColor'] ?? '#23407e';
|
||||
$bodyColor = $_POST['bodyColor'] ?? '#04f153';
|
||||
$infoBgSubtle = $_POST['infoBgSubtle'] ?? '#23407e';
|
||||
$primaryBorderSubtle = $_POST['primaryBorderSubtle'] ?? '#1815d1';
|
||||
$tertiaryColor = $_POST['tertiaryColor'] ?? '#00ff00';
|
||||
$tertiaryColor = $_POST['tertiaryColor'] ?? '#46e1ec';
|
||||
$tertiaryRgbColor = $_POST['tertiaryRgbColor'] ?? '#1e90ff';
|
||||
$selectColor = $_POST['selectColor'] ?? '#087990';
|
||||
$selectColor = $_POST['selectColor'] ?? '#23407e';
|
||||
$backgroundColor = $_POST['backgroundColor'] ?? '#20cdd9';
|
||||
$placeholderColor = $_POST['placeholderColor'] ?? '#f82af2';
|
||||
$logTextColor = $_POST['logTextColor'] ?? '#f8f9fa';
|
||||
|
@ -38,6 +38,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
}
|
||||
|
||||
$backgroundImagePath = $_POST['backgroundImage'] ?? '';
|
||||
$enableSnowEffect = isset($_POST['enableSnowEffect']) ? true : false;
|
||||
$cssContent = "
|
||||
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap');
|
||||
|
@ -440,7 +441,6 @@ h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
|
|||
text-shadow: 3px 3px 6px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 767px) {
|
||||
body {
|
||||
font-size: 14px;
|
||||
|
@ -536,6 +536,120 @@ h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
|
|||
}
|
||||
";
|
||||
|
||||
if ($enableSnowEffect) {
|
||||
$snowEffectCSS = "
|
||||
#snow-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
z-index: 9999;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.snowflake {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
animation: fall linear infinite;
|
||||
}
|
||||
|
||||
@keyframes fall {
|
||||
0% {
|
||||
transform: translateY(0) rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(100vh) rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.snowflake:nth-child(1) {
|
||||
animation-duration: 8s;
|
||||
animation-delay: -2s;
|
||||
left: 10%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(2) {
|
||||
animation-duration: 10s;
|
||||
animation-delay: -3s;
|
||||
left: 20%;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(3) {
|
||||
animation-duration: 12s;
|
||||
animation-delay: -1s;
|
||||
left: 30%;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(4) {
|
||||
animation-duration: 9s;
|
||||
animation-delay: -5s;
|
||||
left: 40%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(5) {
|
||||
animation-duration: 11s;
|
||||
animation-delay: -4s;
|
||||
left: 50%;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(6) {
|
||||
animation-duration: 7s;
|
||||
animation-delay: -6s;
|
||||
left: 60%;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(7) {
|
||||
animation-duration: 8s;
|
||||
animation-delay: -7s;
|
||||
left: 70%;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(8) {
|
||||
animation-duration: 10s;
|
||||
animation-delay: -8s;
|
||||
left: 80%;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.snowflake:nth-child(9) {
|
||||
animation-duration: 6s;
|
||||
animation-delay: -9s;
|
||||
left: 90%;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
";
|
||||
$pos = strpos($cssContent, "#plugin_log, #bin_logs, #singbox_log") + strlen("#plugin_log, #bin_logs, #singbox_log {");
|
||||
$endPos = strpos($cssContent, "}", $pos);
|
||||
|
||||
if ($pos !== false && $endPos !== false) {
|
||||
$cssContent = substr_replace($cssContent, $snowEffectCSS, $endPos + 1, 0);
|
||||
}
|
||||
} else {
|
||||
$cssContent .= "#snow-container { display: none; }\n";
|
||||
}
|
||||
|
||||
$filePath = $_SERVER['DOCUMENT_ROOT'] . '/nekobox/assets/theme/transparent.css';
|
||||
file_put_contents($filePath, $cssContent);
|
||||
echo "<script>
|
||||
|
@ -567,3 +681,4 @@ if (isset($_GET['delete'])) {
|
|||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
V1.6.8-cn
|
||||
V1.6.9-cn
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -33,8 +33,8 @@
|
|||
name="theme-color"
|
||||
content="#FFFFFF"
|
||||
/>
|
||||
<script type="module" crossorigin src="./assets/index-DqRnidtX.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-Bt6wtUNb.css">
|
||||
<script type="module" crossorigin src="./assets/index-CvSbIFcl.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-LfbVF08o.css">
|
||||
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="./registerSW.js"></script></head>
|
||||
<body class="overflow-hidden overscroll-none">
|
||||
<div id="app"></div>
|
||||
|
|
|
@ -1 +1 @@
|
|||
if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(s,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let d={};const t=e=>n(e,f),o={module:{uri:f},exports:d,require:t};i[f]=Promise.all(s.map((e=>o[e]||t(e)))).then((e=>(r(...e),d)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-Bt6wtUNb.css",revision:null},{url:"assets/index-DqRnidtX.js",revision:null},{url:"index.html",revision:"a6fe46348527c1c8304d4883d456fddf"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
|
||||
if(!self.define){let e,i={};const s=(s,n)=>(s=new URL(s+".js",n).href,i[s]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=s,e.onload=i,document.head.appendChild(e)}else e=s,importScripts(s),i()})).then((()=>{let e=i[s];if(!e)throw new Error(`Module ${s} didn’t register its module`);return e})));self.define=(n,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let o={};const c=e=>s(e,f),d={module:{uri:f},exports:o,require:c};i[f]=Promise.all(n.map((e=>d[e]||c(e)))).then((e=>(r(...e),o)))}}define(["./workbox-3e8df8c8"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"assets/index-CvSbIFcl.js",revision:null},{url:"assets/index-LfbVF08o.css",revision:null},{url:"index.html",revision:"e32434c606efed2fabef8fd3a08fecf5"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"favicon.svg",revision:"7f1c4521acc10694fefef8f72dd2ea5f"},{url:"pwa-192x192.png",revision:"021df52501f4357c03eebd808f40dc6a"},{url:"pwa-512x512.png",revision:"d2f759aaabcb2c44ff52b27fde3de6e0"},{url:"pwa-maskable-192x192.png",revision:"7cd11dc5f0490b349d23eef5591d10e5"},{url:"pwa-maskable-512x512.png",revision:"8c97dc367a85a5a1eba523b24f79d03b"},{url:"manifest.webmanifest",revision:"c452912633990899ffe790f985ad0db9"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
|
||||
|
|
|
@ -1 +1 @@
|
|||
v1.59.0
|
||||
v1.60.0
|
|
@ -29,9 +29,19 @@ table td, .table .td {
|
|||
color: red !important;
|
||||
}
|
||||
|
||||
._now_use_bg {
|
||||
background: #5e72e445 !important;
|
||||
}
|
||||
|
||||
.ping a:hover{
|
||||
text-decoration : underline;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
._now_use_bg {
|
||||
background: #4a90e2 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -212,6 +222,7 @@ table td, .table .td {
|
|||
var dom = document.getElementById("cbi-passwall-" + id);
|
||||
if (dom) {
|
||||
dom.title = "当前使用的 TCP 节点";
|
||||
dom.classList.add("_now_use_bg");
|
||||
//var v = "<a style='color: red'>当前TCP节点:</a>" + document.getElementById("cbid.passwall." + id + ".remarks").value;
|
||||
//document.getElementById("cbi-passwall-" + id + "-remarks").innerHTML = v;
|
||||
var dom_remarks = document.getElementById("cbi-passwall-" + id + "-remarks");
|
||||
|
@ -229,6 +240,7 @@ table td, .table .td {
|
|||
} else {
|
||||
dom.title = "当前使用的 UDP 节点";
|
||||
}
|
||||
dom.classList.add("_now_use_bg");
|
||||
var dom_remarks = document.getElementById("cbi-passwall-" + id + "-remarks");
|
||||
if (dom_remarks) {
|
||||
dom_remarks.classList.add("_now_use");
|
||||
|
|
Loading…
Reference in New Issue