Guest User

Untitled

a guest
Jan 17th, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
  2. <script src="https://cdn.staticfile.org/layer/2.3/layer.js"></script>
  3. <script>
  4. $(function () {
  5. $('.file a').each(function() {
  6. $(this).on('click', function() {
  7. if(this.href.lastIndexOf(".mp4") > 1) {
  8. layer.open({
  9. type: 1,
  10. title: decodeURI(this.href.substring(this.href.lastIndexOf("/") + 1, this.href.length)),
  11. shadeClose: true,
  12. shade: 0.8,
  13. area: ['100%', '100%'],
  14. content: '<center><video controls autoplay=true preload=auto style="width:80%;object-fit: cover;" src="' + this.href + '"></video></center>'
  15. });
  16. return false;
  17. }
  18. });
  19. });
  20. });
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment