Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigesanpo/521422a4adca4e4a6cc2970e1727e9c2 to your computer and use it in GitHub Desktop.
Save shigesanpo/521422a4adca4e4a6cc2970e1727e9c2 to your computer and use it in GitHub Desktop.
<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