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

14 lines
690 B
JavaScript
Raw Normal View History

2023-02-17 18:03:03 -05:00
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)
}