Error: Permission denied to access property 'handler'

后端 未结 3 1439
春和景丽
春和景丽 2020-11-29 12:30

I have a greasemonkey script for Firefox, which yesterday was working perfectly. I tried using it today (no code was modified) and I noticed that it stopped working. Upon fu

3条回答
  •  难免孤独
    2020-11-29 12:44

    This page explains how to load jQuery in a Greasemonkey script: http://wiki.greasespot.net/Third-Party_Libraries

    The relevant parts are:

    // @require       http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
    ...
    this.$ = this.jQuery = jQuery.noConflict(true);
    

    According to the docs, jQuery.noConflict() will make sure the version of jQuery for your script won't interfere with the page.

    See also: jQuery in Greasemonkey 1.0 conflicts with websites using jQuery

提交回复
热议问题