PageSourceSearch

https://www.swi-prolog.org/js/blog.js

js swi-prolog.org collected 2026-09-24 06:23:26 UTC 793 bytes, 29 lines download raw bytes

1$(function() {
2  $(".blog-tag").on("click", function(ev) {
3    var el  = $(ev.target).closest(".blog-tag");
4    var tag = el.data("tag");
5    var set = [];
6
7    el.toggleClass("active");
8    el.parent().children(".active").each(function() {
9      set.push($(this).data("tag"));
10    });
11
12    if ( set.length > 0 ) {
13      el.closest(".contents.blog").find(".blog-index-entry").each(function() {
14	var mytags = $(this).data("tags").split("|");
15
16	if ( set.filter(value => mytags.includes(value)).length > 0 )
17	  $(this).removeClass("filtered-out");
18	else
19	  $(this).addClass("filtered-out");
20      });
21    } else {
22      el.closest(".contents.blog")
23        .find(".blog-index-entry")
24        .removeClass("filtered-out");
25    }
26  });
27  $(".blog-index-entry").on("click", function(ev) {
28  });
29});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.