Best way to replace single line of HTML every time a particular website is loaded? (Safari on Mac)

icloudmacsafarisafari-extensions

I have to (many times a day) use 2FA codes on a website which does not support 2FA autofill.

I am able to get to to work by manually editing the HTML using inspect element, but of course the change is not permanent.

Is there a Safari extension I can use to replace that HTML element every time the website loads?

Best Answer

You could use the extension Tampermonkey, available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.

Tampermonkey uses userscripts, which are JavaScript applets, in order to modify the HTML before it executes, selectively on some websites or on all websites.

You may use it to do automatically the HTML changes that you currently do manually.

Related Question