Autoselect item with TamperMonkey

Joined
Dec 31, 2022
Messages
12
Reaction score
1
Hi, I'm using this website:

https://www.bibliotechediroma.it/opac/.do

and trying to autoselect in "Digita o seleziona la biblioteca":

Municipio X > Biblioteca Elsa Morante

I used this script in TamperMonkey, where am I wrong? Thank you!

JavaScript:
// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.bibliotechediroma.it/opac/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.it
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
document.querySelector("button[class='syw-comboselect-trigger']").click();document.querySelector("li[data-group='GR_10'] a[title]").click();document.querySelector("li[data-cd='RMBO2'] a[class='select']").click();
})();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top