PageSourceSearch

https://xcbeyond.cn/istio-handbook/gitbook/gitbook-plugin-editlink/plugin.js

js xcbeyond.cn collected 2026-10-05 21:50:54 UTC 624 bytes, 23 lines download raw bytes

1require(["gitbook", "jQuery"], function(gitbook, $) {
2  gitbook.events.bind('start', function (e, config) {
3    var conf = config.editlink
4    var label = conf.label
5    var base = conf.base
6    var multilingual = conf.multilingual || false
7
8    if (base.slice(-1) !== "/") {
9      base += "/"
10    }
11
12    gitbook.toolbar.createButton({
13      icon: 'fa fa-edit',
14      text: label,
15      onClick: function() {
16        var filepath = gitbook.state.filepath
17        var lang = multilingual && $('html').attr('lang') ? $('html').attr('lang') + '/' : ''
18        
19        window.open(base + lang + filepath)
20      }
21    })
22  })
23})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.