Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: ext/common.js

Issue 29403564: Issue 5083 - Merges chrome subdirectory to top level directory (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome
Left Patch Set: Created April 5, 2017, 10:55 a.m.
Right Patch Set: rebase for dave and sebastians changes, update buildtools dependency Created April 10, 2017, 7:51 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « ext/background.js ('k') | ext/content.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 30 matching lines...) Expand all
41 { 41 {
42 let results = []; 42 let results = [];
43 let listeners = this._listeners.slice(); 43 let listeners = this._listeners.slice();
44 44
45 for (let listener of listeners) 45 for (let listener of listeners)
46 results.push(listener(...args)); 46 results.push(listener(...args));
47 47
48 return results; 48 return results;
49 } 49 }
50 }; 50 };
51 }());
52 51
53 (function()
Sebastian Noack 2017/04/05 11:05:49 No need to create a new IFEE. Just add the code to
Jon Sonesen 2017/04/05 11:39:00 Done.
54 {
55 // Workaround since HTMLCollection and NodeList didn't have iterator support 52 // Workaround since HTMLCollection and NodeList didn't have iterator support
56 // before Chrome 51. 53 // before Chrome 51.
57 // https://bugs.chromium.org/p/chromium/issues/detail?id=401699 54 // https://bugs.chromium.org/p/chromium/issues/detail?id=401699
58 let arrayIterator = Array.prototype[Symbol.iterator]; 55 let arrayIterator = Array.prototype[Symbol.iterator];
59 if (!(Symbol.iterator in HTMLCollection.prototype)) 56 if (!(Symbol.iterator in HTMLCollection.prototype))
60 HTMLCollection.prototype[Symbol.iterator] = arrayIterator; 57 HTMLCollection.prototype[Symbol.iterator] = arrayIterator;
61 if (!(Symbol.iterator in NodeList.prototype)) 58 if (!(Symbol.iterator in NodeList.prototype))
62 NodeList.prototype[Symbol.iterator] = arrayIterator; 59 NodeList.prototype[Symbol.iterator] = arrayIterator;
63 60
64 /* Message passing */ 61 /* Message passing */
(...skipping 10 matching lines...) Expand all
75 return chrome.extension.getBackgroundPage(); 72 return chrome.extension.getBackgroundPage();
76 } 73 }
77 }; 74 };
78 75
79 76
80 /* Utils */ 77 /* Utils */
81 78
82 ext.getURL = chrome.extension.getURL; 79 ext.getURL = chrome.extension.getURL;
83 ext.i18n = chrome.i18n; 80 ext.i18n = chrome.i18n;
84 }()); 81 }());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld