I tried using @require, but does not work, my test
twsentinela.user.js
// ==UserScript==
// @name TWSentinela
// @namespace TWSentinela
// @description TWSentinela
// @require functions.js
// ==/UserScript==
console.log(test)
functions.js
function test(x){ alert(x); }
I put function.js in the same folder that twsentinela.user.js
thank you
Matt Sargent-2 wrote:
>
> On 7/27/2011 9:34 PM, luciansohl wrote:
>> I want to implement a script, but wanted to put it in several different
>> files, eg function.js, class.js, kernel.js, constants.js, etc ...
>> But I have no idea how to implement with greasemonkey, I could do a
>> script
>> for google chrome, but I prefer Mozilla Firefox.
>> The greasemonkey has this functionality?
>> thanks
> You can use @require to bring in script segments. The @require files are
> copied in and stored locally at the time of script installation, so they
> are static. Changing the source file will not alter how already
> installed scripts operate.
>
> --
> 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.
>
>
>
--
View this message in context:
http://old.nabble.com/Modularize-script-tp32153390p32160326.html
Sent from the GreaseMonkey List mailing list archive at Nabble.com.
--
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.