bastian-meier / whiskylink

// ==UserScript==
// @name        whiskylink
// @namespace   wl
// @description Whisky ID Linker
// @include     http://www.whisky.de/tfg/forum/*
// @version     1
// @grant       none
// ==/UserScript==
var nodes = document.getElementsByClassName("main");
for (i=0;i<nodes.length;i++) {
     nodes[i].innerHTML = nodes[i].innerHTML.replace(/WID:(\d+)/g, ' <a class="button small"target="_blank" style="background: #322938; border-color: #cfc998; font-size: 14px; color: #fff; font-weight: 700; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;" href="http://www.whiskybase.com/whisky/$1\"><div style="display:inline-block; background-image: url(http://www.whiskybase.com/images/whiskybase.png); width: 40px; height: 40px; margin: -12px 1px -14px -12px; background-size: 457%; background-position: 0 -18px;"></div>WHISKYBASE (Flasche $1)</a> ').replace(/WUser:([\w\-\ö\ä\ü\ß\ ]+)!/g, ' <a class="button small"target="_blank" style="background: #322938; border-color: #cfc998; font-size: 14px; color: #fff; font-weight: 700; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;" href="http://www.whiskybase.com/profile/$1/collection\"><div style="display:inline-block; background-image: url(http://www.whiskybase.com/images/whiskybase.png); width: 40px; height: 40px; margin: -12px 1px -14px -12px; background-size: 457%; background-position: 0 -18px;"></div>WHISKYBASE (user $1)</a> ');
  }