fx-compat: Add message to Add-ons pane when no plugins installed
We'll want to update the rest of the instances of "extensions" or "add-ons" to say "plugins" (unless we think we might support themes, in which case we can keep "add-ons").
This commit is contained in:
parent
cd296b1f37
commit
ef33731490
3 changed files with 18 additions and 0 deletions
|
@ -625,6 +625,22 @@ const ZoteroStandalone = new function() {
|
||||||
this.updateAddonsPane = function (doc) {
|
this.updateAddonsPane = function (doc) {
|
||||||
//var rootWindow = doc.ownerGlobal.windowRoot.ownerGlobal;
|
//var rootWindow = doc.ownerGlobal.windowRoot.ownerGlobal;
|
||||||
|
|
||||||
|
// Update message when no plugins installed
|
||||||
|
setTimeout(() => {
|
||||||
|
var emptyListMessage = doc.getElementById('empty-list-message');
|
||||||
|
emptyListMessage.innerHTML = Zotero.Utilities.htmlSpecialChars(
|
||||||
|
Zotero.getString("addons.emptyListMessage")
|
||||||
|
).replace(
|
||||||
|
/\[([^\]]+)]/,
|
||||||
|
`<a href="${ZOTERO_CONFIG.PLUGINS_URL}">$1</a>`
|
||||||
|
);
|
||||||
|
emptyListMessage.addEventListener('click', (event) => {
|
||||||
|
Zotero.launchURL(ZOTERO_CONFIG.PLUGINS_URL);
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Make our own removal prompt instead of using BrowserAddonUI.promptRemoveExtension() from
|
// Make our own removal prompt instead of using BrowserAddonUI.promptRemoveExtension() from
|
||||||
// browser-addons.js
|
// browser-addons.js
|
||||||
doc.ownerGlobal.promptRemoveExtension = function (addon) {
|
doc.ownerGlobal.promptRemoveExtension = function (addon) {
|
||||||
|
|
|
@ -1407,5 +1407,6 @@ tabs.duplicate = Duplicate Tab
|
||||||
tabs.undoClose = Reopen Closed Tab;Reopen Closed Tabs
|
tabs.undoClose = Reopen Closed Tab;Reopen Closed Tabs
|
||||||
tabs.closeOther = Close Other Tabs
|
tabs.closeOther = Close Other Tabs
|
||||||
|
|
||||||
|
addons.emptyListMessage = Download plugins from the [Zotero plugins directory].
|
||||||
addons.remove.title = Remove %S?
|
addons.remove.title = Remove %S?
|
||||||
addons.remove.text = Are you sure you want to remove %1$S from %2$S?
|
addons.remove.text = Are you sure you want to remove %1$S from %2$S?
|
||||||
|
|
|
@ -30,6 +30,7 @@ var ZOTERO_CONFIG = {
|
||||||
LICENSING_URL: 'https://www.zotero.org/support/licensing',
|
LICENSING_URL: 'https://www.zotero.org/support/licensing',
|
||||||
GET_INVOLVED_URL: 'https://www.zotero.org/getinvolved',
|
GET_INVOLVED_URL: 'https://www.zotero.org/getinvolved',
|
||||||
DICTIONARIES_URL: 'https://download.zotero.org/dictionaries/',
|
DICTIONARIES_URL: 'https://download.zotero.org/dictionaries/',
|
||||||
|
PLUGINS_URL: 'https://www.zotero.org/support/plugins',
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof process === 'object' && process + '' === '[object process]'){
|
if (typeof process === 'object' && process + '' === '[object process]'){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue