aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-07-03 17:32:40 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-07-03 17:56:11 -0700
commit58b780563c7fc4a1496f5c676f2d14faddb096e0 (patch)
treeda4779eb6168ea931378cca2fd91a399494b7b81 /src/client/views/MainView.tsx
parent1934623881cf548e4dbe8e70eb2995ec2f6b8399 (diff)
merge with master
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index f6db1af66..c0edf7032 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -99,7 +99,7 @@ export class MainView extends React.Component {
window.removeEventListener("keydown", KeyManager.Instance.handle);
window.addEventListener("keydown", KeyManager.Instance.handle);
window.addEventListener("paste", KeyManager.Instance.paste as any);
- document.addEventListener("dash", (e: any) => { // event used by chrome plugin to tell Dash which document to focus on
+ document.addEventListener("dash", (e: any) => { // event used by chrome plugin to tell Dash which document to focus on
const id = FormattedTextBox.GetDocFromUrl(e.detail);
DocServer.GetRefField(id).then(doc => {
if (doc instanceof Doc) {
@@ -107,6 +107,10 @@ export class MainView extends React.Component {
}
});
});
+ document.addEventListener("linkComplete", (e: any) => { // event used by Hypothes.is plugin to tell Dash when an annotation has been linked
+ const annotatedUrl = e.details;
+ console.log("This website " + annotatedUrl + " has a linked annotation");
+ });
}
componentWillUnMount() {