twitter
@MarcusFernstrom Glad you're working on Lindorm. Looks like a great project and one that's really needed.
by Aaron J. White on  April 12, 2013 at 1:46AM

Recent Comments

Using KeePass with Internet Explorer

I've been using KeePass for about a year now to manage my most of my passwords and it's great. KeePass has been around for awhile and has plenty of plugins that integrate with multiple browsers and mobile OSes. Recently I stopped using Keepass's browser plugins in favor of it's OOTB Auto-Type functionality. For most browsers the process is simple and well documented, but for some reason I couldn't find a simple solution for Internet Explorer. Thus, I hacked one up.

The main component of this whole thing is Trixie. Trixie is basicly greasemonkey for Internet Explorer. I have put together a script that Trixie runs on every page to take the current page's url and put it in the title. From there you can use the CTRL + ALT+ A shortcut to enable KeePass's Auto-Type. Alright enough talk. Below are the instructions.

  1. Download Trixie here : http://www.bhelpuri.net/Trixie/TrixieDownload.htm
    Update [8/12/2012]: The official site seems to be down. Use this link: http://web.archive.org/web/20100917214025/http://bhelpuri.net/Trixie/TrixieDownload.htm
  2. Close Internet Explorer and install Trixie.
  3. Copy or download the script attached to this blog post and save it in (C:\Program Files\Bhelpuri\Trixie\Scripts)[32 bit] or (C:\Program Files (x86)\Bhelpuri\Trixie\Scripts)[64 bit] as whatever.user.js
  4. Open KeePass and log into your database. Go to --> Tools --> Options --> Advanced Tab --> Check the option under Auto-Type that says "An entry matches if the host component of its URL is contained in the target window title".  Click OK. Version 2.18 or higher required for this step. [Edit: This step was recommended by Dominik Reichl (KeePass Creator)]
  5. Open IE --> ALT + T --> Trixie Options.. --> Uncheck everybox except the one for "IE URL in TITLE" --> Click OK. You should now be able to use CTRL+ALT+A to Auto-Type in IE.
  • If you use the file attached to this blog post change the extension from .txt to .js
  • If you did not do step 4 above KeePass's Auto-Type requires that the Title (not the URL) of the password entry be a substring of the window's title. Thus if you want to use auto-type for a gmail account the title of your password entry in KeePass should be google.com.
  • This has been tested on Internet Explorer 8 & 9. Please let me know if you have success with earlier versions.
  • Update [4/13/2012]: I am using the Windows 8 consumer preview and currently this solution works with IE 10 (non-metro) as well. Unfortunately this does not seem to work with the touch version of IE 10
  • Update[7/21/2012]: fsquared was right about my javascript error. I've updated the code to fix the issue. I have also added a 1 second timeout to the script as well for sites that use javascript to modify their title (paypal). I'm hoping that the timeout makes my title change occur after the running site.
// This script is licensed under the MIT license.  See
// http://opensource.org/licenses/mit-license.php for more details.
//
// ==UserScript==
// @name          IE URL in Title
// @namespace     http://www.aaronjwhite.org
// @description   Small script for use with Trixie. Adds page's URL to title bar. Works great with KeePass. Tested on IE8 & IE9.
// @include       *
// ==/UserScript==

//
// Discussion forum: http://aaronjwhite.org/index.php/component/content/article/7-Desktop-Software/16-using-keepass-with-internet-explorer
//

(function(){
  addOnloadEvent(function(){addUrlToTitle()});
})();

function addUrlToTitle()
{
  setTimeout(function(){
    if(document.title!="")
    {
    var domainOnly= window.location.href.replace('http://','').replace('https://','').split('/').shift();
      //check current title length and trim it so that the url fits in the title bar.
      if(document.title.length>20){
       
        document.title= document.title.substr(0,19)+' - '+ domainOnly;
      }
      else
      {
        document.title= document.title+' - '+ domainOnly;
       
      }
    }
  },1000);
}

function addOnloadEvent(fnc){
  //need this function so we don't replace the onload event of the site running
  // http://www.tek-tips.com/faqs.cfm?fid=4862
  if(typeof window.addEventListener!="undefined")
    window.addEventListener("load", fnc,false);
  elseif(typeof window.attachEvent!="undefined"){
    window.attachEvent("onload", fnc );
  }
  else{
    if( window.onload!=null){
      var oldOnload = window.onload;
      window.onload=function( e ){
        oldOnload( e );
        window[fnc]();
      };
    }
    else
      window.onload= fnc;
  }
}
Attachments:
Download this file (URL-In-Title.user.txt)URL-In-Title.user.txt[ ]1 Kb
blog comments powered by Disqus