 Issue 6346177440120832:
  Added abstraction for frames, to fix domain-based rules, whitelisting and ad counter on Safari  (Closed)
    
  
    Issue 6346177440120832:
  Added abstraction for frames, to fix domain-based rules, whitelisting and ad counter on Safari  (Closed) 
  | Left: | ||
| Right: | 
| LEFT | RIGHT | 
|---|---|
| 1 /* | 1 /* | 
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 
| 3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 }; | 65 }; | 
| 66 MessageEventTarget.prototype = { | 66 MessageEventTarget.prototype = { | 
| 67 __proto__: WrappedEventTarget.prototype, | 67 __proto__: WrappedEventTarget.prototype, | 
| 68 _wrapListener: function(listener) | 68 _wrapListener: function(listener) | 
| 69 { | 69 { | 
| 70 return function(event) | 70 return function(event) | 
| 71 { | 71 { | 
| 72 if (event.name == "request") | 72 if (event.name == "request") | 
| 73 listener(event.message.payload, this._getSenderDetails(event), functio n(message) | 73 listener(event.message.payload, this._getSenderDetails(event), functio n(message) | 
| 74 { | 74 { | 
| 75 this._getResponseDispatcher(event).dispatchMessage("response", { | 75 this._getResponseDispatcher(event).dispatchMessage("response", | 
| 
Felix Dahlke
2014/01/18 13:39:19
{ should go on its own line
 
Sebastian Noack
2014/01/19 10:19:40
Done.
 | |
| 76 { | |
| 76 requestId: event.message.requestId, | 77 requestId: event.message.requestId, | 
| 77 payload: message | 78 payload: message | 
| 78 }); | 79 }); | 
| 79 }.bind(this)); | 80 }.bind(this)); | 
| 80 }.bind(this); | 81 }.bind(this); | 
| 81 } | 82 } | 
| 82 }; | 83 }; | 
| 83 | 84 | 
| 84 | 85 | 
| 85 /* Message passing */ | 86 /* Message passing */ | 
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 /* API */ | 209 /* API */ | 
| 209 | 210 | 
| 210 ext = { | 211 ext = { | 
| 211 getURL: function(path) | 212 getURL: function(path) | 
| 212 { | 213 { | 
| 213 return safari.extension.baseURI + path; | 214 return safari.extension.baseURI + path; | 
| 214 }, | 215 }, | 
| 215 i18n: new I18n() | 216 i18n: new I18n() | 
| 216 }; | 217 }; | 
| 217 })(); | 218 })(); | 
| LEFT | RIGHT |