This file contains 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
// e.g. console.save({hello: 'world'}) | |
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' | |
if(typeof data === "object"){ | |
data = JSON.stringify(data, undefined, 4) |
This file contains 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
function uploadFile(file) { | |
var formData = new FormData(); | |
formData.append("userfile", file); | |
var request = new XMLHttpRequest(); | |
request.onload = function () { | |
if (request.status == 200) { | |
document.location.href='/'; | |
} else { | |
alert('Error! Upload failed'); | |
} |
This file contains 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
{ | |
"explorer.openEditors.visible": 0, | |
"workbench.colorTheme": "Default Light+", | |
"workbench.iconTheme": "vscode-simpler-icons", | |
"workbench.sideBar.location": "right", | |
// 需下載安裝 Fira Code 字型 (安裝 OTF 格式) | |
// https://github.com/tonsky/FiraCode/releases | |
// 需下載客製化過的 Microsoft YaHei Mono 字型 |