ScrollBar

Smart.ScrollBar

Source

window.onload = function () {
	 const mediaSlider = document.getElementById('mediaSlider'),
		alarmSlider = document.getElementById('alarmSlider'),
		volumeSlider = document.getElementById('volumeSlider'),
		lowBatterySlider = document.getElementById('lowBatterySlider'),
		powerSaverSlider = document.getElementById('powerSaverSlider');

	function setIcon() {
		let below, above, off;

		switch (this) {
			case mediaSlider:
				below = '';
				above = '';
				off = '';
				break;
			case alarmSlider:
				below = above = '';
				off = '';
				break;
			case volumeSlider:
				below = '';
				above = '';
				off = '';
				break;
		}

		if (this.value === this.min) {
			this.previousElementSibling.innerHTML = off;
		}
		else if (this.value < this.max / 2) {
			this.previousElementSibling.innerHTML = below;
		}
		else {
			this.previousElementSibling.innerHTML = above;
		}
	}

	function setBatteryLevel() {
		if (this === lowBatterySlider) {
			document.getElementById('lowBatteryAlert').textContent = this.value;
		}
		else {
			document.getElementById('powerSaver').textContent = this.value;
		}
	}

	mediaSlider.addEventListener('change', setIcon);
	alarmSlider.addEventListener('change', setIcon);
	volumeSlider.addEventListener('change', setIcon);

	lowBatterySlider.addEventListener('change', setBatteryLevel);
	powerSaverSlider.addEventListener('change', setBatteryLevel);
}
Edit

SUPPORT & LEARNING RESOURCES

LICENSE & DOWNLOAD