Grammalecte  Check-in [45611cc1b5]

Overview
Comment:[fx] WebExt: use innerText instead of textContent to retrieve page text
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fx | webext3
Files: files | file ages | folders
SHA3-256: 45611cc1b5cc862eb4ef8976d3f56abc09462c7d63c7f6b6aed00bcd3119337f
User & Date: olr on 2017-10-12 10:48:47
Original Comment: [fx] WebExt: use innerText instead of text
Other Links: branch diff | manifest | tags
Context
2017-10-12
11:02
[fx] WebExt: invisible panel marker must be “visible” to be retrieved by innerText check-in: 8eaecc0c96 user: olr tags: fx, webext3
10:48
[fx] WebExt: use innerText instead of textContent to retrieve page text check-in: 45611cc1b5 user: olr tags: fx, webext3
10:19
[fx] WebExt: useless node id check-in: a1ae783d64 user: olr tags: fx, webext3
Changes

Modified gc_lang/fr/webext/content_scripts/init.js from [631786cf1c] to [989fb6def3].

111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
        oGrammalecte.createLxgPanel();
        oGrammalecte.oLxgPanel.clear();
        oGrammalecte.oLxgPanel.show();
        oGrammalecte.oLxgPanel.startWaitIcon();
    },

    getPageText: function () {
        let sPageText = document.body.textContent;
        let nPos = sPageText.indexOf("__grammalecte_panel__");
        if (nPos >= 0) {
            sPageText = sPageText.slice(0, nPos);
        }
        return sPageText;
    },








|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
        oGrammalecte.createLxgPanel();
        oGrammalecte.oLxgPanel.clear();
        oGrammalecte.oLxgPanel.show();
        oGrammalecte.oLxgPanel.startWaitIcon();
    },

    getPageText: function () {
        let sPageText = document.body.innerText;
        let nPos = sPageText.indexOf("__grammalecte_panel__");
        if (nPos >= 0) {
            sPageText = sPageText.slice(0, nPos);
        }
        return sPageText;
    },