diff --git a/web-extension/extractHtml.js b/web-extension/extractHtml.js index 328e8aa..3975b0d 100644 --- a/web-extension/extractHtml.js +++ b/web-extension/extractHtml.js @@ -328,7 +328,7 @@ function extractCss(appliedStyles, callback) { if (!classNames) { classNames = pre.getAttribute('id'); if (!classNames) { - classNames = pre.tagName; + classNames = pre.tagName + '-' + Math.floor(Math.random()*100000); } } var tmpName = cssClassesToTmpIds[classNames]; diff --git a/web-extension/utils.js b/web-extension/utils.js index a218918..70f299b 100644 --- a/web-extension/utils.js +++ b/web-extension/utils.js @@ -188,7 +188,7 @@ function getAbsoluteUrl(urlStr) { function removeEndingSlash(inputStr) { if (inputStr.endsWith('/')) { - return inputStr.substring(0, inputStr.length - 2); + return inputStr.substring(0, inputStr.length - 1); } return inputStr; }