Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-08 15:07:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-08 15:07:59 +0300
commite3e300557f5def9bf2271735c8a620e6820dfada (patch)
tree8d0d4590518ee17eb32956e35637e11a2b8ca561 /app/assets/javascripts/lib
parenta821bd6ad17e304ca93838a411410a44ee9cff9f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r--app/assets/javascripts/lib/utils/common_utils.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js
index 18462cc24c7..a2591180039 100644
--- a/app/assets/javascripts/lib/utils/common_utils.js
+++ b/app/assets/javascripts/lib/utils/common_utils.js
@@ -484,6 +484,16 @@ export const historyPushState = newUrl => {
};
/**
+ * Based on the current location and the string parameters provided
+ * overwrites the current entry in the history without reloading the page.
+ *
+ * @param {String} param
+ */
+export const historyReplaceState = newUrl => {
+ window.history.replaceState({}, document.title, newUrl);
+};
+
+/**
* Returns true for a String value of "true" and false otherwise.
* This is the opposite of Boolean(...).toString().
* `parseBoolean` is idempotent.