• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

mmy delivery problem sound

pepegrillo12

Active member
Trusted Uploader
Jul 15, 2020
419
96
28
Hello how are you? I've been using mmy delivery (https://babia.to/threads/my-delivery-wordpress-plugin.24214/page-6#post-1279721) for a while now and it's perfect! It's just that in the latest updates, no matter how hard I try, the sound notification doesn't work: this is supposed to be the code: const notificationSong = new Audio('/wp-content/plugins/my-delivey-wordpress/assets/notifications/ trim_phone.mp3');
notificationSong.play(); but in the new update it comes out like this:


async function doCheckApi(e){let t=document.querySelector(".fdm-orders-items");t=null!=t?t.id:0;try{const o=await fetch(e+"?oid="+t);if(o.ok){"updated"!=(await o.json()).status&&updateOrders()}else console.log("GET API error" )}catch(e){console.log(e.message)}}async function updateOrders(){const e=await fetch(order_ajax_object.ajax_url,{method:"POST",credentials:"same-origin",headers: {"Content-Type":"application/x-www-form-urlencoded","Cache-Control":"no-cache"},body:"action=update_orders&nonce="+order_ajax_object.nonce}),t=await e.json(),o=document.querySelectorAll(".fdm-orders-items, .fdm-orders-full-items"),r=document.querySelectorAll(".fdm-btn-order-action"),n =document.querySelectorAll(".order-print");if(o.forEach(e=>e.remove()),r.forEach(e=>e.setAttribute("data-manage-order-id", "")),n.forEach(e=>e.remove()),supportNotification()&&hasNotificationPermission()){const e=document.getElementById("myd-orders-panel-notification-status-label"),t ={};e&&(t.title=e.dataset.notificationTitle||"",t.body=e.dataset.notificationBody||""),sendNotification(t)}document.querySelector(".fdm-orders- loop").insertAdjacentHTML("afterbegin",t.loop),document.querySelector(".fdm-orders-full").insertAdjacentHTML("afterbegin",t.full),document.querySelector("#hide-prints" ).insertAdjacentHTML("afterbegin",t.print),screen.width<=980&&(document.querySelectorAll(".fdm-orders-full-details").display="none")}

someone help me solve?
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock