Sha256: 30ce10e3ff76fb9227160c470c0f98f0e92ddd3122166b150954326f4048cc56

Contents?: true

Size: 1.94 KB

Versions: 10

Compression:

Stored size: 1.94 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 d="/assets/data/mdi_icons.json";var e=document.documentElement.lang;var b;function c(){return $.ajax({url:d,success:function(f){if(typeof f=="string"){a=JSON.parse(f)}if(typeof f=="object"){a=f}}})}$.when(c()).done(function(l){a.push({name:"blank",codepoint:"F068C"});var m=function(o){if(e=="en"){b="Copied to Clipboard"}else{if(e=="de"){b="Kopiert zur Zwischenablage"}else{b="Copied to Clipboard"}}var j=document.createElement("textarea");j.setAttribute("style","position:fixed;opacity:0;top:100px;left:100px;");j.value=o;document.body.appendChild(j);j.select();document.execCommand("copy");var i=document.createElement("div");i.setAttribute("class","copied");i.appendChild(document.createTextNode(b));document.body.appendChild(i);setTimeout(function(){document.body.removeChild(j);document.body.removeChild(i)},1500)};for(var f=1;f<a.length;f++){var n=document.createElement("div"),g=document.createElement("i");n.setAttribute("id","mdi-icon");g.className="mdi mdi-"+a[f].name;n.appendChild(g);var k=document.createElement("code");k.appendChild(document.createTextNode("#"+a[f].codepoint));n.appendChild(k);var h=document.createElement("span");h.appendChild(document.createTextNode(a[f].name));n.appendChild(h);g.onmouseup=(function(i){return function(){m(i.name)}})(a[f]);k.onmouseup=(function(i){return function(){m("#"+i.codepoint)}})(a[f]);h.onmouseup=(function(i){return function(){m("mdi-"+i.name)}})(a[f]);document.getElementById("icons").appendChild(n)}})})();

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
j1-template-2021.1.29 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.28 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.27 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.26 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.25 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.24 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.23 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.22 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.21 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js
j1-template-2021.1.20 assets/themes/j1/modules/mdiPreviewer/js/previewer.min.js