How to Sell Javascript?

Sampler

Senior Member
Joined
Nov 1, 2010
Messages
983
Reaction score
882
Ok, this is not meant to be a presales thread or anything but this is what I wanted to know.

I've got some code which executes something which I know will be extremely popular to many people.

Because essentially it's a piece of code which anyone could then easily resell, in what way do I go around protecting this code should I wish to sell it?

Can I turn it into a piece of software or do I have to host it on a server and potentially charge people per each request they send (that's assuming I can get it to execute the code from a server anyway)?

Personally I've got the code saved as an address in a bookmark tab and just hit it every time i want it to run but want to know the best way I could sell/distribute it to others without them seeing the code themselves.

Thoughts?
 
:confused:

JavaScript is a client-side scripting language so you cannot protect it from the public view. What you can do is offer support and updates for a fee.
 
:confused:

JavaScript is a client-side scripting language so you cannot protect it from the public view. What you can do is offer support and updates for a fee.

Hmm, thanks. Perhaps I'll just have to hire someone to write the code in another language. Hopefully it's not too hard to convert JS/the principles my script to another language.

Thanks for the heads up though.

Sampler
 
Depends on what the code does. If it's ajax or modifies the users experience without reloading you're stuck with javascript. Maybe portions of it can be offloaded to the server side but it depends on what it does exactly.
 
Depends on what the code does. If it's ajax or modifies the users experience without reloading you're stuck with javascript. Maybe portions of it can be offloaded to the server side but it depends on what it does exactly.

No, it's got nothing to do with user experience. As an example of what it does I'll say "on a youtube page it will automatically make my account report all the comments as spam" **PLEASE NOTE THIS IS AN EXAMPLE and NOT what I do.

The problem is I would have to somehow make the program/server go to their youtube account which they are already logged into and do it there i.e. I can imagine users won't want to add their youtube username and password (or maybe they will).

But yeah, would you recommend any other language to try and convert this to?
 
You can obfuscate it. It will make hard to understand it.
 
You can obfuscate it. It will make hard to understand it.

Thanks, that won't help restricting the unauthorized distribution of the code though.
 
Thanks, that won't help restricting the unauthorized distribution of the code though.

Is it possible to move your code to webservice, So client can access your service by ajax.

Or write web browser plug in. I see some company have web browser plugin product.
 
Again, without knowing exactly what it does its hard to say for sure. I can tell you that browser security restricts a website from modifying or accessing another, or its cookies. You would probably be better off making it a SaaS in PHP. They would have to enter their info but it protects your code.
 
Maybe I am missing something, but couldn't you use http://nodejs.org/ to hide your code and build web site in front of it?

Ok, this is not meant to be a presales thread or anything but this is what I wanted to know.

I've got some code which executes something which I know will be extremely popular to many people.

Because essentially it's a piece of code which anyone could then easily resell, in what way do I go around protecting this code should I wish to sell it?

Can I turn it into a piece of software or do I have to host it on a server and potentially charge people per each request they send (that's assuming I can get it to execute the code from a server anyway)?

Personally I've got the code saved as an address in a bookmark tab and just hit it every time i want it to run but want to know the best way I could sell/distribute it to others without them seeing the code themselves.

Thoughts?
 
His example makes it sound like it needs to be run in the context of a browser. If it doesn't require DOM, then sure, you could use Node.js
 
I have a way of running js through a program. If interested pm me and I'll give you a look in team viewer to see if it works as intended or not. If it does I'll write a program around it.
 
Again, without knowing exactly what it does its hard to say for sure. I can tell you that browser security restricts a website from modifying or accessing another, or its cookies. You would probably be better off making it a SaaS in PHP. They would have to enter their info but it protects your code.

Yeah, I'll maybe try and find someone who can convert it to php. I mean it's relatively simply in theory i.e. 3 lines of JS which with absolute basic knowledge of programming can somewhat understand.

Maybe I am missing something, but couldn't you use http://nodejs.org/ to hide your code and build web site in front of it?

Thanks, I'll try that. Seen that site before but never really looked into it. Cheers
 
Yeah, I'll maybe try and find someone who can convert it to php. I mean it's relatively simply in theory i.e. 3 lines of JS which with absolute basic knowledge of programming can somewhat understand.



Thanks, I'll try that. Seen that site before but never really looked into it. Cheers

If you want, send it to me and I'll be able to tell you if its a javascript only type of thing, or if it can be done in php convert it for you.
 
If you can build any software with javascript then you obviously can do this. You have to find client who need your service.
 
obfuscate big javascript code is good for protect source. Of cource it is only client side but is safety than without obfuscate.
 
If this were a crazy facebo*k / social network script that uses an exploit,You would have NP selling it for a high amount or you would use it yourself and make a killing.
Im going to assume the above does not apply because if this script had real value,Im not sure you would sell it,So my solution is to simply share it :D
 
Ok, this is not meant to be a presales thread or anything but this is what I wanted to know.

I've got some code which executes something which I know will be extremely popular to many people.

Because essentially it's a piece of code which anyone could then easily resell, in what way do I go around protecting this code should I wish to sell it?

Can I turn it into a piece of software or do I have to host it on a server and potentially charge people per each request they send (that's assuming I can get it to execute the code from a server anyway)?

Personally I've got the code saved as an address in a bookmark tab and just hit it every time i want it to run but want to know the best way I could sell/distribute it to others without them seeing the code themselves.

Thoughts?

I think you should make it free for personal use, and charge a license fee if it is commercial
related. Then make a donate button on your page or show some ads. If people really like
your script, they will also donate. I have seen this successfully implemented alot of places.
 
Wrap it in an executable and eval it on the page if you're concerned about people stealing your code. Don't use C# or any other .NET stuff since it can be decompiled easily, making your efforts to protect it completely useless.

You can use WebKit (or QWebKit with QT - http://qt-project.org/doc/qt-4.8/qtwebkit.html ) to achieve this easily, however there may be licensing issues you will run across. If the process can be emulated with raw HTTP requests, you could always use libcurl to get it done.
 
Back
Top