web/lib/embed.js
// Generate HTML for each dialog box
Generate HTML for each dialog box
Generate HTML for each dialog box
function initTheGamma() {
  thegamma.forEach(function(info) {
    var el = document.getElementById(info.id);
    if (info.inline) {
      el.innerHTML =
        ("<a href='javascript:openDialog(\"[ID]\")' title='Click here to see the calculation behind the number.' " +
            "class='thegamma-inline' id='thegamma-[ID]-out'>(...)</a>").replace(/\[ID\]/g, info.id);
    } else {
      el.innerHTML =
        ("<div class='thegamma-edit'><a href='javascript:openDialog(\"[ID]\")'><i class='fa fa-code'></i> open source code</a></div>" +
        '<div id="thegamma-[ID]-out" class="thegamma-out"><p class="placeholder">Loading the visualization...</p></div>')
        .replace(/\[ID\]/g, info.id);
      }
  });
  loadTheGamma();
  logStarted = true;
  logEvent("page", "loaded", "", window.navigator.userAgent);
}
function initTheGamma ( ) { thegamma . forEach ( function ( info ) { var el = document . getElementById ( info . id ) ; if ( info . inline ) { el . innerHTML = ( "<a href='javascript:openDialog(\"[ID]\")' title='Click here to see the calculation behind the number.' " + "class='thegamma-inline' id='thegamma-[ID]-out'>(...)</a>" ) . replace ( / \[ID\] / g , info . id ) ; } else { el . innerHTML = ( "<div class='thegamma-edit'><a href='javascript:openDialog(\"[ID]\")'><i class='fa fa-code'></i> open source code</a></div>" + '<div id="thegamma-[ID]-out" class="thegamma-out"><p class="placeholder">Loading the visualization...</p></div>' ) . replace ( / \[ID\] / g , info . id ) ; } } ) ; loadTheGamma ( ) ; logStarted = true ; logEvent ( "page" , "loaded" , "" , window . navigator . userAgent ) ; }
Generate HTML for each dialog box
Generate HTML for each dialog box