Commit 9dd725cc by xcoder

VPN-45 1. липнет текст, где первая картинка.

1 parent 19ea9703
...@@ -40,7 +40,12 @@ window.addEventListener("resize", () => { ...@@ -40,7 +40,12 @@ window.addEventListener("resize", () => {
console.log("localStorage is not supported"); console.log("localStorage is not supported");
} }
setOriented(position); if (mobileCheck() && window.innerWidth <= 1023) {
setOriented(position);
}
else {
setOriented("Portrait");
}
}); });
function do_download() { function do_download() {
...@@ -234,9 +239,6 @@ let portrait = window.matchMedia("(orientation: portrait)"); ...@@ -234,9 +239,6 @@ let portrait = window.matchMedia("(orientation: portrait)");
portrait.addEventListener("change", function (e) { portrait.addEventListener("change", function (e) {
if (e.matches) { if (e.matches) {
// Portrait mode
console.log("Portrait mode");
try { try {
localStorage.setItem(key, JSON.stringify("Portrait")); localStorage.setItem(key, JSON.stringify("Portrait"));
} catch (error) { } catch (error) {
...@@ -245,9 +247,6 @@ portrait.addEventListener("change", function (e) { ...@@ -245,9 +247,6 @@ portrait.addEventListener("change", function (e) {
setOriented("Portrait"); setOriented("Portrait");
} else { } else {
// Landscape
console.log("Landscape");
try { try {
localStorage.setItem(key, JSON.stringify("Landscape")); localStorage.setItem(key, JSON.stringify("Landscape"));
} catch (error) { } catch (error) {
...@@ -312,7 +311,7 @@ function mobileCheck() { ...@@ -312,7 +311,7 @@ function mobileCheck() {
check = true; check = true;
})(navigator.userAgent||navigator.vendor||window.opera); })(navigator.userAgent||navigator.vendor||window.opera);
var sizeCheck = ( window.innerWidth <= 800 ) && ( window.innerHeight <= 600 ) ; var sizeCheck = (window.innerWidth <= 800) && (window.innerHeight <= 600);
return check || sizeCheck; return check || sizeCheck;
} }
\ No newline at end of file \ No newline at end of file
...@@ -594,6 +594,7 @@ hr.delimeter { ...@@ -594,6 +594,7 @@ hr.delimeter {
background-color: #23003f; background-color: #23003f;
border: none; border: none;
overflow: hidden;
} }
@media screen and (max-width: 980px) { @media screen and (max-width: 980px) {
...@@ -611,6 +612,8 @@ hr.delimeter { ...@@ -611,6 +612,8 @@ hr.delimeter {
align-items: flex-start; align-items: flex-start;
margin-left: 20px;
background-color: #23003f; background-color: #23003f;
border: none; border: none;
} }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!