Skip to content

Commit 3890d5d

Browse files
committed
1 parent 3e36940 commit 3890d5d

File tree

6 files changed

+2157
-2359
lines changed

6 files changed

+2157
-2359
lines changed

extension/js/background.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ const formatPrometheusMetrics = (body) => {
1919
// line is a comment
2020
tmp = line.match(/^# (?:HELP|TYPE) ([^ ]+)/)
2121
if (tmp && tmp.length > 1) {
22-
let metricName = tmp[1]
22+
const metricName = tmp[1]
2323

2424
// First comment, don't render closing </section>
25-
if (previousMetricName == '') {
25+
if (previousMetricName === '') {
2626
previousMetricName = metricName
2727
return `<section aria-label="${metricName}">\n<span class="comment">${line}</span>`
2828
}
2929

30-
if (metricName != previousMetricName) {
30+
if (metricName !== previousMetricName) {
3131
previousMetricName = metricName
3232
return `</section>\n<section aria-label="${metricName}">\n<span class="comment">${line}</span>`
3333
}
@@ -60,7 +60,7 @@ const formatPrometheusMetrics = (body) => {
6060
return line
6161
})
6262
.join('<br>') + '</section>'
63-
}
63+
}
6464

6565
// Listen for requests from content pages wanting to set up a port
6666
chrome.runtime.onConnect.addListener(port => {

extension/js/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* global chrome */
1+
/* global chrome, DOMParser */
22

33
// Don't process HTTP response bodies over 30MB
44
const MAX_BODY_SIZE_BYTES = 30 * 1024 * 1024

extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Prometheus Formatter",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"manifest_version": 3,
55
"description": "Makes plain Prometheus/OpenMetrics endpoints easier to read.",
66
"homepage_url": "https://github.com/fhemberger/prometheus-formatter",

0 commit comments

Comments
 (0)