Optimization.

This commit is contained in:
Laurent Espitallier 2017-07-22 19:52:06 +02:00
parent 4b5cfb1832
commit 05978691ba

View File

@ -12,11 +12,11 @@ function shareURL(){
// manages Mozilla Firefox reader mode // manages Mozilla Firefox reader mode
var rawUrl = tab.url; var rawUrl = tab.url;
var partToRemove = partToRemove = "about:reader?url="; var partToRemove = "about:reader?url=";
if(rawUrl.includes(partToRemove)) { if(rawUrl.includes(partToRemove)) {
rawUrl = rawUrl.substring(partToRemove.length); rawUrl = rawUrl.substring(partToRemove.length);
rawUrl = decodeURIComponent(rawUrl); rawUrl = decodeURIComponent(rawUrl);
} }
var url = instance + "/bookmarks.php?action=add&address=" + encodeURIComponent(rawUrl) + "&title=" + encodeURIComponent(tabs[0].title); var url = instance + "/bookmarks.php?action=add&address=" + encodeURIComponent(rawUrl) + "&title=" + encodeURIComponent(tabs[0].title);
widthInt = Number(windowWidth); widthInt = Number(windowWidth);