how to run a code on Chrome DEVTools
I have this very specific scenario on my job where I need to keep refreshing a certain page in my work so it can update new IDs. I thought about making a code that would refresh the page every 5 seconds and only stop when it finds a different ID from the ones already stored.
The problem with this approach is: Every time I run a code, like location.reload(), obviously the page refreshs and both the data and code are lost.
How would this be possible? I thought about using some external file to do that, like VBA libreoffice or even a notepad (we can't download anything), but idk how to do it. Can someone give me a light?
30 Replies
make a chrome extension that does it ?
I'm afraid we can't download extensions either:linux:
But we can open devtools, notepads, libreoffice apps
You wouldn't download it you would write it and side load it? xD
https://answers.microsoft.com/en-us/msoffice/forum/all/refesh-webpage-with-excel-vba-code/d316dbcd-43b6-41ff-af7a-1dbf97023d1d
I wonder if this would work?
You are letting me curious
How
no clue you would have to look it up
Ic
But that is an interesting idea
but there has to be away because not like you are going to write an extension and just test it from the store
π
I've never written an extension though so I'm just pissing in the wind maybe >.>;;
Devs get better by building code that helps with their laziness
freeCodeCamp.org
How to Create Your Own Google Chrome Extension
By Sampurna Chapagain If you are a Google Chrome user, you've probably used some extensions in the browser. Have you ever wondered how to build one yourself? In this article, I will show you how you can create a Chrome extension from scratch. Table ...
looks pretty damn ez π
π₯Ήyou re a life saviour
hope it works gl
If you were from the IT team and was looking in the people's logs, would you suspect an HTML, CSS and JS file creation as someone trying to do something malicious?
:linux:
I would suspect you were making a website xD
xD
no fo real you just mentioned all front end browser things
xD
Not like you are making bash scripts or something π€·ββοΈ
this would be more sus probably
Now I just need to figureout how to make it collect data from a website
ya feel me? but idk how your IT department is...
Indeed
I gotta talk with them someday
Yea you can just tell them what you doing π
if its to optimize your work then ya buddy π
For some reason the IT office there is so old and bad cared, I wonder why the company hates the IT team:linux:
π¦
System/network* admins get little love
they deal with so much shit too ... stressful job π
π€£
Reload it in an
<iframe>
?oh thats so much better of an idea xD
Where
Create a HTML page with the page you need to reload in an
<iframe>
. Then document.getElementById('some_frame_id').contentWindow.location.reload()
(as per StackOverflow).Can i also collect any data from it
Why canβt you just to a normal fetch?