Skip to content

Instantly share code, notes, and snippets.

@moroya
moroya / fix-translate.js
Created December 23, 2023 06:22
ChromeのGoogle翻訳で <code> タグの語順がおかしくなるのを修正するブックマークレット
function getParentBlock(el) {
for (let p = el; p; p = p.parentNode) {
const style = window.getComputedStyle(p, null);
if (style && style.getPropertyValue("display") !== "inline") {
return p;
}
}
return null;
}