Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(window.frameElement){
- if(window.frameElement.offsetHeight > window.frameElement.offsetWidth){
- width = `100%`;
- height = `${100 * window.frameElement.offsetWidth / window.frameElement.offsetHeight}%`
- }
- else
- {
- width = `${100 * window.frameElement.offsetHeight / window.frameElement.offsetWidth}%`
- height = "100%"
- }
- }
- else {
- if(window.screen.availHeight > window.screen.availWidth){
- width = `100vw`;
- height = `100vw`;
- }
- else
- {
- width = `100vh`;
- height = `100vh`;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment