nodebb-plugin-niki-loyalty 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/lib/client.js +22 -2
package/package.json
CHANGED
package/static/lib/client.js
CHANGED
|
@@ -54,6 +54,9 @@ $(document).ready(function () {
|
|
|
54
54
|
}, 500);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
// Fonksiyonu global yap (Konsoldan test için)
|
|
58
|
+
window.showNikiToast = showNikiToast;
|
|
59
|
+
|
|
57
60
|
// -------------------------------------------------------------
|
|
58
61
|
// 🐱 FLOATING WIDGET (Sol Alt - Dinamik Oluşturma)
|
|
59
62
|
// -------------------------------------------------------------
|
|
@@ -115,8 +118,25 @@ $(document).ready(function () {
|
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
//
|
|
119
|
-
createFloatingWidget
|
|
121
|
+
// Fonksiyonları global yap (Konsoldan test için)
|
|
122
|
+
window.createFloatingWidget = createFloatingWidget;
|
|
123
|
+
window.updateFloatingWidget = updateFloatingWidget;
|
|
124
|
+
|
|
125
|
+
// Sayfa yüklendiğinde widget oluştur (küçük gecikme ile - config hazır olsun)
|
|
126
|
+
setTimeout(function () {
|
|
127
|
+
createFloatingWidget();
|
|
128
|
+
}, 500);
|
|
129
|
+
|
|
130
|
+
// Her sayfa değişiminde widget'ı kontrol et ve güncelle
|
|
131
|
+
$(window).on('action:ajaxify.end', function () {
|
|
132
|
+
// Widget yoksa oluştur
|
|
133
|
+
if ($('#niki-floating-widget').length === 0) {
|
|
134
|
+
createFloatingWidget();
|
|
135
|
+
} else {
|
|
136
|
+
// Varsa puanı güncelle
|
|
137
|
+
updateFloatingWidget();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
120
140
|
|
|
121
141
|
// -------------------------------------------------------------
|
|
122
142
|
// 🌅 GÜNLÜK GİRİŞ KONTROLÜ (Session açık olsa bile puan ver)
|