you can hide your code with the obfuscator. There are many available in the market.
There are several tools, such as the Google Closure compiler, and many online javascript ofuscators available on the market. you can use any. but this does not guarantee code confidentiality. any javascript expert can de-obfuscate this code.
:
1. -. .
2. NPAPI, .
, . - , . .
EDIT: NPAPI .