-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhugepower.js
18 lines (17 loc) · 841 Bytes
/
hugepower.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function createButton(id){
var ExportAsMarkdownButton;
ExportAsMarkdownButton = document.createElement('button');
ExportAsMarkdownButton.innerHTML = 'Markdown';
ExportAsMarkdownButton.id = "ExportAsMarkdown";
ExportAsMarkdownButton.style = "background-color: #f44336;border: none;color: white;text-align: center;text-decoration: none;display: inline-block;font-size: 14px;margin: 4px 2px;cursor: pointer;";
function addExportAsMarkdownButton() {
if (document.getElementById("ExportAsMarkdown") === null) {
document.getElementById(id).appendChild(ExportAsMarkdownButton);
document.querySelector('#ExportAsMarkdown').addEventListener('click', exportAsMarkdown);
}
}
setInterval(addExportAsMarkdownButton, 2000);
}
function exportAsMarkdown(){
alert("测试成功")
}