diff options
| author | mrmr1993 | 2016-02-22 15:59:24 +0000 | 
|---|---|---|
| committer | mrmr1993 | 2016-02-22 15:59:24 +0000 | 
| commit | c96a11b542263d14ed0c6e0ee11de8604992e058 (patch) | |
| tree | a1481d106771ccd00b2276388b339f0a52f24cd2 /pages | |
| parent | 8a540759e250f44dafa07daf90131f109f672c6a (diff) | |
| download | vimium-c96a11b542263d14ed0c6e0ee11de8604992e058.tar.bz2 | |
Include branch information in the logging page
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/logging.coffee | 8 | ||||
| -rw-r--r-- | pages/logging.html | 7 | 
2 files changed, 15 insertions, 0 deletions
| diff --git a/pages/logging.coffee b/pages/logging.coffee index 7950cc6c..5c2821d9 100644 --- a/pages/logging.coffee +++ b/pages/logging.coffee @@ -2,6 +2,14 @@ $ = (id) -> document.getElementById id  document.addEventListener "DOMContentLoaded", ->    $("vimiumVersion").innerText = Utils.getCurrentVersion() +    chrome.storage.local.get "installDate", (items) ->      $("installDate").innerText = items.installDate.toString() +  branchRefRequest = new XMLHttpRequest() +  branchRefRequest.addEventListener "load", -> +    $("branchRef").innerText = branchRefRequest.responseText +    $("branchRef-wrapper").classList.add "no-hide" +  branchRefRequest.open "GET", chrome.extension.getURL ".git/HEAD" +  branchRefRequest.send() + diff --git a/pages/logging.html b/pages/logging.html index 409fa8e9..b69902b3 100644 --- a/pages/logging.html +++ b/pages/logging.html @@ -24,6 +24,12 @@          width: 100%;          height: 80%;        } +      #branchRef-wrapper { +        display: none; +      } +      #branchRef-wrapper.no-hide { +        display: block; +      }      </style>    </head> @@ -35,6 +41,7 @@        <br />        Version: <span id="vimiumVersion"></span><br />        Installed: <span id="installDate"></span> +      <div id="branchRef-wrapper">Branch: <span id="branchRef"></span></div>      </div>    </body>  </html> | 
