Spaces:
Runtime error
Runtime error
Update assets/custom.js
Browse files- assets/custom.js +14 -18
assets/custom.js
CHANGED
|
@@ -30,23 +30,6 @@ var isInIframe = (window.self !== window.top);
|
|
| 30 |
// }
|
| 31 |
// }
|
| 32 |
|
| 33 |
-
window.onload = function () {
|
| 34 |
-
// 获取标题元素
|
| 35 |
-
var titleElement = document.querySelector('head title');
|
| 36 |
-
|
| 37 |
-
var zjunTitle = 'Welcome to ZJunChat📡'
|
| 38 |
-
|
| 39 |
-
// 每隔100毫秒检查一次标题是否已更改
|
| 40 |
-
var interval = setInterval(function () {
|
| 41 |
-
// 检查当前标题是否等于新标题
|
| 42 |
-
if (document.title !== zjunTitle) {
|
| 43 |
-
// 如果不等于,就将标题设置为新标题
|
| 44 |
-
document.title = zjunTitle;
|
| 45 |
-
// 同时更新标题元素的内容
|
| 46 |
-
titleElement.innerText = zjunTitle;
|
| 47 |
-
}
|
| 48 |
-
}, 100);
|
| 49 |
-
}
|
| 50 |
|
| 51 |
|
| 52 |
// gradio 页面加载好了么??? 我能动你的元素了么??
|
|
@@ -59,6 +42,7 @@ function gradioLoaded(mutations) {
|
|
| 59 |
appTitleDiv = document.getElementById("app_title");
|
| 60 |
appTitleDiv.innerText = "纸菌Chat📡";
|
| 61 |
ZJun_footer = document.querySelector('#description')
|
|
|
|
| 62 |
// htmlTitle = document.title
|
| 63 |
chatbot = document.querySelector('#chuanhu_chatbot');
|
| 64 |
apSwitch = document.querySelector('.apSwitch input[type="checkbox"]');
|
|
@@ -77,8 +61,20 @@ function gradioLoaded(mutations) {
|
|
| 77 |
}
|
| 78 |
if (ZJun_footer) {
|
| 79 |
ZJun_footer.innerHTML = "<p>由<a href='https://zjun.xyz'>ZJun纸菌📡</a>Recode<p>基于@chuanhu和chatGPT3.5-turbo</p></p>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
-
|
| 82 |
}
|
| 83 |
}
|
| 84 |
}
|
|
|
|
| 30 |
// }
|
| 31 |
// }
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
// gradio 页面加载好了么??? 我能动你的元素了么??
|
|
|
|
| 42 |
appTitleDiv = document.getElementById("app_title");
|
| 43 |
appTitleDiv.innerText = "纸菌Chat📡";
|
| 44 |
ZJun_footer = document.querySelector('#description')
|
| 45 |
+
document.getElementsByClassName('svelte-1frtwj3')[1].nextSibling.nextSibling.data = 'ZJunchat'
|
| 46 |
// htmlTitle = document.title
|
| 47 |
chatbot = document.querySelector('#chuanhu_chatbot');
|
| 48 |
apSwitch = document.querySelector('.apSwitch input[type="checkbox"]');
|
|
|
|
| 61 |
}
|
| 62 |
if (ZJun_footer) {
|
| 63 |
ZJun_footer.innerHTML = "<p>由<a href='https://zjun.xyz'>ZJun纸菌📡</a>Recode<p>基于@chuanhu和chatGPT3.5-turbo</p></p>";
|
| 64 |
+
// 获取标题元素
|
| 65 |
+
var titleElement = document.querySelector('head title');
|
| 66 |
+
var zjunTitle = 'Welcome to ZJunChat📡'
|
| 67 |
+
// 每隔100毫秒检查一次标题是否已更改
|
| 68 |
+
var interval = setInterval(function () {
|
| 69 |
+
// 检查当前标题是否等于新标题
|
| 70 |
+
if (document.title !== zjunTitle) {
|
| 71 |
+
// 如果不等于,就将标题设置为新标题
|
| 72 |
+
document.title = zjunTitle;
|
| 73 |
+
// 同时更新标题元素的内容
|
| 74 |
+
titleElement.innerText = zjunTitle;
|
| 75 |
+
}
|
| 76 |
+
}, 100);
|
| 77 |
}
|
|
|
|
| 78 |
}
|
| 79 |
}
|
| 80 |
}
|