How to test a Greasemonkey script, especially on a local copy of a web page?

I have my own javascript that I need to test with Greasemonkey. I have never worked with Greasemonkey before; How to check a script?

I do not test it on the World Wide Web, I saved the landing page ( Firefox> Save Page As> Web Page Fill ), so I am testing it locally.

What is the process? How to check a script?

+5
source share
1 answer

The following are some guidelines for troubleshooting Greasemonkey scripts, both in general and on local copies of web pages.

  • ( -) Greasemonkey.
    about:config greasemonkey.fileIsGreaseable true

  • , - /tmp /temp. script , .

  • , script /tmp /temp . script , .

  • script , @include, -. :

    // @include file:///D:/web/local%20page%20copies/*
    
  • Firefox (Ctrl Shift J) Greasemonkey.

  • Firebug . Firebug GM script - unsafeWindow..

  • javascript, GM_, Firebug JavaScript.


. :

+6

All Articles