Great script idea! keeping this. Note, this does not prevent the initial loading of the embed itself, just replaces the embed with the link. The total transfer size of a page is still the same. If only there was a way to prevent the loading AND keep the link replacement.
schiffern|1 year ago
I should have mentioned this is paired with uBlock Origin to block Youtube iframes (and indeed all iframes) globally. At the time I was writing it to unbreak embedded videos.
https://github.com/gorhill/uBlock/wiki/Dynamic-filtering:-qu...
https://github.com/gorhill/uBlock/wiki/Blocking-mode
https://github.com/gorhill/uBlock/wiki/Blocking-mode:-medium...
From uBO My Rules tab:
To block all iframes (except sites you whitelist, see links above):Featherknight|1 year ago
I do have the 3rd party iframes blocked globally in uBo Firefox and works great with your script to replace the placeholder elements but Safari lacks an alternative sadly afaik
unknown|1 year ago
[deleted]