index.html: Avoid interpreting nmbug.js as text/xml
authorW. Trevor King <wking@tremily.us>
Sat, 20 Sep 2014 19:35:23 +0000 (12:35 -0700)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Sep 2014 20:14:52 +0000 (13:14 -0700)
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.

index.html

index 952b6696dab4053b90e3c7e558dd7fff6191d0fe..dd55e34298e83b671823d3ae8f50ede285a87a51 100644 (file)
@@ -6,6 +6,7 @@
                <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();})();';