diff --git a/js/misc/dbusUtils.js b/js/misc/dbusUtils.js index 2813de2a7..6e15f9e14 100644 --- a/js/misc/dbusUtils.js +++ b/js/misc/dbusUtils.js @@ -62,6 +62,6 @@ export function loadSubInterfaceXML(iface, ifaceFile) { return ( xmlHeader + - xml.substr(ifaceStartIndex, ifaceEndIndex - ifaceStartIndex) + + xml.substring(ifaceStartIndex, ifaceEndIndex) + xmlFooter); } diff --git a/js/ui/calendar.js b/js/ui/calendar.js index fa683de0c..43079ed6d 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -319,7 +319,7 @@ class DBusEventSource extends EventSourceBase { let event = new CalendarEvent(id, date, end, summary); /* It's a recurring event */ if (!id.endsWith('\n')) { - const parentId = id.substr(0, id.lastIndexOf('\n') + 1); + const parentId = id.substring(0, id.lastIndexOf('\n') + 1); if (!handledRemovals.has(parentId)) { handledRemovals.add(parentId); this._removeMatching(parentId); diff --git a/js/ui/messageList.js b/js/ui/messageList.js index acc503319..dda9f22a9 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -57,7 +57,7 @@ class URLHighlighter extends St.Label { this.connect('style-changed', () => { let [hasColor, color] = this.get_theme_node().lookup_color('link-color', false); if (hasColor) { - let linkColor = color.to_string().substr(0, 7); + let linkColor = color.to_string().substring(0, 7); if (linkColor !== this._linkColor) { this._linkColor = linkColor; this._highlightUrls(); @@ -143,11 +143,11 @@ class URLHighlighter extends St.Label { let pos = 0; for (let i = 0; i < urls.length; i++) { let url = urls[i]; - let str = this._text.substr(pos, url.pos - pos); + let str = this._text.substring(pos, url.pos); markup += `${str}${url.url}`; pos = url.pos + url.url.length; } - markup += this._text.substr(pos); + markup += this._text.substring(pos); this.clutter_text.set_markup(markup); } diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index 667608796..29a015b16 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -107,7 +107,7 @@ class RunDialog extends ModalDialog.ModalDialog { if (text.lastIndexOf(' ') === -1) prefix = text; else - prefix = text.substr(text.lastIndexOf(' ') + 1); + prefix = text.substring(text.lastIndexOf(' ') + 1); let postfix = this._getCompletion(prefix); if (postfix != null && postfix.length > 0) { o.insert_text(postfix, -1); @@ -143,7 +143,7 @@ class RunDialog extends ModalDialog.ModalDialog { } if (k === 0) return ''; - return s1.substr(0, k); + return s1.substring(0, k); } let paths = GLib.getenv('PATH').split(':'); @@ -172,7 +172,7 @@ class RunDialog extends ModalDialog.ModalDialog { return null; let common = results.reduce(_getCommon, null); - return common.substr(text.length); + return common.substring(text.length); } _getCompletion(text) {