This app displays graphics from the Trello Service
The app's Script code
Script CodeExpand source
type("""#user""" , """##{{email|default:'[email protected]'}}""")
type("""#password""" , """##{{password|default:'password'}}""")
clickAndWait("""#login""")
openAndWait("""##{{url|default:'https://trello.com/'}}""")
repeat(0){
pause(##{{refresh|default:180}})
refreshAndWait()
waitForPageLoad()
runScript("""
j('.board-header, #header').hide();
""")
}
The app's JSON Schema
We need the declare a schema for the required configuration fields:
email: the email of the user
password: the password of the user
refresh: the refresh rate of the graph
url: the url board that you want to display
graph: the type of graph that you want to display
JSON SchemaExpand source
{
"fields": [
"email",
"password",
"refresh",
"url"
],
"schema": {
"url": {
"title": "Enter URL",
"type": "Text",
"help": "Paste the URL of the desired board from your Trello account",
"validators": [
"required"
]
},
"password": {
"title": "Password",
"type": "Password",
"validators": [
"required"
]
},
"email": {
"title": "Email Address",
"type": "Text",
"validators": [
"required",
"email"
]
},
"refresh": {
"title": "Refresh Interval (sec)",
"type": "Number",
"validators": [
"required"
]
}
}
}