at path:
ROOT
/
wp-content
/
plugins
/
optinmonster
/
assets
/
js
/
global.js
run:
R
W
Run
Elementor
DIR
2025-12-13 10:18:39
R
W
Run
Utils
DIR
2025-12-13 10:18:39
R
W
Run
admin.js
1.08 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
block.json
476 By
2025-11-20 19:51:54
R
W
Run
Delete
Rename
editor.js
11.13 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
elementor.js
4.26 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
global.js
2.21 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
helper.js
4.73 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
mailpoet.js
1.13 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
metabox.js
1.88 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
om-format.js
617 By
2025-11-20 19:51:54
R
W
Run
Delete
Rename
om-settings.js
632 By
2025-11-20 19:51:54
R
W
Run
Delete
Rename
plugininstall.js
2.06 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
wc-marketing.js
1.53 KB
2025-11-20 19:51:54
R
W
Run
Delete
Rename
error_log
up
📄
global.js
Save
/* ========================================================== * global.js * ========================================================== * Copyright 2021 Awesome Motive. * https://awesomemotive.com * ========================================================== */ window.OMAPI_Global = window.OMAPI_Global || {}; (function (window, document, $, app, undefined) { 'use strict'; app.updateNotifications = function () { $.ajax({ async: true, url: app.url, headers: { 'x-wp-nonce': app.nonce, }, }).done(function (response) { // If the app is running, we don't need to proceed (the app handles it). if (window.omWpApi) { return; } var total = response.length; var $name = app.$.menu.find('.toplevel_page_optin-monster-dashboard .wp-menu-name'); var $count = $name.find('.om-notifications-count'); var countString = String(total); var classes = 'om-notifications-count update-plugins count-' + countString; if ($count.length) { $count.attr('class', classes); $count.find('.plugin-count').text(countString); } else { $name.html( 'OptinMonster <span class="' + classes + '"><span class="plugin-count">' + countString + '</span></span>' ); } }); }; app.init = function () { app.$ = { menu: $(document.getElementById('toplevel_page_optin-monster-dashboard')), }; if (app.upgradeUrl) { app.$.menu .find('.wp-submenu [href="admin.php?page=optin-monster-upgrade"]') .attr('target', '_blank') .attr('rel', 'noopener') .attr('href', app.upgradeUrl); app.$.menu.find('.om-menu-highlight').closest('li').addClass('om-submenu-highlight'); } const bfcmItem = app.$.menu.find('.om-menu-bfcm-highlight'); if (bfcmItem.length) { // Add BFCM highlight class to menu item. bfcmItem.closest('li').addClass('om-submenu-bfcm-highlight'); // Keep BFCM at top visually but make parent menu click go to Dashboard. app.$.menu.find('> a').attr('href', 'admin.php?page=optin-monster-dashboard'); } // If the app is not running, and we should fetch updated notifications... if (!window.omWpApi && app.fetchNotifications) { app.updateNotifications(); } }; $(app.init); })(window, document, jQuery, window.OMAPI_Global);