From 1bf7418cd3f8d1f907cfc3c262c06edabef2554b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=BChlemann?= Date: Fri, 2 Jun 2017 12:12:14 +0000 Subject: [PATCH] Updates book.json Auto commit by GitBook Editor --- assets/js/README.md | 0 assets/js/custom.js | 9 +++++++++ book.json | 7 +++++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 assets/js/README.md create mode 100644 assets/js/custom.js diff --git a/assets/js/README.md b/assets/js/README.md new file mode 100644 index 0000000..e69de29 diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 0000000..995f352 --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1,9 @@ +var target = window.location.hash; + +window.location.hash = ""; + +$(document).ready(function() { + setTimeout(function() { + document.location.hash = target; + }, 50); +}); \ No newline at end of file diff --git a/book.json b/book.json index 5c67902..953af5d 100644 --- a/book.json +++ b/book.json @@ -1,5 +1,5 @@ { - "plugins": [ "edit-link", "theme-api", "jsfiddle", "custom-favicon", "simple-page-toc" ], + "plugins": [ "addcssjs", "edit-link", "theme-api", "jsfiddle", "custom-favicon", "simple-page-toc", "anchors" ], "pluginsConfig": { "edit-link": { "base": "https://github.com/i18next/react-i18next-gitbook/edit/master/", @@ -25,6 +25,9 @@ "simple-page-toc": { "maxDepth": 3, "skipFirstH1": true - } + }, + "addcssjs": { + "js": ["assets/js/custom.js"] + } } }