var Slack = require('./SlackAPI.js')
Use bot or user token for authentication.
var WebAPI = Slack()
// Read more about it here: https://lab.moin.im/2015/03/18/page-scroll-progress/ | |
function scrollProgress (el, updateFunc, endFunc) { | |
document.addEventListener('DOMContentLoaded', function() { | |
var progress = 0, | |
end = false, | |
timeStart = null, | |
timeEnd = null, | |
height = 0, | |
elt = null; |
{ | |
"appKey": "<Your-App-Key>", | |
"appSecret": "<Your-Secret>", | |
"target": ["<Token of target user>"], | |
"payload": "whatever you want to send to that user" | |
} |
Here's a demo if you wanna play with it:
https://codepen.io/moinism/pen/PoGXrdj?editors=1010
P.S: It's just a simple and lazy implementation, could be made more generalized.
P.P.S: It does not mask the input. It's just a method which can be used anywhere.