So, I wanted to execute some JavaScript into my Android app that is in Java, but when testing the JavaScript that has to run; in the Chrome Console (Ctrl-Shift-J
), I get the following error:
Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
The site is chess.com, and the error occurs when I run the following code:
document.body.innerHTML = document.body.innerHTML.replace(`<button type="button" class="ui_v5-button-component ui_v5-button-primary ui_v5-button-large ui_v5-button-full">
Play
</button>`, `<button type="button" id="jhghjikjhgbjinb" class="ui_v5-button-component ui_v5-button-primary ui_v5-button-large ui_v5-button-full">
Play
</button>`);
What I'm trying to do is access the "Play" button on this site and click it. Is there any other way to do the same? I tried using document.getElementsByClassName()
, but how can I change the website's content?