Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doStuff() {
- var enoughWidth = window.innerWidth > 50;
- var enoughHeight = window.innerHeight > 50;
- if (enoughWidth && enoughHeight) {
- actuallyDoStuff();
- } else {
- // eg clearContent();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement