Auto-deploy: 2026-06-02 18:31:11

This commit is contained in:
Hamza-Ayed
2026-06-02 18:31:11 +03:00
parent 7cf9b474bb
commit 6601d7314f
3 changed files with 90 additions and 0 deletions

19
permission.js Normal file
View File

@@ -0,0 +1,19 @@
document.getElementById('grantBtn').addEventListener('click', async () => {
const status = document.getElementById('status');
try {
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
// Stop the tracks immediately since we only needed to ask for permission
stream.getTracks().forEach(track => track.stop());
status.style.color = '#00d67e';
status.textContent = '✅ تم منح الصلاحية بنجاح! يمكنك إغلاق هذه النافذة والعودة إلى الإضافة.';
// Auto close after 3 seconds
setTimeout(() => {
window.close();
}, 3000);
} catch (err) {
status.style.color = '#ff4d6d';
status.textContent = '❌ حدث خطأ أو تم رفض الصلاحية: ' + err.message;
}
});