}
const stopwatchEl = $('.active-stopwatch-trigger');
+
+ if (!stopwatchEl.length) {
+ return;
+ }
+
stopwatchEl.removeAttr('href'); // intended for noscript mode only
stopwatchEl.popup({
position: 'bottom right',
$(this).parent().trigger('submit');
});
- if (!stopwatchEl) {
- return;
- }
-
if (NotificationSettings.EventSourceUpdateTime > 0 && !!window.EventSource && window.SharedWorker) {
// Try to connect to the event source via the shared worker first
const worker = new SharedWorker(`${__webpack_public_path__}js/eventsource.sharedworker.js`, 'notification-worker');