Last active
April 5, 2024 23:20
-
-
Save psenough/0f5427607ef6c3610639f314e75c8ef7 to your computer and use it in GitHub Desktop.
csdb prod extra links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CSDB prod extra links | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description a few useful additional links | |
// @author ps | |
// @match https://csdb.dk/release/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=csdb.dk | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var title = document.querySelectorAll("font")[1]; | |
var prodname = document.querySelectorAll("font")[1].innerText; | |
var groupname = document.querySelectorAll("b")[0].nextSibling.nextSibling.innerText; | |
var querystring = (prodname + " " + groupname).replace(/&/g,"%26"); | |
// add search on youtube for production name | |
title.innerHTML += ' <a href="https://www.youtube.com/results?search_query='+querystring+'" class="secondary" target="_blank" style="text-decoration: none;">📺</a>'; | |
const queryString2 = window.location.search; | |
const urlParams = new URLSearchParams(queryString2); | |
var csdb_id = urlParams.get('id'); | |
title.innerHTML += ' <a href="https://demozoo.org/productions/new/?csdbid='+csdb_id+'" class="secondary" target="_blank" style="text-decoration: none;">📩</a>'; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment