diff --git a/schema.json b/schema.json index d8446e962..1ec5a3478 100644 --- a/schema.json +++ b/schema.json @@ -97,6 +97,19 @@ } ] }, + "css": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/non-empty-non-blank-string" + } + }, + { + "$ref": "#/definitions/non-empty-non-blank-string" + } + ] + }, "robots": { "oneOf": [ { diff --git a/src/drivers/webextension/images/icons/Vuetify.svg b/src/drivers/webextension/images/icons/Vuetify.svg new file mode 100644 index 000000000..15bbf3b98 --- /dev/null +++ b/src/drivers/webextension/images/icons/Vuetify.svg @@ -0,0 +1,6 @@ + diff --git a/src/drivers/webextension/js/content.js b/src/drivers/webextension/js/content.js index 2606e15c9..eef2ad298 100644 --- a/src/drivers/webextension/js/content.js +++ b/src/drivers/webextension/js/content.js @@ -47,6 +47,25 @@ const Content = { : resolve() )) + // CSS rules + let css = [] + + try { + for (const sheet of Array.from(document.styleSheets)) { + for (const rules of Array.from(sheet.cssRules)) { + css.push(rules.cssText) + + if (css.length >= 3000) { + break + } + } + } + } catch (error) { + // Continue + } + + css = css.join('\n') + // Script tags const scripts = Array.from(document.scripts) .filter(({ src }) => src) @@ -69,7 +88,7 @@ const Content = { Content.driver('onContentLoad', [ location.href, - { html, scripts, meta }, + { html, css, scripts, meta }, language, ]) diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index 1e93aec82..063488131 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -139,6 +139,13 @@ const Driver = { } }, + /** + * Wrapper for analyze + */ + analyze(...args) { + return analyze(...args) + }, + /** * Analyse JavaScript variables * @param {String} url @@ -216,13 +223,13 @@ const Driver = { let certIssuer = '' - if (browser) { + if (typeof browser !== 'undefined') { // Currently only works in Firefox // See https://stackoverflow.com/a/50484642 const { certificates } = await browser.webRequest.getSecurityInfo( request.requestId, { - certificateChain: true, + certificateChain: false, rawDER: false, } ) diff --git a/src/technologies.json b/src/technologies.json index c65f9c353..86c1191a8 100644 --- a/src/technologies.json +++ b/src/technologies.json @@ -979,6 +979,16 @@ "scripts": "/([\\d.rc-]+)?/angular-material(?:\\.min)?\\.js\\;version:\\1", "website": "https://material.angularjs.org" }, + "Vuetify": { + "cats": [ + 66 + ], + "icon": "Vuetify.svg", + "implies": "Vue.js", + "html": "