Use self-hosted JavaScript libraries
Add iFrameResizer for when the publication lists are included via an iframe. Add self-hosted copies of jQuery and MathJax. Fix some styling in the code and in the HTML via CSS
This commit is contained in:
+24
-1
@@ -4,6 +4,10 @@ bibtexbrowser_configure('ABBRV_TYPE','key');
|
||||
bibtexbrowser_configure('BIBTEXBROWSER_LAYOUT','table');
|
||||
// URL to individual files
|
||||
bibtexbrowser_configure('BIBTEXBROWSER_URL',"https://publications.zrd-saar.de/");
|
||||
// URL to jQuery
|
||||
bibtexbrowser_configure('JQUERY_URI', '/static/jquery-3.6.4.min.js');
|
||||
// URL to MathJax
|
||||
bibtexbrowser_configure('MATHJAX_URI', '/static/TeX-AMS_HTML.V2.7.1.js');
|
||||
// target for links
|
||||
bibtexbrowser_configure('BIBTEXBROWSER_LINKS_TARGET','_blank');
|
||||
// use IEEE Transactions-like style, e.g. puts authors in front of title
|
||||
@@ -37,4 +41,23 @@ bibtexbrowser_configure('BIBTEXBROWSER_URL_BUILDER', 'url_builder_static');
|
||||
function url_builder_static($bibentry) {
|
||||
return BIBTEXBROWSER_URL.'keys/'.$bibentry->getKey().'.html';
|
||||
}
|
||||
?>
|
||||
|
||||
// A custom function for the MathJax footer to use the static URL instead of the CDN one
|
||||
// Also include iframeResizer JS
|
||||
function javascript_math() {
|
||||
?>
|
||||
<script>
|
||||
MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" id="MathJax-script" async src="/static/tex-mml-chtml.js">
|
||||
</script>
|
||||
<script type="text/javascript" id="iFrameResizer" src="/static/iframe-resizer.child.js">
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user