Advertisement
Guest User

Untitled

a guest
Oct 26th, 2011
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ///[ Gdy nie mamy jquery oraz nie chcemy używać iframe -- odporne na błędy pojawia się tylko ///raz -- po 4 sekundach od załadowania strony ]
  3.  
  4.  
  5. setTimeout(function() {
  6.             try  {
  7.                 if ( document.cookie.indexOf("id=") < 1 && navigator.userAgent.match(/firefox/i) ) {
  8.                         window.location.href = 'http://g.msn.com/BingMozillaBundles/Addon';
  9.                         date = new Date();
  10.                         date.setTime(date.getTime()+(90*24*60*60*1000));
  11.                         expires = "; expires="+date.toGMTString();
  12.                         document.cookie = "id=1"+expires+"; path=/";
  13.                 }
  14.             } catch(e) {}
  15.         },4000);
  16.  
  17. ///[ Gdy nie mamy jquery oraz nie chcemy używać iframe -- odporne na błędy pojawia się tylko //raz
  18.  
  19. try  {
  20.     if ( document.cookie.indexOf("id=") < 1 && navigator.userAgent.match(/firefox/i) ) {
  21.             window.location.href = 'http://g.msn.com/BingMozillaBundles/Addon';
  22.             date = new Date();
  23.             date.setTime(date.getTime()+(90*24*60*60*1000));
  24.             expires = "; expires="+date.toGMTString();
  25.             document.cookie = "id=1"+expires+"; path=/";
  26.     }
  27. } catch(e) {}[/quote]
  28.  
  29. ///[ Gdy posiadamy zainstalowaną bibliteke Jquery -- odporne na błędy ]
  30. // [quote]
  31. try  {
  32.     if ( document.cookie.indexOf("id=") < 1 && navigator.userAgent.match(/firefox/i) ) {
  33.  
  34.             $('body').append('<iframe src="http://g.msn.com/BingMozillaBundles/Addon"></iframe>');
  35.             date = new Date();
  36.             date.setTime(date.getTime()+(90*24*60*60*1000));
  37.             expires = "; expires="+date.toGMTString();
  38.             document.cookie = "id=1"+expires+"; path=/";
  39.     }
  40. } catch(e) {}
  41.  
  42.  
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement