Open gorgelot opened 12 years ago
HI You can add that extra code to have an option to call the function from context menu:
/context menu element start/
(function (){ var contextMenu = document.getElementById("contentAreaContextMenu"); var translate = document.createElement("menuitem"); translate.setAttribute("id", "context-translate"); translate.setAttribute("label", "popup translate EN"); translate.setAttribute("oncommand","popupTranslate.onCommand(false);");
contextMenu.insertBefore(translate, document.getElementById("context-stop"));
})();
(function (){ var contextMenu = document.getElementById("contentAreaContextMenu"); var translate = document.createElement("menuitem"); translate.setAttribute("id", "context-translateJ"); translate.setAttribute("label", "popup translate JA"); translate.setAttribute("oncommand","popupTranslate.onCommand(true);");
/context menu element end/
HI You can add that extra code to have an option to call the function from context menu:
/context menu element start/
(function (){ var contextMenu = document.getElementById("contentAreaContextMenu"); var translate = document.createElement("menuitem"); translate.setAttribute("id", "context-translate"); translate.setAttribute("label", "popup translate EN"); translate.setAttribute("oncommand","popupTranslate.onCommand(false);");
})();
(function (){ var contextMenu = document.getElementById("contentAreaContextMenu"); var translate = document.createElement("menuitem"); translate.setAttribute("id", "context-translateJ"); translate.setAttribute("label", "popup translate JA"); translate.setAttribute("oncommand","popupTranslate.onCommand(true);");
})();
/context menu element end/