Opened 3 years ago

Last modified 3 years ago

#4973 closed defect

Notifications JS error — at Version 6

Reported by: Ross Assignee:
Priority: P1 Milestone: Adblock-Plus-1.13-for-Chrome-Opera
Module: Platform Keywords:
Cc: kzar, trev, rraceanu Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Ross Verified working: no
Review URL(s):

Description (last modified by Ross)


Adblock Plus
Chrome 49 / 56 / Windows 10
Opera 37 / 41 / Windows 7

How to reproduce

  1. Install extension.
  2. Inspect the popup and view the Console.

Observed behaviour

Javascript error related to notifications:
    Uncaught SyntaxError: Identifier 'require' has already been declared
    at notification.js:1

Expected behaviour

JS error to not occur.


The error being thrown in the popup's console is a regression caused by Issue 4795 - Use modern JavaScript syntax.

Change History (6)

comment:1 Changed 3 years ago by kzar

  • Cc trev added
  • Component changed from Unknown to Platform

What did you do to test notifications? When I run this code in the background console:

  id: new Date() | 0,
  type: "normal",
  title: "Notification title",
  message: "<a>Click</a> <a>Configure</a> <a>notification</a> <a>settings</a>",
  urlFilters: ["||^$document"]

and then browse to the notification is displayed. Also the button to open the options page from the notification worked for me.

I can reproduce the console error though, argh.

comment:2 Changed 3 years ago by kzar

  • Description modified (diff)

comment:3 Changed 3 years ago by kzar

  • Description modified (diff)

comment:4 Changed 3 years ago by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 3 years ago by Ross

Ah okay, I was using the popup console instead of the background console. Notifications do work.

comment:6 Changed 3 years ago by Ross

  • Description modified (diff)
  • Summary changed from Notifications JS error / Notifications not working to Notifications JS error
Note: See TracTickets for help on using tickets.