how detect click mouse with firefox

Hi all,
How i can detect click button with bonescript?
exemple i have button name alarm out B_13

push Alarme

if click this button i have message screen in firefox
“you click alarm, beaglebone drive buzzer !” our “stop alarme”

var b = require(‘bonescript’);
var patte13 = “P8_13”;

b.pinMode(patte13, ‘out’);

function alarm(){
b.analogWrite(patte13, 0.2, 2000);

}
cheekClick(function(){
if(button == ‘clicked’)
{
alarm();
console.log(“buzzer on”);
}
if(button ==‘no click’)
{
b.analogWrite(patte13,b.low);
console.log(‘stop buzzer alarm’);
}
});
}

how i must do correcltly this script
thanks for help :slight_smile: