| // ==UserScript== | |
| // @name View CI Images | |
| // @namespace io.ixa.ci | |
| // @description View CI Images | |
| // @version 1 | |
| // @match https://gitlabci/projects/*/builds/* | |
| // ==/UserScript== | |
| (function ($) { | |
| var text = $('#build-trace').html(); | |
| /* HACKY: we can't consume any of the buffer else we can't replace | |
| * the next image */ | |
| text = text.replace(/(Test_.+\.png)\n([A-Za-z0-9\n\/\+=]+)\nEOF\n/g, | |
| '<h2>$1</h2><img src="data:image/png;base64,$2" ' + | |
| 'style="display:block; max-width:800px; width: auto; height: auto;" ' + | |
| '/>'); | |
| $('#build-trace').html(text); | |
| })(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment