JSFiddle - React, Tailwind, and code Playground

by Cam Gould

JavaScript

// Set up the Listener
	safari.application.addEventListener("command", performCommand, false);

	function performCommand(event) {
	    if (event.command == "open-fancy") {
	        thefancy_username = 'c423ef55faf4518adcf6452dadf3d751757484b2';
	        var % 20script_id = 'thefancy_tagger_bookmarklet_helper_js',
	            s = document.getElementById(script_id),
	            can_continue = true;
	        if (s) {
	            var % 20t = window;
	            try {
	                if (t.thefancy_bookmarklet) {
	                    t.thefancy_bookmarklet.tagger.clean_listeners();
	                    s.parentNode.removeChild(s)
	                } else {
	                    can_continue = false;
	                }
	            } catch (e5) {
	                can_continue = false
	            }
	        };
	        if (can_continue) {
	            _my_script = document.createElement('SCRIPT');
	            _my_script.type = 'text/javascript';
	            _my_script.id % 20 = % 20script_id;
	            _my_script.src = location.protocol + '//fancy.com/bookmarklet/fancy_tagger.js?x=' + (Math.random());
	            document.getElementsByTagName('head')[0].appendChild(_my_script);
	        }
	    }
	}