Changes between Version 7 and Version 10 of Ticket #7327


Ignore:
Timestamp:
03/13/2019 11:46:50 AM (15 months ago)
Author:
kzar
Comment:

We need to rethink this API, see the discussion here.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7327

    • Property Status changed from reviewing to closed
    • Property Ready unset
    • Property Resolution changed from to fixed
    • Property Blocking changed from 6936, 7271 to 6936
  • Ticket #7327 – Description

    v7 v10  
    66- Update the mock showOptions function in background.js 
    77 
    8 Something like this: 
    9  
    10 {{{ 
    11 #!diff 
    12 diff --git a/background.js b/background.js 
    13 index 479be40..1bf0e18 100644 
    14 --- a/background.js 
    15 +++ b/background.js 
    16 @@ -453,13 +453,12 @@ 
    17    }; 
    18   
    19    modules.options = { 
    20 -    showOptions(callback) 
    21 +    showOptions() 
    22      { 
    23        if (!/\/(?:mobile|desktop)-options\.html\b/.test(top.location.href)) 
    24          window.open("desktop-options.html", "_blank"); 
    25   
    26 -      if (callback) 
    27 -        callback(); 
    28 +      return Promise.resolve(); 
    29      } 
    30    }; 
    31   
    32 diff --git a/messageResponder.js b/messageResponder.js 
    33 index 3f2a1ac..e0f68a7 100644 
    34 --- a/messageResponder.js 
    35 +++ b/messageResponder.js 
    36 @@ -258,7 +258,7 @@ 
    37    { 
    38      if (message.what == "options") 
    39      { 
    40 -      showOptions(() => 
    41 +      showOptions().then(() => 
    42        { 
    43          if (!message.action) 
    44            return; 
    45 @@ -405,7 +405,7 @@ 
    46        if ("homepage" in message) 
    47          subscription.homepage = message.homepage; 
    48   
    49 -      showOptions(() => 
    50 +      showOptions().then(() => 
    51        { 
    52          sendMessage("app", "addSubscription", subscription); 
    53        }); 
    54 }}} 
    55  
    568See also [https://gitlab.com/eyeo/adblockplus/abpui/adblockplusui/issues/348 ui#348]. 
    579