Let's say I go to someone's website, look up the source and use some of the JavaScript idea/pattern/code that is not a part of the wider framerwork/something similar, but a unique code that was written by the author of the website.

If it's not officially published in e.g. some coding tutorial, but I looked up the source of the website, is it appropriate to reference directly to the code on that website? (e.g. http://example.com/someonesscript.js)

Small edit #1: Just to mention, I have extensively edited the script, it is still similar, but not the same. It is about 100% longer, but there are similarities.

2 Answers 2


Whether you can take code from someone's website and modify it for your own purposes, also depends on the license that governs that piece of code. Ideally, the license would be stated somewhere in the file, but that is not always the case and in those cases the safe assumption is that the code is under a license that does not allow you to use and modify it.


If it is part of the website or a webpage, simply refer to the webpage in your references. It clearly mentions that you are referring to a code which is published on a website.

Just look at this structure for a Chicago styled reference:

Last Name, First Name. "Page Title." Website Title. Web Address (retrieved Date Accessed).

You can produce your citation like this:

Code Producer's Last Name, Code Producer's First Name. "Sample computing source code for idea/pattern/code." Website Title. Web Address (retrieved Date Accessed).

  • is it possible that getting into the source of the website and using someone's javascript partly for anything could considered as stealing? Mar 2, 2015 at 15:02
  • @redCodeAlert I think that is another question and can not be asked and answered in the comments. Please make sure that your question is on-topic to Academia and then ask it. If your question is off-topic here, please consider viewing other StackExchange websites and find an appropriate one to ask your question.
    – enthu
    Mar 2, 2015 at 15:32
  • I meant stealing in terms of academic substitute e.g. plagiarism Mar 2, 2015 at 15:39
  • @redCodeAlert I understand. I suggest your newer question can be titled as: Is it considered plagiarism if I refer to the source code of a website in my paper?
    – enthu
    Mar 2, 2015 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .