JavaScript书签在Firefox中停止工作41 [英] Javascript bookmarklet stopped working in Firefox 41

查看:185
本文介绍了JavaScript书签在Firefox中停止工作41的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Firefox 41中,bookmarklets(书签有一个 javascript: URL,例如 javascript:alert(it works),从点击或关键字运行)停止工作。有没有解决方案可以在Firefox 41中使用 javascript:书签?



以前在


如果您第一次加载任何网址(包括about:blank),那么
Javascript书签将在该选项卡中工作。


由于Firefox对于新选项卡的默认行为是 about:newtab ,这是 nothing ,并且bookmarklets只运行一次 被加载,您可以执行以下操作来设置默认页面,然后运行bookmarklets:


  1. 打开 about:config

  2. find browser.newtab.url
  3. 双击并从 about:newtab 更改为 about:blank $ c>(或您选择的URI)
  4. Ctrl-T

    $ h
    $ b $ h
    $ b $ h







    我只能假定它与默认情况下激活的 browser.newtabpage 设置有关。然而,禁用 newtabpage 功能并没有重新启用它。



    这个问题的其他报告和解决方案,在线仅指安装新选项卡覆盖扩展名 / div>

    根据 about:config 只能通过扩展名重新设置: / b>


    browser.newtab.url 偏好没有暴露的用户界面,不是真正的
    支持,并被搜索劫持者滥用。我们应该删除它,
    鼓励使用非默认新标签页的用户安装附加



    $ b $因此,除非政策本身反转(不太可能,因为这不是第一次Mozilla已经删除了 about:config 功能,并坚持要用扩展名替换)使用像
    新标签覆盖这样的扩展名是


    $ b

    更新:如果您安装了新选项卡覆盖,则必须对其进行配置。 首先,然后将 about:blank 手动添加到扩展程序设置。


    In Firefox 41, bookmarklets (bookmarks with a javascript: URL, e.g. javascript: alert("it works"), run from a click or a keyword) stopped working. Is there any solution to use javascript: bookmarks in Firefox 41?

    Previously seen, understood and solved in Javascript bookmark stopped working in Firefox 13:

    If you first load almost any URL, including about:blank, then a Javascript bookmark will work in that tab.

    Since Firefox's default behavior for new tabs is about:newtab, which is nothing, and bookmarklets only run once something is loaded, you can do the following to set a default page, and then run bookmarklets:

    1. open about:config
    2. find browser.newtab.url
    3. double-click and change from about:newtab to about:blank (or URI of your choice)
    4. Ctrl-T and run bookmarklets in new tabs!

    But this no longer works

    I can only assume it's related to the browser.newtabpage setting activated by default. However, disabling the newtabpage features did not re-enable it.

    Other reports of the issue, and solutions, online refer only to installing the New Tab Override extension. That does work - but is there another way, other than by installing an extension?

    解决方案

    According to ghacks, Mozilla wanted the feature removed from about:config and only re-settable via extension:

    The browser.newtab.url preference has no exposed UI, is not really supported, and is abused by search hijackers. We should remove it and encourage people using a non-default new tab page to install an add-on instead.

    So, unless policy reverses itself (unlikely, as this is not the first time Mozilla has removed about:config features and insisted they be replaced by extensions), using an extension like New Tab Override is the only option.


    UPDATE: If you install New Tab Override, you must configure it first, and manually add about:blank to the extension settings.

    这篇关于JavaScript书签在Firefox中停止工作41的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆