PageSourceSearch

https://saltysouthernroute.com/wp-content/plugins/visitwidget-control-center/assets/js/filter-main.js

js saltysouthernroute.com collected 2026-10-02 01:13:49 UTC 1,181 bytes, 50 lines download raw bytes

1// main elements
2const tabLinks = document.querySelectorAll(".vw-tab-bar__link");
3const sidebarFilter = document.querySelector(".vw-sidebar-filter");
4const mapView = document.getElementById("map-view");
5const listView = document.getElementById("list-view");
6
7let view;
8
9// event listeners
10tabLinks.forEach((tab) => {
11  tab.addEventListener("click", handleTabClick);
12});
13
14function initMainView() {
15  view = "list";
16  renderView();
17}
18
19function handleTabClick(event) {
20  const selectedView = event.currentTarget.dataset.view;
21  if (selectedView === view) return;
22  view = selectedView;
23  renderView();
24}
25
26function renderView() {
27  // active tab class
28  tabLinks.forEach((tab) => {
29    const tabView = tab.dataset.view;
30    tab.classList.remove("active");
31    if (tabView === view) tab.classList.add("active");
32  });
33
34  // show list view
35  if (view === "list") {
36    initListView();
37    sidebarFilter.style.display = "block";
38    mapView.style.display = "none";
39    listView.style.display = "flex";
40  }
41
42  // show map view
43  if (view === "map") {
44    sidebarFilter.style.display = "none";
45    mapView.style.display = "flex";
46    listView.style.display = "none";
47  }
48}
49
50initMainView();

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.