Created
          June 5, 2019 18:35 
        
      - 
      
- 
        Save porty/9c9204b82c0082165ffe78e5c7033ccb to your computer and use it in GitHub Desktop. 
    Userscripts (Tampermonkey)
  
        
  
    
      This file contains hidden or 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 thingo | |
| // @namespace https://roflware.com/ | |
| // @version 0.1 | |
| // @description Adds helpful task(s) to Jira | |
| // @author Robert McNeil | |
| // @match https://jira.cfops.it/browse/* | |
| // @grant none | |
| // ==/UserScript== | |
| const getTicket = () => { | |
| const parts = window.location.pathname.split("/"); | |
| return parts[parts.length - 1]; | |
| }; | |
| (function() { | |
| 'use strict'; | |
| const ticket = getTicket(); | |
| let holder = document.createElement('div'); | |
| holder.style = 'box-shadow: gray 0px 0px 10px; background-color: white; position: fixed; height: auto; width: auto; bottom: 0px; right: 0px; z-index: 1; padding: 10px; border-radius: 5px 0px 0px; text-align: center;'; | |
| holder.innerHTML = '<a href="/rest/api/latest/issue/' + ticket + '">JSON representation</a>'; | |
| document.getElementsByTagName('body')[0].appendChild(holder); | |
| })(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment