page redirect that ignores smartedit

PHOTO EMBED

Fri Jan 07 2022 18:25:40 GMT+0000 (Coordinated Universal Time)

Saved by @davidpetrey #javascript #smartedit

<script type="text/javascript">
    if (window.parent.location.pathname.indexOf("smartedit") <= -1) {
        // Only redirect if NOT in smartedit
    	window.location.replace("/warranty-your-way");
    }else if (window.parent.location.pathname.indexOf("smartedit") >= 0){
    	// IS smartedit, show comment	
       	document.getElementById("redirectJS").style.display = "block";
	}
    
</script>

<h3 id="redirectJS" style="display: none; text-align: center;"> redirect code </h3>
content_copyCOPY