Skip to content

Instantly share code, notes, and snippets.

@akmandev
Created July 14, 2017 08:05
Show Gist options
  • Save akmandev/934d76a0016f5e482ac31aa70e04804f to your computer and use it in GitHub Desktop.
Save akmandev/934d76a0016f5e482ac31aa70e04804f to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hide Warnings in Request Log Window
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include */Sites-Site/-/ViewLogConsole-Start
// @grant none
// ==/UserScript==
(function() {
'use strict';
function contains(selector, text) {
var elements = document.querySelectorAll(selector);
return [].filter.call(elements, function(element){
return RegExp(text).test(element.textContent);
});
}
function hideAll (elements){
for (var i=0; i < elements.length; i++) {
elements[i].setAttribute('style', 'display:none');
}
}
var checkWarnings = setInterval(function(){
var elements = contains('.x-grid3-row', 'WARN');
if(elements.length > 0){
hideAll(elements);
clearInterval(checkWarnings);
}
}, 300);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment