aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/commands/docs.js11
-rw-r--r--src/shared/settings/properties.js8
-rw-r--r--src/shared/versions/index.js38
-rw-r--r--src/shared/versions/release-notes.js8
-rw-r--r--src/shared/versions/storage.js10
5 files changed, 18 insertions, 57 deletions
diff --git a/src/shared/commands/docs.js b/src/shared/commands/docs.js
new file mode 100644
index 0000000..c73eb71
--- /dev/null
+++ b/src/shared/commands/docs.js
@@ -0,0 +1,11 @@
+export default {
+ set: 'Set a value of the property',
+ open: 'Open a URL or search by keywords in current tab',
+ tabopen: 'Open a URL or search by keywords in new tab',
+ winopen: 'Open a URL or search by keywords in new window',
+ buffer: 'Sekect tabs by matched keywords',
+ bdelete: 'Close a certain tab matched by keywords',
+ bdeletes: 'Close all tabs matched by keywords',
+ quit: 'Close the current tab',
+ quitall: 'Close all tabs',
+};
diff --git a/src/shared/settings/properties.js b/src/shared/settings/properties.js
index 4bda8d6..b392cbb 100644
--- a/src/shared/settings/properties.js
+++ b/src/shared/settings/properties.js
@@ -15,4 +15,10 @@ const defaults = {
adjacenttab: true,
};
-export { types, defaults };
+const docs = {
+ hintchars: 'Hint characters on follow mode',
+ smoothscroll: 'smooth scroll',
+ adjacenttab: 'open adjacent tabs',
+};
+
+export { types, defaults, docs };
diff --git a/src/shared/versions/index.js b/src/shared/versions/index.js
deleted file mode 100644
index ba3d183..0000000
--- a/src/shared/versions/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as storage from './storage';
-import * as releaseNotes from './release-notes';
-import manifest from '../../../manifest.json';
-
-const NOTIFICATION_ID = 'vimvixen-update';
-
-const notificationClickListener = (id) => {
- if (id !== NOTIFICATION_ID) {
- return;
- }
-
- browser.tabs.create({ url: releaseNotes.url(manifest.version) });
- browser.notifications.onClicked.removeListener(notificationClickListener);
-};
-
-const checkUpdated = async() => {
- let prev = await storage.load();
- if (!prev) {
- return true;
- }
- return manifest.version !== prev;
-};
-
-const notify = () => {
- browser.notifications.onClicked.addListener(notificationClickListener);
- return browser.notifications.create(NOTIFICATION_ID, {
- 'type': 'basic',
- 'iconUrl': browser.extension.getURL('resources/icon_48x48.png'),
- 'title': 'Vim Vixen ' + manifest.version + ' has been installed',
- 'message': 'Click here to see release notes',
- });
-};
-
-const commit = () => {
- storage.save(manifest.version);
-};
-
-export { checkUpdated, notify, commit };
diff --git a/src/shared/versions/release-notes.js b/src/shared/versions/release-notes.js
deleted file mode 100644
index 6ef2335..0000000
--- a/src/shared/versions/release-notes.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const url = (version) => {
- if (version) {
- return 'https://github.com/ueokande/vim-vixen/releases/tag/' + version;
- }
- return 'https://github.com/ueokande/vim-vixen/releases/';
-};
-
-export { url };
diff --git a/src/shared/versions/storage.js b/src/shared/versions/storage.js
deleted file mode 100644
index 7883258..0000000
--- a/src/shared/versions/storage.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const load = async() => {
- let { version } = await browser.storage.local.get('version');
- return version;
-};
-
-const save = (version) => {
- return browser.storage.local.set({ version });
-};
-
-export { load, save };