From 6711dc8f820470aa150f7955e88b309e6da5f8e2 Mon Sep 17 00:00:00 2001 From: Chris Pederick Date: Tue, 4 Apr 2017 18:26:02 -0700 Subject: [PATCH] 'Edit CSS' did not display stylesheet names correctly --- configuration/firefox/configuration.properties | 2 +- source/common/javascript/dashboard/dashboard.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configuration/firefox/configuration.properties b/configuration/firefox/configuration.properties index 2539ab9..16b0597 100644 --- a/configuration/firefox/configuration.properties +++ b/configuration/firefox/configuration.properties @@ -1,3 +1,3 @@ common.prefix=chrome://web-developer/content description=Adds a menu and a toolbar with various web developer tools. -version=1.2.12 +version=1.2.13 diff --git a/source/common/javascript/dashboard/dashboard.js b/source/common/javascript/dashboard/dashboard.js index 82426fa..199bf71 100644 --- a/source/common/javascript/dashboard/dashboard.js +++ b/source/common/javascript/dashboard/dashboard.js @@ -14,8 +14,14 @@ WebDeveloper.Dashboard.formatURL = function(url) // If the URL is set if(url) { - var lastSlashIndex = url.lastIndexOf("/"); - var queryStringIndex = url.indexOf("?", lastSlashIndex); + var lastSlashIndex = 0; + var queryStringIndex = 0; + + // Required to fix memory corruption (?) resulting in garbled URL in Firefox 52+ + url = " " + url; + + lastSlashIndex = url.lastIndexOf("/"); + queryStringIndex = url.indexOf("?", lastSlashIndex); // If there is no query string if(queryStringIndex == -1)