鲨鱼默认隐藏mediainfo

默认隐藏mediainfo

目前为 2023-03-31 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 鲨鱼默认隐藏mediainfo
  3. // @namespace https://sharkpt.net
  4. // @icon https://sharkpt.net/favicon.ico
  5. // @version 1.0
  6. // @description 默认隐藏mediainfo
  7. // @match https://sharkpt.net/details.php?*
  8. // @require https://cdn.staticfile.org/jquery/3.6.4/jquery.min.js
  9. // @author freefrank
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. 'use strict';
  15.  
  16. $(document).ready(function () {
  17. // Find the target element
  18. const targetElement = $('td.rowfollow[valign="top"][align="left"] > div.nexus-media-info-raw');
  19.  
  20. // Create and add the show/hide button
  21. const button = $('<button>').text('Show').css('margin-bottom', '5px');
  22. targetElement.before(button);
  23.  
  24. // Hide the target element by default
  25. targetElement.hide();
  26.  
  27. // Toggle the visibility of the target element when the button is clicked
  28. button.on('click', function () {
  29. targetElement.toggle();
  30. if (button.text() === 'Show') {
  31. button.text('Hide');
  32. } else {
  33. button.text('Show');
  34. }
  35. });
  36. });
  37. })();

QingJ © 2025

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