Furaffinity-Custom-Pages

Helper Script to create Custom pages on Furaffinitiy

目前为 2023-10-05 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/476762/1260197/Furaffinity-Custom-Pages.js

作者
Midori Tsume
版本
1.0.1
创建于
2023-10-05
更新于
2023-10-05
大小
2.5 KB
许可证
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 FACustomPage("parameterName", "pageUrl");
    See CustomPage for more info

  • Subscribe to the pageOpened Event: customPage.addEventListener("pageOpened", (event) => { console.log(event.detail.parameterValue); });
    event.detail is the CustomData class

  • Trigger the Check for all CustomPages FACustomPage.checkCustomPagesOpened();
    this will trigger every CustomPage event for the current Website where the parameter name matches.

Documentation

CustomPage

The CustomPage class contains following Properties:

  • parameterName - The name of the parameter on which you want the event to execute
  • url - The url on which the parameter has to be to execute the event

It supports the following Events:

It has following functions:

  • static checkCustomPagesOpened() - Checks if any created CustomPage is open and triggers their event for those which are
  • pageOpened(parameterValue, openedPage) - Triggers the pageOpened event. Takes the current parameterValue and the openedPage HTML Document
  • isPageOpened() - Returns a boolean wether the CustomPage is currently open
  • getPageParameterValue() - Returns the parameterValue if the CustomPage is open
  • checkPageOpened() - Checks if the CustomPage is open and triggers the event if it is

CustomData

The CustomData class contains following Properties:

  • parameterValue - The parameterValue of the current openedPage
  • document - The HTML Document of the current openedPage

It has following functions:

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址