I'm using Greasemonkey and I was trying to write my own userscript. I've already got the code, but it's not "running", dunno why.
// ==UserScript==
// @name Image link
// @version 0.1
// @include http://*.*
// @run-at document-end
// ==/UserScript==
var img = document.getElementById('image'),
style = img.currentStyle || window.getComputedStyle(img, false),
link = style.backgroundImage.slice(4, -1);
alert(link);
What can I do to make it actually work?