Aprove Request Github

Script for aprove automatic requests in github

  1. // ==UserScript==
  2. // @name Aprove Request Github
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @description Script for aprove automatic requests in github
  6. // @author Singularity Chris
  7. // @match https://github.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. document.addEventListener('keydown', function(event) {
  16.  
  17. // Shorcut Ctrl + a
  18. if (event.ctrlKey && event.key === 'a') {
  19.  
  20. //setTimeout(function() {
  21. // Guardar boton aprove
  22. //const aproveButton = document.querySelector('a.btn.btn-primary.btn-sm.ml-2');
  23. //console.log('aproveButton');
  24. //aproveButton.click();
  25.  
  26. //}, 1250); // 1250 es el tiempo en milisegundos (1.0 segundos)
  27.  
  28. setTimeout(function() {
  29. // Guardar boton aprove
  30. const reviewButton = document.querySelector('.js-review-changes');
  31. reviewButton.click();
  32. }, 500); // 1250 es el tiempo en milisegundos (0.5 segundos)
  33.  
  34. setTimeout(function() {
  35. const radioInput = document.querySelector('input[name="pull_request_review[event]"][value="approve"]');
  36. radioInput.click();
  37. }, 1000); // 1000 es el tiempo en milisegundos (1.0 segundos)
  38.  
  39. setTimeout(function() {
  40. const spanElements = document.querySelectorAll('span.Button-label');
  41. for(let i = 0; i <= spanElements.length; i++) {
  42. if(spanElements[i].innerHTML == 'Submit review') {
  43. spanElements[i].click();
  44. }
  45. }
  46. }, 1500); // 1500 es el tiempo en milisegundos (1.5 segundos)
  47.  
  48.  
  49. } // If event click ctrl + l
  50. });
  51. // Your code here...
  52. })();

QingJ © 2025

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