User:Christian Sirolli/common.js

(function {    'use strict';    var tt = document.getElementsByClassName('timelineTemplate');    if (tt !== null) {        [].slice.call(tt).forEach(function (t) { var i = document.createElement('iframe'); i.src = 'https://cdn.knightlab.com/libs/timeline3/latest/embed/index.html?source=1ulQOdFOc3EHA4oHKAMu72XRbezXE7imScH6mAUA0mR4&font='+t.getAttribute('data-font')+'&lang=en&timenav_position='+t.getAttribute('data-pos')+'&initial_zoom='+Number(t.getAttribute('data-zoom'))+'&hash_bookmark=true&timenav_height_percentage='+Number(t.getAttribute('data-nav-height'))+'&timenav_mobile_height_percentage='+Number(t.getAttribute('data-nav-mobile-height'))+'&slide_padding_lr='+Number(t.getAttribute('data-slide-padding'))+'&embed=true#'+t.getAttribute('data-hash'); i.height = t.getAttribute('data-height'); i.width = t.getAttribute('data-width'); console.log(i); t.appendChild(i); });   } });