mirror of
https://github.com/AskDavis/Getting-Started-With-ACPI.git
synced 2026-01-04 21:09:47 -08:00
Deploy acpi.dortania.ml to github.com/dortania/Getting-Started-With-ACPI.git:gh-pages
This commit is contained in:
28
gitbook/gitbook-plugin-medium-zoom/plugin.js
Normal file
28
gitbook/gitbook-plugin-medium-zoom/plugin.js
Normal file
@@ -0,0 +1,28 @@
|
||||
require([
|
||||
'gitbook'
|
||||
], function(gitbook) {
|
||||
const options = {
|
||||
margin: 0,
|
||||
background: '#fff',
|
||||
scrollOffset: 40
|
||||
};
|
||||
|
||||
const init = function() {
|
||||
mediumZoom("img", options);
|
||||
}
|
||||
|
||||
gitbook.events.bind('start', function(e, config){
|
||||
const configOption = config['medium-zoom'];
|
||||
if (configOption) {
|
||||
for (const item in options) {
|
||||
if (options.hasOwnProperty(item) && (item in configOption)) {
|
||||
options[item] = configOption[item];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
gitbook.events.bind('page.change', function(e, config) {
|
||||
init();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user