Fix svg height, add conversion options and options to use differents data from GitHub account (#35)
* Display all features on web instance but disable them when they're not enabled * Resize dynamically SVG output and add support to convert images to jpeg/png * Disable animations when computing height * Add option to disable animations * Add options to specify different data from used GitHub account * Update tests
This commit is contained in:
@@ -6,11 +6,10 @@
|
||||
if ((!enabled)||(!q.pagespeed)||(!data.user.websiteUrl))
|
||||
return null
|
||||
//Parameters override
|
||||
let {"pagespeed.detailed":detailed = false, "pagespeed.screenshot":screenshot = false} = q
|
||||
let {"pagespeed.detailed":detailed = false, "pagespeed.screenshot":screenshot = false, "pagespeed.url":url = data.user.websiteUrl} = q
|
||||
//Duration in days
|
||||
detailed = !!detailed
|
||||
//Format url if needed
|
||||
let url = data.user.websiteUrl
|
||||
if (!/^https?:[/][/]/.test(url))
|
||||
url = `https://${url}`
|
||||
const result = {url, detailed, scores:[], metrics:{}}
|
||||
|
||||
Reference in New Issue
Block a user