I'm trying to modify a webpage I access that has a table with a bunch of rows. I'd like to loop through and compare a name in that row with a name on another list I have, if it's there make that name in the table red. I don't have any code yet, but I'm lost when it comes to figuring out how to run this code when I run the webpage in my chrome browser. Does anyone have an example or tutorial about how to do this? Most posts on this topic are many years old and it's been hard to find this info. I appreciate your help!
Asked
Active
Viewed 1,073 times
0
-
1you can run arbitrary js in the chrome console – stjns Mar 05 '20 at 23:02
-
someone asked this check the answers https://stackoverflow.com/questions/6657229/how-can-i-edit-javascript-in-my-browser-like-i-can-use-firebug-to-edit-css-html I hope this will help – sohib shaheen Mar 05 '20 at 23:08
-
Tampermonkey extension – epascarello Mar 05 '20 at 23:50
-
Have a look at the _Greasemonkey_ and the _Tampermonkey_ browser extensions They _might_ allow you to do what you want. – Stephen P Mar 05 '20 at 23:55
1 Answers
1
It sounds like what you're trying to do is modify the structure of a webpage you don't own the code to. While you can use the developer tools to run arbitrary JS, that becomes tedious to do every single time.
I think what you want is a browser plugin. Check out the resources below:
Chrome: https://developer.chrome.com/extensions/getstarted
Firefox: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension
There may also be specific browser plugins already that let you run arbitrary JS code on certain pages, but I am not aware of any myself.

Dr_Derp
- 1,185
- 6
- 17
-
1Thank you, this is what I'm looking for. Thanks for taking the time to understand what I actually needed and giving a great answer! – john Mar 05 '20 at 23:52