redirect done
This commit is contained in:
72
public/redirect.html
Normal file
72
public/redirect.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="force-rendering" content="webkit" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
|
||||
<meta name="keywords" content="flagnote" />
|
||||
<meta name="description" content="flag note" />
|
||||
<meta name="theme-color" content="#ed4014" />
|
||||
<meta name="format-detection" content="telephone=no,email=no,adress=no" />
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-control" content="no-cache" />
|
||||
<meta http-equiv="Cache" content="no-cache" />
|
||||
<link rel="icon" href="/static/favicon.png" />
|
||||
<title>flagnote.com</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #dddddd
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
||||
const servicePath = "";
|
||||
//const servicePath="https://flagnote.com";
|
||||
|
||||
function ajaxGet(url) {
|
||||
let data = null;
|
||||
let xmlhttp = new XMLHttpRequest();
|
||||
xmlhttp.open("GET", url, false);
|
||||
xmlhttp.onreadystatechange = () => {
|
||||
if (xmlhttp.readyState == 4) {
|
||||
if (xmlhttp.status == 200 || xmlhttp.status == 304) {
|
||||
if (xmlhttp.responseText) {
|
||||
let rs = JSON.parse(xmlhttp.responseText);
|
||||
if (rs && rs.code == "000000") {
|
||||
data = rs.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
xmlhttp.send();
|
||||
return data;
|
||||
}
|
||||
|
||||
function getKeyMeta() {
|
||||
let url = servicePath + "/note/keyMeta";
|
||||
let keyMeta = null;
|
||||
try {
|
||||
keyMeta = ajaxGet(url);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
return keyMeta;
|
||||
}
|
||||
|
||||
let keyMeta = getKeyMeta();
|
||||
sessionStorage.setItem(keyMeta.key+".keyMeta", JSON.stringify(keyMeta));
|
||||
location.href = "/" + keyMeta.key;
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body><noscript><strong>Please enable JavaScript to continue.</strong></noscript>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user