When publishing Activities to this GitHub, we require you to follow a set of guidelines. To some, these strict rules may seem harsh. However, the implementation of these rulesets will keep us and the users from running into any issues.
The general rules of activity development are as follows:
.onion
TLDs) or websites with free domains/hosts (for e.g., .TK
[all free Freenom domains], .RF
, GD
, etc) are not permitted, exceptions can be made if a proof is presented showing that they paid for the domain.chrome://
, about:
pages, etc) are not allowed as they require an experimental flag to be enabled on the user's end and could potentially cause damage to their browsers.Activity
class, you are allowed to do your own function and you need to tell us about it in Pull Request description..xyz
, .club
and so on.multiLanguage
with the provided strings. If your activity requires custom strings, then you shouldn't use multiLanguage
until the activity gets 1000 users. You can find an example here.presence.ts
file, iframe.ts
file, and metadata.json
file is mandatory so the result would be what is represented in the following schema:activity
├── metadata.json
└── presence.ts
or if you're using a iframe.ts
file:
activity
├── metadata.json
├── presence.ts
└── iframe.ts
For the convenience of our activity developers, we have provided a schema which you can use to validate the integrity of your
metadata
file. This is entirely optional and is not required during the review process.It is highly recommended that you organize your
metadata
file in the format shown below, and you must have grammatically correct service names, descriptions, tags, and setting fields. Anything not organized to specifications will not be permitted.
Each activity has a descriptor file called metadata.json
, the metadata has a strict standard and an example of this file can be seem below:
{
"$schema": "https://schemas.premid.app/metadata/1.12",
"apiVersion": 1,
"author": {
"name": "USER",
"id": "ID"
},
"contributors": [
{
"name": "USER",
"id": "ID"
}
],
"service": "SERVICE",
"altnames": ["SERVICE"],
"description": {
"en": "DESCRIPTION"
},
"url": "URL",
"version": "VERSION",
"logo": "URL",
"thumbnail": "URL",
"color": "#HEX000",
"tags": ["TAG1", "TAG2"],
"category": "CATEGORY",
"regExp": "REGEXP",
"iFrameRegExp": "REGEXP",
"iframe": false,
"readLogs": false,
"settings": [
{
"id": "multiLanguage",
"multiLanguage": true
}
{
"id": "ID",
"title": "DISPLAY TITLE",
"icon": "FONTAWESOME ICON",
"value": true
},
{
"id": "ID",
"if": {
"ID": true
},
"title": "DISPLAY TITLE",
"icon": "FONTAWESOME ICON",
"value": "\"%song%\" by %artist%",
"placeholder": "use %song% or %artist%"
},
{
"id": "ID",
"title": "DISPLAY TITLE",
"icon": "FONTAWESOME ICON",
"value": 0,
"values": ["1", "2", "etc."]
}
]
}
If a field is listed as optional on the documentation or there is a
*
next to the key, and your activity uses the default value for it, do not include it in themetadata
file. (for e.g., a activity without iframe support would not need theiframe
field.)All images in the
metadata
file must be hosted oni.imgur.com
. Using content hosted on the website is not permitted as they can change the paths and files unwillingly.
A list of fields and their rules are listed below:
$schema
*apiVersion
author
*contributors
service
/websites/Y/YouTube/
, the service name must be YouTube
.YouTube
is permitted because that is the official name and is descriptive, while youtube.com
is not. Top
is a non-descriptive name, so using the url top.gg
is required.)*altnames
tags
.description
metadata.json
and change the descriptions if necessary.url
http
or https
), and do not include query parameters in the url (for e.g., www.google.com/search?gws_rd=ssl
which should be www.google.com
)version
<NEW-FEATURE>.<HUGE-BUGFIX>.<SMALL-BUGFIX-OR-METADATA-CHANGES>
. Anything else like 1.0.0.1
, 1.0
, 1
, 1.0.0-BETA
or changing 1.0.0
to 2.0.0
on a bug fix/small change is not permitted.1.0.0
unless told otherwise, other versions will not be permitted.logo
1:1
aspect ratio.512x512
pixels. You can upsize it using a tool like waifu2x.thumbnail
color
#000000
and #FFFFFF
.tags
amazon-web-services
and aws
)category
anime
when the website isn't related to anime).*regExp
*iFrameRegExp
readLogs
boolean
value (e.g. true
or false
).warning
VLC
.settings
%song% by %artist%
), you must have the variables surrounded by a percent sign on either side. Variables like %var
, var%
, or %%var%%
and anything in between are not permitted for the sake of standardization.SHOW BROWSING STATUS
will not be permitted; however, names such as Show Browsing Status
or Show browsing status
are permitted.multiLanguage
option it can have the following types:
general.json
from the Localization repo or from the activity file (e.g. when the name of the activity is YouTube, the extension will get strings from youtube.json
too.)The code you write must be well-written and must be readable and all strings must be grammatically correct (grammar errors on websites can be ignored).
Each activity follows a strict linting ruleset which will be checked during the review process. A couple of recommendations can be seen below. TypeScript Plugin Recommendations for Strict Type Checking. ESlint Recommendations. Prettier.
Here is a list of rules you must follow when writing your presence.ts
file:
Activity
class before any other variable to avoid rare issues that may occur.document.location
to get current location information rather than window.location
or location
.512x512
pixels. You can upsize it using a tool like waifu2x.smallImageKey
and smallImageText
fields are intended to provide additional/secondary context (such as playing/paused
for video sites, browsing
for regular sites, and other cases) not to promote Discord profiles or anything unrelated to PreMiD.PMD_
.premid.app
or the activity website API. If you are using external domains, you will be required to explain why it is necessary. The only allowed API to make requests is the Fetch API
.undefined
or other null-like values after it has been declared, use the delete
keyword instead. (for e.g., use delete data.startTimestamp
instead of data.startTimestamp = undefined
)You must change the version in the metadata to be a higher value from the previous version when making changes to either the presence.ts, iframe.ts or metadata.json.
In some situations, activities may behave unexpectedly or could use some minor changes to improve their functionality. Here is a list of rules that you must follow while modifiying activities.
All code contributed to the store will be licensed under the
Mozilla Public License 2.0
.If you need to contact someone, please use our official Discord server. All reviewers will have the
Reviewer
role on their profile.Please keep in mind that the reviewers work voluntarily and manage other repositories in addition to this one, your pull request may not get reviewed until hours or even days after it has been created.
Always have an up-to-date fork before creating your pull request. This will help limit false positives from the checks.
The most important process of activity development is getting your activity on the store. This is done by making a pull request on GitHub on the PreMiD/Activities
repository. Our reviewers will confirm that your activity is up to standards and will push it onto the store.
Restrictions
Repetitive offenses such as breaking guidelines, spamming pull requests, threats, or innapropriate behavior will get you banned from creating activities.
In this scenario, the following changes will occur:
Reviewing
A few things you should know after opening a pull request:
Checks
Currently, a activity goes through 3 separate stages of checks. All of these checks help the reviewers determine whether your activity is suitable for deployment.
DeepScan
is a bot that checks for code quality. If you ever receive errors for new issues, you are required to fix them. Warning: DeepScan doesn't always give you errors. Please look at CodeFactor warnings instead.Compile and Lint
checks for code quality. If you ever receive errors for new issues, you are required to fix them.Activity Validator
will scan your metadata.json
file for any errors (for e.g., missing fields, invalid value types, etc.). If you ever see any new issues, you are also required to fix those. Adding a schema field to your metadata.json
file will allow your text editor (if supported) to show you these errors during development.Additional Rules
D/dアニメストア
or G/Google
). Any other Unicode/non-Latin characters must be under the #
folder (for e.g., #/巴哈姆特
) and numbers under the 0-9
folder (for e.g., 0-9/4anime
).After meeting all of the guidelines with the proper reviews and checks, your activity will be merged with the store.
If you have some suggestions about our guidelines, you should contact us @ PreMiD's Discord server and we will check them!
Revision 3
of the guidelines was written and was contributed to by the following individuals:
Revision 2
of the guidelines was written and was contributed to by the following individuals:
Revision 1
was maintained by the following individuals: