Using the above scripts in a .js file The scripts above can be added to a .js file like the "javascipts.js" so it can be globally added to all your webpages. To use the no right click script in a .js file, copy the above code, paste it into the bottom of your .js file and remove the following lines: