Travis CI | 67efe3e Merge pull request #26 from Philiphil/patch-1

This commit is contained in:
Tamer Tas
2017-05-01 12:23:51 +00:00
commit 6464cb2d85
44 changed files with 23142 additions and 0 deletions

View File

@@ -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);
}
});
});
});