mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
There's a default alias for icons/ in apache, https://www.electrictoolbox.com/apache-icons-directory/
28 lines
697 B
JavaScript
28 lines
697 B
JavaScript
/* exported Popup */
|
|
|
|
class Popup {
|
|
constructor() {
|
|
this.div = document.getElementById('active');
|
|
this.ps = this.div.querySelectorAll('p');
|
|
this.img = this.div.querySelector('img');
|
|
}
|
|
setImgSrc(src) {
|
|
this.img.src = `assets/status-${src}.png`;
|
|
}
|
|
setStatusText(txt) {
|
|
this.ps[0].innerText = txt;
|
|
}
|
|
setStatusDesc(desc, color) {
|
|
this.ps[1].innerText = desc;
|
|
this.ps[1].style.color = color || 'black';
|
|
}
|
|
hideButton() {
|
|
document.querySelector('.button').style.display = 'none';
|
|
}
|
|
setChecked(checked) {
|
|
document.getElementById('enabled').checked = checked;
|
|
}
|
|
setToggleText(txt) {
|
|
document.getElementById('toggle').innerText = txt;
|
|
}
|
|
}
|