Hi,
Is there a way to include an external js-file into my greasemonkey
scripts?
For example i want to include the toolbox.js.
I tried this way:
---------------------
function include ( JsFile )
{
var elementBody = document.getElementsByTagName('body').item(0);
var script = document.createElement('script');
script.src = JsFile ;
script.type = 'text/javascript';
//alert("1");
elementBody.appendChild(script)
//alert("2");
}
include ("toolbox.js");
------------------------
If i run this script in an normal html-file without gm it works fine.
But if i try this in a gm-script the js file will no be included, even
if i write the complete file name:
"file:///C:/Dokumente und Einstellungen/Peter/Anwendungsdaten/Mozilla/
Firefox/Profiles/***/gm_scripts/google_bilder_links_dire/toolbox.js"
What do i wrong?
Is there a easier and better way?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---