Guest User

Untitled

a guest
May 23rd, 2013
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="http://www.featureblend.com/flash_detect_1-0-4/flash_detect.js" type="text/javascript" charset="utf-8"></script>
  5.  
  6. <script type="text/javascript">
  7. if(!FlashDetect.installed){
  8. window.location = "?flash=false";
  9. }else{
  10. window.location = "?flash=true";
  11. }
  12. </script>
  13. </head>
  14.  
  15. var uagent = navigator.userAgent.toLowerCase();
  16.  
  17. if (uagent.search("iphone") > -1 ||
  18. uagent.search("ipod") > -1 ||
  19. uagent.search("ipad") > -1 ||
  20. uagent.search("appletv") > -1) {
  21. window.location = "?flash=false";
  22. } else {
  23. window.location = "?flash=true";
  24. }
  25.  
  26. var agent=navigator.userAgent.toLowerCase();
  27. var is_iphone = ((agent.indexOf('iphone')!=-1);
  28. if (is_iphone) { conditional code goes here }
  29.  
  30. RewriteEngine on
  31. RewriteCond %{HTTP_USER_AGENT} iPhone
  32. RewriteRule .* http://iphone.mydomain.com/ [R]
  33.  
  34. var agent=navigator.userAgent.toLowerCase();
  35. var is_iphone = ((agent.indexOf('iphone')!=-1);
  36. var is_ipad = ((agent.indexOf('ipad')!=-1);
  37. if (is_iphone || ipad) { conditional code goes here }
  38.  
  39. RewriteEngine on
  40. RewriteCond %{HTTP_USER_AGENT} iPhone
  41. RewriteCond %{HTTP_USER_AGENT} iPad
  42. RewriteRule .* http://ios.mydomain.com/ [R]
Advertisement
Add Comment
Please, Sign In to add comment