You can freely develop mods for Pony House. Use the index file in this folder to choose which mods you want to enable or disable.
Features are still under development. I will update this file with more information during the time.
WARNING!!
Using mods that attempt to modify Pony House's primary files can corrupt other mods and the app itself. If you are trying this, fork the repository instead of trying to develop a mod.
The first argument will always be the final value that will be sent to the application's API.
This value must always be an object. If this object is replaced by something else, a null will be sent to the API.
To find out what global values are available, use this console debug.
Emitters are always reset when you edit mod files via react. But remember that page elements will not have the same effect.
import tinyAPI from '../../src/util/mods';
console.log(tinyAPI);
tinyAPI.on(eventName, callback)
tinyAPI.once(eventName, callback)
tinyAPI.off(eventName, callback)
Here is the list of libraries that are available to use natively within the application.
https://vega.github.io/vega-lite/usage/embed.html
https://getbootstrap.com/docs/5.3/getting-started/introduction/
https://web3js.readthedocs.io/en/v1.10.0/
Y.Map, Y.Array, Y.Text only
src/client/state/settings.js
insertTheme Function (
Theme Data,
Push or Unshift (String value)
)
removeTheme Function (id),
getThemeById Function (id),
getThemeNameById Function (id)
src/util/selectedRoom.js
dataFolder = storage name
folderName = object name (from dataFolder)
where = data id
data = the data value
limit = The limit of data that can be stored. Default value is 100. If the limit is exceeded, old data will be automatically deleted during the progress.
addToDataFolder(dataFolder, folderName, where, data, limit)
removeFromDataFolder(dataFolder, folderName, where)
getDataList(dataFolder, folderName, where)
src/app/templates/client/Loading.jsx
import { setLoadingPage } from '../../app/templates/client/Loading';
// Start loading
setLoadingPage();
// or
setLoadingPage('Custom message!', 'grow');
// Disable
setLoadingPage(false);
Returns an Array with the list of the matrix-sdk logs. (Read-only)
Display the matrix-sdk logs.
src/app/organisms/room/RoomViewContent.jsx
forceUpdateLimit function
Empty Timeline loaded
src/app/organisms/room/Room.jsx
roomInfo
src/client/logger/index.js
console object = level, message
console object
console object
console cache
src/app/molecules/message/Message.jsx
content
data = { roomId, senderId, eventId }
insertMsg
The value "content" contains the data of the received message. The value "insertMsg" contains the default function of creating the message.
Use the msgOptions.custom object to customize the final result of your message. You can optionally combine this together with "insertMsg".
src/app/organisms/welcome/Welcome.jsx
welcomeObject
src/app/organisms/room/PeopleDrawer.jsx
segments
isUserList
src/client/state/navigation.js
address
isRoomSettings
forceScroll
selectedRoomId
prevSelectedRoomId
eventId
forceScroll
selectedTab
selectedSpaceId
roomType
tabInfo
tabInfo
roomId
roomId
roomId
forceScroll
roomId
roomId
tabText
isProfile
roomId
roomId
isRoomSettings
tabText
forceScroll
roomInfo
<EMPTY>
<EMPTY>
searchTerm
isSpace
parentId
term
roomId
searchTerm
userId
roomId
tabText
<EMPTY>
roomId
cords
requestEmojiCallback
dom
roomId
userIds
event
userId
eventId
body
formattedBody
term
placement
cords
render
afterClose
title
render
afterClose
request
targetDevice
content
src/client/state/AccountData.js
roomId
roomId
roomId
src/util/AsyncSearch.js
findingList
term
config
src/app/organisms/navigation/ProfileAvatarMenu.jsx
statusData (object)
src/util/twemojify.jsx
hostname (string)
protocol (string)
src/util/userStatusEffects.js
Every 1 second this event is emitted.
counter(number)
Every 1 second this event is emitted. (The value will only be counted when the system is actually working)
The update will only be emitted when there is a change in the user's afk status.
counter(number)
src/app/organisms/navigation/Drawer.jsx
When a connection status occurs in the system, a warning will be emitted.
systemStatus (object with status value)
src/app/organisms/profile-viewer/ProfileViewer.jsx
When a user opens the profile, these events will be called.
tinyPlace is a jQuery script. Use this to insert the html for your profile tab.
actions (List of tab functions to be invoked when a user click on this.)
Example:
actions.example_id = function(tinyPlace, user, presenceStatus) {};
tinyData (Parsed information about user presence)
user (User matrix object)
menuItem (Function to add to your script in the profile tab)
Example:
menuItem('Tiny Example', 'example_id')
others
event (event)
You need to convince the user to install the mod on their client.
This is a build yourself version of a Pony House client. In this version your mod will already come pre-installed within the application and the user will not be able to uninstall some mods selected by you.