diff --git a/src/scripts/script.js b/src/scripts/script.js index cd6cb8b..31f2ea7 100644 --- a/src/scripts/script.js +++ b/src/scripts/script.js @@ -18,7 +18,7 @@ var registryUI = {} registryUI.URL_QUERY_PARAM_REGEX = /[&?]url=/; registryUI.URL_PARAM_REGEX = /^url=/; -registryUI.url = function() { +registryUI.url = function(byPassQueryParam) { if (!registryUI._url) { var url = registryUI.getUrlQueryParam(); if (url) { @@ -78,10 +78,14 @@ registryUI.removeServer = function(url) { } registryServer.splice(index, 1); localStorage.setItem('registryServer', JSON.stringify(registryServer)); + if (url == registryUI.url()) { + registryUI.updateHistory(registryUI.getRegistryServer(0)); + rg.router.go('home'); + } } registryUI.updateHistory = function(url) { - history.pushState(null, '', '?url=' + registryUI.encodeURI(url) + window.location.hash); + history.pushState(null, '', (url ? '?url=' + registryUI.encodeURI(url) : '?') + window.location.hash); registryUI._url = url; } diff --git a/src/style.css b/src/style.css index bdaf388..2ad3794 100644 --- a/src/style.css +++ b/src/style.css @@ -93,7 +93,7 @@ h2 { padding: 8px 0; list-style: none; } -.list>li:hover { +.list.highlight>li:hover { background-color: #eee; cursor: pointer; } diff --git a/src/tags/remove.tag b/src/tags/remove.tag index f9433bb..81011e5 100644 --- a/src/tags/remove.tag +++ b/src/tags/remove.tag @@ -15,33 +15,32 @@ along with this program. If not, see . --> - -

Remove your Registry Server ?

-
-
- -
-
-
- -
-
+ + +
Remove your Registry Server ?
+
+ +
+
+ Close +
+