SOLVED FROM JAVASCRIPT
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split(‘&’),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split(‘=’);
if (sParameterName[0] === sParam) {
return typeof sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
}
}
return false;
};
var urlParams = new URLSearchParams(window.location.search);
if(urlParams.has(‘s’) == true) {
var paramValue = getUrlParameter(‘s’);
jQuery(“a[rel=’bookmark’]”).each(function(){
var value = jQuery(this).attr(‘href’);
if(value == ‘https://example.com/’) {
jQuery(this).attr(‘href’,’https://example.com/?hilite=%27’+paramValue+’%27′)
}
})
}
-
This reply was modified 3 years, 9 months ago by mhariszafar.