Auto Merge Request Title

Compatible gitlab

  1. // ==UserScript==
  2. // @name Auto Merge Request Title
  3. // @name:es Auto Merge Request Title
  4. // @description Compatible gitlab
  5. // @description:es Compatible gitlab
  6. // @date 2020-06-10
  7. // @compatible chrome
  8. // @compatible firefox
  9. // @compatible opera
  10. // @compatible safari
  11. // @license CC BY-NC-ND 4.0 International. https://creativecommons.org/licenses/by-nc-nd/4.0/
  12. // @match *://*.gitlab.com/*
  13. // @match *://gitlab.*.com.*/*
  14. // @version 0.0.1.20200702174508
  15. // @namespace https://gf.qytechs.cn/users/662624
  16. // ==/UserScript==
  17. document.addEventListener("DOMContentLoaded", function(event) {
  18. var branchSelector = document.getElementsByClassName("branch-selector");
  19.  
  20. for (var i = 0; i < branchSelector.length; i++) {
  21. var texto = branchSelector[i].innerText;
  22. }
  23. var textoToInput = texto.split(' ');
  24.  
  25. var textToInsert = textoToInput[1] +'=>'+ textoToInput[3];
  26. document.getElementById("merge_request_title").value = textToInsert;
  27. });

QingJ © 2025

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