Scaffold: Load translator on double-click

This commit is contained in:
Dan Stillman 2019-08-10 08:40:01 -04:00
parent 1199059612
commit 1c6840f9a5

View file

@ -27,6 +27,14 @@ var Scaffold_Load = new function() {
this.onLoad = Zotero.Promise.coroutine(function* () {
var listitem, translator, listcell, set;
var listbox = document.getElementById("listbox");
listbox.addEventListener('dblclick', () => {
var translatorID = document.getElementById("listbox").selectedItem.getUserData("zotero-id");
if (!translatorID) return;
this.accept();
window.close();
});
var translators = {};
// Get the matching translators