Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3616 closed change (fixed)

Turn popupBlocker.js into a module

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 (last modified by sebastian)

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 (4)

comment:1 Changed 4 years ago by sebastian

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

comment:2 Changed 4 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:3 Changed 4 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next

comment:4 Changed 4 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Implemented and popup blocking still works.

ABP 1.10.2.1559
Chrome 30 / 35 / 48 / Windows 7 x64
Chrome 43 / OS X 10.11
Chrome 48 / Ubuntu 14.04 x64
Opera 23 / 27 / Windows 7 x64
Opera 28 / OS X 10.11
Opera 35 / Ubuntu 14.04 x64

Note: See TracTickets for help on using tickets.