Spaces:
Runtime error
Runtime error
Update assets/custom.js
Browse files- assets/custom.js +15 -8
assets/custom.js
CHANGED
|
@@ -19,6 +19,18 @@ var ga = document.getElementsByTagName("gradio-app");
|
|
| 19 |
var targetNode = ga[0];
|
| 20 |
var isInIframe = (window.self !== window.top);
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
// gradio 页面加载好了么??? 我能动你的元素了么??
|
| 23 |
function gradioLoaded(mutations) {
|
| 24 |
for (var i = 0; i < mutations.length; i++) {
|
|
@@ -29,7 +41,7 @@ function gradioLoaded(mutations) {
|
|
| 29 |
appTitleDiv = document.getElementById("app_title");
|
| 30 |
appTitleDiv.innerText = "纸菌Chat📡";
|
| 31 |
ZJun_footer = document.querySelector('#description')
|
| 32 |
-
htmlTitle = document.title
|
| 33 |
chatbot = document.querySelector('#chuanhu_chatbot');
|
| 34 |
apSwitch = document.querySelector('.apSwitch input[type="checkbox"]');
|
| 35 |
|
|
@@ -46,14 +58,9 @@ function gradioLoaded(mutations) {
|
|
| 46 |
setChatbotHeight()
|
| 47 |
}
|
| 48 |
if (ZJun_footer) {
|
| 49 |
-
ZJun_footer.innerHTML = "<p>由<a href='https://zjun.xyz'>ZJun纸菌📡</a>基于@chuanhu和
|
| 50 |
-
}
|
| 51 |
-
if (htmlTitle) {
|
| 52 |
-
console.log(htmlTitle)
|
| 53 |
-
htmlTitle = 'Welcome to ZJunChat📡';
|
| 54 |
-
} else {
|
| 55 |
-
console.log('no title')
|
| 56 |
}
|
|
|
|
| 57 |
}
|
| 58 |
}
|
| 59 |
}
|
|
|
|
| 19 |
var targetNode = ga[0];
|
| 20 |
var isInIframe = (window.self !== window.top);
|
| 21 |
|
| 22 |
+
document.addEventListener('load',function(){
|
| 23 |
+
if (document.title) {
|
| 24 |
+
console.log(document.title)
|
| 25 |
+
htmlTitle = 'Welcome to ZJunChat📡';
|
| 26 |
+
console.log(document.title)
|
| 27 |
+
} else {
|
| 28 |
+
console.log('no title')
|
| 29 |
+
console.log(document.title)
|
| 30 |
+
}
|
| 31 |
+
})
|
| 32 |
+
|
| 33 |
+
|
| 34 |
// gradio 页面加载好了么??? 我能动你的元素了么??
|
| 35 |
function gradioLoaded(mutations) {
|
| 36 |
for (var i = 0; i < mutations.length; i++) {
|
|
|
|
| 41 |
appTitleDiv = document.getElementById("app_title");
|
| 42 |
appTitleDiv.innerText = "纸菌Chat📡";
|
| 43 |
ZJun_footer = document.querySelector('#description')
|
| 44 |
+
// htmlTitle = document.title
|
| 45 |
chatbot = document.querySelector('#chuanhu_chatbot');
|
| 46 |
apSwitch = document.querySelector('.apSwitch input[type="checkbox"]');
|
| 47 |
|
|
|
|
| 58 |
setChatbotHeight()
|
| 59 |
}
|
| 60 |
if (ZJun_footer) {
|
| 61 |
+
ZJun_footer.innerHTML = "<p>由<a href='https://zjun.xyz'>ZJun纸菌📡</a>Recode<p>基于@chuanhu和chatGPT3.5-turbo</p></p>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
+
|
| 64 |
}
|
| 65 |
}
|
| 66 |
}
|