As already explained in [1], you have to set the preference "greasemonkey.fileIsGreaseable" to "true" in about:config for the script to run on a local page (file:///...). Being that you are new to Greasemonkey and probably to javascript, I strongly advice against it (except for test purposes) since this setting opens a security risk.
[1] http://groups.google.com/group/greasemonkey-users/msg/754858770242b237 On Tue, Jan 5, 2010 at 7:54 AM, Ben Stover <[email protected]> wrote: > According to some helpful suggestions I successfuly installed the GM script > below (see at the bottom of this posting). > > As the "@include" tag indicates this GM script should always be performed > whenever I call/load a web page > with the (sub) pattern *blank.html* > > Ok, so I dragged the following file D:\test\blank.html onto Firefox. The URL > entry field shows afterwards: > > file:///D:/test/blank.html > > ....but the Greasemonkey script is NOT executed. > > Why? > > Ben > > > > blank.html: > > > Test for GM > > test > > > > > > pTestAddIFrames.user.js: > > // ==UserScript== > // @name TestAddIFrames > // @namespace nsTestAddIFrames > // @description Test Adding IFrames > // @include *blank.html* > // @version 0.0.1 > // ==/UserScript== > > var x = document.createElement("<iframe>"); > x.src = "http://www.google.com"; > document.body.appendChild(x); > var x = document.createElement("<iframe>"); > x.src = "http://www.yahoo.com"; > document.body.appendChild(x); > var x = document.createElement("<iframe>"); > x.src = "http://www.bing.com"; > document.body.appendChild(x); -- You received this message because you are subscribed to the Google Groups "greasemonkey-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
