Powerwatch Download Button

This script adds a download button to the powerwatch.pw page.

  1. // ==UserScript==
  2. // @name Powerwatch Download Button
  3. // @namespace PWDB
  4. // @author MegaByte
  5. // @description This script adds a download button to the powerwatch.pw page.
  6. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  7. // @run-at document-end
  8. // @noframes
  9. // @include http*://*powerwatch.pw/*
  10. // @version 3.0
  11. // @grant GM_addStyle
  12. // ==/UserScript==
  13.  
  14.  
  15. var player = $("#vplayer");
  16.  
  17. if(player.length != 0) {
  18. $("body").find("script").each(function() {
  19. var patt = new RegExp("file:\\s?\"https?:\\/\\/.+?\\.mp4\"");
  20. var res = patt.exec($(this).html());
  21. if(res !== null) {
  22. var url = res[0].substring(6, res[0].length-1);
  23. addButton(url);
  24. }
  25. });
  26. }
  27.  
  28. function addButton(url) {
  29. $("h5.h4-fine").html("<span class='head'>"+$("h5.h4-fine").html()+"</span><span class='down'><a href='" + url + "' download target='_blank'>Download</a></span>")
  30. GM_addStyle("h5.h4-fine { display: flex; } h5.h4-fine .head { flex-grow: 1; } h5.h4-fine .down { flex-grow: 0; }");
  31. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址