mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
* Implemented Selenium based web browing. Replaced the default web browsing function with one that uses selenium to gather information with a visual and an overlay. Included a small bug fix for the missing google api key that would attempt to use official google with default api keys from the template. * Fixed flake8 issues.
30 lines
804 B
JavaScript
30 lines
804 B
JavaScript
const overlay = document.createElement('div');
|
|
Object.assign(overlay.style, {
|
|
position: 'fixed',
|
|
zIndex: 999999,
|
|
top: 0,
|
|
left: 0,
|
|
width: '100%',
|
|
height: '100%',
|
|
background: 'rgba(0, 0, 0, 0.7)',
|
|
color: '#fff',
|
|
fontSize: '24px',
|
|
fontWeight: 'bold',
|
|
display: 'flex',
|
|
justifyContent: 'center',
|
|
alignItems: 'center',
|
|
});
|
|
const textContent = document.createElement('div');
|
|
Object.assign(textContent.style, {
|
|
textAlign: 'center',
|
|
});
|
|
textContent.textContent = 'AutoGPT Analyzing Page';
|
|
overlay.appendChild(textContent);
|
|
document.body.append(overlay);
|
|
document.body.style.overflow = 'hidden';
|
|
let dotCount = 0;
|
|
setInterval(() => {
|
|
textContent.textContent = 'AutoGPT Analyzing Page' + '.'.repeat(dotCount);
|
|
dotCount = (dotCount + 1) % 4;
|
|
}, 1000);
|