static _handleRouteChange(e) {
    let article = e.article;

    if (article) {
      let scheme = location.href.startsWith('https:') ? 'https:' : 'http:';
      let queryParams = location.search;
      _hrefs.baseHref = `${scheme}${Properties.apiHost}/v2/share/${
        Properties.appVersion
      }/${article.article_collection_path}/${
        article.article_clean_title
      }${queryParams}`;
      _elements.forEach(elem => {
        let service = elem.getAttribute('data-sharing-api'),
          href = this._services[service].sharingFunction.call(this, article);

        _hrefs[service] = href;
        elem.setAttribute(
          elem.nodeName.toLowerCase() === 'a' ? 'href' : 'data-href',
          href
        );
      });
    } else {
      let queryParams = location.search;
      _hrefs.baseHref = `${document.location.href}${queryParams}`;
      _elements.forEach(elem => {
        let service = elem.getAttribute('data-sharing-api'),
          href = this._services[service].sharingFunction.call(this, article);

        _hrefs[service] = href;
        elem.setAttribute(
          elem.nodeName.toLowerCase() === 'a' ? 'href' : 'data-href',
          href
        );
      });
    }
  }
/**
   * Adds the proper sharing URLs to the buttons when the route changes
   *
   * @param {EventArgs} e - Route change event args
   * @returns {void}
   * @private
   */
Adds the proper sharing URLs to the buttons when the route changes
@param {EventArgs} e - Route change event args
@returns {void}
@private
Adds the proper sharing URLs to the buttons when the route changes @param { EventArgs } e - Route change event args @returns { void } @private
static _handleRouteChange(e) {
    let article = e.article;
    if (article) {
      let scheme = location.href.startsWith('https:') ? 'https:' : 'http:';
      let queryParams = location.search;
      _hrefs.baseHref = `${scheme}${Properties.apiHost}/v2/share/${
        Properties.appVersion
      }/${article.article_collection_path}/${
        article.article_clean_title
      }${queryParams}`;
      _elements.forEach(elem => {
        let service = elem.getAttribute('data-sharing-api'),
          href = this._services[service].sharingFunction.call(this, article);
        _hrefs[service] = href;
        elem.setAttribute(
          elem.nodeName.toLowerCase() === 'a' ? 'href' : 'data-href',
          href
        );
      });
    } else {
      let queryParams = location.search;
      _hrefs.baseHref = `${document.location.href}${queryParams}`;
      _elements.forEach(elem => {
        let service = elem.getAttribute('data-sharing-api'),
          href = this._services[service].sharingFunction.call(this, article);
        _hrefs[service] = href;
        elem.setAttribute(
          elem.nodeName.toLowerCase() === 'a' ? 'href' : 'data-href',
          href
        );
      });
    }
  }
static _handleRouteChange ( e ) { let article = e . article ; if ( article ) { let scheme = location . href . startsWith ( 'https:' ) ? 'https:' : 'http:' ; let queryParams = location . search ; _hrefs . baseHref = ` ${ scheme } ${ Properties . apiHost } ${ Properties . appVersion } ${ article . article_collection_path } ${ article . article_clean_title } ${ queryParams } ` ; _elements . forEach ( elem => { let service = elem . getAttribute ( 'data-sharing-api' ) , href = this . _services [ service ] . sharingFunction . call ( this , article ) ; _hrefs [ service ] = href ; elem . setAttribute ( elem . nodeName . toLowerCase ( ) === 'a' ? 'href' : 'data-href' , href ) ; } ) ; } else { let queryParams = location . search ; _hrefs . baseHref = ` ${ document . location . href } ${ queryParams } ` ; _elements . forEach ( elem => { let service = elem . getAttribute ( 'data-sharing-api' ) , href = this . _services [ service ] . sharingFunction . call ( this , article ) ; _hrefs [ service ] = href ; elem . setAttribute ( elem . nodeName . toLowerCase ( ) === 'a' ? 'href' : 'data-href' , href ) ; } ) ; } }
Adds the proper sharing URLs to the buttons when the route changes
 @param {EventArgs} e - Route change event args
 @returns {void}
 @private
Adds the proper sharing URLs to the buttons when the route changes @param { EventArgs } e - Route change event args @returns { void } @private