admin管理员组

文章数量:1200975

Microsoft Edge browser does not support javascript bookmarklet in favorites. Is there an easy workaround for this?

When browser extensions for Edge come out, then it might be possible if the user installs an extension -- but that's much higher overhead for the user and developer.

I assume this is by design. But what is the microsoft workaround for this besides extensions?

description of problem:

and old workaround: /

a hack using an installed program: .html

Microsoft Edge browser does not support javascript bookmarklet in favorites. Is there an easy workaround for this?

When browser extensions for Edge come out, then it might be possible if the user installs an extension -- but that's much higher overhead for the user and developer.

I assume this is by design. But what is the microsoft workaround for this besides extensions?

description of problem: http://answers.microsoft.com/en-us/windows/forum/apps_windows_10-msedge/please-support-drag-and-drop-bookmarklet-and/dc7d2f09-8742-46a5-bb4a-4d1f576b8919

and old workaround: http://www.howtogeek.com/231775/how-to-install-and-use-bookmarklets-in-microsoft-edge/

a hack using an installed program: http://www.emmet-gray.com/Articles/EdgeManage.html

Share Improve this question edited Aug 24, 2021 at 18:50 teichert 4,6931 gold badge33 silver badges42 bronze badges asked Jun 23, 2016 at 8:46 TaiwanGrapefruitTeaTaiwanGrapefruitTea 1,2353 gold badges17 silver badges29 bronze badges 2
  • You answer in the link you share. There is no question to answer here. This should be closed as offtopic / too broad – Marcos Pérez Gude Commented Jun 23, 2016 at 8:54
  • As mentioned in the question, I'm looking for workarounds or solutions to get bookmarklets into favorites. If it's impossible, that would be good info to know too. – TaiwanGrapefruitTea Commented Jun 23, 2016 at 18:03
Add a comment  | 

6 Answers 6

Reset to default 6

Edge does support bookmarklets, but they call it a Reading List. It works almost like bookmarklets, but a bit poorly and difficult to debug, plus there is a (logical) limitation that cannot be circumvented as easily as in say Firefox: if your script comes from a http:// site, it cannot be run on a https:// site.

You can use bookmarklets in Edge this way:

  1. Right-click your button with your javascript:.... URL.
  2. Click Add to reading list.
  3. Navigate to your site and run the script on that site by clicking Reading list (Reading list on my version of Edge on PC is located behind the three horizontal lines called Hub and then the fancy icon with many curled horizontal lines called Reading list, on mobile the Reading list icon appears above the address bar when you click the ... menu icon) and from that list clicking your script.

With Windows 10 Fall Creators Update, Edge now supports editing URLs for favorites.

Reference : https://blogs.windows.com/msedgedev/2017/10/17/edgehtml-16-fall-creators-update/

Edit URLs for favorites

By popular demand, we’ve added the ability to edit the address for individual favorites in the Favorites Hub or on the Favorites bar.

To do this, simply right-click or press and hold a favorite and select “Edit URL.”

Points to Note:

  • The javascript code that's pasted in place of the URL should be in a single line. [i.e. remove all the new line breaks.]
  • The javascript code should not exceed 2083 characters.

I'd be happy to discover a better work-around, but the closest I have found for MS Edge version 92.0.902.78 is a feature known as "Snippets". The devtools guide describes Snippets as alternatives to bookmarklets.

To add a "Snippet":

  • Open the dev tools (F12 or Ctrl-Shift-I or navigate: ...->"More Tools"->"Developer Tools")
  • Find the "Snippets" pane in the "Sources" panel
  • Click the "New snippet" button
  • Add your javascript code in the editor area and save

To run a "Snippet":

  • Right-click on the snippet name in the Snippets list of the developer tools and select "Run"

Each snippet is associated with a uri-looking link (like snippet:///add-library-proxy), but these don't appear to be recognized in bookmarks nor from in the address bar.

Now that Edge supports editing a URL on the favorite bar - simply do the following.

  1. Add a favorite (doesn't matter what)
  2. Use "Inspect element" from the bookmarklet button context menu (right-click)
  3. Use "Edit URL" from the favorite (create in step 1) context menu (right-click)
  4. Paste the bookmarklet URL

(tested on 41.16281.1000.0)

I know this is kinda an old question, but...

Now that Microsoft Edge stores its favorites in a database, the "old workaround" is no longer viable.

But, there is a free 3rd-party application called EdgeManage that will allow you to edit/create the URL directly in the favorite.

So, this will allow you to use bookmarklets in Edge

PS: I am the author

Maybe i'm misunderstanding but the bookmarklet on this site works fine in Win11/MS Edge - https://webaim.org/resources/contrastchecker/

本文标签: