Cloning people libraries

Joined
Sep 28, 2022
Messages
1
Reaction score
0
what do you do when someone clones your library and deploy them on their website? this website cloned one of my libraries, I contacted them but I did not get any answer. I contacted google and they said that this does not concern them. they are getting plenty of money from Adsense
 
Joined
Nov 13, 2020
Messages
302
Reaction score
38
Anything on the web is fair game for anybody to steal. Not much in the way of saying you wrote it.
How do you know they have one of your scripts?
 
Joined
Mar 11, 2022
Messages
225
Reaction score
32
There is nothing you can do. Code can't be protected by any law. Maybe you can give it a try. I mean if it's a one by one copy (your function names, your variable names and you are able to proof that this is all yours, you maybe can fight it in a court. But all others have to do to use foreign code legally is basically just changing function names, variable names and so on. Which can be done with a few clicks with the right software.

If you really want to protect your code, you should go with ajax.

Create dynamically a div (display:none), and load a PHP as content via ajax. Pass some date and time hashes to protect this PHP file from reading like
Code:
<?php
if($_POST['whateverhash']>=$_SESSION['whateverminhash'] && $_POST['whateverhash']<=$_SESSION['whatevermaxhash']){
?>
<script>
//your unstealable javascript code in here.
</script>
<?php
}
?>
 
Joined
Jul 3, 2022
Messages
93
Reaction score
23
one should be proud somebody else considers his code worthy to be cloned
 
Joined
Mar 11, 2022
Messages
225
Reaction score
32
one should be proud somebody else considers his code worthy to be cloned
Basically yes. I would agree a 100%. But i did a product designer lately which is the first of it's kind. My clients insisted to protect the code as much as possible because they are aware of competition. Plus, i've signed a contract to not do a same or similar project for a certain time. So of course it would kill me if i see my code (with little changes) in different projects of others in the future. Because this should be my projects and my money. So i would't be proud at all but p*ss*ed.
 
Joined
Mar 11, 2022
Messages
225
Reaction score
32
Well i use ajax. Works good enough so far. But there is no 100% protection
 
Joined
Jul 12, 2020
Messages
89
Reaction score
10
They can't steal it if they can't find it!
This probably doesn't work with newer browsers since their developers continually screw things up creating more problems and call it progress.

1. Write your script.
2. Create a link in the document head section and give it an "id".
3. Load document to make sure script loads and works correctly.
4. At the bottom of the script (file) use the .removeChild(); method.
5. Reload document and see if script still works.
If not, it's because the browser version has been updated to adapt to using js and css plugins. Therby, rewriting what was initially loaded to the browser.

If it does, it's because the version your using has not included the update. Meaning the script
loads and will maintain normal processing and functionality.

6. Check your browser's "view source" to see what happens.
7. Check your cache directory to ensure script does not exist.

The DOM's "removeChild" method, in older browsers, would rewrite the HTML displayed and remove the script from the cache without affecting the processing or functionality of it. Simply because the browser had already loaded it for display. Removing it after the fact is what could be used to protect script from being stolen. But, as i said, browser developers keep screwing things up.
 
Joined
Mar 11, 2022
Messages
225
Reaction score
32
@c1lonewolf

Hmmmmmnnnnooo. I doubt that. Maybe on some browsers. But as a cross browser solution? I haven't give it a try because it doesn't make any sense to me. But maybe im wrong.
 
Joined
Jul 12, 2020
Messages
89
Reaction score
10
You never know unless you what?

It was simple!
The script was created in a separate file.
When the document loaded the code was written to the browser itself for processing.
A copy of the file was stored in the cache (which can easily be accessed and copied) by way
of the script's link (src="").
When the link was removed from the document using the DOM's removeChild method, the copied
file was also removed from cache.

I used it all the time. The script would still process as normal because the browser had to load it for it to be used. All I was doing was removing the link to directly access the file and the copy of it in the cache. The browser itself still maintained the code. But these days they may have changed all that.
 
Joined
Mar 11, 2022
Messages
225
Reaction score
32
Well, that's not exactly how parsing works. Cache is a complete different thing. Even when remooving the link element completely, console will still show it's href as available.

As i said. I have not tried. So i could be wrong. But this sounds so doubtful to me, that i really don't know if the effort of trying it is woth it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,260
Messages
2,571,039
Members
48,768
Latest member
first4landlord

Latest Threads

Top