Skip to content

Instantly share code, notes, and snippets.

View brunomonteiro3's full-sized avatar

Bruno Monteiro brunomonteiro3

  • Empiricus Research
  • São Paulo, Brazil
View GitHub Profile
@thiagoeliasr
thiagoeliasr / viewportsize.js
Last active October 8, 2022 01:24
Display ViewPort and Screen Resolution at the top of screen. (This script was created intended to be a bookmarklet)
$(document).find('body').append('<div id="div-width-top" style="position: fixed; right: 5px; top: 5px; background: #000; color: #fff; padding: 10px; z-index: 99999; opacity: 0.7">Window Size:</div>');
$('#div-width-top').html('ViewPort: ' + window.innerWidth + 'px | Window: ' + screen.width + 'px');
$(window).resize(function() {
$('#div-width-top').html('ViewPort: ' + window.innerWidth + 'px | Window: ' + screen.width + 'px');
});