Grammalecte  Check-in [5fc11add34]

Overview
Comment:[fx] WebExt: don’t create menu button if textarea is not visible
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 5fc11add34e33c8bb25f2e0d832228f4f3f1a9ab5f325eea0f2e35dabc9362f9
User & Date: olr on 2017-09-27 12:05:23
Other Links: manifest | tags
Context
2017-09-27
12:26
[fx] WebExt: no infinite animation: stop after 10 iterations check-in: 53c3063ab1 user: olr tags: fx, trunk
12:05
[fx] WebExt: don’t create menu button if textarea is not visible check-in: 5fc11add34 user: olr tags: fx, trunk
11:45
[fx] WebExt: secure function createNode() check-in: 57f14062ba user: olr tags: fx, trunk
Changes

Modified gc_lang/fr/webext/content_scripts/init.js from [46a029346c] to [6ea24993c1].

    46     46       oTFPanel: null,
    47     47       oLxgPanel: null,
    48     48       oGCPanel: null,
    49     49   
    50     50       createMenus: function () {
    51     51           let lNode = document.getElementsByTagName("textarea");
    52     52           for (let xNode of lNode) {
    53         -            this.lMenu.push(new GrammalecteMenu(this.nMenu, xNode));
    54         -            this.nMenu += 1;
           53  +            if (xNode.style.display !== "none" && xNode.style.visibility !== "hidden") {
           54  +                this.lMenu.push(new GrammalecteMenu(this.nMenu, xNode));
           55  +                this.nMenu += 1;
           56  +            }
    55     57           }
    56     58       },
    57     59   
    58     60       rescanPage: function () {
    59     61           if (this.oTFPanel !== null) { this.oTFPanel.hide(); }
    60     62           if (this.oLxgPanel !== null) { this.oLxgPanel.hide(); }
    61     63           if (this.oGCPanel !== null) { this.oGCPanel.hide(); }