How to keep the function in chrome console and run it after reloading the page?

I have a code that i want to put in chrome console

var a = document.getElementsByClassName("dispo");
if (a.length > 0) {
    for (let i = 0; i < a.length ; i++) {
        if (a[i].textContent.length > 0) {
           console.log(a[i].parentElement.textContent.substr(0,10) + " - " + a[i].textContent);   
        }
    } 
} else {
    setInterval(function(){ document.location.reload() },60000);
}

The function above gets some data from the website, but if it didn’t find the data i want it to reload every minute until the data is available.
I want to insert the code only once and leave the browser working.
So how to run the function every time i reload the page ?

document.elementFromPoint.click not work chrome console

How can i simulate click to make move with mouse in website
https://www.playok.com/p/?g=sc+

document.elementFromPoint(x,y).click();

It only works on some elements, but not in game board

Hide errors containing “props.style” from Chrome developer console

I need to hide some errors (that contain “props.style”):

enter image description here

enter image description here

that are contaminating my developer console. I figure hiding them by the word will be best. I have tried adding a few regex patterns on SO such as this one, to the filter, but they seem to hide all errors. How do I hide just the errors with “props.style” in them?

Hide errors containing a specific word from Chrome developer console

I need to hide some errors (that contain “props.style”):

enter image description here

enter image description here

that are contaminating my developer console. I figure hiding them by the word will be best. I have tried adding a few regex patterns on SO such as this one, to the filter, but they seem to hide all errors. How do I hide just the errors with “props.style” in them?

Output of chrome.tabs.executeScript is different from that of console

I am writing a chrome extension using chrome.tabs.executeScriptto get the attribute of a tag in html but I notice a difference between the result returned by this function and the result in the console.

var scriptToExec = 'document.getElementsByTagName("video")';
chrome.tabs.executeScript({ code: scriptToExec }, getResult);

function getResult(resultArray) {
if (resultArray.length > 0) {
    console.log(resultArray);
    //console.log(resultArray[0].getAttribute("name"));
};}

My test page has one video tag but I think I do not get the expected object in getResult

Could anyone tell me what am I missing pls?

Extension popup
Console

How to send MAMP PHP errors to browser console

Is there any way to redirect PHP errors from my php_error.log file to my browser’s console? This would help catch errors much faster without constantly switching between Chrome, Brackets, and Console.app.