@cnbritain/merlin-frontend-statepusher-js
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -13,2 +13,4 @@ "use strict"; | ||
import { hasHistory } from '@cnbritain/merlin-frontend-utils-js/js/detect'; | ||
function StatePusher(){ | ||
@@ -48,3 +50,5 @@ this._currentIndex = -1; | ||
url = getParent( articleTitle, ".a-main, .a-main--gallery" ).getAttribute( "data-url" ) + queryParams; | ||
history.replaceState( {}, articleTitle.innerHTML, url ); | ||
if(hasHistory){ | ||
history.replaceState( {}, articleTitle.innerHTML, url ); | ||
} | ||
document.title = articleTitle.innerHTML; | ||
@@ -51,0 +55,0 @@ setStorage('last_article', url); |
{ | ||
"name": "@cnbritain/merlin-frontend-statepusher-js", | ||
"cnOptions": {}, | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A handy-dandy reusuable front-end component for great justice.", | ||
@@ -6,0 +6,0 @@ "main": "js/index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
162
8877
15
1