Last active
June 17, 2019 05:17
-
-
Save mohno007/4532f9f342cc75480fc86064ba34172b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CodeBuild Highlight | |
// @namespace https://gist.github.com/mohno007/4532f9f342cc75480fc86064ba34172b | |
// @version 0.2 | |
// @description Codebuild Highlight | |
// @author mohno007 | |
// @match https://*.console.aws.amazon.com/codesuite/codebuild/projects/* | |
// @grant none | |
// @licence CC0 1.0 | |
// @updateURL https://gist.githubusercontent.com/mohno007/4532f9f342cc75480fc86064ba34172b/raw/codebuild_highlight.user.js | |
// @downloadURL https://gist.githubusercontent.com/mohno007/4532f9f342cc75480fc86064ba34172b/raw/codebuild_highlight.user.js | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const styles = [ | |
[/\[success\]/, { color: '#32cd32' }], | |
[/\[warn\]/, { color: '#ffa500' }], | |
[/\[error\]/, { color: '#f14949' }], | |
]; | |
setInterval(() => { | |
const lines = [...document.querySelectorAll('.ace_line')]; | |
lines.forEach(line => { | |
styles.forEach(([regex, style]) => { | |
if (regex.test(line.textContent)) { | |
Object.assign(line.style, style); | |
} | |
}); | |
}); | |
}, 5000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment