added script which should convert normal links into javascript links
This commit is contained in:
		
							parent
							
								
									340669c5eb
								
							
						
					
					
						commit
						e316557ac8
					
				
					 2 changed files with 109 additions and 0 deletions
				
			
		
							
								
								
									
										19
									
								
								index.html
									
										
									
									
									
								
							
							
						
						
									
										19
									
								
								index.html
									
										
									
									
									
								
							|  | @ -29,6 +29,25 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>. | |||
| 	<script type="text/javascript" src="jquery-ui-1.10.4.custom.min.js"></script> | ||||
| 	<script type="text/javascript" src="jquery-cookie-1.4.0.js"></script> | ||||
| 	<script type="text/javascript" src="uhr.js"></script> | ||||
| 	<script type="text/javascript"> | ||||
| 	(function(doc, nav, standalone) { | ||||
| 		if ((standalone in nav) && nav[standalone]) { | ||||
| 			var curnode; | ||||
| 			var loc = doc.location; | ||||
| 			var stop = /^(a|html)$/i; | ||||
| 			doc.addEventListener('click', function(e) { | ||||
| 				curnode = e.target; | ||||
| 				while (!(stop).test(curnode.nodeName)) { | ||||
| 					curnode = curnode.parentNode; | ||||
| 				} | ||||
| 				if ('href' in curnode && (curnode.href.indexOf('http') || ~curnode.href.indexOf(location.host)) { | ||||
| 					e.preventDefault(); | ||||
| 					location.href=curnode.href; | ||||
| 				} | ||||
| 			}, false); | ||||
| 		} | ||||
| 	}(document, window.navigator, 'standalone')); | ||||
| 	</script> | ||||
| </head> | ||||
| <body style="padding:0;margin:0;"> | ||||
| 	<div id="uhr"></div> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue