Guest User

Untitled

a guest
Nov 28th, 2022
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. if(window.frameElement){
  2. if(window.frameElement.offsetHeight > window.frameElement.offsetWidth){
  3. width = `100%`;
  4. height = `${100 * window.frameElement.offsetWidth / window.frameElement.offsetHeight}%`
  5. }
  6. else
  7. {
  8. width = `${100 * window.frameElement.offsetHeight / window.frameElement.offsetWidth}%`
  9. height = "100%"
  10. }
  11. }
  12. else {
  13. if(window.screen.availHeight > window.screen.availWidth){
  14. width = `100vw`;
  15. height = `100vw`;
  16. }
  17. else
  18. {
  19. width = `100vh`;
  20. height = `100vh`;
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment