Origami Markdown区块
此区块请移步 https://origami.ixk.me/markdown-block.html

Origami Notebox区块

Origami 图片区块


Origami 代码区块
window.$httpGetParams = function(data) {
var arr = [];
for (var param in data) {
arr.push(encodeURIComponent(param) + "=" + encodeURIComponent(data[param]));
}
return arr.join("&");
};
window.$http = function(options) {
options = options || {};
options.type = (options.type || "GET").toUpperCase();
options.dataType = options.dataType || "json";
if (options.async === undefined) {
options.async = true;
}
var params = window.$httpGetParams(options.data);
var xhr;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
} else {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
var status = xhr.status;
if (status >= 200 && status < 300) {
if (options.dataType === "json") {
options.success && options.success(JSON.parse(xhr.responseText));
} else {
options.success && options.success(xhr.responseText);
}
} else {
options.error && options.error(status);
}
}
};
if (options.type == "GET") {
xhr.open("GET", options.url + "?" + params, options.async);
xhr.send(null);
} else if (options.type == "POST") {
xhr.open("POST", options.url, options.async);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(params);
} else {
xhr.open(options.type, options.url, options.async);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(params);
}
};

Origami Git卡片

Origami 文章卡片

Origami 运行代码块(支持多种语言)
#include <stdio.h>
int main() {
printf ("Hello, World!");
char chs[100];
scanf ("%s", &chs);
printf ("%s", chs);
return 0;
}
