mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-30 16:50:47 +08:00
Replace deprecated substr with substring
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user