Save script bookmarklets in Microsoft Edge

Save script bookmarklets in Microsoft Edge

Recently, I use Microsoft Edge as my primary browser since plugins were supported, and I am really satisfied with it. However, save a bookmarklet was very tricky in Edge.

Bookmarklets are shortcuts that actually run javascript snippets, usually to add a page to a service. For instance I use ReadCube and they offer a bookmarklet that lets me send any journal page to the ReadCube client. In every other browser you can navigate to the webpage of the bookmarklet, and drag the button which contains the JavaScript code to your favorites. For security reasons this does not work in Microsoft Edge, but you can fix it.

After the update in November 2015, the favorites were stored in the spartan.edb ESE database in the file path like this:

C:\Users\Frank Lin\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\DataStore\Data\nouser1\120712-0049\DBStore

Because this is a database, you need special tools and special care to edit it, but luckily it seems that the Edge also uses registry. I managed to find my favorites in this location in the registry:

HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\MicrosoftEdge\FavOrder\FavBarCache

Based on this, the script bookmarklet can be added to Edge with these steps:

  1. Copy the JavaScript code of the bookmarklet to the clipboard in other browser such as Internet Explorer.
  2. Add any page in Edge to the Favorites Bar as a placeholder.
  3. Run regedit, and navigated to the path above.
  4. Pasted the JavaScript code from the clipboard to the url key of the placeholder favorites item that just added.
  5. Restart the Microsoft Edge.

Edit registry for script bookmarklet


Frank Lin

Code learning...

Say something Login