Update index.html
Browse files- index.html +14 -25
index.html
CHANGED
|
@@ -5,6 +5,16 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
<title>My static Space</title>
|
| 7 |
<link rel="stylesheet" href="style.css" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
<div class="card" id = "in_html" name="in_card">
|
|
@@ -12,32 +22,11 @@
|
|
| 12 |
<script>
|
| 13 |
const queryString = window.location.search;
|
| 14 |
const urlParams = new URLSearchParams(queryString);
|
| 15 |
-
const
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
const tit = urlParams.get("title");
|
| 19 |
-
if (tit !== null){
|
| 20 |
-
var titl = "<center><b>"+tit+"</b></center>"
|
| 21 |
-
document.getElementById("in_html").innerHTML=titl;
|
| 22 |
-
}
|
| 23 |
-
const links = urlParams.get("links");
|
| 24 |
-
var linkz= links.split(",");
|
| 25 |
-
let i = 0;
|
| 26 |
-
|
| 27 |
-
while (i < linkz.length) {
|
| 28 |
-
linkzz = linkz[i].replace("'","").replace("'","").replace('"','').replace('"','');
|
| 29 |
-
|
| 30 |
-
console.log(linkzz);
|
| 31 |
-
var a = document.createElement('a');
|
| 32 |
-
var linkText = document.createTextNode(linkzz);
|
| 33 |
-
a.appendChild(linkText);
|
| 34 |
-
a.id = "link_class";
|
| 35 |
-
a.title = linkzz;
|
| 36 |
-
a.href = linkzz;
|
| 37 |
-
document.getElementById("in_html").appendChild(a);
|
| 38 |
-
i++;
|
| 39 |
-
};
|
| 40 |
-
//document.getElementById("in_html").innerHTML=links
|
| 41 |
</script>
|
| 42 |
</body>
|
| 43 |
</html>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
<title>My static Space</title>
|
| 7 |
<link rel="stylesheet" href="style.css" />
|
| 8 |
+
<meta name="twitter:card" content="player"/>
|
| 9 |
+
<meta name="twitter:site" content=""/>
|
| 10 |
+
<meta name="twitter:player" content=""/>
|
| 11 |
+
<meta name="twitter:player:stream" content=""/>
|
| 12 |
+
<meta name="twitter:player:width" content="100%"/>
|
| 13 |
+
<meta name="twitter:player:height" content="100%"/>
|
| 14 |
+
<meta property="og:title" content="Video Player"/>
|
| 15 |
+
<meta property="og:description" content="Video Player"/>
|
| 16 |
+
<meta property="og:image" content=""/>
|
| 17 |
+
<!--meta http-equiv="refresh" content="0; url=https://jbilcke-hf-ai-tube.hf.space/"-->
|
| 18 |
</head>
|
| 19 |
<body>
|
| 20 |
<div class="card" id = "in_html" name="in_card">
|
|
|
|
| 22 |
<script>
|
| 23 |
const queryString = window.location.search;
|
| 24 |
const urlParams = new URLSearchParams(queryString);
|
| 25 |
+
const vid = urlParams.get("video");
|
| 26 |
+
console.log(vid)
|
| 27 |
+
document.querySelector('meta[name="twitter:player"]').setAttribute("content", vid);
|
| 28 |
+
document.querySelector('meta[name="twitter:stream"]').setAttribute("content", vid);
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
</script>
|
| 31 |
</body>
|
| 32 |
</html>
|