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!

4
  • 1
    you can run arbitrary js in the chrome console Commented Mar 5, 2020 at 23:02
  • someone asked this check the answers stackoverflow.com/questions/6657229/… I hope this will help Commented Mar 5, 2020 at 23:08
  • Tampermonkey extension Commented Mar 5, 2020 at 23:50
  • Have a look at the Greasemonkey and the Tampermonkey browser extensions They might allow you to do what you want. Commented Mar 5, 2020 at 23:55

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.