| 
									
										
										
										
											2015-05-04 20:44:36 +05:30
										 |  |  | <html> | 
					
						
							|  |  |  | <body> | 
					
						
							| 
									
										
										
										
											2015-07-24 15:33:07 +08:00
										 |  |  | <script src="../../static/jquery-2.0.3.min.js"></script> | 
					
						
							| 
									
										
										
										
											2015-05-04 20:44:36 +05:30
										 |  |  | <script type="text/javascript" charset="utf-8"> | 
					
						
							| 
									
										
										
										
											2015-11-12 18:28:04 +08:00
										 |  |  |   var ipcRenderer = require('electron').ipcRenderer; | 
					
						
							| 
									
										
										
										
											2015-07-24 15:33:07 +08:00
										 |  |  |   var port = location.search.substr("?port=".length); | 
					
						
							| 
									
										
										
										
											2015-05-04 20:44:36 +05:30
										 |  |  |   $.ajax({ | 
					
						
							|  |  |  |     type: "GET", | 
					
						
							| 
									
										
										
										
											2015-07-24 15:33:07 +08:00
										 |  |  |     url: "http://127.0.0.1:" + port, | 
					
						
							| 
									
										
										
										
											2015-05-04 20:44:36 +05:30
										 |  |  |     headers: { | 
					
						
							|  |  |  |       "Authorization": "Basic " + btoa("test:test") | 
					
						
							|  |  |  |     }, | 
					
						
							| 
									
										
										
										
											2015-07-24 15:33:07 +08:00
										 |  |  |     success: function(result) { | 
					
						
							| 
									
										
										
										
											2015-11-12 18:28:04 +08:00
										 |  |  |       ipcRenderer.sendToHost(result); | 
					
						
							| 
									
										
										
										
											2015-07-24 15:33:07 +08:00
										 |  |  |     }, | 
					
						
							|  |  |  |     error: function(xhr, status, error) { | 
					
						
							| 
									
										
										
										
											2015-11-12 18:28:04 +08:00
										 |  |  |       ipcRenderer.sendToHost(error); | 
					
						
							| 
									
										
										
										
											2015-07-24 15:33:07 +08:00
										 |  |  |     }, | 
					
						
							| 
									
										
										
										
											2015-05-04 20:44:36 +05:30
										 |  |  |   }); | 
					
						
							|  |  |  | </script> | 
					
						
							|  |  |  | </body> | 
					
						
							|  |  |  | </html> |