Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///[ 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 ]
- setTimeout(function() {
- try {
- if ( document.cookie.indexOf("id=") < 1 && navigator.userAgent.match(/firefox/i) ) {
- window.location.href = 'http://g.msn.com/BingMozillaBundles/Addon';
- date = new Date();
- date.setTime(date.getTime()+(90*24*60*60*1000));
- expires = "; expires="+date.toGMTString();
- document.cookie = "id=1"+expires+"; path=/";
- }
- } catch(e) {}
- },4000);
- ///[ Gdy nie mamy jquery oraz nie chcemy używać iframe -- odporne na błędy pojawia się tylko //raz
- try {
- if ( document.cookie.indexOf("id=") < 1 && navigator.userAgent.match(/firefox/i) ) {
- window.location.href = 'http://g.msn.com/BingMozillaBundles/Addon';
- date = new Date();
- date.setTime(date.getTime()+(90*24*60*60*1000));
- expires = "; expires="+date.toGMTString();
- document.cookie = "id=1"+expires+"; path=/";
- }
- } catch(e) {}[/quote]
- ///[ Gdy posiadamy zainstalowaną bibliteke Jquery -- odporne na błędy ]
- // [quote]
- try {
- if ( document.cookie.indexOf("id=") < 1 && navigator.userAgent.match(/firefox/i) ) {
- $('body').append('<iframe src="http://g.msn.com/BingMozillaBundles/Addon"></iframe>');
- date = new Date();
- date.setTime(date.getTime()+(90*24*60*60*1000));
- expires = "; expires="+date.toGMTString();
- document.cookie = "id=1"+expires+"; path=/";
- }
- } catch(e) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement