2023-06-30 20:11:37 -04:00
|
|
|
import {getCurrentExtension} from './sharedInternals.js';
|
|
|
|
|
|
|
|
export {
|
|
|
|
getSettings,
|
|
|
|
initTranslations,
|
|
|
|
gettext,
|
|
|
|
ngettext,
|
|
|
|
pgettext
|
|
|
|
} from './sharedInternals.js';
|
|
|
|
|
2023-07-09 23:12:30 -04:00
|
|
|
const {extensionManager} = imports.ui.main;
|
|
|
|
|
2023-06-30 20:11:37 -04:00
|
|
|
/**
|
|
|
|
* Open the preference dialog of the current extension
|
|
|
|
*/
|
|
|
|
export function openPrefs() {
|
|
|
|
const extension = getCurrentExtension();
|
|
|
|
|
|
|
|
if (!extension)
|
|
|
|
throw new Error('openPrefs() can only be called from extensions');
|
|
|
|
|
2023-07-09 23:12:30 -04:00
|
|
|
extensionManager.openExtensionPrefs(extension.uuid, '', {});
|
2023-06-30 20:11:37 -04:00
|
|
|
}
|