JiraCloudNoPlansTab

Remove the "Plans" menu in the header of Jira Cloud

  1. // ==UserScript==
  2. // @name JiraCloudNoPlansTab
  3. // @namespace http://wimgodden.be/
  4. // @version 1.3
  5. // @description Remove the "Plans" menu in the header of Jira Cloud
  6. // @author Wim Godden <wim@cu.be>
  7. // @match https://*.atlassian.net/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12.  
  13. add_jQuery (removeCouldPlansTab, "1.7.2");
  14.  
  15. function add_jQuery (callbackFn, jqVersion) {
  16. jqVersion = jqVersion || "1.7.2";
  17. var D = document;
  18. var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
  19. var scriptNode = D.createElement ('script');
  20. scriptNode.src = 'https://ajax.googleapis.com/ajax/libs/jquery/'
  21. + jqVersion
  22. + '/jquery.min.js'
  23. ;
  24. scriptNode.addEventListener ("load", function () {
  25. var scriptNode = D.createElement ("script");
  26. scriptNode.textContent =
  27. 'var gm_jQuery = jQuery.noConflict (true);\n'
  28. + '(' + callbackFn.toString () + ')(gm_jQuery);'
  29. ;
  30. targ.appendChild (scriptNode);
  31. }, false);
  32. targ.appendChild (scriptNode);
  33.  
  34. setTimeout(function() {
  35. removeCouldPlansTab(gm_jQuery);
  36. }, 2000); // A second will elapse and Code will execute.
  37. }
  38.  
  39. function removeCouldPlansTab($) {
  40. 'use strict';
  41.  
  42. $("div div div div div button span:contains('Plans')").parent().parent().parent().parent().parent().hide();
  43. }

QingJ © 2025

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