1
Fork 0
This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus-Polestar/public/scripts/webview.js
2023-07-23 20:45:17 -04:00

14 lines
No EOL
690 B
JavaScript
Executable file

function ws() {
setTimeout(() => {
if(document.querySelector('.active .webview-navigation#Tab')){ // Check if the tab has the navigation controls
const WLSTA = () => {document.querySelector('.active .loading-indicator').style.opacity = '1'}
const WLSTO = () => {document.querySelector('.active .loading-indicator').style.opacity = '0'}
document.querySelector('.active webview').addEventListener('did-start-loading', WLSTA)
document.querySelector('.active webview').addEventListener('did-stop-loading', WLSTO)
} else
{
// Don't do anything if the tab has no navigation controls
}
}, 0200)
}