Last active
November 15, 2017 17:29
-
-
Save toke/8709cbec56ac1f8aa0d22f2313f86863 to your computer and use it in GitHub Desktop.
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 Image resource example | |
// @resource logo ../icons/laptop.png | |
// @grant GM.getResourceUrl | |
// ==/UserScript== | |
(async function() { | |
let img = document.createElement("img"); | |
img.src = await GM.getResourceUrl("logo"); | |
document.body.appendChild(img); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment