aboutsummaryrefslogtreecommitdiff
path: root/content/amso-shop.js
blob: c6814ea1193b60e61481ce7fecffb274ac6b9e60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
 * SPDX-License-Identifier: CC0-1.0
 *
 * Copyright (C) 2025 Woj. Kosior <koszko@koszko.org>
 */

/*
  #+begin_src manifest-jq
  .matches = ["https://amso.eu/*", "https://amso.pl/*"]
  #+end_src
*/

if (false) { /* #+begin_src background-js */
    blockJsOnUrl("https://amso.eu/*", "https://amso.pl/*");
} /* #+end_src */

/* Make some dynamically-loaded images work and remove non-functional menu with
 * preloader.  This is just to allow comparing offers, no support for purchasing
 * (but they seem to respond to email inquiries and one should be able to
 * purchase this way). */

for (const source of document.querySelectorAll("source[data-srcset]"))
    source.srcset = source.getAttribute("data-srcset");

for (const img of document.querySelectorAll("img[data-src]"))
    img.src = img.getAttribute("data-src");

for (const brokenMenu of document.querySelectorAll("section.additional_menu"))
    brokenMenu.remove();