Greasy Fork is available in English.

Gitlab Batch Open Tabs

Batch Open Gitlab Search Results.

  1. // ==UserScript==
  2. // @name Gitlab Batch Open Tabs
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Batch Open Gitlab Search Results.
  6. // @author v4IIII
  7. // @match https://www.gitlab.com/
  8. // @connect www.gitlab.com
  9. // @include *://*gitlab.com/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. var c2=[];
  16. var c0=document.getElementsByClassName('text-plain');
  17. console.log(c0);
  18. for (var i=0;i<c0.length;i++){
  19. c2.push(c0[i].href);
  20. //var c1=c0[i].getAttribute('class');
  21. //if (c1==="v-align-middle"){c2.push(c0[i].href);};
  22. /* try{var c1=c0[i].firstChild.nextSibling.href;}catch(err){c1=null;}
  23. try{var c3=c0[i].firstChild.href;}catch(err){c3=null;}
  24. console.log(c1);
  25. console.log(c3);
  26. if(c1===undefined){}else{if(c1===null){}else{c2.push(c1);}}
  27. if(c3===undefined){}else{if(c3===null){}else{c2.push(c3);}}*/
  28. };
  29. console.log(c2);
  30.  
  31. function fm(a){
  32. let handle=window.open(a);
  33. handle.blur();
  34. window.focus();
  35. };
  36.  
  37. for (i=0;i<c2.length;i++){
  38. fm(c2[i]);
  39. }
  40. // Your code here...
  41. })();