Bookmarklets: Difference between revisions
From Freephile Wiki
Created page with "A bookmarklet to view Phab tickets in a force-directed graph <pre><a href="javascript:(function(){javascript: (function() {var t = window.getSelection ? window.getSelection()..." |
m need protocol |
||
Line 1: | Line 1: | ||
A bookmarklet to view Phab tickets in a force-directed graph | A bookmarklet to view Phab tickets in a force-directed graph | ||
<pre><a href="javascript:(function(){javascript: (function() {var t = window.getSelection ? window.getSelection().toString() : document.selection.createRange().text;var re = /[\s\-T0-9]{1,6}/;var OK = re.exec(t);if (!OK) {alert(t + ' is not a valid Phab issue#\n Please just select a 1 - 6 digit Phab ticket #. With or without the "T"\ndashes and spaces are OK');} else {t = t.replace(/[\-\s]/, '');window.location = 'cindy.wmflabs.org/notes/index.php/Special:PhabTaskGraph?tasks=' + t}})()})()">Visualize Phab ticket</a></pre> | <pre><a href="javascript:(function(){javascript: (function() {var t = window.getSelection ? window.getSelection().toString() : document.selection.createRange().text;var re = /[\s\-T0-9]{1,6}/;var OK = re.exec(t);if (!OK) {alert(t + ' is not a valid Phab issue#\n Please just select a 1 - 6 digit Phab ticket #. With or without the "T"\ndashes and spaces are OK');} else {t = t.replace(/[\-\s]/, '');window.location = 'http://cindy.wmflabs.org/notes/index.php/Special:PhabTaskGraph?tasks=' + t}})()})()">Visualize Phab ticket</a></pre> | ||
[[Category:JavaScript]] | [[Category:JavaScript]] |
Latest revision as of 15:02, 27 September 2017
A bookmarklet to view Phab tickets in a force-directed graph
<a href="javascript:(function(){javascript: (function() {var t = window.getSelection ? window.getSelection().toString() : document.selection.createRange().text;var re = /[\s\-T0-9]{1,6}/;var OK = re.exec(t);if (!OK) {alert(t + ' is not a valid Phab issue#\n Please just select a 1 - 6 digit Phab ticket #. With or without the "T"\ndashes and spaces are OK');} else {t = t.replace(/[\-\s]/, '');window.location = 'http://cindy.wmflabs.org/notes/index.php/Special:PhabTaskGraph?tasks=' + t}})()})()">Visualize Phab ticket</a>