2011-05-03 5 views
1

Chrome의 webkitNotifications API는 사용자가 알림을 클릭 할 때 페이지로 리디렉션하지 않습니다.webkitNotfications에 리디렉션을 추가 할 수 있습니까?

내가 Mac에서 Growl처럼 작동하도록 할 수있는 방법이 있습니까? 알림이 팝업되고 사용자가 클릭하여 리디렉션됩니다. 예를 들어, 사용자는 새 메시지를 받고, webkitNotifications를 통해 알림을 받고, 메시지를 클릭하고 message.php로 이동합니다.

답변

1

어쩌면 당신은

function setNotifJL(strtitre,strmsg) { 
    if (window.webkitNotifications.checkPermission() == 0) { 
    Window.webkitNotifications.createNotification('../mypic.gif',strtitre, strmsg); 
    n.show(); 
    n.onclose = notify; 
    n.onclick = nclicked; 
    } 
    } 
    function notify() {location.href='<whereever you want';} 
이 (온 클릭)를 시도해야한다
관련 문제