You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1 lines
1.9 KiB

!function(){"use strict";var a=Object.create(null);function e(a){var e=a.querySelector("[data-tag-cloud-container]");e&&(e.style.display="none")}function t(t){var n=function(){var n;(n=t.dataset.scriptSrc||"/js/tagcanvas.js",a[n]||(a[n]=new Promise((function(a,e){var t=document.createElement("script");t.src=n,t.async=!0,t.onload=a,t.onerror=e,document.head.appendChild(t)}))),a[n]).then((function(){!function(a){if("true"!==a.dataset.tagCloudInitialized){var t=a.dataset.canvasId;if(t&&document.getElementById(t)&&window.TagCanvas)try{TagCanvas.textFont=a.dataset.textFont||"Trebuchet MS, Helvetica",TagCanvas.textColour=a.dataset.textColour||"#333",TagCanvas.textHeight=Number(a.dataset.textHeight||20),TagCanvas.outlineColour=a.dataset.outlineColour||"#E2E1D1",TagCanvas.maxSpeed=Number(a.dataset.maxSpeed||.1),TagCanvas.freezeActive="false"!==a.dataset.freezeActive,TagCanvas.outlineMethod="block",TagCanvas.minBrightness=.2,TagCanvas.depth=.92,TagCanvas.pulsateTo=.6,TagCanvas.initial=[.1,-.1],TagCanvas.decel=.98,TagCanvas.reverse=!0,TagCanvas.hideTags=!1,TagCanvas.shadow="#ccf",TagCanvas.shadowBlur=3,TagCanvas.weight=!1,TagCanvas.imageScale=null,TagCanvas.fadeIn=1e3,TagCanvas.clickToFront=600,TagCanvas.lock=!1,TagCanvas.Start(t),TagCanvas.tc&&TagCanvas.tc[t]&&TagCanvas.tc[t].Wheel(!0),a.dataset.tagCloudInitialized="true"}catch(t){console.warn("Failed to initialize tag cloud.",t),e(a)}}}(t)})).catch((function(a){console.warn("Failed to load tag cloud script.",a),e(t)}))};"requestIdleCallback"in window?window.requestIdleCallback(n,{timeout:1500}):window.setTimeout(n,0)}function n(a){if("IntersectionObserver"in window){var e=new IntersectionObserver((function(a){a.forEach((function(a){a.isIntersecting&&(e.unobserve(a.target),t(a.target))}))}),{rootMargin:"200px 0px"});e.observe(a)}else t(a)}function o(){document.querySelectorAll("[data-tag-cloud]").forEach(n)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o,{once:!0}):o()}();