I'm trying to change the text of a web page that doesn't have an assigned ID.
I can't use HTML or script tags.
I can only do custom #CSS and custom raw #Javascript. Can someone help me here?
I can change the text in CSS and JS without any problem when there is an ID. But of course, if the text doesn't have an ID, I have to go back to find an ID, and that deletes things in a block
Here for my example, I would like to change only "Powered by " and keep the rest.
=> More informations about this toot | More toots from Elsental@shelter.moe
I've been offered this before. But it doesn't work :
document.addEventListener('DOMContentLoaded', function () {
const span = Array.from(document.querySelectorAll('span'))
.find(el => el.textContent.trim() === 'Powered by ');
if (span) {
span.textContent = 'New text';
}
});
$(document).ready(function() {
const span = $('span').filter(function() {
return $(this).text().trim() === 'Powered by ';
});
if (span.length) {
span.text('New text');
}
});
=> More informations about this toot | More toots from Elsental@shelter.moe
text/gemini
This content has been proxied by September (3851b).