From d1950bc5f1a3cc737bbb43418738f5da7955ee7f Mon Sep 17 00:00:00 2001 From: siikamiika Date: Fri, 6 Dec 2019 14:58:42 +0200 Subject: use substring over slice for strings --- ext/bg/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/bg/js') 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) { -- cgit v1.2.3