bookmarkleter
bookmarkleter copied to clipboard
jQuery appended out of block scope
when using jQuery, the append into the header happens out of block scope, needs to be moved up one line:
!function($) {
var loadBookmarklet = function($) {
/* user script here */
};
if ($ && $.fn && parseFloat($.fn.jquery) >= 1.7)
loadBookmarklet($);
else {
var s = document.createElement("script");
s.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js",
s.onload = s.onreadystatechange = function() {
var state = this.readyState;
state && "loaded" !== state && "complete" !== state || loadBookmarklet(jQuery.noConflict())
}
}
document.getElementsByTagName("head")[0].appendChild(s) /* needs to be moved up one line */
}(window.jQuery);