Every line of 'location href jquery' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
37 function redirectbasehref(el, responseText) { 38 var mo = responseText.match(/
17 function locationHashChanged () { 18 if (window.location.hash === '#all' || window.location.hash === '') { 19 showAll() 20 } else { 21 filterCategory(window.location.hash.substr(1)) 22 } 23 }
231 function after_setWindowLocation(win, url) { 232 goog.dom.safe.setLocationHref(win.location, url); 233 }
182 function createHref(location) { 183 return createPath(location); 184 }
76 function createHref(location) { 77 return history.createHref(resolveLocation(location)); 78 }
42 function __carrotware_SetJQueryURL(jqPath) { 43 jqURL = jqPath; 44 45 __carrotware_LoadJQuery(); 46 }
155 updateLocation(window, url) { 156 if (window === this.current) 157 this.current.url = url; 158 window.document._URL = url; 159 window.document._location = new Location(this, url); 160 }
131 function addHashIfNeeded(href) { 132 if (sniffer.history) { 133 return href; 134 } 135 var index = href.indexOf('#'); 136 if (index===-1) { 137 return href+'#'; 138 } 139 return href; 140 }
4 function loc(href){ 5 var a = document.createElement('a'); 6 var self = { 7 replace: function(href) { 8 a.href = href; 9 Regular.util.extend(this, { 10 href: a.href, 11 hash: a.hash, 12 host: a.host, 13 fragment: a.fragment, 14 pathname: a.pathname, 15 search: a.search 16 }, true) 17 if (!/^\//.test(this.pathname)) this.pathname = '/' + this.pathname; 18 return this; 19 }, 20 history: { 21 replaceState: function(obj, title, path){ 22 23 self.replace(path) 24 // a.href = path 25 }, 26 pushState: function(obj, title, path){ 27 self.replace(path) 28 } 29 } 30 } 31 return (self).replace(href) 32 }
196 resolveHref(el) { 197 if (!el) { 198 return null; 199 } 200 const closestHrefEl = el.closest('[href]'); 201 return closestHrefEl ? closestHrefEl.getAttribute('href') : null; 202 }