(colorStart = '#4caf50', colorEnd = '#81c784')
| 859 | } |
| 860 | } |
| 861 | function createProgressBar(colorStart = '#4caf50', colorEnd = '#81c784') { |
| 862 | if (!config.showCountdown && !config.showCountdowndrag) return null |
| 863 | const progressBar = document.createElement('div') |
| 864 | Object.assign(progressBar.style, { |
| 865 | position: 'fixed', |
| 866 | height: '6px', |
| 867 | width: '5%', |
| 868 | background: `linear-gradient(to right, ${colorStart}, ${colorEnd})`, |
| 869 | borderRadius: '3px', |
| 870 | boxShadow: '0 2px 5px rgba(0, 0, 0, 0.3)', |
| 871 | zIndex: '9999' |
| 872 | }) |
| 873 | document.body.appendChild(progressBar) |
| 874 | return progressBar |
| 875 | } |
| 876 | let mouseDownTime = 0 |
| 877 | function handleMouseDown(event) { |
| 878 | const linkElement = event.target.tagName === 'A' ? event.target : event.target.closest('a') |
no outgoing calls
no test coverage detected