You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, January 14th 2018, 2:48pm

decyrpt custom js files

Dear Klaus!

I know that at the moment with the HTML5 viewer it is only possible to encrypt and then decrypt xml files and js files (that are krpano plugins). Would it be hard to implement a custom function that could be used to decrypt any js code?

To do something along the lines of:

Source code

1
2
3
$.getScript("my_external_script.js", function(data) {
   $(plugin.sprite).append(krpano.decrypt(data));
});


Problem is, we're developing a set of complex plugins for our content, and it is getting hard to maintain and structure code in a modular manner while at the same time keeping it protected as we're only allowed to encrypt JS code that is enclosed in a given structure (krpano plugin).