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

Side by Side Diff: chromeDevenvPoller__.js

Issue 29573134: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/buildtools/
Patch Set: Remove change from geckoInfo.js.tmpl Created Oct. 11, 2017, 11:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 (function() 5 (function()
6 { 6 {
7 var version = null; 7 var version = null;
8 function doPoll() 8 function doPoll()
9 { 9 {
10 fetch(chrome.extension.getURL("devenvVersion__")) 10 fetch(browser.extension.getURL("devenvVersion__"))
11 .then(function(response) 11 .then(function(response)
12 { 12 {
13 return response.text(); 13 return response.text();
14 }) 14 })
15 .then(function(text) 15 .then(function(text)
16 { 16 {
17 if (version == null) 17 if (version == null)
18 version = text; 18 version = text;
19 19
20 if (text != version) 20 if (text != version)
21 chrome.runtime.reload(); 21 browser.runtime.reload();
22 else 22 else
23 window.setTimeout(doPoll, 5000); 23 window.setTimeout(doPoll, 5000);
24 }); 24 });
25 } 25 }
26 26
27 // Delay first poll to prevent reloading again immediately after a reload 27 // Delay first poll to prevent reloading again immediately after a reload
28 doPoll(); 28 doPoll();
29 })(); 29 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld