Created
June 25, 2018 13:14
-
-
Save cyamax/0d4467755d11ada196a4097c1f8dab89 to your computer and use it in GitHub Desktop.
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