<yt-formatted-string id="subscriber-count" class="style-scope ytd-c4-tabbed-header-renderer" aria-label="2.24 million subscribers">2.24M subscribers</yt-formatted-string>
And I have tried this:
var get=document.getElementById('test'); var str=get.innerHTML; document.write(str.replace("Rindan's","TestNAme"));
But it instead deleted the whole page and left the number in without the subscribers string so semi-success. Can anyone help me get this reliably working? Sorry for the weird formatting, the text editor for stackoverflow isn’t great.
You can just set innerHtml of the element without writing
var get=document.getElementById('subscriber-count'); var str=get.innerHTML; get.innerHTML = str.replaceAll("subscribers","");
Something like this https://codepen.io/mikhail-vnukov/pen/QWvbeeW