feat(assets): 将图片资源从 JPG/PNG 更新为 WebP 格式
- 将 MBTI 图标从 PNG 更改为 WebP 格式以优化加载性能 - 更新背景图片路径配置以使用 WebP 图片资源 - 移除对 sessionStorage 中图片 URL 列表的重复设置逻辑
This commit is contained in:
@@ -50,17 +50,15 @@ $(document).ready(function () {
|
||||
* 自定义壁纸
|
||||
*/
|
||||
var imgUrls = JSON.parse(sessionStorage.getItem("imgUrls"));
|
||||
var index = sessionStorage.getItem("index");
|
||||
var $panel = $('#panel');
|
||||
var date = new Date();
|
||||
var dayOfWeek = date.getDay();
|
||||
if (imgUrls == null) {
|
||||
imgUrls = [];
|
||||
index = 0;
|
||||
SiteConfig.background.imagePaths.forEach(path => {
|
||||
imgUrls.push(path);
|
||||
});
|
||||
sessionStorage.setItem("imgUrls", JSON.stringify(imgUrls));
|
||||
//sessionStorage.setItem("imgUrls", JSON.stringify(imgUrls));
|
||||
// sessionStorage.setItem("index", index);
|
||||
} else {
|
||||
// if (index == imgUrls.length)
|
||||
|
||||
Reference in New Issue
Block a user