docs(readme): Start adding documentation for React version

This commit is contained in:
Erik Ziegler committed 2019-03-04 13:43:39 +01:00
1 parent ec51cb7a6c
commit 6658623f1f
365 files changed
+52155 -15

No files matched your search

@@ -0,0 +1,30 @@
require(["gitbook", "jQuery"], function(gitbook, $) {
gitbook.events.bind('start', function (e, config) {
var conf = config['edit-link'];
var label = conf.label;
var base = conf.base;
var lang = gitbook.state.innerLanguage;
if (lang) {
// label can be a unique string for multi-languages site
if (typeof label === 'object') label = label[lang];
lang = lang + '/';
}
// Add slash at the end if not present
if (base.slice(-1) != "/") {
base = base + "/";
}
gitbook.toolbar.createButton({
icon: 'fa fa-edit',
text: label,
onClick: function() {
var filepath = gitbook.state.filepath;
window.open(base + lang + filepath);
}
});
});
});