Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Chaillet
doi-landing-page
Commits
ddbded35
Commit
ddbded35
authored
Apr 30, 2019
by
Maxime Chaillet
Browse files
add script in dom without using jquery. This is a test.
parent
a9940c93
Pipeline
#10582
failed with stages
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
www/min/doi.min.js
View file @
ddbded35
This diff is collapsed.
Click to expand it.
www/src/doiview.js
View file @
ddbded35
...
...
@@ -180,11 +180,16 @@ DOIView.prototype.setDataAccessMessage = function (doiData) {
* @param {string} data doi metadata in Json+LD format as provided by datacite.
*/
DOIView
.
prototype
.
addDOIMetadataToHead
=
function
(
data
)
{
$
(
'
#test
'
).
append
(
$
(
'
<script>
'
)
.
attr
(
'
type
'
,
'
application/ld+json
'
)
.
text
(
data
)
);
// $('#test').append(
// $('<script>')
// .attr('type', 'application/ld+json')
// .text(data)
// );
var
scriptNode
=
document
.
createElement
(
'
script
'
);
scriptNode
.
type
=
'
application/ld+json
'
;
scriptNode
.
text
=
data
;
document
.
getElementById
(
'
test
'
).
appendChild
(
scriptNode
);
// $('<script>')
// .attr('type', 'application/ld+json')
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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