Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Skip invisible links in 'open selected links in tab' function #45

Closed
Splitthof opened this issue Aug 25, 2015 · 1 comment
Closed

Skip invisible links in 'open selected links in tab' function #45

Splitthof opened this issue Aug 25, 2015 · 1 comment

Comments

@Splitthof
Copy link

Please skip invisible links (blocked by Adblock) in the 'open selected links in tab' feature.
I have achieved this by editing the isLinkSelected function:

isLinkSelected = function() {
...
    for (let link of links) {
      if (selection.containsNode(link, true) && (link.offsetHeight>0) && this.linkURLs.indexOf(link.href) == -1)
        this.linkURLs.push(link.href);

Maybe a check on link.offsetWidth>0 is also useful.
Please accept this adjustment in your code, so I no longer need to edit your code (mozilla addon signing).

@yfdyh000
Copy link
Owner

Sorry for delay, my email backlog recently.

Looks good, works for ABP element blocker.
p.s. uBlock looks removes the invisible links from DOM.

I still don't got a AMO approval and signature, and the is a micro change, so this commit will not be release immediately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants