Backlogのwikiの画像はでかすぎるから良い感じにする
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
// 指定した画像のサイズ以上はすべて指定サイズにする | |
var maxWidth = 600; | |
var elements = document.getElementsByTagName("img"); | |
for(i=0;i<elements.length;i++){ | |
if(elements[i].width > maxWidth){ | |
elements[i].width = maxWidth; | |
console.log("小さくしたよ"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment