The PageBuilder library is designed to assist with customizing the web pages, with a primary focus on enhancing 404 error pages.
To use PageBuilder, include the library in your Violentmonkey script by adding the following link:
https://github.com/BBBaden-Moodle-userscripts/PageBuilderLib/raw/main/PageBuilder.lib.user.js
- Description: Retrieves the element with the ID
page-content
. - Usage:
const pageContent = document.selectPageContent();
- Description: Clears the inner HTML of the element with the ID
page-content
. - Usage:
document.clearPageContent();
- Description: Customizes the 404 error page:
- Title: Sets the browser tab title to the provided
title
. - Header Text: Updates the main header text with
headerText
. - Clear Content: Clears the content inside the
page-content
element.
- Title: Sets the browser tab title to the provided
- Usage:
PageBuilder.prepare404Page('Settings', 'Settings Page');
This library is licensed under the MIT License.