P3DM Timer Bypass

Download page timer bypass

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

  1. // ==UserScript==
  2. // @name P3DM Timer Bypass
  3. // @description Download page timer bypass
  4. // @description:ru Обход таймера страницы загрузки
  5. // @namespace Violentmonkey Scripts
  6. // @icon https://www.google.com/s2/favicons?sz=64&domain=p3dm.ru
  7. // @version 1.0.1
  8. // @author Wizzergod
  9. // @license MIT
  10. // @match https://p3dm.ru/download-en.html*
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. function decryptCode(code) {
  18. return atob(code);
  19. }
  20.  
  21. function getDecryptedLink() {
  22. var url = window.location.href;
  23. var startIndex = url.indexOf('?') + 1;
  24. var code = url.substring(startIndex);
  25. var decryptedCode = decryptCode(code);
  26. var newLink = decryptedCode;
  27. return newLink;
  28. }
  29.  
  30. function createButton(newLink) {
  31. var downloadsPage = document.querySelector('.downloads_page');
  32. if (downloadsPage) {
  33.  
  34. var linkPlace = document.getElementById('linkPlace');
  35. if (linkPlace) {
  36. linkPlace.style.display = 'none';
  37. }
  38.  
  39. var download = document.querySelector('.download');
  40. if (download) {
  41. download.style.display = 'none';
  42. }
  43.  
  44. var button = document.createElement('a');
  45. button.href = newLink;
  46. button.style.display = 'flex';
  47. button.style.alignItems = 'center';
  48. button.style.justifyContent = 'center';
  49. button.style.minWidth = '20.21%';
  50. button.style.height = '30px';
  51. button.style.padding = '20px';
  52. button.style.fontSize = '1.3em';
  53. button.style.textDecoration = 'none';
  54. button.style.color = '#ffffff';
  55. button.style.backgroundColor = '#28a745';
  56. button.style.border = 'solid 1px #333';
  57. button.style.borderRadius = '3px';
  58. button.style.oBorderRadius = '3px';
  59. button.style.mozBorderRadius = '3px';
  60. button.style.webkitBorderRadius = '3px';
  61.  
  62. var icon = document.createElement('span');
  63. icon.className = 'icon-download';
  64. icon.style.marginRight = '5px';
  65. button.appendChild(icon);
  66.  
  67. var buttonText = document.createElement('span');
  68. buttonText.textContent = 'DOWNLOAD';
  69. button.appendChild(buttonText);
  70.  
  71. downloadsPage.appendChild(button);
  72. }
  73. }
  74.  
  75. function decryptAndCreateButton() {
  76. var newLink = getDecryptedLink();
  77. createButton(newLink);
  78. }
  79.  
  80. decryptAndCreateButton();
  81. })();