Merge pull request #151 from CommanderRoot/rm-deprecated-substr
Replace deprecated String.prototype.substr()
This commit is contained in:
commit
4cb37cea1f
1 changed files with 2 additions and 2 deletions
|
@ -333,7 +333,7 @@ const ua = {
|
||||||
const o = ua.object(null, windowId, tab.cookieStoreId);
|
const o = ua.object(null, windowId, tab.cookieStoreId);
|
||||||
chrome.browserAction.setBadgeText({
|
chrome.browserAction.setBadgeText({
|
||||||
tabId,
|
tabId,
|
||||||
text: o && o.platform ? o.platform.substr(0, 3) : ''
|
text: o && o.platform ? o.platform.slice(0, 3) : ''
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,7 @@ const ua = {
|
||||||
const o = ua.object(tabId, undefined, cookieStoreId);
|
const o = ua.object(tabId, undefined, cookieStoreId);
|
||||||
chrome.browserAction.setBadgeText({
|
chrome.browserAction.setBadgeText({
|
||||||
tabId,
|
tabId,
|
||||||
text: o.platform ? o.platform.substr(0, 3) : 'BOT'
|
text: o.platform ? o.platform.slice(0, 3) : 'BOT'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue