JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://eurica.github.io/pdjs/js/pdjs.js"></script>
Here's a button to click for a PD incident:
<input type="button" onclick="sendPDIncident()" value="trigger incident">
JavaScript
PDJS = new PDJSobj({
subdomain: "poland",
token: "S8xCQxQv2uCbwt3g6GzL",
})
sendPDIncident = function() {
PDJS.trigger({
service_key: "505a0ae5737746b2b206329132464bef",
description: "PLEASE BUY NEW SERVER",
incident_key: "server_problem",
details: {
cause: "Faulty wiring"
},
success: function(json) {
console.log(json)
alert(JSON.stringify(json))
}
})
}