Skip to content

BBBaden-Moodle-userscripts/PageBuilderLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

61 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

 
 
 

Contributors