diff options
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/index.js | 2 | ||||
-rw-r--r-- | src/content/navigates.js | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/content/index.js b/src/content/index.js index 4751cde..a9ccd63 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -45,6 +45,8 @@ const execOperation = (operation) => { return navigates.linkNext(window); case operations.NAVIGATE_PARENT: return navigates.parent(window); + case operations.NAVIGATE_ROOT: + return navigates.root(window); } }; diff --git a/src/content/navigates.js b/src/content/navigates.js index 692b7be..64e5fc0 100644 --- a/src/content/navigates.js +++ b/src/content/navigates.js @@ -63,4 +63,8 @@ const parent = (win) => { } }; -export { historyPrev, historyNext, linkPrev, linkNext, parent }; +const root = (win) => { + win.location = win.location.origin; +}; + +export { historyPrev, historyNext, linkPrev, linkNext, parent, root }; |