You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: index.js
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,7 @@ module.exports = {
14
14
throw"ERROR: 'base' value required to generate 'Edit This Page' link. \nFor help, please refer to - https://github.com/rtCamp/gitbook-plugin-edit-link/blob/master/README.md#usage";
15
15
}
16
16
17
-
if(!config.label){
18
-
config.label="Edit This Page";
19
-
}
17
+
varlabel=config.label[this.context.config.language]||config.label||"Edit This Page";
20
18
21
19
// add slash at the end if not present
22
20
varbase=config.base;
@@ -33,7 +31,7 @@ module.exports = {
33
31
lang=this.context.config.language+"/";
34
32
}
35
33
36
-
rtEditLink='<a id="edit-link" href="'+base+lang+newPath+'" class="btn fa fa-edit pull-left"> '+config.label+'</a>';
34
+
rtEditLink='<a id="edit-link" href="'+base+lang+newPath+'" class="btn fa fa-edit pull-left"> '+label+'</a>';
0 commit comments