src/tracker.js
/**
   * Event handler for decorating an element with a URL (for now only
   * anchor tags)
   */
Event handler for decorating an element with a URL (for now only
anchor tags)
Event handler for decorating an element with a URL ( for now only anchor tags )
autoDecorate(elem) {
    const xdm = this.config(KEY_CROSS_DOMAIN);
    if (!xdm) return;
    const domains = isString(xdm) ? [xdm] : isArray(xdm) ? xdm : [];
    let canDecorate;
    for (let i = 0; i < domains.length; i++) {
      if (elem.hostname.indexOf(domains[i]) !== -1) {
        canDecorate = true;
        break;
      }
    }
    if (canDecorate) {
      const decorated = this.decorate(elem);
      if (decorated) {
        elem.href = decorated;
      }
    }
  }
autoDecorate ( elem ) { const xdm = this . config ( KEY_CROSS_DOMAIN ) ; if ( ! xdm ) return ; const domains = isString ( xdm ) ? [ xdm ] : isArray ( xdm ) ? xdm : [ ] ; let canDecorate ; for ( let i = 0 ; i < domains . length ; i ++ ) { if ( elem . hostname . indexOf ( domains [ i ] ) !== - 1 ) { canDecorate = true ; break ; } } if ( canDecorate ) { const decorated = this . decorate ( elem ) ; if ( decorated ) { elem . href = decorated ; } } }
Event handler for decorating an element with a URL (for now only
 anchor tags)
Event handler for decorating an element with a URL ( for now only anchor tags )
// bind an event handler on mouseup to remove the url