Thu Jul 30 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
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
<script>
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: "",
  // Clickable text to display in the ribbon. Use empty quotes for a blank link. Keep it under 30 characters.
  ribbonLinkText: "ASCO and Conquer Cancer gratefully acknowledge our generous supporters.",
  // Clickable text links to this URL
  ribbonLink: "https://meetings.asco.org/am/supporters",
  // Ribbon background color
  ribbonColor: '#8879B5',
  // Ribbon text color
  ribbonTextColor: '#FCFCFC'
  // =========================== END USER DEFINED CONFIGURATION ===========================
};
var bannerPlacer = 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 : "#FCFCFC",
    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    height: 46px;\n    width: 100%;\n  border: 1px solid #8879B5;\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: 13pt;\n    line-height: 1;\n    text-decoration: underline;\n    color: "  + ribbonTextColor + ";\n   } .att_ribbon_link:hover {\n color: " + ribbonTextColor + ";\n } .att_ribbon_link:visited {\n color: " + ribbonTextColor + ";\n } \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 targetNode = document.querySelector(".search-query-container"),
    		parentNode = document.querySelector(".digital-program-header-container"),
 	   		l = document.createElement("div");
	 	l.id="tntBanner";
	 	e.templateClass && l.classList.add(e.templateClass), l.innerHTML = null != e.template && e.template ? e.template.replace(/(\r\n\t|\n|\r\t)/gm, "") : "", parentNode.insertBefore(l, targetNode);
	 	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()
    }
};
bannerPlacer();

var pageWatcher = function() {
	var target = document.querySelector(".search-query-container");
	var config = {subtree: true, characterData: true, childList: true};
	var observer = new MutationObserver(function(mutations) {
		if(document.location.href.indexOf("meetinglibrary.asco.org/browse-meetings/2020%20ASCO%20Virtual%20Scientific%20Program") > -1){
			if(!document.querySelector("#tntBanner")){
				bannerPlacer();
			}
		}
		pageWatcher();
	});
	observer.observe(target, config);
}
pageWatcher();

</script>