From d1950bc5f1a3cc737bbb43418738f5da7955ee7f Mon Sep 17 00:00:00 2001 From: siikamiika Date: Fri, 6 Dec 2019 14:58:42 +0200 Subject: [PATCH] use substring over slice for strings --- ext/bg/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index b2bc172f..d2e0fd56 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -360,7 +360,7 @@ class DisplaySearch extends Display { setTitleText(text) { // Chrome limits title to 1024 characters if (text.length > 1000) { - text = text.slice(0, 1000) + '...'; + text = text.substring(0, 1000) + '...'; } if (text.length === 0) {