Attempt to fix img is null
This commit is contained in:
parent
d616e1049e
commit
45735523c3
|
@ -13,13 +13,8 @@
|
|||
|
||||
let isSubmitted = true;
|
||||
|
||||
// Function to reload the page
|
||||
function reloadPage() {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
// Reload the page every 20 minutes (1200000 milliseconds)
|
||||
setInterval(reloadPage, 1200000);
|
||||
setInterval(window.location.reload(), 1200000);
|
||||
while (true) {
|
||||
if (isSubmitted) {
|
||||
console.log("%cNew Wayspot", "font-weight: bold;");
|
||||
|
@ -35,7 +30,7 @@
|
|||
for (let retries = 0; retries < MAX_RETRIES; retries++) {
|
||||
try {
|
||||
// Your existing code starts here
|
||||
let url = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro-vision:generateContent?key=MY_GEMINI_KEY'
|
||||
let url = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro-vision:generateContent?key=AIzaSyB7-gSfD9pZKyTAIT7L-OVp7TPtwWKgMxU'
|
||||
var inlineData = [];
|
||||
for (let i = 0; i < base64data.length; i++) {
|
||||
inlineData.push({
|
||||
|
@ -613,8 +608,8 @@
|
|||
// Select the img element inside the div
|
||||
var img = document.querySelector('.wf-image-modal.flex-grow.bg-contain.bg-center.bg-no-repeat img');
|
||||
|
||||
if (img == null) {
|
||||
reloadPage()
|
||||
if (img === null) {
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
// Get the src attribute of the img element
|
||||
|
|
Loading…
Reference in New Issue