From 13e06f7c0928e03e1d4d620b4fd0c2040f7705e5 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Thu, 24 Mar 2022 16:37:13 +0100 Subject: [PATCH] Replace deprecated String.prototype.substr() .substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher --- src/document.js | 2 +- src/view/Office.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/document.js b/src/document.js index b55894d8e..e8d275927 100644 --- a/src/document.js +++ b/src/document.js @@ -24,7 +24,7 @@ let checkingProxyStatus = false const checkProxyStatus = () => { checkingProxyStatus = true - const url = Config.get('urlsrc').substr(0, Config.get('urlsrc').indexOf('proxy.php') + 'proxy.php'.length) + const url = Config.get('urlsrc').slice(0, Config.get('urlsrc').indexOf('proxy.php') + 'proxy.php'.length) $.get(url + '?status').done(function(val) { if (val && val.status && val.status !== 'OK') { if (val.status === 'starting' || val.status === 'stopped') { diff --git a/src/view/Office.vue b/src/view/Office.vue index d4a5350bf..e80f179e5 100644 --- a/src/view/Office.vue +++ b/src/view/Office.vue @@ -81,7 +81,7 @@ export default { }, viewColor() { return view => ({ - 'border-color': '#' + ('000000' + Number(view.Color).toString(16)).substr(-6), + 'border-color': '#' + ('000000' + Number(view.Color).toString(16)).slice(-6), 'border-width': '2px', 'border-style': 'solid', })