Skip to content

Instantly share code, notes, and snippets.

@Abbe98
Created July 18, 2023 06:36
Show Gist options
  • Save Abbe98/4c4e2273b041ca22c5c75fcf3f4ae009 to your computer and use it in GitHub Desktop.
Save Abbe98/4c4e2273b041ca22c5c75fcf3f4ae009 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Riksarkivet tumbnails
// @namespace https://sok.riksarkivet.se/
// @description
// @version 1.0
// @author Albin Larsson
// @match https://sok.riksarkivet.se/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const hitRows = document.querySelectorAll('.hitRow');
for (const element of hitRows) {
const iconElm = element.querySelector('.hit_icon');
if (!iconElm) continue;
const link = new URL(element.querySelector('.hit_middle a').href);
console.log(link, iconElm);
fetch(link).then(r => {
console.log(r);
});
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment