3 <body style='margin:
0px; display: flex;'
>
6 // The desired size should be specified in the url in the search portion
7 // like this ?widthDimension:heightDimension.
8 var unitMatch
= '([0-9.]+[a-zA-Z]+)';
9 var searchParser
= new RegExp('\\?' + unitMatch
+ '(?:\\:' + unitMatch
+ ')');
10 var parsedParameters
= searchParser
.exec(window
.location
.search
);
13 var elementToSize
= document
.getElementById('sizer');
14 var width
= parsedParameters
[1];
15 elementToSize
.style
.width
= width
;
16 var height
= parsedParameters
[2];
17 elementToSize
.style
.height
= height
;