Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
- <script src="https://cdn.staticfile.org/layer/2.3/layer.js"></script>
- <script>
- $(function () {
- $('.file a').each(function() {
- $(this).on('click', function() {
- if(this.href.lastIndexOf(".mp4") > 1) {
- layer.open({
- type: 1,
- title: decodeURI(this.href.substring(this.href.lastIndexOf("/") + 1, this.href.length)),
- shadeClose: true,
- shade: 0.8,
- area: ['100%', '100%'],
- content: '<center><video controls autoplay=true preload=auto style="width:80%;object-fit: cover;" src="' + this.href + '"></video></center>'
- });
- return false;
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment