-
Notifications
You must be signed in to change notification settings - Fork 0
/
freshscript.user.js
11 lines (10 loc) · 8.07 KB
/
freshscript.user.js
1
2
3
4
5
6
7
8
9
10
11
// ==UserScript==
// @name FreshScript (Jira Tweaks)
// @namespace https://youtu.be/hBe0VCso0qs
// @version 1.0.273
// @description Now, this is a story all about how my life got flipped-turned upside down...
// @author The Fresh Prince of Jira
// @match https://*.atlassian.net/secure/RapidBoard.jspa*
// @grant none
// ==/UserScript==
!function(e){function t(i){if(o[i])return o[i].exports;var l=o[i]={exports:{},id:i,loaded:!1};return e[i].call(l.exports,l,l.exports,t),l.loaded=!0,l.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var l=o(1),n=i(l),a=document.createElement("style");a.innerText=o(2),document.head.appendChild(a),(0,n["default"])(function s(){if((0,n["default"])("#ghx-pool").length&&(0,n["default"])("#ghx-view-pluggable").length){var e=o(3);e.keys().forEach(e)}else setTimeout(s,100)})},function(e,t){e.exports=jQuery},function(e,t){e.exports="#ghx-pool{cursor:default}#ghx-pool .ghx-issue .ghx-type,#ghx-pool .ghx-issue .ghx-days{display:none}#ghx-pool .ghx-issue .ghx-issue-content{padding:5px 5px 5px 13px}#ghx-pool .ghx-issue .ghx-flags{top:7px;right:7px;left:auto}#ghx-pool .ghx-issue .ghx-avatar{top:5px;right:5px;left:auto}#ghx-pool .ghx-issue .ghx-avatar:not(:empty)~.ghx-flags{top:32px}#ghx-pool .ghx-issue .ghx-priority[title='Major']{display:none}#ghx-pool #ghx-column-headers .ghx-column{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#ghx-pool #ghx-column-headers .ghx-column h2{display:inline}#ghx-pool.ghx-band-3 .ghx-issue.ghx-has-avatar .ghx-flags{top:44px}#ghx-pool.ghx-band-1 .ghx-issue .ghx-issue-fields{padding-right:25px}#ghx-pool.ghx-band-1 .ghx-issue .ghx-flags{top:5px;right:4px}#ghx-pool.ghx-band-1 .ghx-issue .ghx-priority,#ghx-pool.ghx-band-1 .ghx-issue .ghx-priority img{width:14px;height:14px}#ghx-pool.ghx-band-1 .ghx-issue .ghx-avatar:not(:empty)~.ghx-flags{top:29px}#ghx-pool.wide{padding-top:0 !important}#ghx-pool.wide .ghx-columns,#ghx-pool.wide .ghx-zone-overlay-table{width:150%;min-width:1920px}#ghx-pool.wide .ghx-column-header-group{position:static !important;min-width:1920px}#ghx-header .fresh-board-actions{display:inline-block;vertical-align:top;position:relative;margin-left:10px}#ghx-header .fresh-board-actions button:not(:last-of-type){border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0}#ghx-header .fresh-board-actions button+button{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}#ghx-header .fresh-board-actions button:hover+button{border-left-color:#999}#ghx-header .fresh-board-actions .ajs-layer{width:200px;position:absolute;right:0;top:30px}#ghx-header #ghx-view-modes:empty{display:none}#ghx-detail-view #ghx-tab-details .ghx-fieldtype-textarea{display:block}#ghx-detail-view #js-sizer{display:block}body.hide-left-sidebar .aui-sidebar{display:none}body.hide-left-sidebar #gh{padding-left:0}body.hide-left-sidebar #ghx-column-header-group{position:absolute !important;top:0 !important;left:10px !important}body.hide-extra-fields .ghx-issue .ghx-extra-fields{display:none}"},function(e,t,o){function i(e){return o(l(e))}function l(e){return n[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var n={"./column-widths":4,"./column-widths.js":4,"./drag-scroll":7,"./drag-scroll.js":7,"./issue-code-links":8,"./issue-code-links.js":8,"./project-switching":9,"./project-switching.js":9,"./resizeable-detail-view":10,"./resizeable-detail-view.js":10,"./visibility-toggles":11,"./visibility-toggles.js":11};i.keys=function(){return Object.keys(n)},i.resolve=l,e.exports=i,i.id=3},function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function l(e){(0,r["default"])("#ghx-pool").toggleClass("wide",e),(0,r["default"])("#ghx-column-header-group").width((0,r["default"])(".ghx-columns").width()),s["default"].set("wideColumns",e)}var n=o(5),a=o(6),s=i(a),d=o(1),r=i(d);(0,n.addButton)("Toggle Column Width").click(function(){l(!(0,r["default"])("#ghx-pool").hasClass("wide"))}),s["default"].get("wideColumns")&&l(!0)},function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function l(){null==r&&!function(){r=(0,d["default"])("<div></div>").addClass("fresh-board-actions").prependTo("#ghx-modes-tools"),u=(0,d["default"])("<ul></ul>").addClass("aui-list-section aui-first aui-last");var e=(0,d["default"])("<div></div>").addClass("ajs-layer box-shadow").append((0,d["default"])("<div></div>").addClass("aui-list").append(u)).appendTo(r).hide(),t=(0,d["default"])("<button>Fresh</button>").addClass("aui-button ghx-dropdown-trigger").click(function(){return e.toggle(),(0,d["default"])(this).toggleClass("active"),(0,d["default"])("body").click(),!1}).insertBefore(e);e.on("mouseenter mouseout","li",function(e){(0,d["default"])(this).toggleClass("active","mouseenter"==e.type)}),(0,d["default"])("body").on("click","*",function(){e.hide(),t.removeClass("active")})}()}function n(e){l();var t=(0,d["default"])("<li></li>").addClass("aui-list-item").appendTo(u);return(0,d["default"])("<a></a>").addClass("aui-list-item-link").attr("href","#").text(e).appendTo(t)}function a(e){return l(),(0,d["default"])("<button></button>").addClass("aui-button").text(e).prependTo(r)}Object.defineProperty(t,"__esModule",{value:!0}),t.addMenuItem=n,t.addButton=a;var s=o(1),d=i(s),r=void 0,u=void 0},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={get:function(e){return JSON.parse(window.localStorage.getItem("freshscript."+e))},set:function(e,t){window.localStorage.setItem("freshscript."+e,JSON.stringify(t))}},e.exports=t["default"]},function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var l=o(1),n=i(l),a=25,s=!0,d=!1,r=(0,n["default"])("#ghx-pool")[0],u=void 0,h=void 0,g=void 0,f=void 0,p=void 0,c=void 0,x=void 0;(0,n["default"])(r).on("mousedown",function(e){return(0,n["default"])(e.target).closest(".ghx-issue").length?void 0:(h=e.pageX,g=e.pageY,f=r.scrollLeft,p=r.scrollTop,c=d,x=s,u=!0,!1)}),(0,n["default"])(window).on("mouseup",function(){u=!1}).on("mousemove",function(e){if(u){var t=e.pageX-h,o=e.pageY-g;return c=c&&Math.abs(t)<a,x=x&&Math.abs(o)<a,c&&!x&&(t=0),x&&!c&&(o=0),r.scrollLeft=f-t,r.scrollTop=p-o,!1}})},function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var l=o(1),n=i(l);(0,n["default"])("#ghx-work").on("click",".ghx-key a",function(){return window.open(this.href),!1})},function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var l=o(1),n=i(l);(0,n["default"])("#ghx-controls-work").on("click","#js-work-quickfilters a.js-quickfilter-button.ghx-active",function(e,t){e.ctrlKey||t||(0,n["default"])("#js-work-quickfilters a.js-quickfilter-button.ghx-active").not(this).trigger("click",[!0])})},function(e,t){"use strict";function o(){var e=$("#js-sizer")[0];if(e){var t=e.cloneNode();for(t.style.display="block";e.firstChild;)t.appendChild(e.lastChild);e.parentNode.replaceChild(t,e),$(t).on("mousedown",function(e){return s=d.offsetWidth,l=e.pageX,n=e.pageY,i=!0,!1})}else setTimeout(o,100)}var i,l,n,a,s=400,d=$("#ghx-detail-view")[0];o(),$("#ghx-pool").each(function(e,t){$(t).click(function(e){setTimeout(o,300)})}),$(window).on("mouseup",function(){i&&(s=a),i=!1}).on("mousemove",function(e){if(i){var t=e.pageX-l;return a=s-t,d.style.left=t+"px",d.style.width=a+"px",$("#ghx-column-header-group").width($(".ghx-columns").width()),!1}})},function(e,t,o){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}function l(e,t,o){var i=arguments.length<=3||void 0===arguments[3]?!0:arguments[3],l=arguments.length<=4||void 0===arguments[4]?null:arguments[4],a=s["default"].get(e);return(a||null==a&&!i)&&((0,r["default"])("body").addClass(t),null!=l&&l()),(0,n.addMenuItem)(o).click(function(){var o=s["default"].get(e);o=null==o?i:!o,s["default"].set(e,o),(0,r["default"])("body").toggleClass(t,o),null!=l&&l()})}var n=o(5),a=o(6),s=i(a),d=o(1),r=i(d);l("hideLeftSidebar","hide-left-sidebar","Toggle left sidebar",!0,function(){(0,r["default"])("#ghx-column-header-group").width((0,r["default"])(".ghx-columns").width())}),l("hideExtraFields","hide-extra-fields","Toggle extra fields")}]);