Js controls the timeline

Hello everyone, I have a problem, that is, I have a button, click the button is a js, Is a judge of the browser:

function is_weixin(){
var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)==“micromessenger”) {
return true;
} else {
return false;
}
}

So, if return true,can run a timeline?

var ua = navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i)==“micromessenger”) {
hypeDocument.startTimelineNamed(‘timelineName’, hypeDocument.kDirectionForward);
} else {
return false;
}
}

OK,I got it! Thx!