Last active
May 31, 2017 16:06
-
-
Save StefRe/fa6fde1d7cc0a73b5bae0fa59f3fcfad to your computer and use it in GitHub Desktop.
GM script: Search the catalog of SLUB for the title
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 Google Books SLUB Search | |
// @namespace gist.github.com/StefRe | |
// @description Search the catalog of SLUB for the title | |
// @include https://books.google.de/books* | |
// @version 1.1 | |
// @grant none | |
// ==/UserScript== | |
var link = document.createElement('a'); | |
link.innerHTML = 'SLUB'; | |
//var title = document.head.querySelector('[property="og:title"]').getAttribute('content'); | |
//link.href = 'http://katalogbeta.slub-dresden.de/?tx_find_find[q][title]=' + title | |
var title = document.title.replace(' - Google Books', ''); | |
link.href = 'http://katalogbeta.slub-dresden.de/?tx_find_find[q][default]=' + title | |
document.getElementById('gb-get-book-container').appendChild(link); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment