mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
add isLocalhost
This commit is contained in:
1 parent
8ad6550d12
commit
6f84fcc8f2
2 files changed
+33
-12
No files matched your search
+25
-11
@@ -29,25 +29,31 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li class="title">Plugins</li>
|
<li class="title">Plugins</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif">artplayer-plugin-gif</a>
|
<a
|
||||||
|
href="./?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif">artplayer-plugin-gif</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight">artplayer-plugin-backlight</a>
|
<a
|
||||||
|
href="./?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight">artplayer-plugin-backlight</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku">artplayer-plugin-danmuku</a>
|
<a
|
||||||
|
href="./?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku">artplayer-plugin-danmuku</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-playlist.js%0A.%2Funcompiled%2Fartplayer-plugin-playlist.css&example=playlist">artplayer-plugin-playlist</a>
|
<a
|
||||||
|
href="./?libs=.%2Funcompiled%2Fartplayer-plugin-playlist.js%0A.%2Funcompiled%2Fartplayer-plugin-playlist.css&example=playlist">artplayer-plugin-playlist</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="title">Tools</li>
|
<li class="title">Tools</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail">artplayer-tool-thumbnail</a>
|
<a
|
||||||
|
href="./?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail">artplayer-tool-thumbnail</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github">artplayer-tool-github</a>
|
<a
|
||||||
|
href="./?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github">artplayer-tool-github</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -67,10 +73,12 @@
|
|||||||
<a href="https://www.paypal.me/harveyzack">Paypal</a>
|
<a href="https://www.paypal.me/harveyzack">Paypal</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/zhw2590582/ArtPlayer/blob/master/images/wechatpay.jpg">WeChat Pay</a>
|
<a href="https://github.com/zhw2590582/ArtPlayer/blob/master/images/wechatpay.jpg">WeChat
|
||||||
|
Pay</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://github.com/zhw2590582/ArtPlayer/blob/master/images/alipay.jpg">Alipay</a>
|
<a
|
||||||
|
href="https://github.com/zhw2590582/ArtPlayer/blob/master/images/alipay.jpg">Alipay</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,17 +111,23 @@
|
|||||||
<script src="./uncompiled/artplayer.js"></script>
|
<script src="./uncompiled/artplayer.js"></script>
|
||||||
<script src="./assets/js/common.js"></script>
|
<script src="./assets/js/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
var isLocalhost = Boolean(
|
||||||
|
window.location.hostname === 'localhost' ||
|
||||||
|
window.location.hostname === '[::1]' ||
|
||||||
|
window.location.hostname.match(
|
||||||
|
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||||
|
)
|
||||||
|
);
|
||||||
var _hmt = _hmt || [];
|
var _hmt = _hmt || [];
|
||||||
(function () {
|
(function () {
|
||||||
if (window.location.hostname !== 'localhost') {
|
if (!isLocalhost) {
|
||||||
var hm = document.createElement('script');
|
var hm = document.createElement('script');
|
||||||
hm.src = 'https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d';
|
hm.src = 'https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d';
|
||||||
var s = document.getElementsByTagName('script')[0];
|
var s = document.getElementsByTagName('script')[0];
|
||||||
s.parentNode.insertBefore(hm, s);
|
s.parentNode.insertBefore(hm, s);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
+8
-1
@@ -22,9 +22,16 @@
|
|||||||
<script src="./uncompiled/artplayer.js"></script>
|
<script src="./uncompiled/artplayer.js"></script>
|
||||||
<script src="./assets/js/mobile.js"></script>
|
<script src="./assets/js/mobile.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
var isLocalhost = Boolean(
|
||||||
|
window.location.hostname === 'localhost' ||
|
||||||
|
window.location.hostname === '[::1]' ||
|
||||||
|
window.location.hostname.match(
|
||||||
|
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||||
|
)
|
||||||
|
);
|
||||||
var _hmt = _hmt || [];
|
var _hmt = _hmt || [];
|
||||||
(function () {
|
(function () {
|
||||||
if (window.location.hostname !== 'localhost') {
|
if (!isLocalhost) {
|
||||||
var hm = document.createElement('script');
|
var hm = document.createElement('script');
|
||||||
hm.src = 'https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d';
|
hm.src = 'https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d';
|
||||||
var s = document.getElementsByTagName('script')[0];
|
var s = document.getElementsByTagName('script')[0];
|
||||||
|
|||||||
Reference in new issue
Block a user