nodebb-plugin-ezoic-infinite 1.4.13 → 1.4.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/client.js +8 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.4.13",
3
+ "version": "1.4.14",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",
package/public/client.js CHANGED
@@ -681,16 +681,17 @@
681
681
 
682
682
  enforceNoAdjacentAds();
683
683
 
684
- // Forcer Ezoic à recalculer le nombre de mots après insertion de nouveaux wrappers
685
- // Nécessaire pour infinite scroll : Ezoic ne recalcule pas automatiquement
684
+ // Forcer Ezoic à re-scanner les placeholders et recalculer le contenu
685
+ // après insertion de nouveaux wrappers (nécessaire pour infinite scroll)
686
686
  if (inserted > 0) {
687
687
  try {
688
- if (window.ezstandalone && typeof window.ezstandalone.refresh === 'function') {
689
- window.ezstandalone.refresh();
690
- } else if (window.ezstandalone && typeof window.ezstandalone.updateContent === 'function') {
691
- window.ezstandalone.updateContent();
688
+ if (window.ezstandalone && typeof window.ezstandalone.defineSlots === 'function') {
689
+ // defineSlots() force un re-scan sans l'erreur "cannot call refresh"
690
+ window.ezstandalone.defineSlots();
692
691
  }
693
- } catch (e) {}
692
+ } catch (e) {
693
+ // Fallback silencieux si defineSlots n'existe pas
694
+ }
694
695
  }
695
696
 
696
697
  scheduleRefill(250);