Tue Mar 10 2020
Copied to clipboard! Copy reply
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
var att_config = {
  // =========================== USER DEFINED CONFIGURATION ===========================
  // Non clickable text to display in the ribbon. Use empty quotes for blank text. Try to keep it under 80 characters.
  ribbonText: "Novel Coronavirus Statement",
  // Clickable text to display in the ribbon. Use empty quotes for a blank link. Keep it under 30 characters.
  ribbonLinkText: "Click for details",
  // Clickable text links to this URL
  ribbonLink: "https://meetings.asco.org/am/asco-statement-novel-coronavirus-covid-19",
  // Ribbon background color
  ribbonColor: '#008764',
  // Ribbon text color
  ribbonTextColor: '#ffffff'
  // =========================== END USER DEFINED CONFIGURATION ===========================
};
 (function() {
	"use strict";
    var text = null != att_config.ribbonText && att_config.ribbonText ? att_config.ribbonText : "", 
    ribbonLinkText = null != att_config.ribbonLinkText && att_config.ribbonLinkText ? att_config.ribbonLinkText : "", 
    ribbonLink = null != att_config.ribbonLink && att_config.ribbonLink ? att_config.ribbonLink : "",
    ribbonColor = null != att_config.ribbonColor && att_config.ribbonColor ? att_config.ribbonColor : "#008764",
    ribbonTextColor = null != att_config.ribbonTextColor && att_config.ribbonColor ?att_config.ribbonTextColor : "#ffffff",
    template = '\n  <p class="att_ribbon_text">' + text + '</p>\n  <a class="att_ribbon_link" target="_blank" rel="nofollow noopener" href="' + ribbonLink + '">' + ribbonLinkText + "</a>\n",
    style = "\n  .att_ribbon_active {\n    margin-top: 40px;\n  }\n  .att_ribbon * {\n    font-family: helvetica, arial, sans-serif;\n  }\n  .att_ribbon {\n    position: fixed;\n    top: 0;\n    left: 0;\n    height: 50px;\n    width: 100%;\n  border: 1px solid #ffffff;\n   background-color: " + ribbonColor + ";\n    color: " + ribbonTextColor + ";\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    flex-direction: row;\n  }\n  .att_ribbon_text {\n    margin: 0;\n    padding: 0;\n    font-size: 13pt;\n    line-height: 1;\n    color: " + ribbonTextColor + ";\n  }\n  .att_ribbon_link {\n    margin: 0 0 0 0.5rem;\n    padding: 0;\n    font-size: 11pt;\n    line-height: 1;\n    text-decoration: underline;\n    color: "  + ribbonTextColor + ";\n  }\n",
    handlers=function(){
    document.body.classList.add("att_ribbon_active")
    };
    injector({
    templateClass:"att_ribbon",
    template:template,
    style:style,
    handlers:handlers
    });
	"use strict";

	function injector(e) {
    	var t = null != e.el && e.el ? e.el : document.body,
 	   		l = document.createElement("div");
 	e.templateClass && l.classList.add(e.templateClass), l.innerHTML = null != e.template && e.template ? e.template.replace(/(\r\n\t|\n|\r\t)/gm, "") : "", t.appendChild(l);
 	var n = document.createElement("style");
    n.innerText = null != e.style && e.style ? e.style.replace(/(\r\n\t|\n|\r\t)/gm, "") : "", document.head.appendChild(n), null != e.handlers && "function" == typeof e.handlers && e.handlers()
    }
})();