Furaffinity-Custom-Pages

Helper Script to create Custom pages on Furaffinitiy

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://update.greasyfork.org/scripts/476762/1318215/Furaffinity-Custom-Pages.js

Tác giả
Midori Tsume
Phiên bản
1.1.0
Đã tạo
05-10-2023
Đã cập nhật
27-01-2024
Giấy phép
MIT

Furaffinity Custom Pages

Helper Script to create Custom pages on Furaffinitiy

How to use

  • @require this script

  • Create a new CustomPage: const customPage = new CustomPage("pageUrl", "parameterName");
    See CustomPage for more info

  • Subscribe to the pageOpened Event: customPage.onopen = (data) => console.log(data.parameterValue);
    data is the CustomData class

Documentation

CustomPage

The CustomPage class contains following Properties:

  • url - The url on which the parameter has to be to execute the event
  • parameterName - The name of the parameter on which you want the event to execute
  • parameterValue - The value of the parameter, if the CustomPage is open
  • isOpen - A boolean wether the CustomPage is open

It supports the following Events:

It has following functions:

  • pageOpened(parameterValue, openedPage) - Triggers the onopen event. Takes the current parameterValue and the openedPage HTML Document
  • checkPageOpened() - Checks if the CustomPage is open and triggers the event if it is

CustomData

The CustomData class contains following Properties:

  • parameterName - The parameterName of the current opened Page
  • parameterValue - The parameterValue of the current opened Page
  • document - The HTML Document of the current opened Page

It has following functions:

  • removeDocumentSiteContent() - Removes the default SiteContent of the openedPage document. Returns the document without SiteContent