Code back pre
<!--PreLP back to LP when click Back-->
<script type="text/javascript">
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
var lp_href;
lp_href = getParameterByName('lp_href');
if (!lp_href || lp_href == '') {
lp_href = $('a.pre-link').attr('href') + location.search;
} else {
lp_href = lp_href + location.search;
}
$('a.pre-link').attr('href', lp_href);
jQuery(document).ready(function($) {
if (window.history && window.history.pushState) {
$(window).on('popstate', function() {
var hashLocation = location.hash;
var hashSplit = hashLocation.split("#!/");
var hashName = hashSplit[1];
if (hashName !== '') {
var hash = window.location.hash;
if (hash === '') {
window.location.href=lp_href;
return false;
}
}
});
window.history.pushState('forward', null, location.search + '#forward');
}
});
</script>
Public Last updated: 2019-08-18 04:55:36 PM