New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule constructor works incorrectly with TD tag #483

Closed
Alex-302 opened this Issue Dec 16, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@Alex-302
Member

Alex-302 commented Dec 16, 2016

When TD tag is selected, rule constructor uses class name of the nested element instead his own
Adguard 2.5.9 for chrome
Example link
http://www.depo.ua/rus/politics/nabu-oprilyudnila-video-yak-ohendovskomu-povidomlyali-pro-14122016170300
image
image

@Alex-302 Alex-302 added the Bug label Dec 16, 2016

@Alex-302 Alex-302 added this to the 2.6 milestone Dec 16, 2016

@atropnikov

This comment has been minimized.

Show comment
Hide comment
@atropnikov

atropnikov Dec 26, 2016

Member

deserializeElement function doesn't work correct.

serializeElement(<td><span>...</span></td>) => '<td><span>...</span></td>'
but
deserializeElement('<td><span>...</span></td>') => <span>...</span>

Member

atropnikov commented Dec 26, 2016

deserializeElement function doesn't work correct.

serializeElement(<td><span>...</span></td>) => '<td><span>...</span></td>'
but
deserializeElement('<td><span>...</span></td>') => <span>...</span>

@atropnikov

This comment has been minimized.

Show comment
Hide comment
@atropnikov

atropnikov Dec 26, 2016

Member

We don't need the entire element in devtools.js, just retrieve element's info (classes, attributes etc).

var getSelectedElementInfo = function (callback) {
        browser.devtools.inspectedWindow.eval("DevToolsHelper.getElementInfo($0)", {
            useContentScriptContext: true
        }, function (elementInfo) {
            callback(elementInfo);
        });
    };
Member

atropnikov commented Dec 26, 2016

We don't need the entire element in devtools.js, just retrieve element's info (classes, attributes etc).

var getSelectedElementInfo = function (callback) {
        browser.devtools.inspectedWindow.eval("DevToolsHelper.getElementInfo($0)", {
            useContentScriptContext: true
        }, function (elementInfo) {
            callback(elementInfo);
        });
    };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment