var OneSignal = window.OneSignal || []; OneSignal.push(["init", { appId: "dc641f08-1b8f-4e9c-a35e-e96e8ad1037b", safari_web_id: 'web.onesignal.auto.4b99c5db-a7c9-461a-8333-facb0838095d', autoRegister: false, /* Set to true to automatically prompt visitors */ subdomainName: 'https://parsonline.onesignal.com', /* subdomainName: Use the value you entered in step 1.4: http://imgur.com/a/f6hqN */ notifyButton: { enable: false }, httpPermissionRequest: { enable: true }, notifyButton: { enable: false /* Set to false to hide */ }, promptOptions: { /* Change bold title, limited to 30 characters */ siteName: 'دوست صمیمی', /* Subtitle, limited to 90 characters */ actionMessage: "برای ادامه لطفا بر روی دکمه 'بله' کلیک نمایید.", /* Example notification title */ exampleNotificationTitle: 'پارس آنلاین', /* Example notification message */ exampleNotificationMessage: 'نمونه اطلاع رسانی از جشنواره های ما', /* Text below example notification, limited to 50 characters */ exampleNotificationCaption: 'Click Allow to let us send you notifications', /* Accept button text, limited to 15 characters */ acceptButtonText: "بله", /* Cancel button text, limited to 15 characters */ cancelButtonText: "خیر" }, welcomeNotification: { "title": "با سپاس", "message": "شما هم اکنون در لیست اطلاع رسانی از جشنواره ها ی پارس آنلاین قرار گرفتید." // "url": "" /* Leave commented for the notification to not open a window on Chrome and Firefox (on Safari, it opens to your webpage) */ }, httpPermissionRequest: { modalTitle: 'با سپاس', modalMessage: "شما هم اکنون در لیست اطلاع رسانی از جشنواره ها ی پارس آنلاین قرار گرفتید.", modalButtonText: 'بستن پنجره' /* ... */ }, welcomeNotification: { disable: true } }]); OneSignal.push(function() { /* These examples are all valid */ OneSignal.getUserId(function(userId) { //console.log("OneSignal User ID:", userId); // (Output) OneSignal User ID: 270a35cd-4dda-4b3f-b04e-41d7463a2316 }); }); function subscribe() { $.cookie("push_subscribe", "1", { path: '/', expires: 5 }); qp_design_alert_close(); OneSignal.push(["registerForPushNotifications"]); event.preventDefault(); } function notsubscribe(){ $.cookie("push_subscribe", "1", { path: '/', expires: 5 }); qp_design_alert_close(); } /* This example assumes you've already initialized OneSignal */ OneSignal.push(function() { // If we're on an unsupported browser, do nothing if (!OneSignal.isPushNotificationsSupported()) { return; } OneSignal.isPushNotificationsEnabled(function(isEnabled) { if (isEnabled) { // The user is subscribed to notifications // Don't show anything } else { if($.cookie('push_subscribe') != "1" ){ alert('
آیا تمایل دارید از آخرین جشنواره های فروش و تمدید پارس آنلاین مطلع شوید؟

','پارس آنلاین'); //$.cookie("push_subscribe", "1", { path: '/', expires: 1 }); } } }); }); OneSignal.push(["sendTags", { Operator:"else", Username:"", CityId:"", ProvinceId:"", ProductId:"", city:"", province:"", ServiceName:"", TrafficName:"", DurationName:"", Name:"", Price:"", }]);