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

Side by Side Diff: lib/main.js

Issue 29366570: Issue 4681 - Move URL Fixer first-run page into the extension (Closed) Base URL: https://hg.adblockplus.org/urlfixer
Patch Set: Created Dec. 1, 2016, 1:05 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the URL Fixer, 2 * This file is part of the URL Fixer,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * URL Fixer is free software: you can redistribute it and/or modify 5 * URL Fixer 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 * URL Fixer is distributed in the hope that it will be useful, 9 * URL Fixer 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 let window = Services.wm.getMostRecentWindow("navigator:browser"); 70 let window = Services.wm.getMostRecentWindow("navigator:browser");
71 if (!window) 71 if (!window)
72 return; 72 return;
73 73
74 let oldVersion = Prefs.version; 74 let oldVersion = Prefs.version;
75 Prefs.version = require("info").addonVersion; 75 Prefs.version = require("info").addonVersion;
76 if (!oldVersion || isMajorUpdate(oldVersion, Prefs.version)) 76 if (!oldVersion || isMajorUpdate(oldVersion, Prefs.version))
77 { 77 {
78 let url = "http://urlfixer.org/firstrun/?v=" + Prefs.version; 78 let url = "chrome://url-fixer/content/firstrun/index.html";
79 if (oldVersion) 79 if (oldVersion)
80 url += "&update=1"; 80 url += "&update=1";
81 if ("Browser" in window && typeof window.Browser.addTab != 'undefined') 81 if ("Browser" in window && typeof window.Browser.addTab != 'undefined')
82 { 82 {
83 // window.Browser.addTab(url, true); 83 // window.Browser.addTab(url, true);
84 // No firstrun on Fennec. 84 // No firstrun on Fennec.
85 } 85 }
86 else if ("gBrowser" in window) 86 else if ("gBrowser" in window)
87 window.gBrowser.loadOneTab(url, {inBackground: false}); 87 window.gBrowser.loadOneTab(url, {inBackground: false});
88 } 88 }
89 89
90 require("typoCollector").onBrowserInitialized(window); 90 require("typoCollector").onBrowserInitialized(window);
91 } 91 }
OLDNEW
« chrome/content/firstrun/style.css ('K') | « chrome/content/firstrun/style.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld