Skip to content

Commit

Permalink
display:noneに修正、borderを消す
Browse files Browse the repository at this point in the history
  • Loading branch information
hatosh authored and ahuglajbclajep committed Sep 13, 2020
1 parent 4913a30 commit fbf8842
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,21 @@ const download: () => void = () => {
img.className = canvas.className;
canvas.parentNode!.replaceChild(img, canvas);

//ボタンを見えなくする
const button = doc.getElementsByTagName("button");
for (let i = 0; i < button.length; i++) {
button[i].style.visibility = "hidden";
}
const addDiv = doc.getElementsByClassName("note new")[0] as HTMLElement;
addDiv.style.visibility = "hidden";
//ボタン,ボーダー線を見えなくする
Array.from(doc.getElementsByTagName("button")).forEach((e) => {
const parent = e.parentNode as HTMLElement;
if (parent.className == "note-menu") {
e.style.visibility = "hidden";
} else {
e.style.display = "none";
}
});
const addButton = doc.getElementsByClassName("note new")[0] as HTMLElement;
addButton.style.display = "none";
const modeSpan = doc.getElementsByClassName("graph-mode")[0] as HTMLElement;
modeSpan.style.display = "none";
const notesDiv = doc.getElementsByClassName("notes")[0] as HTMLElement;
notesDiv.style.border = "0px";

// 内容をファイルに変換して URL を発行し、クリックイベントを起こす
const html = `<!DOCTYPE html>\n${doc.outerHTML}`;
Expand Down

0 comments on commit fbf8842

Please sign in to comment.