// ==UserScript== // @name Mastodon identicon adder // @namespace http://tampermonkey.net/ // @version 0.1 // @description Apply eyeballs to URIs better. // @author feonixrift // @grant none // require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js // @require https://cdn.jsdelivr.net/npm/jdenticon@2.1.1 // @downloadURL none // ==/UserScript== // Techniques learned from https://openuserjs.org/scripts/nokeya/Direct_links_out/source // Jquery dependency only exists because I can't figure out how to get the jdenticon function to run directly (function() { 'use strict'; function identicate(link){ var identicon = document.createElement("svg") identicon.setAttribute('data-jdenticon-value', link.href) identicon.setAttribute('style', 'width: 48px; height: 48px;') link.parentNode.appendChild(identicon, link.parentNode.children[0]); // $.fn.jdenticon() jdenticon.update(identicon) } function alldenticate(){ var links = document.getElementsByClassName('status__avatar'); for (var i=0; i