This repository has been archived by the owner on May 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
footer.php
75 lines (75 loc) · 2.7 KB
/
footer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* footer.php
*
* 尾部
*
* @author 熊猫小A
*
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
?>
<script>
var serviceWorkerUri = '/SWCacheRule.js';
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register(serviceWorkerUri).then(function() {
if (navigator.serviceWorker.controller) {
console.log('Assets cached by the controlling service worker.');
} else {
console.log('Please reload this page to allow the service worker to handle network operations.');
}
}).catch(function(error) {
console.log('ERROR: ' + error);
});
} else {
console.log('Service workers are not supported in the current browser.');
}
</script>
<?php $this->footer(); ?>
<script src="<?php $this->options->themeUrl('/assets/owo/owo_custom.js'); ?>"></script>
<?php if($this->allow('comment')&&($this->is('post')||$this->is('page')) ): ?>
<script>
var owo = new OwO({
logo: 'OωO表情',
container: document.getElementsByClassName('OwO')[0],
target: document.getElementsByClassName('input-area')[0],
api: '<?php $this->options->themeUrl('/assets/owo/OwO_2.json'); ?>',
position: 'down',
width: '400px',
maxHeight: '250px'
});
</script>
<?php endif; ?>
<script src="<?php $this->options->themeUrl('/assets/hljs/highlight.pack.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/assets/fancybox/jquery.fancybox.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/assets/main.29.js'); ?>"></script>
<!--script src="<?php $this->options->themeUrl('/assets/smothscroll/smothscroll.js'); ?>"></script-->
<?php if($this->options->pjax=='1'): ?>
<script src="<?php $this->options->themeUrl('/assets/pjax/jquery.pjax.js'); ?>"></script>
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/pjax/np.css');?>">
<script src="<?php $this->options->themeUrl('/assets/pjax/np.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/assets/RAW.0c.js'); ?>"></script>
<script>
$(document).on('pjax:complete', function() {
<?php echo $this->options->pjaxreload; ?>
})
</script>
<?php endif; ?>
<?php echo $this->options->customfooter; ?>
<script src='<?php $this->options->themeUrl('/assets/mathjax/2.7.4/MathJax.js'); ?>' async></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<?php if(Utils::isPluginAvailable('Like')):?>
<script>
var cookies = $.macaroon('_syan_like') || "";
$.each($(".post-like"),function(i,item){
var id = $(item).attr('data-pid');
if (-1 !== cookies.indexOf("," + id + ",")) $(item).addClass("done");
})
</script>
<?php endif;?>
</body>
</html>