Skip to content

Commit b03ab92

Browse files
committedApr 1, 2023
style: use double-quotes in JavaScript
1 parent 36d0104 commit b03ab92

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

‎coverage/htmlfiles/coverage_html.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ coverage.pyfile_ready = function () {
219219

220220
// If we're directed to a particular line number, highlight the line.
221221
var frag = location.hash;
222-
if (frag.length > 2 && frag[1] === 't') {
222+
if (frag.length > 2 && frag[1] === "t") {
223223
document.querySelector(frag).closest(".n").classList.add("highlight");
224224
coverage.set_sel(parseInt(frag.substr(2), 10));
225225
} else {
@@ -533,14 +533,14 @@ coverage.scroll_window = function (to_pos) {
533533

534534
coverage.init_scroll_markers = function () {
535535
// Init some variables
536-
coverage.lines_len = document.querySelectorAll('#source > p').length;
536+
coverage.lines_len = document.querySelectorAll("#source > p").length;
537537

538538
// Build html
539539
coverage.build_scroll_markers();
540540
};
541541

542542
coverage.build_scroll_markers = function () {
543-
const temp_scroll_marker = document.getElementById('scroll_marker')
543+
const temp_scroll_marker = document.getElementById("scroll_marker")
544544
if (temp_scroll_marker) temp_scroll_marker.remove();
545545
// Don't build markers if the window has no scroll bar.
546546
if (document.body.scrollHeight <= window.innerHeight) {
@@ -554,8 +554,8 @@ coverage.build_scroll_markers = function () {
554554

555555
const scroll_marker = document.createElement("div");
556556
scroll_marker.id = "scroll_marker";
557-
document.getElementById('source').querySelectorAll(
558-
'p.show_run, p.show_mis, p.show_exc, p.show_exc, p.show_par'
557+
document.getElementById("source").querySelectorAll(
558+
"p.show_run, p.show_mis, p.show_exc, p.show_exc, p.show_par"
559559
).forEach(element => {
560560
const line_top = Math.floor(element.offsetTop * marker_scale);
561561
const line_number = parseInt(element.querySelector(".n a").id.substr(1));
@@ -582,21 +582,21 @@ coverage.build_scroll_markers = function () {
582582
};
583583

584584
coverage.wire_up_sticky_header = function () {
585-
const header = document.querySelector('header');
585+
const header = document.querySelector("header");
586586
const header_bottom = (
587-
header.querySelector('.content h2').getBoundingClientRect().top -
587+
header.querySelector(".content h2").getBoundingClientRect().top -
588588
header.getBoundingClientRect().top
589589
);
590590

591591
function updateHeader() {
592592
if (window.scrollY > header_bottom) {
593-
header.classList.add('sticky');
593+
header.classList.add("sticky");
594594
} else {
595-
header.classList.remove('sticky');
595+
header.classList.remove("sticky");
596596
}
597597
}
598598

599-
window.addEventListener('scroll', updateHeader);
599+
window.addEventListener("scroll", updateHeader);
600600
updateHeader();
601601
};
602602

0 commit comments

Comments
 (0)
Please sign in to comment.