From 4e72e291c14d21c1c6d14426dd8c942235a807e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=CC=81lint=20Szekeres?= Date: Fri, 13 Dec 2019 00:14:12 +0100 Subject: [PATCH] remove query string, getUrl() fix --- .eslintrc | 1 + resources/js/app.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 609f9ab..1b2b720 100644 --- a/.eslintrc +++ b/.eslintrc @@ -37,6 +37,7 @@ }] }, "globals": { + "window": true, "angular": true, "gtag": true, "dataLayer": true, diff --git a/resources/js/app.js b/resources/js/app.js index 94b1e76..00e8bd6 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,8 +1,19 @@ (function() { 'use strict'; + // remove query string + window.history.replaceState( + {}, + '', + window.location.href.replace(window.location.search, '') + ); +})(); + +(function() { + 'use strict'; + angular .module('NginxConfigIoApp', ['ngSanitize', 'ngclipboard', '720kb.tooltips']) .config([ @@ -625,7 +636,7 @@ }; $scope.getUrl = function() { - return $location.absUrl().replace(/#.*$/, ''); + return $location.absUrl(); }; $scope.addSite = function() {