This used to be posted in the past, but I couldnt find it. Anyway, I was just cleaning up some old code and had another look at this and realized it was not filtering https links, so now it does.
In all theme footer.php files before last </body>
<script src="<?php echo $site_config["SITEURL"];?>/scripts/anon.js" type="text/javascript"></script>
<script type="text/javascript"><!--
protected_links = "<?php echo $site_config["SITEURL"];?>";
auto_anonymize();
//--></script>
place anon.js file in scripts folder or create scripts folder if its not present
 
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)