lolo343
Forum Replies Created
-
It’s weird
I also changed this :
window.OneSignal.registerForPushNotifications();by :
window.OneSignal.showHttpPrompt();The registration window appears right away, but when I scan the code I get an error message that appears after the 12-second delay
First i have created a file named onesignaldelay.js with:
window.OneSignal = window.OneSignal || []; var notificationPromptDelay = 12000; window.OneSignal.push(function() { var navigationStart = window.performance.timing.navigationStart; var timeNow = Date.now(); setTimeout(promptAndSubscribeUser, Math.max(notificationPromptDelay – (timeNow – navigationStart), 0)); }); function promptAndSubscribeUser() { window.OneSignal.isPushNotificationsEnabled(function(isEnabled) { if (!isEnabled) { window.OneSignal.registerForPushNotifications(); } }); }
Then in a second time I added this code in the functions.php file to call the script :
function theme_js(){
wp_enqueue_script( ‘onesignaldelay’,
‘/wp-content/themes/wp-knowledge-base-child/js/onesignaldelay.js’,
array() );
}
add_action( ‘wp_footer’, ‘theme_js’ );
I do not get errors in the crawler, but the 12-second timeout in the javascript file seems to have no effect.Forum: Plugins
In reply to: [OneSignal - Web Push Notifications] Onesignal delay promptHas anyone successfully implemented this option on wordpress ?
Forum: Plugins
In reply to: [OneSignal - Web Push Notifications] Onesignal delay promptthis is the error message :
tslib.es6.js:62 Uncaught (in promise) InvalidStateError {description: "RedundantPermissionMessage", reason: 1, message: "Another permission message (SlidedownPermissionMessage) is being displayed.", name: "InvalidStateError", stack: "InvalidStateError: Another permission message (Sli…m/sdks/OneSignalSDK.js:1:1486)? at <anonymous>"}description: "RedundantPermissionMessage"reason: 1message: "Another permission message (SlidedownPermissionMessage) is being displayed."name: "InvalidStateError"stack: "InvalidStateError: Another permission message (SlidedownPermissionMessage) is being displayed.? at Function.<anonymous> (https://cdn.onesignal.com/sdks/OneSignalSDK.js:1:139123)? at i (https://cdn.onesignal.com/sdks/OneSignalSDK.js:1:2384)? at Object.next (https://cdn.onesignal.com/sdks/OneSignalSDK.js:1:1719)? at s (https://cdn.onesignal.com/sdks/OneSignalSDK.js:1:1486)? at <anonymous>"__proto__: t s @ tslib.es6.js:62
- This reply was modified 7 years, 4 months ago by lolo343.
Forum: Plugins
In reply to: [OneSignal - Web Push Notifications] Onesignal delay promptI also changed this :
window.OneSignal.registerForPushNotifications();
by :
window.OneSignal.showHttpPrompt();
The registration window appears right away, but when I scan the code I get an error message that appears after the 12-second delay
Have you managed to make this work since then?
Forum: Plugins
In reply to: [OneSignal - Web Push Notifications] Not working with WP Fastest CacheI’m also interested in ??
Forum: Plugins
In reply to: [wp-Typography] Intelligent character replacementit’s ok , i remove né and risqué from the good file
Forum: Plugins
In reply to: [wp-Typography] Intelligent character replacementI try To put ‘né’ and ‘ne’ in exceptions but it does not work it’s the same problem with ‘risque’ ==> ‘risqué’
Forum: Plugins
In reply to: [wp-Typography] Intelligent character replacementit will remove for exemple né : ne
by this (:)= ORi have a second question , is it possible top apply the plugin to the comments?
Forum: Developing with WordPress
In reply to: Adding spaces after punctuationThe method will be carried out on about 37 000 post
Forum: Developing with WordPress
In reply to: Adding spaces after punctuation@ancawonka
post_content have links …. no?Forum: Developing with WordPress
In reply to: Force a page to download a file automatically?@lutsukomm use the ‘code’ tab when you put code on topics it’s better,
i made the same mistake until the arrival of a moderator- This reply was modified 7 years, 10 months ago by lolo343.
Forum: Developing with WordPress
In reply to: Adding spaces after punctuationnot for the currency just for removing the space after the
.