你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/476762-furaffinity-custom-pages,源站連結 點此以跳轉。
Helper Script to create Custom pages on Furaffinitiy
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.org.cn/scripts/476762/1318215/Furaffinity-Custom-Pages.js
Helper Script to create Custom pages on Furaffinitiy
@require this scriptconst customPage = new CustomPage("pageUrl", "parameterName");customPage.onopen = (data) => console.log(data.parameterValue);data is the CustomData classThe CustomPage class contains following Properties:
url - 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