Sha256: 769b3cc2373b3d87827e66e2677bb60ae1f2f7b7a1c880a5955621e80882ba77
Contents?: true
Size: 1.83 KB
Versions: 31
Compression:
Stored size: 1.83 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) 2021 Juergen Adams # # J1 Template is licensed under the MIT License. # See: https://github.com/jekyll-one-org/J1 Template/blob/master/LICENSE # ----------------------------------------------------------------------------- */ (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=1;d<a.length;d++){var l=document.createElement("div"),e=document.createElement("i");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);f.onclick=(function(i){return function(){}})(a[d]);e.onmouseup=(function(i){return function(){k("\\"+i.codepoint)}})(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("icons").appendChild(l)}})})();
Version data entries
31 entries across 31 versions & 1 rubygems