Created
December 13, 2014 13:20
-
-
Save bastian-meier/d051476fe2c0f9a4310f to your computer and use it in GitHub Desktop.
replaces WID: 12345 with a link to Whiskybase.com in the whisky.de forum
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 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-bottom: 4px solid #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> '); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ich habe nur die Optik ein wenig "gepimpt", der Dank geht an theo22 aus der whisky.de community.