Skip to content

Commit

Permalink
Merge branch 'ffox-local-pdf-error'
Browse files Browse the repository at this point in the history
  • Loading branch information
diegodlh committed Jun 9, 2020
2 parents c8efea2 + 3087adb commit 4d7125d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/background/help-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export default function HelpPage(chromeTabs, extensionURL, browserName_) {
if (error instanceof errors.LocalFileError) {
return this.showLocalFileHelpPage(tab);
} else if (error instanceof errors.NoFileAccessError) {
return this.showNoFileAccessHelpPage(tab);
if (browserName_() === 'firefox') {
return this.showNoFileAccessFirefoxHelpPage(tab);
} else {
return this.showNoFileAccessHelpPage(tab);
}
} else if (error instanceof errors.RestrictedProtocolError) {
return this.showRestrictedProtocolPage(tab);
} else if (error instanceof errors.BlockedSiteError) {
Expand All @@ -35,6 +39,7 @@ export default function HelpPage(chromeTabs, extensionURL, browserName_) {

this.showLocalFileHelpPage = showHelpPage.bind(null, 'local-file');
this.showNoFileAccessHelpPage = showHelpPage.bind(null, 'no-file-access');
this.showNoFileAccessFirefoxHelpPage = showHelpPage.bind(null, 'no-file-access-firefox');
this.showRestrictedProtocolPage = showHelpPage.bind(
null,
'restricted-protocol'
Expand Down
11 changes: 11 additions & 0 deletions src/help/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ <h1 class="help-item__heading">We’re sorry, Hypothesis couldn’t open that fi
</li>
</ol>
</section>
<section id="no-file-access-firefox" class="help-item">
<img class="help-item__icon" src="sad-annotation.svg" />
<h1 class="help-item__heading">We’re sorry, Hypothesis couldn’t open that file…</h1>
<p>If it’s a local PDF document that you’ve opened from your computer,
unfortunately this is not yet supported in this Firefox extension.
</p>
<p>You can use the
<a href="https://web.hypothes.is/help/installing-the-bookmarklet/">bookmarklet</a>
instead.
</p>
</section>
<section id="local-file" class="help-item">
<img class="help-item__icon" src="sad-annotation.svg" />
<h1 class="help-item__heading">We’re sorry, Hypothesis couldn’t open that file…</h1>
Expand Down

0 comments on commit 4d7125d

Please sign in to comment.