Replace deprecated substr with substring

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-07-25 17:20:38 +02:00
parent 69d2f9bff9
commit 653bacd8d0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
}
function updateSelectedLineId() {
const fragmentId = window.location.hash.substr(1);
const fragmentId = window.location.hash.substring(1);
if (fragmentId && fragmentId.match(/^L\d+$/)) {
selectedLineId = fragmentId;
} else {
@@ -55,7 +55,7 @@
}
function updateSelection() {
const fragment = window.location.hash.substr(1);
const fragment = window.location.hash.substring(1);
const match = fragment.match(/(.+):H(\d+)L(\d+)(H(\d+)L(\d+))?/);
if (match && match[1] === file.path) {
selection = {