Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EBI-Framework
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ebiwd
EBI-Framework
Commits
3f1f3256
Commit
3f1f3256
authored
7 years ago
by
khawkins98
Browse files
Options
Downloads
Patches
Plain Diff
Simplify script checker to just load downtime.js
parent
e630b50a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/ebi-global-includes/script/4_ebiFrameworkContent.js
+19
-34
19 additions, 34 deletions
js/ebi-global-includes/script/4_ebiFrameworkContent.js
js/script.js
+20
-34
20 additions, 34 deletions
js/script.js
with
39 additions
and
68 deletions
js/ebi-global-includes/script/4_ebiFrameworkContent.js
+
19
−
34
View file @
3f1f3256
...
...
@@ -103,42 +103,27 @@ function ebiFrameworkUpdateFoot() {
}
function
ebiFrameworkUpdateFooterMeta
()
{
var
d
=
new
Date
();
var
html
=
'
<div class="columns">
'
+
'
<p class="address">EMBL-EBI, Wellcome Genome Campus, Hinxton, Cambridgeshire, CB10 1SD, UK. +44 (0)1223 49 44 44</p> <p class="legal">Copyright © EMBL-EBI
'
+
d
.
getFullYear
()
+
'
| EMBL-EBI is <a href="http://www.embl.org/">part of the European Molecular Biology Laboratory</a> | <a href="//www.ebi.ac.uk/about/terms-of-use">Terms of use</a>
'
+
'
<a class="readmore float-right" href="http://intranet.ebi.ac.uk">Intranet</a>
'
+
'
</p></div>
'
;
var
d
=
new
Date
();
var
html
=
'
<div class="columns">
'
+
'
<p class="address">EMBL-EBI, Wellcome Genome Campus, Hinxton, Cambridgeshire, CB10 1SD, UK. +44 (0)1223 49 44 44</p> <p class="legal">Copyright © EMBL-EBI
'
+
d
.
getFullYear
()
+
'
| EMBL-EBI is <a href="http://www.embl.org/">part of the European Molecular Biology Laboratory</a> | <a href="//www.ebi.ac.uk/about/terms-of-use">Terms of use</a>
'
+
'
<a class="readmore float-right" href="http://intranet.ebi.ac.uk">Intranet</a>
'
+
'
</p></div>
'
;
function
init
()
{
try
{
var
foot
=
document
.
getElementById
(
'
ebi-footer-meta
'
);
foot
.
innerHTML
=
html
;
}
catch
(
err
)
{
setTimeout
(
init
,
500
);
}
}
init
();
}
function
ebiFrameworkIncludeScripts
()
{
var
requireScripts
=
[
'
//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/js/script.js
'
,
// make sure we have script.js from where we expect
'
//www.ebi.ac.uk/web_guidelines/js/downtime.js?
'
+
Math
.
round
(
new
Date
().
getTime
()
/
3600000
)];
// refresh downtime.js once an hour
function
init
()
{
try
{
var
existingScripts
=
document
.
getElementsByTagName
(
'
script
'
);
var
gotScript
,
i
,
j
,
putScript
;
for
(
j
=
0
;
j
<
requireScripts
.
length
;
j
++
)
{
for
(
gotScript
=
false
,
i
=
0
;
i
<
existingScripts
.
length
;
i
++
)
if
(
existingScripts
[
i
].
src
.
indexOf
(
requireScripts
[
j
])
!==
-
1
)
gotScript
=
true
;
if
(
!
gotScript
)
{
putComment
=
document
.
createComment
(
requireScripts
[
j
]
+
'
automatically inserted
'
);
putScript
=
document
.
createElement
(
'
script
'
);
putScript
.
type
=
'
text/javascript
'
;
putScript
.
src
=
requireScripts
[
j
];
document
.
body
.
appendChild
(
putComment
);
document
.
body
.
appendChild
(
putScript
);
}
}
}
catch
(
err
)
{
setTimeout
(
init
,
500
);
}
try
{
var
foot
=
document
.
getElementById
(
'
ebi-footer-meta
'
);
foot
.
innerHTML
=
html
;
}
catch
(
err
)
{
setTimeout
(
init
,
500
);
}
}
init
();
}
function
ebiFrameworkIncludeScripts
()
{
var
downtimeScript
=
'
//www.ebi.ac.uk/web_guidelines/js/downtime.js?
'
+
Math
.
round
(
new
Date
().
getTime
()
/
3600000
);
putComment
=
document
.
createComment
(
downtimeScript
+
'
automatically inserted
'
);
putScript
=
document
.
createElement
(
'
script
'
);
putScript
.
type
=
'
text/javascript
'
;
putScript
.
src
=
downtimeScript
;
document
.
body
.
appendChild
(
putComment
);
document
.
body
.
appendChild
(
putScript
);
}
This diff is collapsed.
Click to expand it.
js/script.js
+
20
−
34
View file @
3f1f3256
/* Copyright (c) EMBL-EBI 2017 */
// Do not edit this file directly.
// It is made by concating .js files with by npm into script.js.
// Source files: js/ebi-global-includes/script/*.js
function
ebiFrameworkExternalLinks
()
{
// mark pdf/doc/txt links with link-pdf/link-doc/link-txt classes
// exclude links with images
...
...
@@ -220,45 +221,30 @@ function ebiFrameworkUpdateFoot() {
}
function
ebiFrameworkUpdateFooterMeta
()
{
var
d
=
new
Date
();
var
html
=
'
<div class="columns">
'
+
'
<p class="address">EMBL-EBI, Wellcome Genome Campus, Hinxton, Cambridgeshire, CB10 1SD, UK. +44 (0)1223 49 44 44</p> <p class="legal">Copyright © EMBL-EBI
'
+
d
.
getFullYear
()
+
'
| EMBL-EBI is <a href="http://www.embl.org/">part of the European Molecular Biology Laboratory</a> | <a href="//www.ebi.ac.uk/about/terms-of-use">Terms of use</a>
'
+
'
<a class="readmore float-right" href="http://intranet.ebi.ac.uk">Intranet</a>
'
+
'
</p></div>
'
;
var
d
=
new
Date
();
var
html
=
'
<div class="columns">
'
+
'
<p class="address">EMBL-EBI, Wellcome Genome Campus, Hinxton, Cambridgeshire, CB10 1SD, UK. +44 (0)1223 49 44 44</p> <p class="legal">Copyright © EMBL-EBI
'
+
d
.
getFullYear
()
+
'
| EMBL-EBI is <a href="http://www.embl.org/">part of the European Molecular Biology Laboratory</a> | <a href="//www.ebi.ac.uk/about/terms-of-use">Terms of use</a>
'
+
'
<a class="readmore float-right" href="http://intranet.ebi.ac.uk">Intranet</a>
'
+
'
</p></div>
'
;
function
init
()
{
try
{
var
foot
=
document
.
getElementById
(
'
ebi-footer-meta
'
);
foot
.
innerHTML
=
html
;
}
catch
(
err
)
{
setTimeout
(
init
,
500
);
}
}
init
();
}
function
ebiFrameworkIncludeScripts
()
{
var
requireScripts
=
[
'
//www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/js/script.js
'
,
// make sure we have script.js from where we expect
'
//www.ebi.ac.uk/web_guidelines/js/downtime.js?
'
+
Math
.
round
(
new
Date
().
getTime
()
/
3600000
)];
// refresh downtime.js once an hour
function
init
()
{
try
{
var
existingScripts
=
document
.
getElementsByTagName
(
'
script
'
);
var
gotScript
,
i
,
j
,
putScript
;
for
(
j
=
0
;
j
<
requireScripts
.
length
;
j
++
)
{
for
(
gotScript
=
false
,
i
=
0
;
i
<
existingScripts
.
length
;
i
++
)
if
(
existingScripts
[
i
].
src
.
indexOf
(
requireScripts
[
j
])
!==
-
1
)
gotScript
=
true
;
if
(
!
gotScript
)
{
putComment
=
document
.
createComment
(
requireScripts
[
j
]
+
'
automatically inserted
'
);
putScript
=
document
.
createElement
(
'
script
'
);
putScript
.
type
=
'
text/javascript
'
;
putScript
.
src
=
requireScripts
[
j
];
document
.
body
.
appendChild
(
putComment
);
document
.
body
.
appendChild
(
putScript
);
}
}
}
catch
(
err
)
{
setTimeout
(
init
,
500
);
}
try
{
var
foot
=
document
.
getElementById
(
'
ebi-footer-meta
'
);
foot
.
innerHTML
=
html
;
}
catch
(
err
)
{
setTimeout
(
init
,
500
);
}
}
init
();
}
function
ebiFrameworkIncludeScripts
()
{
var
downtimeScript
=
'
//www.ebi.ac.uk/web_guidelines/js/downtime.js?
'
+
Math
.
round
(
new
Date
().
getTime
()
/
3600000
);
putComment
=
document
.
createComment
(
downtimeScript
+
'
automatically inserted
'
);
putScript
=
document
.
createElement
(
'
script
'
);
putScript
.
type
=
'
text/javascript
'
;
putScript
.
src
=
downtimeScript
;
document
.
body
.
appendChild
(
putComment
);
document
.
body
.
appendChild
(
putScript
);
}
function
ebiFrameworkCookieBanner
()
{
function
setCookie
(
c_name
,
value
,
exdays
)
{
var
exdate
=
new
Date
();
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment