This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name [Jira] Show SP on Swimlane | |
// @description Show open, done and total story points on jira swimlanes | |
// @author Daniel Kahl | |
// @version 1.0 | |
// @match https://kanasoftware.jira.com/jira/software/c/projects/VOC/boards/* | |
// @namespace http://tampermonkey.net/ | |
// @downloadURL https://gist.githubusercontent.com/dantodev/8179ce45abf36a3fbc5bcc815653deeb/raw/tm-jira-swimlane-header.js | |
// @updateURL https://gist.githubusercontent.com/dantodev/8179ce45abf36a3fbc5bcc815653deeb/raw/tm-jira-swimlane-header.js | |
// @grant GM_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.xmSDK.require(["rules-engine"], ({ rulesEngine }) => { | |
const actions = rulesEngine.actions; | |
const conditions = rulesEngine.condition; | |
// show badge for 10% of the users that then opens a layered survey | |
rulesEngine.createPipeline(pipeline => { | |
pipeline.add(actions.diceRate({ all: 10 })); | |
pipeline.add(actions.showBadge({ position: "right" })); | |
pipeline.add(actions.showLayerSurvey({ surveyId: "survey-id" })); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createObservable(observerCallback) { | |
if (typeof observerCallback !== "function") { | |
throw new TypeError("createObservable() must be be called with callback function"); | |
} | |
let started = false; | |
let observable = {}; | |
let disposeCallback = null; | |
let errorCallback = null; | |
let completeCallback = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
function mapItem(itemNode) { | |
return { | |
title: getText(itemNode, '.tracklist-name'), | |
artist: getText(itemNode, '.TrackListRow__artists'), | |
album: getText(itemNode, '.TrackListRow__album'), | |
duration: getText(itemNode, '.tracklist-duration'), | |
unplayable: itemNode.matches('.tracklist-row-unplayable') | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createElement(tagName, config) { | |
if (tagName instanceof Object) { | |
config = tagName; | |
tagName = null; | |
} | |
config = Object.assign({ | |
tagName: tagName || 'div', | |
className: null, | |
class: null, | |
attr: null, |