The goal is to change the size of my chrome extension popup (different from a normal popup window) dynamically when the user clicks on a button.
I tried to hide the elements I have on the page by setting the hidden attribute to true. I also tried to change the window size with window.resizeTo, but nothing works.
Note: I can enlarge the window, but I can't shrink it back
Just adjust the css width property of <body> element. Can also do the same with <html> for good measure.
document.body.style.width="100px";
document.getElementsByTagName("html")[0].style.width="100px";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With