Created
April 2, 2016 03:38
-
-
Save YusukeHosonuma/571190f0b68493cec4476664a3c93eea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// ==UserScript== | |
// @name GitHub Helper | |
// @namespace Yusuke.Hosonuma | |
// @description GitHubのコメントを全て開くボタンを追加 | |
// @match https://github.com/* | |
// ==/UserScript== | |
(function(){ | |
var target = document.getElementsByClassName('gh-header-actions'); | |
var button = document.createElement('button'); | |
button.innerHTML = 'Expand'; | |
button.className = 'btn btn-sm'; | |
button.addEventListener('click', function(event){ | |
var items = document.getElementsByClassName('discussion-item-body'); | |
for (var i=0; i< items.length; i++){ | |
items[i].style.display = 'block'; | |
} | |
}); | |
target[0].appendChild(button); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment