Smile4ever / firefoxaddons

Extend the functionality of Firefox with cool addons
82 stars 20 forks source link

[Neat URL][REQ] port this addon/extension to Chrome? #124

Closed luboq closed 6 years ago

luboq commented 6 years ago

Pure URL is not good enough, Chrome also need Neat URL please! ☺️

luboq commented 6 years ago

@Smile4ever A hotheaded friend of mine has tried to import Neat URL to chrome manually:

  1. Download the file neat-URL.xpi and unzip it
  2. Build browser-polyfill.js by using https://github.com/mozilla/webextension-polyfill and put it in the folder above
  3. Modify manifest.json change
    "background": {
        "scripts": ["background.js", "toolbaricon.js"]
    },

    To

    "background": {
        "scripts": ["browser-polyfill.js","background.js", "toolbaricon.js"]
    },
  4. Modify options.html Add
    <script type="application/javascript" src="browser-polyfill.js"></script>

    before

    <script src="options.js" defer></script>

I just would like to ask b/c obviously you know your work best: Are these steps enough? ghe-emoji

Smile4ever commented 6 years ago

I think this is indeed enough, looking at the permissions (=used APIs). I will implement these changes and do some thorough tests.

nicolaasjan commented 6 years ago

Hi, I would like to have this extension in Chromium as well. Simply loading the unpacked Firefox xpi-file throws errors obviously:

Unrecognized manifest key 'applications'.
found unexpected key 'browser_style'
Uncaught ReferenceError: browser is not defined
Uncaught ReferenceError: browser is not defined

The method described above by Waldens 'hotheaded friend' is a bit to difficult for me (building browser-polyfill.js).

Are you working on a Chrome extension?

gliptak commented 6 years ago

Could the applications key be removed? https://github.com/Rob--W/dont-track-me-google/issues/15

Smile4ever commented 6 years ago

In the Chrome build, I will remove applications and browser_style. This will be retained in the Firefox build so the addon doesn't get loaded twice when using about:debugging and AMO (addons.mozilla.org) together.

Progress has been made for the Chrome build, I have it working. I will publish soon to the Chrome Web Store.

luboq commented 6 years ago

@Smile4ever Good job! I can't wait to enjoy it on Chrome and recommend it to the community.。◕ ‿ ◕。

Smile4ever commented 6 years ago

It has been published to the Chrome Web Store: https://chrome.google.com/webstore/detail/neat-url/jchobbjgibcahbheicfocecmhocglkco

Port can be seen here:

Screenshot: image

luboq commented 6 years ago

@Smile4ever Thanks. Already recommend it to the community, seems very popular: https://www.v2ex.com/t/457992

Also encountered some suspected bugs, like the rule jd_pop@*.jd.com seems not working for the URL https://item.jd.com/5724596.html?jd_pop=1bb6d5c7-e6fc-41cc-99cf-08e3a9efcd4d&abt=3 I'm not sure if this is bug or misuse yet. Anyway, big thanks~