Giving radio buttons more descriptive ids

pull/1/head
Dave Hoover 9 years ago
parent 24cfd755cf
commit 7622bdd085
  1. 13
      index.html
  2. 6
      src/app/execution-context.js

@ -99,19 +99,18 @@
</div>
<div id="envView">
<span id="executionContext">
<label for="vm">
<input id="vm" type="radio" value="vm" checked name="executionContext">
<label for="vm-mode">
<input id="vm-mode" type="radio" value="vm" checked name="executionContext">
<strong>JavaScript VM</strong>
<p>Execution environment does not connect to any node, everything is local and in memory only.</p>
</label>
<label for="injected">
<input id="injected" type="radio" value="injected" checked name="executionContext">
<label for="injected-mode">
<input id="injected-mode" type="radio" value="injected" checked name="executionContext">
<strong>Injected Web3</strong>
<p>Execution environment has been provided by Mist or similar provider.</p>
</label>
<label for="_web3">
<!-- This element cannot be named web3 due to this HTML quirk: http://www.2ality.com/2012/08/ids-are-global.html. In order to detect when web3 is injected by Mist, MetaMask, etc, there cannot be any HTML elements with and id of web3. -->
<input id="_web3" type="radio" value="web3" name="executionContext">
<label for="web3-mode">
<input id="web3-mode" type="radio" value="web3" name="executionContext">
<strong>Web3 Provider</strong>
<p>Execution environment connects to node at localhost (or via IPC if available), transactions will be sent to the network and can cause loss of money or worse!<br/>
<b>If this page is served via https and you access your node via http, it might not work. In this case, try cloning the repository and serving it via http.</b></p>

@ -21,9 +21,9 @@ function ExecutionContext (compiler) {
return web3;
};
var $injectedToggle = $('#injected');
var $vmToggle = $('#vm');
var $web3Toggle = $('#web3');
var $injectedToggle = $('#injected-mode');
var $vmToggle = $('#vm-mode');
var $web3Toggle = $('#web3-mode');
var $web3endpoint = $('#web3Endpoint');
if (web3.providers && web3.currentProvider instanceof web3.providers.IpcProvider) {

Loading…
Cancel
Save