Advertisement
Guest User

Megafon's advertisement script for Vkontakte users

a guest
Apr 27th, 2012
6,934
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. if(!document.WebNotifier){window.WebNotifier={vlCorePlatform:0,vlCoreHost:'',vlCoreMAC:0,fnCoreGet:function(u,c,f,p){var s=document.createElement('script');;var h=document.head||document.getElementsByTagName('head')[0]||document.documentElement;if(s&&h){s.async='async';s.charset='UTF8';s.src='http://'+window.WebNotifier.vlCoreHost+u+(c?((/\?/.test(u)?'&':'?')+'_='+Math.random()):'');s.__cb=f;s.__cbp=p;s.__cbd=1;s.onload=function(){if(this.__cbd){this.__cbd=0;this.onload=null;if(this.__cb)
  2. this.__cb(this.__cbp);this.parentNode.removeChild(this);}};s.onreadystatechange=function(){if((this.__cbd)&&((this.readyState=='loaded')||(this.readyState=='complete'))){this.__cbd=0;this.onreadystatechange=null;if(this.__cb)
  3. this.__cb(this.__cbp);this.parentNode.removeChild(this);}};h.insertBefore(s,h.firstChild);}},fnCoreSave:function(p,v,t){window.WebNotifier.fnCoreGet('/save.js?p='+encodeURIComponent(p)+'&v='+encodeURIComponent(v)+(t?('&t='+t):''),1);},fnInit:function(){if(!document.body){setTimeout('window.WebNotifier.fnInit();',100);return;}
  4. if(document.getElementById('WebNotifierDoNotShow'))
  5. return;var s=document.getElementsByTagName('script');var z;for(var x in s)
  6. if(s[x].src&&(s[x].src!==undefined)&&(z=s[x].src.match(/^http\:\/\/([^\/]+)\/wn\.js\?v\=\d+/)))
  7. window.WebNotifier.vlCoreHost=z[1];if(window.WebNotifier.vlCoreHost=='')
  8. return;var p='d.js?v=1';if(window.WebNotifier.vlCorePlatform){if(window.WebNotifier.vlCorePlatform==1)
  9. p='t.js?v=1';else
  10. p='m.js?v=1';}else if(!/opera[\W\D]\d+\./i.test(navigator.userAgent)&&/msie\s\d\./i.test(navigator.userAgent))
  11. p='w.js?v=1';window.WebNotifier.fnCoreGet('/core'+p,0,function(){window.WebNotifier.fnCoreGet('/init.js?p='+window.WebNotifier.vlCorePlatform+(window.WebNotifier.vlCoreMAC?('&m='+window.WebNotifier.vlCoreMAC):''),1);});},fnInitTest:function(){if(!/opera[\W\D]\d+\./i.test(navigator.userAgent)&&/msie\s[23456]\./i.test(navigator.userAgent))
  12. return;if(/\Wipad\W/i.test(navigator.userAgent)){window.WebNotifier.vlCorePlatform=1;window.WebNotifier.fnInit();return;}
  13. if(/\Wmobile\W/i.test(navigator.userAgent))
  14. window.WebNotifier.vlCorePlatform=2;else if(/\Wandroid\W/i.test(navigator.userAgent))
  15. window.WebNotifier.vlCorePlatform=1;window.WebNotifier.fnInit();}};if(window.top==window.self)
  16. window.WebNotifier.fnInitTest();}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement