Greasy Fork镜像 还支持 简体中文。

Aprove Request Github

Script for aprove automatic requests in github

目前為 2023-06-20 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name Aprove Request Github
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  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. setTimeout(function() {
  20. // Guardar boton aprove
  21. const aproveButton = document.querySelector('a.btn.btn-primary.btn-sm.ml-2');
  22. aproveButton.click();
  23.  
  24. }, 250); // 250 es el tiempo en milisegundos (0.25 segundos)
  25.  
  26. setTimeout(function() {
  27. // Guardar boton aprove
  28. const reviewButton = document.querySelector('.js-review-changes');
  29. reviewButton.click();
  30. }, 1000); // 1000 es el tiempo en milisegundos (1.0 segundos)
  31.  
  32. setTimeout(function() {
  33. const radioInput = document.querySelector('input[name="pull_request_review[event]"][value="approve"]');
  34. radioInput.click();
  35. }, 1250); // 1250 es el tiempo en milisegundos (1.25 segundos)
  36.  
  37. setTimeout(function() {
  38. const spanElements = document.querySelectorAll('span.Button-label');
  39. for(let i = 0; i <= spanElements.length; i++) {
  40. if(spanElements[i].innerHTML == 'Submit review') {
  41. spanElements[i].click();
  42. }
  43. }
  44. }, 1500); // 1500 es el tiempo en milisegundos (1.5 segundos)
  45.  
  46.  
  47. } // If event click ctrl + l
  48. });
  49. // Your code here...
  50. })();

QingJ © 2025

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