Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<script> (function(){
if(document.body.classList.contains('page-index')){
var elements = document.getElementsByClassName('entry-thumb');
var re = /https%3A%2F%2F.+\.jpg/;
Array.prototype.forEach.call(elements, function(element) {
var imageUri = re.exec(element.getAttribute('style'));
element.style.backgroundImage = 'url(' + decodeURIComponent(imageUri[0]) + ')'; }); } }());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.