Highlight my backlog » History » Revision 2
Revision 1 (Tom Clegg, 07/11/2015 03:22 AM) → Revision 2/12 (Tom Clegg, 07/11/2015 03:24 AM)
h1. Highlight my backlog <pre><code class="javascript"> // ==UserScript== // @name Highlight my redmine backlog // @namespace https://arvados.org/projects/arvados/wiki/Highlight_my_backlog https://arvados.org/ // @version 0.1 // @description Highlights issues assigned to you in redmine Backlogs view. // @author Tom Clegg // @match https://arvados.org/rb/master_backlog/* // @grant none // ==/UserScript== $.ajax('/my/account', {success: function(data, _, _) { var key = $('#api-access-key',data).text(); var url = '/issues.json?assigned_to_id=me&limit=100'; var ajaxopts = { dataType: 'json', headers: {'X-Redmine-API-Key': key}, success: dopage }; $.ajax(url, ajaxopts); function dopage(data, _, _) { for (var i=0; i<data.issues.length; i++) { $('#story_'+data.issues[i].id).css({ //background:'#faa', 'font-weight':'bold' }); } if (data.total_count > data.offset + data.limit) { $.ajax(url + '&offset=' + (data.offset + data.limit), ajaxopts); } } }}); </code></pre>