Lines 129-131
function playSound( sound ) {
Link Here
|
129 |
} |
129 |
} |
130 |
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; |
130 |
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>'; |
131 |
} |
131 |
} |
132 |
- |
132 |
|
|
|
133 |
// For keeping the text when navigating the search tabs |
134 |
function keep_text(clicked_index) { |
135 |
var searchboxes = document.getElementsByClassName("head-searchbox"); |
136 |
var persist = searchboxes[0].value; |
137 |
|
138 |
for (i = 0; i < searchboxes.length - 1; i++) { |
139 |
if (searchboxes[i].value != searchboxes[i+1].value) { |
140 |
if (i === searchboxes.length-2) { |
141 |
if (searchboxes[i].value != searchboxes[0].value) { |
142 |
persist = searchboxes[i].value; |
143 |
} else if (searchboxes.length === 2) { |
144 |
if (clicked_index === 0) { |
145 |
persist = searchboxes[1].value; |
146 |
} |
147 |
} else { |
148 |
persist = searchboxes[i+1].value; |
149 |
} |
150 |
} else if (searchboxes[i+1].value != searchboxes[i+2].value) { |
151 |
persist = searchboxes[i+1].value; |
152 |
} |
153 |
} |
154 |
} |
155 |
|
156 |
for (i = 0; i < searchboxes.length; i++) { |
157 |
searchboxes[i].value = persist; |
158 |
} |
159 |
} |