2

I'm doing a college project, but I've never created chrome extensions, The website is made in React and I need to run this code:

function placeMarker(a,b)
 const element = document.getElementsByClassName("guess-map__canvas-container")[0]; // html element containing needed props.
 const keys = Object.keys(element); // all keys
 const key = keys.find(key => key.startsWith("__reactFiber$")); // the React key I need to access props
 const place = element[key].return.memoizedProps.onMarkerLocationChanged 
 place({a,b});

I think this happens because Content Scripts are executed in an "isolated world" environment and I need this info from the website.

How can I fix this? I'm using manifest V3

I tried using chrome scripts but it didn't work well

NukeLuke
  • 21
  • 2

0 Answers0