Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoOliveiraRocha authored Dec 10, 2024
1 parent 7424ac2 commit 56a8829
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
body, html {
padding: 0;
height: 638px;
width: 498px;
/* width: 498px; dinamically set using URL params and JS */
overflow: hidden;
margin: 0;
display: flex;
Expand All @@ -33,6 +33,12 @@
return decodeURIComponent(results[2].replace(/\+/g, ' '));
}

// Retrieve width parameter (if any), default to '498'
var widthParam = getParameterByName('width');
var pageWidth = widthParam ? widthParam : '498';
document.documentElement.style.width = pageWidth + 'px';
document.body.style.width = pageWidth + 'px';

// Get the URL parameter 'url'
var urlParam = getParameterByName('url');

Expand Down

0 comments on commit 56a8829

Please sign in to comment.