When loaded from file:///.../index.html, Firefox seems to assume
nmbug.js is text/xml. If you're serving nmbug.js from an actual
server, this shouldn't be a problem, but the explicit override makes
local testing easier.
<script type="text/javascript">
function load_bookmarklet(id, source) {
var request = new XMLHttpRequest();
+ request.overrideMimeType('text/plain');
request.onload = function () {
var element = document.getElementById(id);
var href = 'javascript:(function () {\n' + this.responseText + '\n run();})();';