Last active
January 13, 2017 16:01
-
-
Save wojcikstefan/97517db33265b2c2f362bd0c0cd577ae to your computer and use it in GitHub Desktop.
Remove live call requests from Plivo's call debug logs
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
// Remove calls to /v1/Account/AUTH_ID/Call/?status=live from Plivo's call debug logs | |
// To use this code as a bookmarklet, create a bookmark with a URL equal to: | |
// javascript:(function(){if(typeof window.cleanPlivoDebugLogsGist !== 'undefined'){cleanPlivoDebugLogs();}else{s=document.createElement('script');s.type='text/javascript';s.src='https://rawgit.com/wojcikstefan/97517db33265b2c2f362bd0c0cd577ae/raw/b7112b1e39e9b011dd6cf0a9f631cf6b50e6624e/remove_live_calls_from_plivo_debug_logs.js';document.body.appendChild(s);}})(); | |
window.cleanPlivoDebugLogs = function() { | |
$('.log-loader li').each(function(i, el) { | |
$(el).find('b').each(function(j, headerEl) { | |
var $headerEl = $(headerEl); | |
if ($headerEl.text().indexOf('Params') === 0) { | |
var nextLineText = $headerEl.parent().next().text() | |
if (nextLineText.trim() === 'status : live') { | |
$headerEl.closest('li').toggle(); | |
} | |
} | |
}); | |
}); | |
}; | |
cleanPlivoDebugLogs(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment