Advertisement
Guest User

Check if in webapp, if add to homescreen

a guest
May 10th, 2012
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ((\"standalone\" in window.navigator) && !window.navigator.standalone){
  2.     document.write('<link rel=\"stylesheet\" href=\"css/add2home.css\">');
  3.     document.write('<script type=\"text/javascript\">');
  4.     document.write('var addToHomeConfig = {');
  5.     document.write('    animationIn: \"bubble\",');
  6.     document.write('    animationOut: \"drop\",');
  7.     document.write('    lifespan:10000,');
  8.     document.write('    expire:7200,');
  9.     document.write('    touchIcon:true,');
  10.     document.write('    returningVisitor:true,');
  11.     document.write('};');
  12.     document.write('<\/s' + 'cript>');
  13.     document.write('<script type=\"application/javascript\" src=\"js/add2home.js\"><\/s' + 'cript>');
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement