User JavaScript

Last update: 2012-06-02

While User JavaScript is still supported in Opera, extensions are the preferred method for adding custom JavaScript. Support for extensions is more robust and receives frequent updates and enhancements.

Taking control

User JavaScript allows you to specify local JavaScript files for Opera to include on every page that you visit.

User JavaScript can be used for many purposes, including:

Table of contents

Utilizing User JavaScript

Examples of use

User JavaScript specifications


It is possible to share User JavaScript files created by others, but you should never install and use a script library from someone you do not know and trust. If in doubt, post the script in the Opera forums, newsgroups, or mailing lists, and ask if the script you would like to use is well written and exploit-free.

If enabled, User JavaScript will be loaded on most pages that you visit, including pages in any frames and inline frames. Any global functions and variables created in the User JavaScript will be available, and can be read by any scripts on these pages. For this reason, to protect your privacy and security, we recommend that you do not include any sensitive information in your User JavaScript. By default, User JavaScript will not be loaded on secure pages.

To check if User JavaScript is enabled, see opera:about. If User JavaScript is enabled, the location of the User JavaScript files will be shown as the "User JavaScript files" listed under "Paths".

Note: User JavaScript will not be loaded on pages accessed using the opera: protocol.


Opera Help

Need help? Hit F1 anytime while using Opera to access our online help files, or go here.