alexa-rank-webextension icon indicating copy to clipboard operation
alexa-rank-webextension copied to clipboard

Clicking rank opens blank page instead of Alexa

Open JJD2K opened this issue 5 years ago • 12 comments

Clicking the menu item opens an empty page.

JJD2K avatar May 18 '20 18:05 JJD2K

Could you please share more details:

  • on what page you're trying;
  • browser version;
  • probably a screenshot would illustrate the issue best;

fuyu avatar May 19 '20 07:05 fuyu

Hello The issue is on ALL pages. Latest Firefox: 76.0.1 (64-bit) There is not much to show on the screenshot - it just opens a new empty tab:"about:blank".

I do not know if I can debug something. I guess it is an issue with the latest Firefox Release. Maybe they have added some extra restrictions to the plugins which cause the issue. These permissions are enabled: Access your data for all websites Access browser tabs

Please change the plugin home page to this repository as it is pointing to the old one:

Homepage https://github.com/fuyu/Googalexa

Thank you for the prompt reply. If you need more info or have something to test let me know.

JJD2K avatar May 19 '20 11:05 JJD2K

Hello I debugged this and it seems the code is correct, but for some reason, the function does not work: window.open('https://www.alexa.com/siteinfo/' + stats.host, '_blank'); and opens an empty page. If I paste for example: https://www.alexa.com/siteinfo/yahoo.com in a new tab it works, but using the extension it opens a blank page.

I suspect that ALEXA somehow detects that the request is coming from the addon and blocks it, but unfortunately, the source of the plugin in Firefox Developer edition is not editable and I can not experiment with the window.open parameters.

JJD2K avatar Jun 11 '20 09:06 JJD2K

Hello I found the problem. As I initially suspected it is an issue with Firefox. Other users have experienced the same problem. See here: https://stackoverflow.com/questions/48982711/window-open-in-background-js-in-firefox-extension https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create

Solution it to replace: window.open('https://www.alexa.com/siteinfo/' + stats.host, '_blank'); with:
browser.tabs.create({url: 'https://www.alexa.com/siteinfo/' + stats.host});

Please update the code and upload the signed extension. Thank you in advance!

JJD2K avatar Jun 11 '20 14:06 JJD2K

Thanks, I'll check this solution and will do the edits. It's interesting that I'm using the latest version of FF and the extension works correctly for me.

fuyu avatar Jun 15 '20 07:06 fuyu

Hello That is really strange indeed. I have tested this both on Windows and MAC and both versions have the same issues. Also FF Developer version has the same issue.

JJD2K avatar Jun 16 '20 09:06 JJD2K

Are you using the latest version? Are you going to apply this fix? What I pointed out is a bug in the code according to the documentation anyway.

Please this issue makes the plugin unusable.

JJD2K avatar Aug 05 '20 14:08 JJD2K

Thanks for the reminder. I have the plugin working so the issue slips out of my mind.

fuyu avatar Aug 05 '20 16:08 fuyu

Hello Why is it working for you? Are you running an older version of Firefox? It should not be working with the latest versions - tested both on Windows and MAC

JJD2K avatar Aug 05 '20 23:08 JJD2K

Latest version of Firefox.

fuyu avatar Aug 06 '20 05:08 fuyu

@JJD2K Fixed the code and pushed new version v0.9.3 to Mozilla Addons. Please give it a try.

fuyu avatar Aug 09 '20 07:08 fuyu

THANK YOU VERY MUCH! Works perfectly!

JJD2K avatar Aug 09 '20 12:08 JJD2K