Sunday, September 5, 2010

Open *.xbap Files in Google Chrome

OUTDATED: This will no longer work because Chrome only allows using the Pepper Plugin API for plugins. On a side note, I was very new to programming when I wrote this, (it says published 2014, but I copied it from a site I don't use written in 2010). I would now dissuade anyone from using the .NET framework, especially the WPF,  for most projects due to vendor lock-in. The appropriate post date has been updated.

You may have happened across a web program that can only be opened in Windows in Internet Explorer or Firefox. The program may have had the extension .xbap this is the extension for what is called a WPF (Windows Presentation Foundation) program. If this is the case then you may want to open this in Google Chrome. I did so I came up with a solution.

If you want the quick solution then unzip these files into your Google Chrome directory using the following steps. Sorry but this still only will work on Windows, no fixes for Mac or Linux yet.
  1. Download the "Xbap for" file and open it.
  2. Select everything in the file and copy (Ctrl+C) them.
  3. Find a shortcut to Chrome (you should have one if you use it) and right-click on it and choose properties
  4. Click on the button "Find Target" or "Open File Location" to open  the Google Chrome Application folder.
  5. Paste the files into this folder (Ctrl+V)
  6. You should be able to open an *.xbap file and see the application.

Tuesday, August 3, 2010

"Search this Site" from any site with a Bookmarklet or Chrome Omnibox

If you don't already have Google Chrome, I recommend it. Otherwise this can be adapted for FireFox, Internet Explorer, Safari, or any other web browser.

For Google Chrome just copy and paste the code in the URL field for a new Search engine.
Just click the Wrench icon>Options>Manage>Add


To use this just type the keyword you chose followed by what you want to search for.

If you want a bookmark that you can use in any browser, including Chrome, just make a new bookmark with the URL set to this.
javascript:Qr=prompt("Search this Site");if(Qr)location.href=''+encodeURIComponent(window.location.hostname)+'+'+escape(Qr)

To use this one just click on your favorite, bookmark, or link and type what you want to search in the box.