diegocr / CleanLinks

Converts obfuscated/nested links to genuine clean links.
166 stars 45 forks source link

Port to WebExtension (WIP) #176

Closed Cimbali closed 6 years ago

Cimbali commented 6 years ago

This is a port of CleanLinks to web extensions.

A few ways of cleaning links have already been implemented:

I'm starting this PR so that anyone who wants to help, see the progress, or otherwise comment on this work can do so. In particular I think I didn't use most of the features of the add-on, so I'm not entirely sure I'm rebuilding it correctly.

The way this is built, is cleanlink.js is included everywhere and contains all the common code. background.js runs the background "service," inject.js is a content script that is injected in every frame, and options.js is run on the options page.

Cimbali commented 6 years ago

Notifying issues linked to WebExtension: #174, #172, #170

alekksander commented 6 years ago

actually why supplement over forking as new project? @diegocr doesn't seem to have any spare time

Cimbali commented 6 years ago

@alekksander We'll see in due time. I'm trying to make this work decently first, then hopefully discuss with @diegocr, and if he indeed doesn't want to maintain the project any more I could take it over.

Cimbali commented 6 years ago

Anyone who wants to test the web-extension, please grab web-ext, clone this PR and run web-ext run. Any feedback is welcome.

Alternately, go to about:debugging#addons, tick "Enable add-on debugging", click "Load Temporary Add-on" and select the manifest.json file from this PR. Again, any feedback is welcome.

jawz101 commented 6 years ago

Can you make an xpi of it for those of us not familiar with the extension building?

Cimbali commented 6 years ago

i'm afraid tere's no xpi's anymore. You don't even have to build anything, just get the source code and follow one of the two ways described above:

Get the source:

git clone https://github.com/diegocr/CleanLinks
cd CleanLinks
git fetch origin pull/176/head:webext
git checkout webext

If you have npm, the node.js package manager:

npm -i web-ext
web-ext run

Alternately, use the debugging mode:

That's really all there is to it.

alekksander commented 6 years ago

„no xpi's anymore”? how come? won't this get a release as xpi some day?

Cimbali commented 6 years ago

WebExtensions are a new API and format for extensions, and the whole reason this addon has to be ported in the first place.

WebExtensions are notshipped as xpi's, just as is or zipped (usually via addons.mozilla.org)

Lcstyle commented 6 years ago

well i can at least confirm that this branch does work. I am enjoying it in 59.0.3 x64 win10

Riajyuu commented 6 years ago

@Cimbali can you post this on AMO ?

Cimbali commented 6 years ago

I will publish on AMO as soon as this is at beta-level of readiness. Specifically I want to implement all features before putting this out there, so I still want to do the cleaning of Location: headers and requests initiated by a page such as refreshes.

alekksander commented 6 years ago

i confirm it's working fine under fx59 on ubuntu based system. could translate to polish if needed, and waiting for the official release to start complaining/suggesting things :)

Cimbali commented 6 years ago

Alright, the webextension fork is out on AMO! Welcoming bug reports and feature requests at https://github.com/Cimbali/CleanLinks/issues

Get the add-on here: https://addons.mozilla.org/addon/clean-links-webext/