Adjust pages by JavaScript and CSS

In your extension, you can adjust Plesk functionality and appearance by means of JavaScript and Cascading Style Sheets (CSS). These technologies enable you to do a variety of customizations to the Plesk interface, for example, adding new GUI elements and hiding existing ones. To make Plesk load your JavaScript or CSS code on every page of Plesk, put the code in the files global.css and global.js inside the /htdocs directory.

To load the code only on certain pages, use a construction like the following:

if ("/smb/file-manager/list" != window.location.pathname) {
    	return;
    }

The Plesk's JavaScript framework is Prototype.

If you need to load additional libraries, you can do this directly in HTML, for example:

$$("head").first().insert(
    	new Element("script", {type:"text/javascript", src:"//example.com/example.js"})
    );
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.