|
1
|
/* |
|
2
|
* This script adds multiselect facility for the list of branches. |
|
3
|
* |
|
4
|
* Some info on 'const': |
|
5
|
* https://caniuse.com/const |
|
6
|
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const#browser_compatibility |
|
7
|
* |
|
8
|
* According to MDN 'const' requires Android's WebView 37, |
|
9
|
* which may not be available. |
|
10
|
* For the time being, continueing without 'const' and 'indexOf' |
|
11
|
* (but that may be reconsidered later). |
|
12
|
*/ |
|
13
|
window.addEventListener( 'load', function() { |
|
14
|
|
|
15
|
var submenu = document.querySelector("div.submenu"); |
|
16
|
var anchor = document.createElement("A"); |
|
17
|
var brlistDataObj = document.getElementById("brlist-data"); |
|
18
|
var brlistDataTxt = brlistDataObj.textContent || brlistDataObj.innerText; |
|
19
|
var brlistData = JSON.parse(brlistDataTxt); |
|
20
|
anchor.classList.add("l |