Created
February 14, 2020 08:35
-
-
Save shigesanpo/521422a4adca4e4a6cc2970e1727e9c2 to your computer and use it in GitHub Desktop.
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
<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