hide cw buttons if not connected
这个提交包含在:
		
							父节点
							
								
									abd04d581a
								
							
						
					
					
						当前提交
						4a60e002b8
					
				
					共有  1 个文件被更改,包括 4 次插入 和 2 次删除
				
			
		|  | @ -1,6 +1,8 @@ | ||||||
| // Lets see if CW is selected
 | // Lets see if CW is selected
 | ||||||
| const ModeSelected = document.getElementById('mode'); | const ModeSelected = document.getElementById('mode'); | ||||||
| 
 | 
 | ||||||
|  | $('#winkey_buttons').hide(); | ||||||
|  | 
 | ||||||
| if (location.protocol == 'http:') { | if (location.protocol == 'http:') { | ||||||
|     // Do something if the page is being served over SSL
 |     // Do something if the page is being served over SSL
 | ||||||
|     $('#winkey').hide(); // Hide the CW buttons
 |     $('#winkey').hide(); // Hide the CW buttons
 | ||||||
|  | @ -132,6 +134,8 @@ async function connect() { | ||||||
|         writeToByte("0x00, 0x02"); |         writeToByte("0x00, 0x02"); | ||||||
|         writeToByte("0x02, 0x00"); |         writeToByte("0x02, 0x00"); | ||||||
| 
 | 
 | ||||||
|  |         $('#winkey_buttons').show(); | ||||||
|  | 
 | ||||||
|         reader = inputStream.getReader(); |         reader = inputStream.getReader(); | ||||||
|         readLoop(); |         readLoop(); | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|  | @ -154,8 +158,6 @@ async function writeToStream(line) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| async function writeToByte(line) { | async function writeToByte(line) { | ||||||
|     var enc = new TextEncoder(); // always utf-8
 |  | ||||||
|      |  | ||||||
|     const writer = outputStream.getWriter(); |     const writer = outputStream.getWriter(); | ||||||
|     const data = new Uint8Array([line]); |     const data = new Uint8Array([line]); | ||||||
|     writer.write(line); |     writer.write(line); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用