Created
September 1, 2008 12:45
-
-
Save atnan/8300 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function(){ | |
if (typeof boilerplate_bookmarklet == 'undefined') { | |
var stylesheet_url = 'http://example.com/bookmarklet.css'; | |
var script_url = 'http://example.com/bookmarklet.js'; | |
var head = document.getElementsByTagName('head')[0] || document.documentElement; | |
var stylesheet = document.createElement('link'); | |
stylesheet.setAttribute('rel', 'stylesheet'); | |
stylesheet.setAttribute('type', 'text/css'); | |
stylesheet.setAttribute('href', stylesheet_url); | |
head.appendChild(stylesheet); | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); | |
script.setAttribute('src', script_url); | |
head.appendChild(script); | |
} else { | |
boilerplate_bookmarklet.init(); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment