• 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)
  • Are you using the HTML widget to embed the calculator?

    Thread Starter eetteri24

    (@eetteri24)

    Yes

    What’s the url to where the calculator code is embeded?

    Thread Starter eetteri24

    (@eetteri24)

    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.

    ok, I understand. I think then you should try obfuscating the code using something like
    https://obfuscator.io/

    Moderator bcworkz

    (@bcworkz)

    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

    (@eetteri24)

    So if obfuscation is not possible, should I write the calculator with PHP?

    Moderator bcworkz

    (@bcworkz)

    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.