This commit is contained in:
2026-02-15 16:59:54 +03:00
parent 0b95dd62e1
commit ea28427c3d
25 changed files with 7336 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
// userData.js
(function () {
function sendUserData() {
if (window.gon) {
try {
const userData = {
id: window.gon.application.current_user.id
};
// Отправляем только один раз
window.postMessage(
{
source: 'medods-extension',
type: 'userData',
payload: userData
},
'*'
);
return;
} catch (error) {
console.error('Error in sendUserData:', error);
}
}
}
// Запускаем после небольшой задержки
setTimeout(sendUserData, 100);
})();