nodebb-plugin-ezoic-infinite 1.9.1 → 1.9.2

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/library.js +5 -0
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -208,8 +208,13 @@ plugin.addAdminNavigation = async (header) => {
208
208
  return header;
209
209
  };
210
210
 
211
+ const NO_ADS_PATHS = /^\/(login|register|reset|confirm|email-confirm|sso|oauth|admin)(\/|$)/i;
212
+
211
213
  plugin.injectEzoicHead = async (data) => {
212
214
  try {
215
+ const reqPath = data.req?.path ?? '';
216
+ if (NO_ADS_PATHS.test(reqPath)) return data;
217
+
213
218
  const settings = await getSettings();
214
219
  const uid = data.req?.uid ?? 0;
215
220
  const excluded = await isUserExcluded(uid, settings.excludedGroups);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-ezoic-infinite",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "Production-ready Ezoic infinite ads integration for NodeBB 4.x",
5
5
  "main": "library.js",
6
6
  "license": "MIT",