0

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!

john
  • 775
  • 3
  • 15
  • 31

1 Answers1

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
  • 1
    Thank 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