Rev2055, Don't add ? to url if start with # using replaceState and pushState
This commit is contained in:
parent
e42631932b
commit
34a6337c01
3 changed files with 7 additions and 3 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.5.4"
|
||||
self.rev = 2054
|
||||
self.rev = 2055
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -149,7 +149,9 @@ class Wrapper
|
|||
back = window.location.pathname
|
||||
if back.match /^\/[^\/]+$/ # Add / after site address if called without it
|
||||
back += "/"
|
||||
if query.replace("?", "")
|
||||
if query.startsWith("#")
|
||||
back = query
|
||||
else if query.replace("?", "")
|
||||
back += "?"+query.replace("?", "")
|
||||
return back
|
||||
|
||||
|
|
|
@ -1005,7 +1005,9 @@ jQuery.extend( jQuery.easing,
|
|||
if (back.match(/^\/[^\/]+$/)) {
|
||||
back += "/";
|
||||
}
|
||||
if (query.replace("?", "")) {
|
||||
if (query.startsWith("#")) {
|
||||
back = query;
|
||||
} else if (query.replace("?", "")) {
|
||||
back += "?" + query.replace("?", "");
|
||||
}
|
||||
return back;
|
||||
|
|
Loading…
Reference in a new issue