admin管理员组文章数量:1291293
I want to write a greasemonkey script for my client to automate his tasks, however I don't want to share the script with others (as obviously, my client would not be too happy with this!)
How can I do write a greasemonkey script without sharing it with others?
I want to write a greasemonkey script for my client to automate his tasks, however I don't want to share the script with others (as obviously, my client would not be too happy with this!)
How can I do write a greasemonkey script without sharing it with others?
Share Improve this question edited Aug 31, 2012 at 13:39 Wladimir Palant 57.7k12 gold badges99 silver badges127 bronze badges asked Aug 31, 2012 at 11:56 ImdadImdad 6,0424 gold badges36 silver badges53 bronze badges 3- 3 You just do it. Writing a greasemonkey script doesn't necessarily involve publishing it anywhere. – user229044 ♦ Commented Aug 31, 2012 at 12:37
- OK. great! can you tell me then how can I run/install the script in my browser without uploading it to the userscripts site – Imdad Commented Aug 31, 2012 at 12:57
- 1 Just make a new script. No part of installing the script involves uploading it anywhere. – user229044 ♦ Commented Aug 31, 2012 at 13:01
2 Answers
Reset to default 9The question is not clear. But if you mean, "Can I stop my client from seeing the Greasemonkey script's code and possibly sharing it?"
Then the answer is "NO". Anyone using Firefox can see/edit the script's code via the Greasemonkey menu or the User Scripts tab in the Add-on manager.
This is by design. The producers of Greasemonkey (and most script authors) do not want any possibility of hidden or encrypted scripts being foisted on unsuspecting users.
~~~
Additionally, the script source can be seen by anyone with access to the client-machine's file system.
If you mean:
How can I run/install the script in my browser without uploading it to the userscripts site?
That's easy...
- Save your script to to a file, EG MyScript.user.js. Keep track of where you saved it, and make sure it's not in a system
temp
folder. - In Firefox, choose Open File (CtrlO).
- Navigate to where you'd saved your script and open it.
- Greasemonkey will pop up a dialog asking if you want to install the script. Press Install.
See "Installing Scripts" in the documentation.
Make site with a link like this
<a href="http://yourserver./yourscript.user.js">Install special script xx</a>
and save your script at
http://yourserver./yourscript.user.js
Grease Monkey and Tamper Monkey will see a javascript file and if it ends with user.js it will ask to install it. Give the url with the install link to your client. You can protect your site with a password.
本文标签: javascriptCan I write a private greasemonkey scriptStack Overflow
版权声明:本文标题:javascript - Can I write a private greasemonkey script? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741529318a2383659.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论