您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Helper Script to create Custom pages on Furaffinitiy
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/476762/1260198/Furaffinity-Custom-Pages.js
Helper Script to create Custom pages on Furaffinitiy
@require
this scriptconst customPage = new FACustomPage("parameterName", "pageUrl");
customPage.addEventListener("pageOpened", (event) => {
console.log(event.detail.parameterValue);
});
event.detail
is the CustomData classFACustomPage.checkCustomPagesOpened();
The CustomPage class contains following Properties:
parameterName
- The name of the parameter on which you want the event to executeurl
- The url on which the parameter has to be to execute the eventIt supports the following Events:
pageOpened
- Event has CustomData as detailsIt has following functions:
static checkCustomPagesOpened()
- Checks if any created CustomPage is open and triggers their event for those which arepageOpened(parameterValue, openedPage)
- Triggers the pageOpened event. Takes the current parameterValue and the openedPage HTML DocumentisPageOpened()
- Returns a boolean wether the CustomPage is currently opengetPageParameterValue()
- Returns the parameterValue if the CustomPage is opencheckPageOpened()
- Checks if the CustomPage is open and triggers the event if it isThe CustomData class contains following Properties:
parameterValue
- The parameterValue of the current openedPagedocument
- The HTML Document of the current openedPageIt has following functions:
removeDocumentSiteContent()
- Removes the default SiteContent of the openedPage document. Returns the document without SiteContent