Skip to content

Commit

Permalink
Make locate item shortcut configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
wshanks committed Feb 14, 2020
1 parent f285b3a commit ffc3c16
Show file tree
Hide file tree
Showing 19 changed files with 65 additions and 26 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate with Google Scholar" shortcut
+ Add "Locate menu" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut

* In version 3.3.3:

Expand Down
7 changes: 4 additions & 3 deletions addon/chrome/content/zutilo/keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,10 @@ keys.shortcuts.locateMenu = function(win) {
win.document.getElementById('zotero-tb-locate-menu').showPopup();
};

keys.categories.locateGoogleScholar = 'uinavigation'
keys.shortcuts.locateGoogleScholar = function(_win) {
Zotero_LocateMenu.locateItem({"target": {"label": "Google Scholar Search"}})
keys.categories.locateItem = 'uinavigation'
keys.shortcuts.locateItem = function(win) {
let label = Zutilo.Prefs.get("locateItemEngine")
win.Zotero_LocateMenu.locateItem({"target": {"label": label}})
};

AddonManager.getAddonByID('[email protected]', function(aAddon) {
Expand Down
2 changes: 2 additions & 0 deletions addon/chrome/content/zutilo/zutilo.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ Zutilo.Prefs = {
// Alternative QuickCopy translators
defaults.setCharPref('quickCopy_alt1', '')
defaults.setCharPref('quickCopy_alt2', '')
// locateItem engine label
defaults.setCharPref('locateItemEngine', 'Google Scholar Search')
// Other preferences
defaults.setCharPref('attachLinkAppearance', 'Zotero');
defaults.setCharPref('attachmentImportProcessType', 'Zotero');
Expand Down
2 changes: 1 addition & 1 deletion addon/chrome/locale/de/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ zutilo.shortcuts.name.toggleZoteroCollectionsPane = Collections pane: Show / hid
zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Item pane: Show / hide (sticky)
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Collections pane: Show / hide (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateGoogleScholar = Locate with Google Scholar
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
2 changes: 1 addition & 1 deletion addon/chrome/locale/en-US/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ zutilo.shortcuts.name.toggleZoteroCollectionsPane = Collections pane: Show / hid
zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Item pane: Show / hide (sticky)
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Collections pane: Show / hide (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateGoogleScholar = Locate with Google Scholar
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
2 changes: 1 addition & 1 deletion addon/chrome/locale/es/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ zutilo.shortcuts.name.toggleZoteroCollectionsPane = Collections pane: Show / hid
zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Item pane: Show / hide (sticky)
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Collections pane: Show / hide (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateGoogleScholar = Locate with Google Scholar
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
2 changes: 1 addition & 1 deletion addon/chrome/locale/fr/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ zutilo.shortcuts.name.toggleZoteroCollectionsPane = Volet de gauche : Afficher
zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = Volet de droite : Afficher / Cacher (avec diviseur)
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = Volet de gauche : Afficher / Cacher (avec diviseur)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateGoogleScholar = Locate with Google Scholar
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.BBTPin = Pin key for selection
zutilo.shortcuts.name.BBTUnpin = Unpin key for selection
zutilo.shortcuts.name.BBTRefresh = Force-refresh key for selection
Expand Down
2 changes: 1 addition & 1 deletion addon/chrome/locale/zh-CN/zutilo/zutilo.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ zutilo.shortcuts.name.toggleZoteroCollectionsPane = 显示/隐藏分类窗格
zutilo.shortcuts.name.toggleZoteroItemPaneStickySplitter = 显示/隐藏条目窗格 (sticky)
zutilo.shortcuts.name.toggleZoteroCollectionsPaneStickySplitter = 显示/隐藏分类窗格 (sticky)
zutilo.shortcuts.name.locateMenu = Show Locate menu
zutilo.shortcuts.name.locateGoogleScholar = Locate with Google Scholar
zutilo.shortcuts.name.locateItem = Locate with Google Scholar
zutilo.shortcuts.name.BBTPin = 固定 BBT Citation Key
zutilo.shortcuts.name.BBTUnpin = 解除固定 BBT Citation Key
zutilo.shortcuts.name.BBTRefresh = 刷新 BBT Citation Key
Expand Down
8 changes: 7 additions & 1 deletion docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ However, when the pane is shown, the thicker vertical divider ("splitter", "grip

* __Open New Item menu:__
Open the new item menu so that the type of new item to create can be selected from it.

* __Open style editor:__
Open the style editor window (normally accessible from the advanced section of Zotero's preferences).

* __Locate item:__
Equivalent to using one of the Lookup engines from the Locate menu accessed from the top of the item pane.
The default engine is "Google Scholar Search".
To change the engine, modify the `extensions.zutilo.locateItemEngine` preference in the config editor.
The config editor can be opened from the Advanced pane of Zotero's preferences window.
For a list of valid engine names, select "Developer->Run JavaScript" from Zotero's "Tools" menu and enter and run this command: `Zotero.LocateManager.getVisibleEngines().map(engine => engine.name)`.

### Better BibTeX functions

The following functions are only available when [Better BibTeX](https://github.com/retorquere/zotero-better-bibtex) is installed.
Expand Down
4 changes: 2 additions & 2 deletions i18n/de/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate with Google Scholar" shortcut
+ Add "Locate menu" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut

* In version 3.3.3:

Expand Down
8 changes: 7 additions & 1 deletion i18n/de/readme/docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ However, when the pane is shown, the thicker vertical divider ("splitter", "grip

* __Open New Item menu:__
Open the new item menu so that the type of new item to create can be selected from it.

* __Open style editor:__
Open the style editor window (normally accessible from the advanced section of Zotero's preferences).

* __Locate item:__
Equivalent to using one of the Lookup engines from the Locate menu accessed from the top of the item pane.
The default engine is "Google Scholar Search".
To change the engine, modify the `extensions.zutilo.locateItemEngine` preference in the config editor.
The config editor can be opened from the Advanced pane of Zotero's preferences window.
For a list of valid engine names, select "Developer->Run JavaScript" from Zotero's "Tools" menu and enter and run this command: `Zotero.LocateManager.getVisibleEngines().map(engine => engine.name)`.

### Better BibTeX functions

The following functions are only available when [Better BibTeX](https://github.com/retorquere/zotero-better-bibtex) is installed.
Expand Down
4 changes: 2 additions & 2 deletions i18n/en-US/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate with Google Scholar" shortcut
+ Add "Locate menu" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut

* In version 3.3.3:

Expand Down
8 changes: 7 additions & 1 deletion i18n/en-US/readme/docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ However, when the pane is shown, the thicker vertical divider ("splitter", "grip

* __Open New Item menu:__
Open the new item menu so that the type of new item to create can be selected from it.

* __Open style editor:__
Open the style editor window (normally accessible from the advanced section of Zotero's preferences).

* __Locate item:__
Equivalent to using one of the Lookup engines from the Locate menu accessed from the top of the item pane.
The default engine is "Google Scholar Search".
To change the engine, modify the `extensions.zutilo.locateItemEngine` preference in the config editor.
The config editor can be opened from the Advanced pane of Zotero's preferences window.
For a list of valid engine names, select "Developer->Run JavaScript" from Zotero's "Tools" menu and enter and run this command: `Zotero.LocateManager.getVisibleEngines().map(engine => engine.name)`.

### Better BibTeX functions

The following functions are only available when [Better BibTeX](https://github.com/retorquere/zotero-better-bibtex) is installed.
Expand Down
4 changes: 2 additions & 2 deletions i18n/es/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate with Google Scholar" shortcut
+ Add "Locate menu" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut

* In version 3.3.3:

Expand Down
8 changes: 7 additions & 1 deletion i18n/es/readme/docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ However, when the pane is shown, the thicker vertical divider ("splitter", "grip

* __Open New Item menu:__
Open the new item menu so that the type of new item to create can be selected from it.

* __Open style editor:__
Open the style editor window (normally accessible from the advanced section of Zotero's preferences).

* __Locate item:__
Equivalent to using one of the Lookup engines from the Locate menu accessed from the top of the item pane.
The default engine is "Google Scholar Search".
To change the engine, modify the `extensions.zutilo.locateItemEngine` preference in the config editor.
The config editor can be opened from the Advanced pane of Zotero's preferences window.
For a list of valid engine names, select "Developer->Run JavaScript" from Zotero's "Tools" menu and enter and run this command: `Zotero.LocateManager.getVisibleEngines().map(engine => engine.name)`.

### Better BibTeX functions

The following functions are only available when [Better BibTeX](https://github.com/retorquere/zotero-better-bibtex) is installed.
Expand Down
4 changes: 2 additions & 2 deletions i18n/fr/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate with Google Scholar" shortcut
+ Add "Locate menu" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut

* In version 3.3.3:

Expand Down
8 changes: 7 additions & 1 deletion i18n/fr/readme/docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ However, when the pane is shown, the thicker vertical divider ("splitter", "grip

* __Open New Item menu:__
Open the new item menu so that the type of new item to create can be selected from it.

* __Open style editor:__
Open the style editor window (normally accessible from the advanced section of Zotero's preferences).

* __Locate item:__
Equivalent to using one of the Lookup engines from the Locate menu accessed from the top of the item pane.
The default engine is "Google Scholar Search".
To change the engine, modify the `extensions.zutilo.locateItemEngine` preference in the config editor.
The config editor can be opened from the Advanced pane of Zotero's preferences window.
For a list of valid engine names, select "Developer->Run JavaScript" from Zotero's "Tools" menu and enter and run this command: `Zotero.LocateManager.getVisibleEngines().map(engine => engine.name)`.

### Better BibTeX functions

The following functions are only available when [Better BibTeX](https://github.com/retorquere/zotero-better-bibtex) is installed.
Expand Down
4 changes: 2 additions & 2 deletions i18n/zh-CN/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate with Google Scholar" shortcut
+ Add "Locate menu" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut

* In version 3.3.3:

Expand Down
8 changes: 7 additions & 1 deletion i18n/zh-CN/readme/docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,16 @@ However, when the pane is shown, the thicker vertical divider ("splitter", "grip

* __Open New Item menu:__
Open the new item menu so that the type of new item to create can be selected from it.

* __Open style editor:__
Open the style editor window (normally accessible from the advanced section of Zotero's preferences).

* __Locate item:__
Equivalent to using one of the Lookup engines from the Locate menu accessed from the top of the item pane.
The default engine is "Google Scholar Search".
To change the engine, modify the `extensions.zutilo.locateItemEngine` preference in the config editor.
The config editor can be opened from the Advanced pane of Zotero's preferences window.
For a list of valid engine names, select "Developer->Run JavaScript" from Zotero's "Tools" menu and enter and run this command: `Zotero.LocateManager.getVisibleEngines().map(engine => engine.name)`.

### Better BibTeX functions

The following functions are only available when [Better BibTeX](https://github.com/retorquere/zotero-better-bibtex) is installed.
Expand Down

0 comments on commit ffc3c16

Please sign in to comment.