Hide js code in source view page

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
User avatar
amir2314
 
 
Posts: 318
Joined: Wed Aug 02, 2017 12:16 pm

Hide js code in source view page

Post by amir2314 »

Hi dear pablo
.
How can i hide the js code from website after publish
.
Im looking for the way to hide java script code in source view page by web browser .
.
And an other question : how can i disable any thing to prevent show in source view page elements such as folders . Fonts . Javascript js files and ...
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Hide js code in source view page

Post by crispy68 »

There is no way to protect JavaScript intended to run in a browser from a determined viewer. Obviously, you can have the code placed in a separate external file. Or you can Obfuscate the file so that most native variable names are replaced with short versions, so that all unneeded whitespace is removed, so it can't be read without further processing. Or, dynamically include the .js file by programmatically adding script tags (like Google Analytics does). This will make it even more difficult to get to the source code from the View Source command as there will be no easy link to click on there.

The question is, does that really need to be done in the first place?
User avatar
amir2314
 
 
Posts: 318
Joined: Wed Aug 02, 2017 12:16 pm

Re: Hide js code in source view page

Post by amir2314 »

crispy68 wrote: Tue Aug 16, 2022 4:34 pm There is no way to protect JavaScript intended to run in a browser from a determined viewer. Obviously, you can have the code placed in a separate external file. Or you can Obfuscate the file so that most native variable names are replaced with short versions, so that all unneeded whitespace is removed, so it can't be read without further processing. Or, dynamically include the .js file by programmatically adding script tags (like Google Analytics does). This will make it even more difficult to get to the source code from the View Source command as there will be no easy link to click on there.

The question is, does that really need to be done in the first place?
If find a disable right click and disable shortcut to doing this but i think these method are old . Have you any better idea to doing that . And an other question : in wwb option there is an option called external js cheack box . What happening if i generate external js file after the publishing ? How i have to use this option ?
User avatar
crispy68
 
 
Posts: 2737
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Hide js code in source view page

Post by crispy68 »

If you want to place your scripts in an external file, then you need to do the following:

1. Go to Tool --> Options --> HTML and check the button Generate external JS files for page specific scripts.
2. Click on the Publish tab (still under Options) and in the File Type Output Folder click Add --> Extension = js --> Folder = js and hit ok.

This will now generate a separate file for your scripts and place them in a folder called "js". Any .js files will be neatly placed in this folder rather than the html document.

Disabling right click might work on my mom but anybody that's a little savvy will be able to get what they want. Is it a deterrent? Maybe, but only for the computer illiterate... and those are not the ones you are typically trying to hide info from anyway.
GrahamW
 
 
Posts: 240
Joined: Sat Jul 08, 2017 5:02 am

Re: Hide js code in source view page

Post by GrahamW »

you can give this a try, I used it in the past and it works ok but its just a little harder for people to crack the code

https://obfuscator.io/

make sure when you add the js code to it you remove the script tags at the beginning and end

Graham
User avatar
BaconFries
 
 
Posts: 5326
Joined: Thu Aug 16, 2007 7:32 pm

Re: Hide js code in source view page

Post by BaconFries »

Maybe one of the answers posted at the following url will help.
https://stackoverflow.com/questions/686 ... -a-webpage
Post Reply