Skip to content

Instantly share code, notes, and snippets.

@StefRe
Last active May 31, 2017 16:06
Show Gist options
  • Save StefRe/fa6fde1d7cc0a73b5bae0fa59f3fcfad to your computer and use it in GitHub Desktop.
Save StefRe/fa6fde1d7cc0a73b5bae0fa59f3fcfad to your computer and use it in GitHub Desktop.
GM script: Search the catalog of SLUB for the title
// ==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