Skip to content

The PageBuilder library is designed to assist with customizing the web pages, with a primary focus on enhancing 404 error pages.

License

Notifications You must be signed in to change notification settings

BBBaden-Moodle-userscripts/PageBuilderLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 

Repository files navigation

🎨 PageBuilder Library

The PageBuilder library is designed to assist with customizing the web pages, with a primary focus on enhancing 404 error pages.

🚀 Installation

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

🛠️ Functionalities

1. document.selectPageContent()

  • Description: Retrieves the element with the ID page-content.
  • Usage:
    const pageContent = document.selectPageContent();

2. document.clearPageContent()

  • Description: Clears the inner HTML of the element with the ID page-content.
  • Usage:
    document.clearPageContent();

3. PageBuilder.prepare404Page(title, headerText)

  • 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.
  • Usage:
    PageBuilder.prepare404Page('Settings', 'Settings Page');

📄 License

This library is licensed under the MIT License.

About

The PageBuilder library is designed to assist with customizing the web pages, with a primary focus on enhancing 404 error pages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published