Skip to content

Instantly share code, notes, and snippets.

@shawncampbell
Created December 18, 2019 00:09
Show Gist options
  • Save shawncampbell/2e0595164dfb3b0874635bad212318c6 to your computer and use it in GitHub Desktop.
Save shawncampbell/2e0595164dfb3b0874635bad212318c6 to your computer and use it in GitHub Desktop.
Log Heroku Config Vars as JSON object in Console
// Run jQuery in Console
// @see https://blog.wplauncher.com/run-jquery-in-chrome-console/
var jqry = document.createElement('script');
jqry.src = "https://code.jquery.com/jquery-3.3.1.min.js";
document.getElementsByTagName('head')[0].appendChild(jqry);
jQuery.noConflict();
// Log Heroku Config Vars as JSON in Console
// @see https://blog.wplauncher.com/backup-heroku-config-vars/
var config_vars = {}
$( '.config-var-key' ).each(
function(){
var key = $( this ).val()
var value = $( this ).parents( 'tr' ).find( '.config-var-value' ).eq(0).val()
config_vars[key] = value
}
)
console.log( config_vars )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment