Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts

16 January 2009

Opening Python files (and other source files) "in-browser" in Firefox 3.0+

If Firefox keeps annoying you with a Download dialog box, when you drag/drop Python source files into the browser window, do the following: go to your Firefox profiles directory (for Mac OS X, it is under ~/Library/Application Support/Firefox/Profiles/xyz.default), open up the mimeTypes.rdf file and (carefully) delete all references to "x-python". After a restart, things should work fine! Sample junk found in mimeTypes.rdf (there were several of these):
  <RDF:Description RDF:about="urn:mimetype:text/x-python"
                   NC:fileExtensions="py"
                   NC:description=""
                   NC:value="text/x-python"
                   NC:editable="true">
    <NC:handlerProp RDF:resource="urn:mimetype:handler:text/x-python"/>
  </RDF:Description>

05 July 2007

Firefox Greasemonkey hack

Firefox Greasemonkey hack: sri-goog-amazon.user.js. (make sure you know what you're doing if you install this...) Select a piece of text with your mouse and hit one of these keys:
  • ALT-A: searches Amazon.com for the selected text, in a background tab
  • ALT-G: does the above with Google.com
Also, without any selection, ALT-A and ALT-G will take you to Amazon.com & Google.com respectively.