--- /dev/null
+// ==UserScript==
+// @name (ArkhamDB) Arkham Horror LCG Card Game deck title
+// @namespace http://tampermonkey.net/
+// @version 0.1
+// @description append deck name to page title
+// @author Dariusz Murakowski
+// @match https://arkhamdb.com/deck/view/*
+// @grant none
+// @run-at document-end
+// ==/UserScript==
+
+// this works for news articles. For static pages,
+// look for a.active inside div.static-pages-nav? TODO.
+
+(function() {
+ 'use strict';
+
+ // from https://stackoverflow.com/questions/12685963/get-element-by-tag-and-class
+ // and https://stackoverflow.com/questions/18242171/get-element-by-tag-name-and-class-name
+ var hl_nodes = document.querySelectorAll('h1');
+ if (hl_nodes.length == 1) {
+ var headline = hl_nodes[0].innerHTML;
+ console.log(headline);
+ document.title = document.title + " - " + headline;
+ }
+ // alternatively, using jQuery: var headline = $('h1').text();
+})();
\ No newline at end of file