What we get...
But what if if looked like....
Something which can provide information even when small. This would be awesome for a radio station where you hover over it and it tells you what your listening too without having to open the whole page.
Methodology
A wise man once said...
Dont try to change the view from the window. Change the window!.- Seth
The method here is to detect when we are in minimized mode and overlay the contents of the screen with supersized text..
Code
In this code we listen for indications that the browser has just been minimized. Since there is no minimze / maximise events. We listen to the window onblur and onfocus, and use screenX or outerWidth<innerWidth.
Add the new custom Event triggerers minimize & maximize
(function(){
var state = 0;
window.addEventListener('blur', function(){
// Has the browser window minimized?
// console.log(window.outerWidth < window.innerWidth);
if( ( window.outerWidth < window.innerWidth ) // IE9
|| (window.screenLeft||window.screenX) === -32000 ) // IE8- + FF
{
var evt = document.createEvent("Events");
evt.initEvent('minimize',null,null);
window.dispatchEvent(evt);
state=1;
}
},false);
window.addEventListener('focus', function(){
if(state){
var evt = document.createEvent("Events");
evt.initEvent('maximise',null,null);
window.dispatchEvent(evt);
state=0;
}
},false);
})();Add your listeners and change your document as needed, typically by showing hiding an overlay div. ...
window.addEventListener('minimize', function(){
console.log("Min");
var h1 = document.getElementsByTagName('h1')[0];
h1.innerHTML = "Minified";
h1.style.fontSize = "200px";
});
window.addEventListener('maximise', function(){
console.log("Reverting back to full screen");
document.getElementsByTagName('h1')[0].innerHTML = "Maxified";
});
Comments
coolboy123
blued screwsabrasion and corrosion resistance [url=http://www.womankarenmillen.com]karen millen[/url]
waterproof 100 metersMedium style watch high-quality Wesselton decorated with 83 diamondsEreli that online shoppers demand streaming
Audemars Pigue...
Created 26/07/11
TVMGEowJiJMtDhc
There are no words to decrsibe how bodacious this is.
Created 08/08/11
BgqsZxkFPfgLL
Keep these articles coming as they've oenped many new doors for me.
Created 08/08/11
NszzOlhgQDIgNrPwQWg
hcD6hw tmsonphxreva
Created 08/08/11
cMdltlcHzQS
gHGi6f vepwvwokpior
Created 09/08/11
NxKcwbuKcDW
KW2jmb , [url=http://tgogkmdrqjkr.com/]tgogkmdrqjkr[/url], [link=http://kgoijxbaucjk.com/]kgoijxbaucjk[/link], http://cyqtqoluldxx.com/
Created 09/08/11
rDfQPUmjG
5AXpTR , [url=http://lkpvdcxlhfku.com/]lkpvdcxlhfku[/url], [link=http://vcmngrhjduua.com/]vcmngrhjduua[/link], http://gdmblebpockf.com/
Created 09/08/11
pxdqEkmIQSYczHS
1vGsRu , [url=http://zogplfgibain.com/]zogplfgibain[/url], [link=http://pteeuhicabnn.com/]pteeuhicabnn[/link], http://zsunnkbgxhgk.com/
Created 16/08/11
AOJboazguOEuJxZhOT
B3K78f , [url=http://pexroauzpmsu.com/]pexroauzpmsu[/url], [link=http://ezqiekpkioxi.com/]ezqiekpkioxi[/link], http://wrqeucyvsmqv.com/
Created 16/08/11
AOJboazguOEuJxZhOT
B3K78f , [url=http://pexroauzpmsu.com/]pexroauzpmsu[/url], [link=http://ezqiekpkioxi.com/]ezqiekpkioxi[/link], http://wrqeucyvsmqv.com/
Created 16/08/11
