Page MenuHomePhabricator
Paste P9475

GreaseMonkey script to add a link to https://wikifarm.wmflabs.org/cpt/index.php/Phab:Txxxx on Phab tasks
ActivePublic

Authored by Anomie on Thu, Oct 24, 3:27 PM.
// ==UserScript==
// @name Add Phab task summary link
// @include https://phabricator.wikimedia.org/T*
// @version 1
// ==/UserScript==
var sidebar = document.querySelector( '#phabricator-standard-page-body .phui-side-column .phabricator-action-list-view' );
if ( sidebar ) {
var a = document.createElement( 'a' );
a.className = 'phabricator-action-view-item';
a.href = 'https://wikifarm.wmflabs.org/cpt/index.php/Phab:' + document.location.pathname.match( /T\d+/ )[0];
a.setAttribute( 'data-sigil', 'workflow' );
var span = document.createElement( 'span' );
span.className = 'visual-only phui-icon-view phui-font-fa fa-cubes phabricator-action-view-icon';
span.setAttribute( 'aria-hidden', 'true' );
a.appendChild( span );
a.appendChild( document.createTextNode( 'Patch summary' ) );
var li = document.createElement( 'li' );
li.className = 'phabricator-action-view phabricator-action-view-href action-has-icon';
li.appendChild( a );
sidebar.appendChild( li );
}

Event Timeline

Anomie created this paste.Thu, Oct 24, 3:27 PM