From 353e402d5be207cafcc7a0d38344775bf50dba5d Mon Sep 17 00:00:00 2001 From: Gitoffthelawn Date: Mon, 14 Feb 2022 08:40:50 -0800 Subject: [PATCH 1/2] i18n AMO and Opera links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4484c51..832a315 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ YouTube Review: Download Links: * Chrome: https://chrome.google.com/webstore/detail/user-agent-switcher-and-m/bhchdcejhohfmigjafbampogmaanbfkg - * Firefox: https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/ + * Firefox: https://addons.mozilla.org/firefox/addon/user-agent-string-switcher/ * Edge: https://microsoftedge.microsoft.com/addons/detail/useragent-switcher-and-m/cnjkedgepfdpdbnepgmajmmjdjkjnifa - * Opera: https://addons.opera.com/en/extensions/details/user-agent-switcher-8/ + * Opera: https://addons.opera.com/extensions/details/user-agent-switcher-8/ Usage Instruction: * https://add0n.com/useragent-switcher.html From 368f3029ac31e85667cd0f0372da9cdd6f8dbc44 Mon Sep 17 00:00:00 2001 From: Tobias Speicher Date: Sun, 20 Feb 2022 19:30:58 +0100 Subject: [PATCH 2/2] Replace deprecated String.prototype.substr() String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher --- extension/firefox/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/firefox/common.js b/extension/firefox/common.js index e9e80ac..bcf2ad1 100644 --- a/extension/firefox/common.js +++ b/extension/firefox/common.js @@ -333,7 +333,7 @@ const ua = { const o = ua.object(null, windowId, tab.cookieStoreId); chrome.browserAction.setBadgeText({ 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); chrome.browserAction.setBadgeText({ tabId, - text: o.platform ? o.platform.substr(0, 3) : 'BOT' + text: o.platform ? o.platform.slice(0, 3) : 'BOT' }); } },