Skip to content

Instantly share code, notes, and snippets.

@arantius
Forked from vBm/GM_getResourceURL.user.js
Created July 16, 2014 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/195e4226fd7a8500cf4e to your computer and use it in GitHub Desktop.
Save arantius/195e4226fd7a8500cf4e to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name GM_getResourceURL Tester
// @namespace testing
// @include http://www.greasespot.net/*
// @resource icon https://assets-cdn.github.com/favicon.ico
// @grant GM_getResourceURL
// ==/UserScript==
var img = document.createElement('img');
img.src = GM_getResourceURL('icon');
document.getElementsByTagName('body')[0].appendChild( img );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment