Title: Hidden Javascript code
Last modified: October 29, 2020

---

# Hidden Javascript code

 *  [eetteri24](https://wordpress.org/support/users/eetteri24/)
 * (@eetteri24)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/)
 * I have custom made calculator with html/javascript. Calculator’s code shouldn’t
   be visible when you inspect the site, so how I can attach it to WordPress site?
   I have Elementor pro.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [wpfundi](https://wordpress.org/support/users/safiweb/)
 * (@safiweb)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13596928)
 * Are you using the [HTML widget](https://elementor.com/help/html-widget/) to embed
   the calculator?
 *  Thread Starter [eetteri24](https://wordpress.org/support/users/eetteri24/)
 * (@eetteri24)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13596970)
 * Yes
 *  [wpfundi](https://wordpress.org/support/users/safiweb/)
 * (@safiweb)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13597030)
 * What’s the url to where the calculator code is embeded?
 *  Thread Starter [eetteri24](https://wordpress.org/support/users/eetteri24/)
 * (@eetteri24)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13597301)
 * The client said that I can’t share the code for anyone else. And the page is 
   still under construction from my company’s behalf. What information you need?
   Thanks.
 *  [wpfundi](https://wordpress.org/support/users/safiweb/)
 * (@safiweb)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13597378)
 * ok, I understand. I think then you should try obfuscating the code using something
   like
    [https://obfuscator.io/](https://obfuscator.io/)
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13597435)
 * You should recognize that obfuscating is not the same as securely preventing 
   any kind of access at all. The code exists on a user’s browser, where they can
   analyze it to their heart’s content. The recommended obfuscation tool looks like
   it scrambles code quite well, but someone really determined can still unscramble
   it. The only truly secure way to prevent access is to run code server side. Web
   servers don’t generally run JavaScript, so providing JS code and saying don’t
   let others have access could mean don’t publish it anywhere at all.
 * I recommend asking the author if obfuscation will be adequate protection from
   their standpoint.
 *  Thread Starter [eetteri24](https://wordpress.org/support/users/eetteri24/)
 * (@eetteri24)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13597457)
 * So if obfuscation is not possible, should I write the calculator with PHP?
 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13601966)
 * If you have the skillz to translate JS to PHP, that would be a great solution.
   PHP running server side would fully protect the source code, provided the server
   is properly configured.
 * I kind of hate to bring it up, but given the nature of calculators, couldn’t 
   it be reverse engineered? The result will be an original work that would not 
   violate any copyright protections of the original work, provided the original
   source code was never seen. (IANAL, I could be wrong on that) But would anyone
   bother? Probably not. For example, I’ve created a rather unique calculator where
   the JS code if free to be reused for non-commercial purposes. AFAIK, no one has
   done so, they all simply link to my site where it’s available for use. And this
   is where the source code is available. Reverse engineering is far more work.
 * I don’t think it’s an issue, but something you ought to at least be aware of.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Hidden Javascript code’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 8 replies
 * 3 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/hidden-javascript-code/#post-13601966)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
