Opened 2 years ago

Last modified 2 years ago

#4856 new change

Reimplement getDocLink assignment in adblockplusUI

Reported by: saroyanm Assignee:
Priority: P3 Milestone:
Module: User-Interface Keywords:
Cc: greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by greiner)

Background

We do use getDocLink function to assign redirectable, localized links. Usage of that function, both in new-options.js and firstRun.js is messy and inefficient due to unnecessary repetition.

What to change

Use the data-doclink attribute to assign links that use adblockplus.org/redirect to anchor tags on the page (similar to data-i18n).

Note that as soon as the messaging API supports it, we could make use of the initialization code to aggregate all "app.get" messages into a single one to avoid unnecessary message passing.

Change History (2)

comment:1 Changed 2 years ago by saroyanm

  • Description modified (diff)

I created this as a part of current discussion:

  • Are changes fine with you @Thomas ?
  • I didn't make this should blocker for #2706, let me know if you think it should be.
Version 0, edited 2 years ago by saroyanm (next)

comment:2 Changed 2 years ago by greiner

  • Description modified (diff)
  • Priority changed from Unknown to P3
  • Ready set

I'm fine with the proposed changes but I'd suggest tackling the efficiency issue separately. The reason for that being that multiple input and output values were initially part of the messaging protocol but got rejected. Therefore we first need to agree on an appropriate way on how we can minimize the communication overhead between background page and other pages - requesting multiple values at once is only one possible approach.

Note: See TracTickets for help on using tickets.