Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for whitebackground.hta

(view source code of whitebackground.hta as plain text)

  1. <html>
  2. <head>
  3.  
  4. <title>White Background</title>
  5.  
  6. <HTA:APPLICATION
  7.   APPLICATIONNAME="White Background"
  8.   ID="WhiteBackground"
  9.   VERSION="1.00"
  10.   BORDER="none"
  11.   INNERBORDER="no"
  12.   CAPTION="no"
  13.   SYSMENU="no"
  14.   MAXIMIZEBUTTON="no"
  15.   MINIMIZEBUTTON="no"
  16.   SCROLL="no"
  17.   SCROLLFLAT="yes"
  18.   SINGLEINSTANCE="yes"
  19.   WINDOWSTATE="maximize"/>
  20.  
  21. <style type="text/css">
  1. body {
  2. 	background-color: white;
  3. 	font-family: swiss,helvetica,sansserif;
  4. 	font-size: 150%;
  5. 	text-align: center;
  6. }
  1. </style>
  2.  
  3. <script type="text/javascript">
  4. if (document.addEventListener) {
  5. 	document.addEventListener( "contextmenu", function(e) {
  6. 		if ( document.getElementById( "ExitButton" ).style.display == "none" ) {
  7. 			document.getElementById( "ExitButton" ).style.display = "block";
  8. 			document.getElementById( "HelpText" ).style.display = "block";
  9. 		} else {
  10. 			document.getElementById( "ExitButton" ).style.display = "none";
  11. 			document.getElementById( "HelpText" ).style.display = "none";
  12. 		}
  13. 		e.preventDefault();
  14. 	}, false);
  15. } else {
  16. 	document.attachEvent( "oncontextmenu", function( ) {
  17. 		if ( document.getElementById( "ExitButton" ).style.display == "none" ) {
  18. 			document.getElementById( "ExitButton" ).style.display = "block";
  19. 			document.getElementById( "HelpText" ).style.display = "block";
  20. 		} else {
  21. 			document.getElementById( "ExitButton" ).style.display = "none";
  22. 			document.getElementById( "HelpText" ).style.display = "none";
  23. 		}
  24. 		window.event.returnValue = false;
  25. 	});
  26. }
  1. </script>
  2.  
  3. </head>
  4. <body onkeypress="if (window.event.keyCode==27){window.close();}">
  5.  
  6. <div style="height: 25%;"></div>
  7.  
  8. <p id="ExitButton" style="display: none; float: right; position: absolute; right: 0; top: 0; padding: 5px;"><input type="button" value="X" style="width: 3em; height: 2em; background-color: silver; font-size: 120%; font-weight: bold; color: red;" onclick="window.close( );" /></p>
  9.  
  10. <p id="HelpText" style="display: none;">To exit, press the <span onclick="window.close( );">ESC</span> key or click the <span style="background-color: silver; color: red; padding: 0.25em;" onclick="window.close( );">&nbsp;&nbsp;X&nbsp;&nbsp;</span> in the upper right corner.<br />
  11. <br />
  12. Or right-click once more to hide this text and the <span style="background-color: silver; color: red; padding: 0.25em" onclick="window.close( );">&nbsp;&nbsp;X&nbsp;&nbsp;</span> in the upper right corner again.<br />
  13. <br />
  14. <br />
  15. <br />
  16. <br />
  17. WhiteBackground.hta, Version 1.00<br />
  18. &copy; 2015 Rob van der Woude<br />
  19. <a href="http://www.robvanderwoude.com/">http://www.robvanderwoude.com</a></p>
  20.  
  21. </body>
  22. </html>

page last uploaded: 2017-07-06, 12:37