ZJunTvT commited on
Commit
e9e4763
·
1 Parent(s): 60ce7d2

Update assets/custom.js

Browse files
Files changed (1) hide show
  1. assets/custom.js +17 -10
assets/custom.js CHANGED
@@ -19,16 +19,23 @@ var ga = document.getElementsByTagName("gradio-app");
19
  var targetNode = ga[0];
20
  var isInIframe = (window.self !== window.top);
21
 
22
- window.onload = function (){
23
- if (document.title) {
24
- console.log(document.title)
25
- document.title = '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 页面加载好了么??? 我能动你的元素了么??
 
19
  var targetNode = ga[0];
20
  var isInIframe = (window.self !== window.top);
21
 
22
+ // window.onload = function (){
23
+ // if (document.title) {
24
+ // console.log(document.title)
25
+ // document.title = ;
26
+ // console.log(document.title)
27
+ // } else {
28
+ // console.log('no title')
29
+ // console.log(document.title)
30
+ // }
31
+ // }
32
+ window.onload = function() {
33
+ // 获取标题元素
34
+ var titleElement = document.querySelector('head title');
35
+
36
+ // 更改标题元素内容
37
+ titleElement.innerText = 'Welcome to ZJunChat📡';
38
+ }
39
 
40
 
41
  // gradio 页面加载好了么??? 我能动你的元素了么??