handlePageLoad(e) {
    const currentPattern = this.getPatternParam();

    if (currentPattern) {
      document.title = 'Pattern Lab - ' + currentPattern;

      const addressReplacement =
        window.location.protocol === 'file:'
          ? null
          : window.location.protocol +
            '//' +
            window.location.host +
            window.location.pathname.replace('index.html', '') +
            '?p=' +
            currentPattern;

      if (this.dontWipeBrowserHistory === true) {
        window.history.replaceState(
          {
            currentPattern: currentPattern,
          },
          null,
          addressReplacement
        );
        this.dontWipeBrowserHistory = false;
      } else {
        window.history.pushState(
          {
            currentPattern: currentPattern,
          },
          null,
          addressReplacement
        );
      }
    }
  }
// adds / updates the page's query string
adds / updates the page's query string
adds / updates the page ' s query string
handlePageLoad(e) {
    const currentPattern = this.getPatternParam();
    if (currentPattern) {
      document.title = 'Pattern Lab - ' + currentPattern;
      const addressReplacement =
        window.location.protocol === 'file:'
          ? null
          : window.location.protocol +
            '//' +
            window.location.host +
            window.location.pathname.replace('index.html', '') +
            '?p=' +
            currentPattern;
      if (this.dontWipeBrowserHistory === true) {
        window.history.replaceState(
          {
            currentPattern: currentPattern,
          },
          null,
          addressReplacement
        );
        this.dontWipeBrowserHistory = false;
      } else {
        window.history.pushState(
          {
            currentPattern: currentPattern,
          },
          null,
          addressReplacement
        );
      }
    }
  }
handlePageLoad ( e ) { const currentPattern = this . getPatternParam ( ) ; if ( currentPattern ) { document . title = 'Pattern Lab - ' + currentPattern ; const addressReplacement = window . location . protocol === 'file:' ? null : window . location . protocol + '//' + window . location . host + window . location . pathname . replace ( 'index.html' , '' ) + '?p=' + currentPattern ; if ( this . dontWipeBrowserHistory === true ) { window . history . replaceState ( { currentPattern : currentPattern , } , null , addressReplacement ) ; this . dontWipeBrowserHistory = false ; } else { window . history . pushState ( { currentPattern : currentPattern , } , null , addressReplacement ) ; } } }
adds / updates the page's query string
adds / updates the page ' s query string