• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #13120

pending completion
#13120

push

circleci

Vinnl
Separate page for scan results

282 of 1619 branches covered (17.42%)

Branch coverage included in aggregate %.

28 of 28 new or added lines in 5 files covered. (100.0%)

959 of 4370 relevant lines covered (21.95%)

1.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/client/js/partials/exposure-scan.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
const exposureScanPartial = document.querySelector("[data-partial='exposureScan']")
×
6

7
if (exposureScanPartial) {
×
8
  init()
×
9
}
10

11
async function init () {
12
  const urlParams = new URLSearchParams(document.location.search)
×
13
  const emailFromUrl = urlParams.get('email')
×
14
  /** @type {HTMLTemplateElement} */
15
  const dataEl = exposureScanPartial.querySelector('#data')
×
16
  dataEl.dataset.email = emailFromUrl
×
17
  const sanitisedEmail = dataEl.dataset.email.trim()
×
18

19
  const res = await fetch('/api/v1/scan/', {
×
20
    headers: {
21
      'Content-Type': 'application/json',
22
      'x-csrf-token': dataEl.dataset.csrfToken,
23
      Accept: 'application/json'
24
    },
25
    mode: 'same-origin',
26
    method: 'POST',
27
    body: JSON.stringify({
28
      email: sanitisedEmail
29
    })
30
  })
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc