Overview
Comment: | [fx][doc] warning: the node must always have an identifier |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | doc | fx |
Files: | files | file ages | folders |
SHA3-256: |
cd626d33e6effa134f196320aa0bf051 |
User & Date: | olr on 2020-04-07 11:17:25 |
Other Links: | manifest | tags |
Context
2020-04-07
| ||
16:13 | [fr] ajustements check-in: 38cda6c0bb user: olr tags: trunk, fr | |
11:17 | [fx][doc] warning: the node must always have an identifier check-in: cd626d33e6 user: olr tags: trunk, doc, fx | |
07:44 | [fx] openPanelForText: open panel even if there is no node check-in: 1bfcf772b6 user: olr tags: trunk, fx | |
Changes
Modified doc/API_web.md from [db743ee983] to [7922180e3c].
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - - + + | ### Open the Grammalecte panel for a node If you have disabled the spinning button, you can launch the Grammalecte panel with your custom button. oGrammalecteAPI.openPanelForNode("node_id") oGrammalecteAPI.openPanelForNode(node) |
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - + - + - + | ### Open the Grammalecte panel for any text oGrammalecteAPI.openPanelForText("your text") oGrammalecteAPI.openPanelForText("your text", "node_id") oGrammalecteAPI.openPanelForText("your text", node) |
︙ |
Modified gc_lang/fr/webext/content_scripts/api.js from [184dcb850a] to [4233cac483].
︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | + + + | let sNodeId = ""; if (vNode instanceof HTMLElement && vNode.id) { sNodeId = vNode.id; } else if (typeof(vNode) === "string" && document.getElementById(vNode)) { sNodeId = vNode; } else { console.log("[Grammalecte API] No node identifier. No event, no result will be sent.") } let xEvent = new CustomEvent("GrammalecteCall", { detail: JSON.stringify({sCommand: "openPanelForText", sText: sText, sNodeId: sNodeId}) }); document.dispatchEvent(xEvent); } else { console.log("[Grammalecte API] Error: parameter is not a text."); } }, |
︙ |