diff --git a/core/misc/form.js b/core/misc/form.js index b05ecf0b4c6..d69854780d0 100644 --- a/core/misc/form.js +++ b/core/misc/form.js @@ -295,7 +295,7 @@ } else { url = window.location; } - const hash = url.hash.substr(1); + const hash = url.hash.substring(1); if (hash) { const $target = $(`#${hash}`); $('body').trigger('formFragmentLinkClickOrHashChange', [$target]); diff --git a/core/modules/ckeditor5/js/ckeditor5.js b/core/modules/ckeditor5/js/ckeditor5.js index e204023d7a4..1d81ad30bfb 100644 --- a/core/modules/ckeditor5/js/ckeditor5.js +++ b/core/modules/ckeditor5/js/ckeditor5.js @@ -637,7 +637,7 @@ // Redirect on hash change when the original hash has an associated CKEditor 5. function redirectTextareaFragmentToCKEditor5Instance() { - const hash = window.location.hash.substr(1); + const hash = window.location.hash.substring(1); const element = document.getElementById(hash); if (element) { const editorID = getElementId(element); diff --git a/core/modules/views/js/base.js b/core/modules/views/js/base.js index 31a0147c4c0..f844ddb9366 100644 --- a/core/modules/views/js/base.js +++ b/core/modules/views/js/base.js @@ -106,7 +106,7 @@ const chars = ['#', '?', '&']; for (let i = 0; i < chars.length; i++) { if (href.includes(chars[i])) { - href = href.substr(0, href.indexOf(chars[i])); + href = href.substring(0, href.indexOf(chars[i])); } } return href; diff --git a/core/modules/views_ui/js/ajax.js b/core/modules/views_ui/js/ajax.js index 5cbd583e3c6..f534cd6ff93 100644 --- a/core/modules/views_ui/js/ajax.js +++ b/core/modules/views_ui/js/ajax.js @@ -194,7 +194,7 @@ $(once('views-ajax', '#views-tabset a')).on('click', function () { const href = $(this).attr('href'); // Cut of #views-tabset. - const displayId = href.substr(11); + const displayId = href.substring(11); const viewsPreviewId = document.querySelector( '#views-live-preview #preview-display-id', ); diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js index 34edf52d533..4cadec6186b 100644 --- a/core/modules/views_ui/js/views-admin.js +++ b/core/modules/views_ui/js/views-admin.js @@ -221,7 +221,7 @@ this.target.each(function (i) { // Ensure that the maxlength is not exceeded by prepopulating the field. const maxlength = $(this).attr('maxlength') - suffix.length; - this.value = transliterated.substr(0, maxlength) + suffix; + this.value = transliterated.substring(0, maxlength) + suffix; }); },