Library to create Custom pages on Furaffinitiy
สคริปต์นี้ไม่ควรถูกติดตั้งโดยตรง มันเป็นคลังสำหรับสคริปต์อื่น ๆ เพื่อบรรจุด้วยคำสั่งเมทา // @require https://update.greasyfork.org/scripts/476762/1549463/Furaffinity-Custom-Pages.js
Helper Script to create Custom pages on Furaffinitiy. Also see docs on Furaffinity-Custom-Pages
@require
this script
Create a new CustomPage:
const customPage = new FACustomPage("pageUrl", "parameterName");
See CustomPage for more info
Subscribe to the onOpen Event (Either directly or with addEventListener):
customPage.onopen = (event) => { console.log(event.detail.parameterValue) };
customPage.addEventListener("onOpen", (event) => { console.log(event.detail.parameterValue) });
event.detail
is the CustomData class
Trigger the check for open pages:
FACustomPages.checkAllPages();
See CustomPage for more info
Feature | Status |
---|---|
Have basic Custom Pages | ✅ Completed |
Support for url encoded parameters ⠀⠀⠀⠀ | ✅ Completed |
The CustomPage class contains following Properties:
pageUrl
- The url on which the parameter has to be to execute the eventparameterName
- The name of the parameter on which you want the event to executeparameterValue
- The value of the parameter, if the CustomPage is openisOpen
- A boolean wether the CustomPage is openIt supports the following Events:
onopen
- Event has CustomData as detailsIt has following functions:
pageOpened(parameterValue, openedPage)
- Triggers the onopen event. Takes the current parameterValue and the openedPage HTML DocumentcheckPageOpened()
- Checks if the CustomPage is open and triggers the event if it isThe CustomData class contains following Properties:
parameterName
- The parameterName of the current opened PageparameterValue
- The parameterValue of the current opened Pagedocument
- The HTML Document of the current opened PageIt has following functions:
removeDocumentSiteContent()
- Removes the default SiteContent of the openedPage document. Returns the document without SiteContent