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.
- package/library.js +5 -0
- 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);
|