daily pastebin goal
22%
SHARE
TWEET

Untitled

Agungsupeno93 Mar 16th, 2018 165 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //keluar
  2. document.addEventListener("backbutton", onBackKeyDown, false);
  3.     function onBackKeyDown() {
  4.         var namahalaman=app.views.main.router.url;
  5.         if(namahalaman=="/"){
  6.             app.dialog.create({
  7.                 title:'Notifikasi',
  8.                 buttons:[
  9.                 {
  10.                     text:'ya',
  11.                     bold:'true',
  12.                     onClick:function(){
  13.                         navigator.app.exitApp();
  14.                     },
  15.                 },
  16.                 {
  17.                     text:'Tidak',
  18.                 },
  19.                 ],
  20.                 content:'Apakah mau keluar? yakin..',
  21.                 animate:'true',
  22.                 closeByBackdropclick:'true',
  23.                 verticalButtons:false,
  24.             }).open();
  25.         } else {
  26.             app.router.back();
  27.         }
  28.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top