|
// ==UserScript== |
|
// @name Qiita Nonsense LGTM Button Killer |
|
// @namespace https://github.com/mpyw |
|
// @version 0.6 |
|
// @description Qiita の LGTM を倒す |
|
// @author mpyw |
|
// @match https://qiita.com/* |
|
// @grant none |
|
// ==/UserScript== |
|
|
|
(() => { |
|
const style = document.createElement('style'); |
|
style.textContent = ` |
|
.it-Footer_like button, .co-Item_like button { |
|
background-color: transparent !important; |
|
flex-shrink: 0; |
|
} |
|
.it-Footer_like button[style="background-color: rgb(85, 197, 0);"] { |
|
background-color: rgb(85, 197, 0) !important; |
|
color: rgb(255, 255, 255); |
|
} |
|
`; |
|
document.head.appendChild(style); |
|
|
|
for (const button of document.querySelectorAll('.it-Actions_item-like button, .it-Footer_like button, .co-Item_like button')) { |
|
button.innerHTML = '<i class="fa fa-fw fa-thumbs-up"></i>'; |
|
} |
|
|
|
for (const button of document.querySelectorAll('.it-Footer_like button')) { |
|
button.insertAdjacentHTML('beforeend', '<span>Like</span>'); |
|
} |
|
|
|
for (const svg of document.querySelectorAll('.it-Header_like svg')) { |
|
const parent = svg.parentNode; |
|
parent.removeChild(svg); |
|
parent.insertAdjacentHTML('beforeend', '<i class="fa fa-fw fa-thumbs-up" style="font-size: 16px; color: #999"></i>'); |
|
} |
|
|
|
const comments = document.getElementById('comments'); |
|
if (comments) { |
|
new MutationObserver(() => { |
|
for (const button of document.querySelectorAll('.co-Item_like button')) { |
|
button.innerHTML = '<i class="fa fa-fw fa-3x fa-thumbs-up"></i>'; |
|
} |
|
}).observe(comments, { childList: true }); |
|
} |
|
})(); |
ありがとうございます!適用しておきます