Opened 4 years ago

Last modified 4 years ago

#3616 closed change

Turn popupBlocker.js into a module — at Initial Version

Reported by: sebastian Assignee: sebastian
Priority: P4 Milestone: Adblock-Plus-1.11-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29335388

Description

Background

A while ago, we started to isolate code in adblockpluschrome using (jsHydra) modules, to improve encapsulation. As a side-effect, we can also use some ES6 features in modules that we cannot use otherwise.

Also since #2711 it's now possible to exclude individual modules in a derived metadata (e.g. for a particular platform).

So by turning popupBlocker.js into a module we can tidy up the code, and instead of checking for the platform, we can simply exclude the module from the Safari build.

What to change

  • Turn popupBlocker.js into a module located under lib/.
  • Replace var with `let statements.
  • Use arrow functions where appropriate.
  • Exclude lib/popupBlocker.js in metadata.safari

Change History (0)

Note: See TracTickets for help on using tickets.