Overview
Comment: | [fx] attempt for the lexicographer (can’t work that way, it seems) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fx | webext2 |
Files: | files | file ages | folders |
SHA3-256: |
fd7a9b5ca39b9c90309c170dc9d5bb77 |
User & Date: | olr on 2017-08-08 13:08:16 |
Other Links: | branch diff | manifest | tags |
Context
2017-08-08
| ||
17:25 | [fx] conjugueur: panneau et onglet check-in: 1f91810c3d user: olr tags: fx, webext2 | |
16:39 | [fx] merge webext2 check-in: 1eac03608e user: IllusionPerdu tags: fx, webext2_fix | |
13:08 | [fx] attempt for the lexicographer (can’t work that way, it seems) check-in: fd7a9b5ca3 user: olr tags: fx, webext2 | |
2017-08-07
| ||
15:09 | [fx] tests with context menus check-in: f7b29b571c user: olr tags: fx, webext2 | |
Changes
Modified gc_lang/fr/webext/background.js from [fa74ac872d] to [f23ea27e23].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | // Background "use strict"; function showError (e) { console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message); } /* Worker (separate thread to avoid freezing Firefox) */ let xGCEWorker = new Worker("gce_worker.js"); xGCEWorker.onmessage = function (e) { // https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent try { |
︙ | |||
99 100 101 102 103 104 105 106 107 108 | 109 110 111 112 113 114 115 116 117 118 119 120 121 | + + + | console.log("Item " + xInfo.menuItemId + " clicked in tab " + xTab.id); console.log("editable: " + xInfo.editable + " · selected: " + xInfo.selectionText); // confusing: no way to get the node where we click?! switch (xInfo.menuItemId) { case "grammar_checking": break; case "lexicographer": if (xInfo.selectionText) { xGCEWorker.postMessage(["getListOfTokens", {sText: xInfo.selectionText}]); } break; } }); |
Modified gc_lang/fr/webext/panel/main.js from [9125bf11f9] to [def169afbc].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + + + | // Main panel "use strict"; |
︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | + + + + + + + + | //document.getElementById("movewindow").style.display = "block"; } } catch (e) { showError(e); } } function startWaitIcon () { document.getElementById("waiticon").hidden = false; } function stopWaitIcon () { document.getElementById("waiticon").hidden = true; } /* Events */ window.addEventListener( "click", |
︙ | |||
79 80 81 82 83 84 85 | 89 90 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } /* Messages received */ function handleMessage (oMessage, xSender, sendResponse) { |