mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-18 03:21:07 +00:00
added handling for identical query param href/action on the same page
This commit is contained in:
parent
8d3dc2cbc2
commit
a5add9a974
1 changed files with 11 additions and 3 deletions
|
|
@ -48,9 +48,9 @@
|
|||
|
||||
if(path.isQuery( url )){
|
||||
// if the path is a list of query params and the hash is a path
|
||||
// append the query params to it. otherwise use the pathname and append
|
||||
// the query params
|
||||
return ( isHashPath ? path.stripHash( hash ) : location.pathname ) + url;
|
||||
// append the query params to the paramless version of it.
|
||||
// otherwise use the pathname and append the query params
|
||||
return ( isHashPath ? path.cleanHash( hash ) : location.pathname ) + url;
|
||||
}
|
||||
|
||||
// otherwise use the hash as the path prefix with the file and
|
||||
|
|
@ -82,6 +82,14 @@
|
|||
return url.replace( /^#/, "" );
|
||||
},
|
||||
|
||||
stripQuery: function( url ){
|
||||
return url.replace( /\?.*/, "");
|
||||
},
|
||||
|
||||
cleanHash: function( url ){
|
||||
return path.stripHash( path.stripQuery ( url ));
|
||||
},
|
||||
|
||||
//check whether a url is referencing the same domain, or an external domain or different protocol
|
||||
//could be mailto, etc
|
||||
isExternal: function( url ){
|
||||
|
|
|
|||
Loading…
Reference in a new issue