Skip to content

Commit 8a3bf9e

Browse files
committed
build(test): remove obsolete jQuery gold files #840
1 parent 5a6e090 commit 8a3bf9e

7 files changed

+25
-183
lines changed

CHANGES.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ This list is detailed and covers changes in each pre-release version.
2222
Unreleased
2323
----------
2424

25-
Nothing yet.
25+
- Fix: Removed another vestige of jQuery from the source tarball
26+
(`issue 840`_).
2627

2728

2829
.. _changes_611:

tests/gold/html/support/coverage_html.js

+23-15
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,21 @@ coverage.pyfile_ready = function () {
209209
coverage.set_sel(0);
210210
}
211211

212-
document.querySelector(".button_toggle_run").addEventListener("click", coverage.toggle_lines);
213-
document.querySelector(".button_toggle_mis").addEventListener("click", coverage.toggle_lines);
214-
document.querySelector(".button_toggle_exc").addEventListener("click", coverage.toggle_lines);
215-
document.querySelector(".button_toggle_par").addEventListener("click", coverage.toggle_lines);
212+
const on_click = function(sel, fn) {
213+
const elt = document.querySelector(sel);
214+
if (elt) {
215+
elt.addEventListener("click", fn);
216+
}
217+
}
218+
on_click(".button_toggle_run", coverage.toggle_lines);
219+
on_click(".button_toggle_mis", coverage.toggle_lines);
220+
on_click(".button_toggle_exc", coverage.toggle_lines);
221+
on_click(".button_toggle_par", coverage.toggle_lines);
216222

217-
document.querySelector(".button_next_chunk").addEventListener("click", coverage.to_next_chunk_nicely);
218-
document.querySelector(".button_prev_chunk").addEventListener("click", coverage.to_prev_chunk_nicely);
219-
document.querySelector(".button_top_of_page").addEventListener("click", coverage.to_top);
220-
document.querySelector(".button_first_chunk").addEventListener("click", coverage.to_first_chunk);
223+
on_click(".button_next_chunk", coverage.to_next_chunk_nicely);
224+
on_click(".button_prev_chunk", coverage.to_prev_chunk_nicely);
225+
on_click(".button_top_of_page", coverage.to_top);
226+
on_click(".button_first_chunk", coverage.to_first_chunk);
221227

222228
coverage.filters = undefined;
223229
try {
@@ -258,13 +264,15 @@ coverage.toggle_lines = function (event) {
258264
coverage.set_line_visibilty = function (category, should_show) {
259265
const cls = "show_" + category;
260266
const btn = document.querySelector(".button_toggle_" + category);
261-
if (should_show) {
262-
document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls));
263-
btn.classList.add(cls);
264-
}
265-
else {
266-
document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls));
267-
btn.classList.remove(cls);
267+
if (btn) {
268+
if (should_show) {
269+
document.querySelectorAll("#source ." + category).forEach(e => e.classList.add(cls));
270+
btn.classList.add(cls);
271+
}
272+
else {
273+
document.querySelectorAll("#source ." + category).forEach(e => e.classList.remove(cls));
274+
btn.classList.remove(cls);
275+
}
268276
}
269277
};
270278

tests/gold/html/support/jquery.ba-throttle-debounce.min.js

-9
This file was deleted.

tests/gold/html/support/jquery.hotkeys.js

-99
This file was deleted.

tests/gold/html/support/jquery.isonscreen.js

-53
This file was deleted.

tests/gold/html/support/jquery.min.js

-4
This file was deleted.

0 commit comments

Comments
 (0)