Sha256: dacc1e806b9ca009673ba7dda38e76f010e42902b5a77c28406ae9708986262c
Contents?: true
Size: 897 Bytes
Versions: 6
Compression:
Stored size: 897 Bytes
Contents
jQuery(function ($) { var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; if (!MutationObserver) { return; } var logParent = document.querySelector('#logs tbody'); var observer = new MutationObserver(function(mutations) { if (mutations.some(function(m) { return m.addedNodes && m.addedNodes instanceof NodeList && m.addedNodes.length > 0 && m.type == 'childList' })) { $('td.log').each(function() { var logText = $(this).html(); $(this).html( logText.replace(/instance#(\d+)\/(\d+)(?:\s+|\.|$)/, function(match, jobId, instanceId) { return '<a href="/definitions/' + jobId + '/instances/' + instanceId+ '">' + match + '</a>'; }) ); }); } }); observer.observe(logParent, {childList: true, substree: true}); });
Version data entries
6 entries across 6 versions & 1 rubygems