 Issue 5186743326212096:
  Issue 1843 - Deactivate "Block element" dialog when extension is disabled/uninstalled/reloaded  (Closed)
    
  
    Issue 5186743326212096:
  Issue 1843 - Deactivate "Block element" dialog when extension is disabled/uninstalled/reloaded  (Closed) 
  | Left: | ||
| Right: | 
| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH | 
| 4 * | 4 * | 
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as | 
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. | 
| 8 * | 8 * | 
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, | 
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 384 } | 384 } | 
| 385 | 385 | 
| 386 return frames[0]; | 386 return frames[0]; | 
| 387 } | 387 } | 
| 388 } | 388 } | 
| 389 }; | 389 }; | 
| 390 | 390 | 
| 391 return ext.onMessage._dispatch(message, sender, sendResponse).indexOf(true) != -1; | 391 return ext.onMessage._dispatch(message, sender, sendResponse).indexOf(true) != -1; | 
| 392 }); | 392 }); | 
| 393 | 393 | 
| 394 // We have to register any listener for the onConnect event. Otherwise | |
| 395 // you can't connect any ports. However, we need to connect from the | |
| 396 // content script, in order to detect extension reload/disable/uninstall. | |
| 397 chrome.runtime.onConnect.addListener(function() {}); | |
| 
kzar
2015/01/26 16:05:22
The comment doesn't read quite right, how about th
 
Sebastian Noack
2015/01/26 16:13:56
Doesn't read that much differently for me. But I g
 | |
| 398 | |
| 394 | 399 | 
| 395 /* Storage */ | 400 /* Storage */ | 
| 396 | 401 | 
| 397 ext.storage = localStorage; | 402 ext.storage = localStorage; | 
| 398 | 403 | 
| 399 | 404 | 
| 400 /* Options */ | 405 /* Options */ | 
| 401 | 406 | 
| 402 ext.showOptions = function(callback) | 407 ext.showOptions = function(callback) | 
| 403 { | 408 { | 
| (...skipping 27 matching lines...) Expand all Loading... | |
| 431 callback(new Page(tab)); | 436 callback(new Page(tab)); | 
| 432 } | 437 } | 
| 433 else | 438 else | 
| 434 { | 439 { | 
| 435 ext.pages.open(optionsUrl, callback); | 440 ext.pages.open(optionsUrl, callback); | 
| 436 } | 441 } | 
| 437 }); | 442 }); | 
| 438 }); | 443 }); | 
| 439 }; | 444 }; | 
| 440 })(); | 445 })(); | 
| OLD | NEW |