Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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) 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) 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;
- }
- if (document.getElementById('WebNotifierDoNotShow')) return;
- var s = document.getElementsByTagName('script');
- var z;
- for (var x in s)
- if (s[x].src && (s[x].src !== undefined) && (z = s[x].src.match(/^http\:\/\/([^\/]+)\/wn\.js\?v\=\d+/))) window.WebNotifier.vlCoreHost = z[1];
- if (window.WebNotifier.vlCoreHost == '') return;
- var p = 'd.js?v=1';
- if (window.WebNotifier.vlCorePlatform) {
- if (window.WebNotifier.vlCorePlatform == 1) p = 't.js?v=1';
- else p = 'm.js?v=1';
- } else if (!/opera[\W\D]\d+\./i.test(navigator.userAgent) && /msie\s\d\./i.test(navigator.userAgent)) 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)) return;
- if (/\Wipad\W/i.test(navigator.userAgent)) {
- window.WebNotifier.vlCorePlatform = 1;
- window.WebNotifier.fnInit();
- return;
- }
- if (/\Wmobile\W/i.test(navigator.userAgent)) window.WebNotifier.vlCorePlatform = 2;
- else if (/\Wandroid\W/i.test(navigator.userAgent)) window.WebNotifier.vlCorePlatform = 1;
- window.WebNotifier.fnInit();
- }
- };
- if (window.top == window.self) window.WebNotifier.fnInitTest();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement