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

Side by Side Diff: firstRun.js

Issue 8681105: Show a warning to people having a corrupted file storage (Closed)
Patch Set: Created Oct. 30, 2012, 10:28 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 | « firstRun.html ('k') | lib/adblockplus_compat.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the Adblock Plus extension, 2 * This file is part of the Adblock Plus extension,
3 * Copyright (C) 2006-2012 Eyeo GmbH 3 * Copyright (C) 2006-2012 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Set up page title 93 // Set up page title
94 var titleId = (backgroundPage.isFirstRun ? "firstRun_title_install" : "firstRu n_title_update"); 94 var titleId = (backgroundPage.isFirstRun ? "firstRun_title_install" : "firstRu n_title_update");
95 var pageTitle = i18n.getMessage(titleId); 95 var pageTitle = i18n.getMessage(titleId);
96 document.title = document.getElementById("title-main").textContent = pageTitle ; 96 document.title = document.getElementById("title-main").textContent = pageTitle ;
97 97
98 // Only show changelog link on the update page 98 // Only show changelog link on the update page
99 if (backgroundPage.isFirstRun) 99 if (backgroundPage.isFirstRun)
100 document.getElementById("title-changelog").style.display = "none"; 100 document.getElementById("title-changelog").style.display = "none";
101 101
102 // Show warning if data corruption was detected
103 if (backgroundPage.seenDataCorruption)
104 document.getElementById("dataCorruptionWarning").removeAttribute("hidden");
105
102 // Set up URLs 106 // Set up URLs
103 var versionId = chrome.app.getDetails().version.split(".").slice(0, 2).join("" ); 107 var versionId = chrome.app.getDetails().version.split(".").slice(0, 2).join("" );
104 setLinks("title-changelog", "https://adblockplus.org/releases/adblock-plus-" + versionId + "-for-google-chrome-released"); 108 setLinks("title-changelog", "https://adblockplus.org/releases/adblock-plus-" + versionId + "-for-google-chrome-released");
105 setLinks("acceptableAdsExplanation", getDocLink("acceptable_ads", "criteria"), 109 setLinks("acceptableAdsExplanation", getDocLink("acceptable_ads", "criteria"),
106 backgroundPage.openOptions); 110 backgroundPage.openOptions);
111 setLinks("dataCorruptionWarning", getDocLink("knownIssuesChrome_filterstorage" ));
107 112
108 initSocialLinks(variant); 113 initSocialLinks(variant);
109 114
110 var donateLink = document.getElementById("share-donate"); 115 var donateLink = document.getElementById("share-donate");
111 donateLink.href = getDocLink("donate") + "&variant=" + variant; 116 donateLink.href = getDocLink("donate") + "&variant=" + variant;
112 } 117 }
113 window.addEventListener("load", init, false); 118 window.addEventListener("load", init, false);
114 119
115 function setLinks(id) 120 function setLinks(id)
116 { 121 {
(...skipping 16 matching lines...) Expand all
133 } 138 }
134 } 139 }
135 } 140 }
136 141
137 function getDocLink(page, anchor) 142 function getDocLink(page, anchor)
138 { 143 {
139 return Prefs.documentation_link 144 return Prefs.documentation_link
140 .replace(/%LINK%/g, page) 145 .replace(/%LINK%/g, page)
141 .replace(/%LANG%/g, Utils.appLocale) + (anchor ? "#" + anchor : "" ); 146 .replace(/%LANG%/g, Utils.appLocale) + (anchor ? "#" + anchor : "" );
142 } 147 }
OLDNEW
« no previous file with comments | « firstRun.html ('k') | lib/adblockplus_compat.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld