Created
August 24, 2016 16:21
-
-
Save EntranceJew/3b4a094edb03d098a0f829b8f4bd0a29 to your computer and use it in GitHub Desktop.
show_all_scripts.js
This file contains 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
(function(document){ | |
var i, scripts = document.getElementsByTagName("script"), | |
attributes = new Map([ | |
['fontFamily', 'Menlo,Monaco,Consolas,"Courier New",monospace'], | |
['overflow', 'auto'], | |
['display', 'block'], | |
['backgroundColor', '#f5f5f5'], | |
['border', '1px solid #cccccc'], | |
['borderRadius', '4px'], | |
['whiteSpace', 'pre'] | |
]); | |
for (i = 0; i < scripts.length; i++) { | |
attributes.forEach( function(v,k){ | |
scripts[i].style[k] = v; | |
}); | |
} | |
})(document); |
This file contains 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
$( document ).ready(function(){ | |
$( "script" ).each(function(k,v){ | |
$( v ).css({ | |
'font-family': 'Menlo,Monaco,Consolas,"Courier New",monospace', | |
'overflow': 'auto', | |
'display': 'block', | |
'background-color': '#f5f5f5', | |
'border': '1px solid #cccccc', | |
'border-radius': '4px', | |
'white-space': 'pre' | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment