Sha256: 5da0c980581ce6a9119deada542688ab28cdbbc1a68a6c0ed919403922b90608
Contents?: true
Size: 1.81 KB
Versions: 26
Compression:
Stored size: 1.81 KB
Contents
/* # ----------------------------------------------------------------------------- # ~/assets/themes/j1/modules/mdiPreviewer/css/previewer.js # Provides JS functions for the MDI Icon Previewer # # Product/Info: # https://jekyll.one # # Copyright (C) 2023 Juergen Adams # # J1 Theme is licensed under the MIT License. # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE.md # ----------------------------------------------------------------------------- */ (function(){var a={};var c="/assets/data/mdi_icons.json";function b(){return $.ajax({url:c,success:function(d){if(typeof d=="string"){a=JSON.parse(d)}if(typeof d=="object"){a=d}}})}$.when(b()).done(function(h){a.push({name:"blank",codepoint:"F068C"});var k=function(m){var j=document.createElement("textarea");j.setAttribute("style","position:fixed;opacity:0;top:100px;left:100px;");j.value=m;document.body.appendChild(j);j.select();document.execCommand("copy");var i=document.createElement("div");i.setAttribute("class","copied");i.appendChild(document.createTextNode("Copied to Clipboard"));document.body.appendChild(i);setTimeout(function(){document.body.removeChild(j);document.body.removeChild(i)},1500)};for(var d=0;d<a.length;d++){var l=document.createElement("div"),e=document.createElement("i");l.setAttribute("id","mdi-icon");e.className="mdi mdi-"+a[d].name;l.appendChild(e);var g=document.createElement("code");g.appendChild(document.createTextNode("#"+a[d].codepoint));l.appendChild(g);var f=document.createElement("span");f.appendChild(document.createTextNode(a[d].name));l.appendChild(f);e.onmouseup=(function(i){return function(){k(i.name)}})(a[d]);g.onmouseup=(function(i){return function(){k("#"+i.codepoint)}})(a[d]);f.onmouseup=(function(i){return function(){k("mdi-"+i.name)}})(a[d]);document.getElementById("mdi-icons").appendChild(l)}})})();
Version data entries
26 entries across 26 versions & 1 rubygems