Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
90ec0f4e
Commit
90ec0f4e
authored
Jun 07, 2021
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused `uris` method
parent
36d13ca2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
21 deletions
+0
-21
html-metadata.js
src/annotator/integrations/html-metadata.js
+0
-16
html-metadata-test.js
src/annotator/integrations/test/html-metadata-test.js
+0
-5
No files found.
src/annotator/integrations/html-metadata.js
View file @
90ec0f4e
...
@@ -77,22 +77,6 @@ export class HTMLMetadata {
...
@@ -77,22 +77,6 @@ export class HTMLMetadata {
return
uri
;
return
uri
;
}
}
/**
* Returns all uris for the document being annotated
*
* @return {string[]}
*/
uris
()
{
const
metadata
=
this
.
getDocumentMetadata
();
const
uniqueUrls
=
{};
for
(
let
link
of
metadata
.
link
)
{
if
(
link
.
href
)
{
uniqueUrls
[
link
.
href
]
=
true
;
}
}
return
Object
.
keys
(
uniqueUrls
);
}
/**
/**
* Return metadata for the current page.
* Return metadata for the current page.
*
*
...
...
src/annotator/integrations/test/html-metadata-test.js
View file @
90ec0f4e
...
@@ -196,11 +196,6 @@ describe('HTMLMetadata', function () {
...
@@ -196,11 +196,6 @@ describe('HTMLMetadata', function () {
});
});
});
});
it
(
'should have unique uris'
,
function
()
{
const
uris
=
testDocument
.
uris
();
assert
.
equal
(
uris
.
length
,
8
);
});
it
(
'uri() returns the canonical uri'
,
function
()
{
it
(
'uri() returns the canonical uri'
,
function
()
{
const
uri
=
testDocument
.
uri
();
const
uri
=
testDocument
.
uri
();
assert
.
equal
(
uri
,
metadata
.
link
[
5
].
href
);
assert
.
equal
(
uri
,
metadata
.
link
[
5
].
href
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment