code optimization, new log system, appp optimizawion
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
<div class="scale_block">
|
||||
<div>
|
||||
oh no html breaking! <br>
|
||||
please don't use custom scale for this window
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
if(document.title == "login"){
|
||||
console.log(document.title);
|
||||
@ -7,5 +15,34 @@
|
||||
console.log("check");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
px_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
|
||||
// console.log(px_ratio);
|
||||
isZooming();
|
||||
$(window).resize(function(){isZooming();});
|
||||
|
||||
function isZooming(){
|
||||
var newPx_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
|
||||
if(newPx_ratio != px_ratio){
|
||||
px_ratio = newPx_ratio;
|
||||
// console.log(px_ratio);
|
||||
if (px_ratio != 1){
|
||||
// console.log("zooming");
|
||||
document.getElementsByClassName("scale_block")[0].style.display = "block";
|
||||
}
|
||||
else{
|
||||
document.getElementsByClassName("scale_block")[0].style.display = "none";
|
||||
}
|
||||
return true;
|
||||
}else{
|
||||
// console.log("just resizing");
|
||||
if (px_ratio != 1){
|
||||
document.getElementsByClassName("scale_block")[0].style.display = "block";
|
||||
}
|
||||
else{
|
||||
document.getElementsByClassName("scale_block")[0].style.display = "none";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
@ -8,10 +8,8 @@
|
||||
<script src="/lib/ejs.js"></script>
|
||||
<script src="/lib/aes.js"></script>
|
||||
<meta charset="UTF-8">
|
||||
<!-- <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> <%= name %> </title>
|
||||
<!-- <script> document.querySelector("title").innerHTML += $.cookie("uuid"); </script> -->
|
||||
<style>
|
||||
.main{
|
||||
width: 80vw;
|
||||
@ -21,6 +19,29 @@
|
||||
html{
|
||||
background-color:aliceblue;
|
||||
}
|
||||
.scale_block{
|
||||
display: none;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
background-color:rgb(47, 47, 47);
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
/* line-height: 100vh; */
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
font-size: 4vw;
|
||||
filter: opacity(99.8%);
|
||||
/* filter: blur(1px); */
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
.scale_block div{
|
||||
position: absolute;
|
||||
top: 50vh;
|
||||
left: 50vw;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 100vw;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user