Save script bookmarklets in Microsoft Edge

Save script bookmarklets in Microsoft Edge

manage bookmarklet by registry

Recently, I make 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

Hey, there! This is Frank Lin (@flinhong), one of the 1.4 billion 🇨🇳. This 'inDev. Journal' site holds the exploration of my quirky thoughts and random adventures through life. Hope you enjoy reading and perusing my posts.


Practising closures in JavaScript

JavaScript Notes


Practising closures in JavaScript

JavaScript is a very function-oriented language. As we know, functions are first class objects and can be easily assigned to variables, passed as arguments, returned from another function invocation, or stored into data structures. A function can access variable outside of it. But what happens when an outer variable changes? Does a function get the most recent value or the one that existed when the function was created? Also, what happens when a function invoked in another place - does it get access to the outer variables of the new place?

Setup an IKEv2 server with StrongSwan



Setup an IKEv2 server with StrongSwan

IKEv2, or Internet Key Exchange v2, is a protocol that allows for direct IPSec tunneling between the server and client. In IKEv2 implementations, IPSec provides encryption for the network traffic. IKEv2 is natively supported on some platforms (OS X 10.11+, iOS 9.1+, and Windows 10) with no additional applications necessary, and it handles client hiccups quite smoothly.

Self-host comments in Jekyll, powered by Firebase real-time database



Self-host comments in Jekyll, powered by Firebase real-time database

It's convenient to set up a comment system in Jekyll site with external social comment systems like Disqus or Duoshuo (多说). However, as you all know, Disqus was blocked in China and Duoshuo is going to shutdown. It's the time to rethink about the comment system (although I didn't get too many comments →_→), simple and controllable. And it becomes true with Firebase database.