Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122450514
BaseUriRuntimeModule.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 17, 22:51
Size
653 B
Mime Type
text/x-c++
Expires
Sat, Jul 19, 22:51 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27486837
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
BaseUriRuntimeModule.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict"
;
const
RuntimeGlobals
=
require
(
"../RuntimeGlobals"
);
const
RuntimeModule
=
require
(
"../RuntimeModule"
);
class
BaseUriRuntimeModule
extends
RuntimeModule
{
constructor
()
{
super
(
"base uri"
,
RuntimeModule
.
STAGE_ATTACH
);
}
/**
* @returns {string} runtime code
*/
generate
()
{
const
{
chunk
}
=
this
;
const
options
=
chunk
.
getEntryOptions
();
return
`
$
{
RuntimeGlobals
.
baseURI
}
=
$
{
options
.
baseUri
===
undefined
?
"undefined"
:
JSON
.
stringify
(
options
.
baseUri
)
};
`
;
}
}
module
.
exports
=
BaseUriRuntimeModule
;
Event Timeline
Log In to Comment