var OneSignal = window.OneSignal || []; OneSignal.push(["init", { appId: "10ee85eb-ac69-4175-ad6c-e5378ad64863", autoRegister: false, /* Set to true to automatically prompt visitors */ subdomainName: 'https://digburstweb.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); }); }); 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) { console.log('1'); // 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: "", }]);