Skip to content

Commit

Permalink
Merge pull request #282 from CommanderRoot/refactor/rm-deprecated-substr
Browse files Browse the repository at this point in the history
Replace deprecated String.prototype.substr()
  • Loading branch information
juliushaertl committed Apr 12, 2022
2 parents 49939f1 + 13e06f7 commit 43b9666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
2 changes: 1 addition & 1 deletion src/view/Office.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
Expand Down

0 comments on commit 43b9666

Please sign in to comment.