diff options
author | CommanderRoot <CommanderRoot@users.noreply.github.com> | 2022-05-03 15:52:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 15:52:45 +0300 |
commit | 56640ae815fbace78c62482711cb1733d26cee5e (patch) | |
tree | 18078e6b9ec3e8ffe7cc6ac28e4c8f0a309bce94 /plugins/Overlay | |
parent | 34ea7bbfcbc5a79a5c7b675b8cd2134cdda74cbe (diff) |
Replace deprecated String.prototype.substr() (#19111)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Diffstat (limited to 'plugins/Overlay')
-rw-r--r-- | plugins/Overlay/javascripts/Piwik_Overlay.js | 2 | ||||
-rw-r--r-- | plugins/Overlay/templates/startOverlaySession.twig | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Overlay/javascripts/Piwik_Overlay.js b/plugins/Overlay/javascripts/Piwik_Overlay.js index 57693d0de2..9ce5302d85 100644 --- a/plugins/Overlay/javascripts/Piwik_Overlay.js +++ b/plugins/Overlay/javascripts/Piwik_Overlay.js @@ -380,7 +380,7 @@ var Piwik_Overlay = (function () { var currentHashStr = broadcast.getHash(); if (currentHashStr.charAt(0) == '?') { - currentHashStr = currentHashStr.substr(1); + currentHashStr = currentHashStr.slice(1); } currentHashStr = broadcast.updateParamValue('l=' + newFrameLocation, currentHashStr); diff --git a/plugins/Overlay/templates/startOverlaySession.twig b/plugins/Overlay/templates/startOverlaySession.twig index d99dc5f6fb..7e8b4d56ac 100644 --- a/plugins/Overlay/templates/startOverlaySession.twig +++ b/plugins/Overlay/templates/startOverlaySession.twig @@ -12,7 +12,7 @@ var match = false; var parser = document.createElement('a'); - var urlToRedirect = window.location.hash.substr(1); + var urlToRedirect = window.location.hash.slice(1); parser.href = urlToRedirect; var hostToRedirect = parser.hostname; |