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
1f5f0665
Commit
1f5f0665
authored
Apr 17, 2018
by
Sheetal Umesh Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove outdated April fool joke.
parent
e6b305e4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
15 deletions
+0
-15
media-embedder.js
src/sidebar/media-embedder.js
+0
-4
media-embedder-test.js
src/sidebar/test/media-embedder-test.js
+0
-11
No files found.
src/sidebar/media-embedder.js
View file @
1f5f0665
...
@@ -105,10 +105,6 @@ function youTubeQueryParams(link) {
...
@@ -105,10 +105,6 @@ function youTubeQueryParams(link) {
* Return a YouTube embed (<iframe>) DOM element for the given video ID.
* Return a YouTube embed (<iframe>) DOM element for the given video ID.
*/
*/
function
youTubeEmbed
(
id
,
link
)
{
function
youTubeEmbed
(
id
,
link
)
{
const
now
=
new
Date
();
if
(
now
.
getFullYear
()
===
2018
&&
now
.
getMonth
()
===
3
&&
now
.
getDate
()
===
1
)
{
id
=
'dQw4w9WgXcQ'
;
}
const
query
=
youTubeQueryParams
(
link
);
const
query
=
youTubeQueryParams
(
link
);
return
iframe
(
`https://www.youtube.com/embed/
${
id
}${
query
}
`
);
return
iframe
(
`https://www.youtube.com/embed/
${
id
}${
query
}
`
);
}
}
...
...
src/sidebar/test/media-embedder-test.js
View file @
1f5f0665
...
@@ -362,15 +362,4 @@ describe('media-embedder', function () {
...
@@ -362,15 +362,4 @@ describe('media-embedder', function () {
assert
.
equal
(
assert
.
equal
(
element
.
children
[
1
].
src
,
'https://www.youtube.com/embed/abcdefg'
);
element
.
children
[
1
].
src
,
'https://www.youtube.com/embed/abcdefg'
);
});
});
it
(
'never gives you up'
,
()
=>
{
var
url
=
'https://www.youtube.com/watch?v=deadbeef'
;
var
element
=
domElement
(
`<a href="
${
url
}
">
${
url
}
</a>`
);
clock
.
tick
(
new
Date
(
'2018-04-01'
).
getTime
());
mediaEmbedder
.
replaceLinksWithEmbeds
(
element
);
assert
.
equal
(
element
.
children
[
0
].
tagName
,
'IFRAME'
);
assert
.
equal
(
element
.
children
[
0
].
src
,
'https://www.youtube.com/embed/dQw4w9WgXcQ'
);
});
});
});
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