https://github.com/cee-studio/cee-std
Simple and Minimum C container Lib
https://github.com/cee-studio/cee-std
Last synced: 10 months ago
JSON representation
Simple and Minimum C container Lib
- Host: GitHub
- URL: https://github.com/cee-studio/cee-std
- Owner: cee-studio
- License: bsd-3-clause
- Created: 2020-08-12T00:57:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-19T04:27:43.000Z (over 1 year ago)
- Last Synced: 2025-04-25T12:46:19.779Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 738 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.html
- License: LICENSE
Awesome Lists containing this project
README
const get_url_record = function () {
const host = window.location.host;
const url = window.location.href;
const matched = url.match(/^(https|http):\/\/([^\/]+)\/(.*)/);
if (matched != null) {
const r = {protocol: matched[1], host: matched[2], path_name: matched[3]};
return r;
}
else
return null;
};
function run() {
const url_record = get_url_record();
var md_path_name = "index.md";
if (url_record.path_name)
md_path_name = url_record.path_name.replace(".html", ".md");
const url = url_record.protocol + "://" + url_record.host + "/" + md_path_name;
const fp = fetch(url, {method: 'GET'});
fp.then (function (r) { return r.text(); })
.then(function (text) {
console.log(text);
target = document.getElementById('html-content');
converter = new showdown.Converter({parseImgDimension: true
, strikethrough: true
});
converter.addExtension(function () {
return [{
type: 'output',
regex: /<a\shref[^>]+>/g,
replace : function (text) {
var url = text.match(/"(.*?)"/)[1]
if(url.includes(window.location.hostname) || url[0] == '/' || url[0] == '.' || url[0] == '#'){
return text
}
return '<a href="' + url + '" target="_blank">'
}
}]
}, 'externalLink')
html = converter.makeHtml(text);
target.innerHTML = html;
});
}
run();
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-134662929-1');