Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P9475
GreaseMonkey script to add a link to https://wikifarm.wmflabs.org/cpt/index.php/Phab:Txxxx on Phab tasks
Active
Public
Actions
Authored by
Anomie
on Oct 24 2019, 3:27 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
Platform Engineering
Referenced Files
F30878361: raw.txt
Oct 24 2019, 3:27 PM
2019-10-24 15:27:33 (UTC+0)
Subscribers
None
// ==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.
Oct 24 2019, 3:27 PM
2019-10-24 15:27:33 (UTC+0)
Log In to Comment