Overview
Comment: | [fx] WebExt: context menu: rescan page |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx |
Files: | files | file ages | folders |
SHA3-256: |
3126c1b302479cac58734bf9f04555f7 |
User & Date: | olr on 2017-09-16 10:57:01 |
Other Links: | manifest | tags |
Context
2017-09-16
| ||
11:18 | [fx] WebExt: CSS: line-height in suggestion block check-in: 63577f44c9 user: olr tags: trunk, fx | |
10:57 | [fx] WebExt: context menu: rescan page check-in: 3126c1b302 user: olr tags: trunk, fx | |
2017-09-15
| ||
14:58 | [fx] WebExt: smaller text formatter check-in: d4a86b753d user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/webext/background.js from [b21f2d7035] to [cd0a23cfe8].
︙ | |||
169 170 171 172 173 174 175 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | - + + + + + + + + + + + + + + + + | browser.contextMenus.create({ id: "parseAndSpellcheck", title: "Corriger", contexts: ["selection"] }); browser.contextMenus.create({ |
︙ |
Modified gc_lang/fr/webext/content_scripts/init.js from [7343d224bf] to [52c46fcb6a].
︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + + + + + + + + + + + | createMenus: function () { let lNode = document.getElementsByTagName("textarea"); for (let xNode of lNode) { this.lMenu.push(new GrammalecteMenu(this.nMenu, xNode)); this.nMenu += 1; } }, rescanPage: function () { if (this.oTFPanel !== null) { this.oTFPanel.hide(); } if (this.oLxgPanel !== null) { this.oLxgPanel.hide(); } if (this.oGCPanel !== null) { this.oGCPanel.hide(); } for (let oMenu of this.lMenu) { oMenu.deleteNodes(); } this.lMenu.length = 0; // to clear an array this.createMenus(); }, createTFPanel: function () { if (this.oTFPanel === null) { this.oTFPanel = new GrammalecteTextFormatter("grammalecte_tf_panel", "Formateur de texte", 760, 600, false); //this.oTFPanel.logInnerHTML(); this.oTFPanel.insertIntoPage(); this.oTFPanel.adjustHeight(); |
︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | + + + | break; case "openLxgPanel": oGrammalecte.createLxgPanel(); oGrammalecte.oLxgPanel.clear(); oGrammalecte.oLxgPanel.show(); oGrammalecte.oLxgPanel.startWaitIcon(); break; case "rescanPage": oGrammalecte.rescanPage(); break; default: console.log("[Content script] Unknown command: " + sActionDone); } }); /* Start */ oGrammalecte.createMenus(); |
Modified gc_lang/fr/webext/content_scripts/menu.js from [89ff587940] to [51ff434365].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - - - - - + + + + + | // JavaScript "use strict"; class GrammalecteMenu { constructor (nMenu, xTextArea) { this.sMenuId = "grammalecte_menu" + nMenu; |
︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | + + + + + | xMenu.appendChild(createNode("div", {className: "grammalecte_menu_footer"})); return xMenu; } catch (e) { showError(e); } } deleteNodes () { this.xMenu.parentNode.removeChild(this.xMenu); this.xButton.parentNode.removeChild(this.xButton); } switchMenu () { let xMenu = document.getElementById(this.sMenuId); xMenu.style.display = (xMenu.style.display == "block") ? "none" : "block"; } } |