Skip to content

Commit

Permalink
Fixed #7
Browse files Browse the repository at this point in the history
  • Loading branch information
diegocr committed Oct 2, 2013
1 parent 8f1ed5a commit 400aaf0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 32 deletions.
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##CleanLinks Mozilla Firefox Extension##

This Extension is designed to convert "obfuscated" and/or nested links to genuine/normal plain clean links.
This Extension is designed to convert obfuscated/nested links to genuine/normal plain clean links.

_Eg:_

Expand All @@ -12,23 +12,13 @@ _Eg:_

- javascript:window.open('http://somesite.com') ➠ <http://somesite.com/>

It also allows to remove affiliate/tracking tags from URLs by the use of configurable patterns, being the most common used ones defined by default (ie, UTM, AFF, REF, etc)

You can disable the add-on at anytime by clicking the toolbar icon, which will become black/greyed when it's turned off. When some links are converted, the icon will change and you'll be able to mouse-over to open its popup where you can see the number of fixed links on the current website.
_Further details on the AMO listing page:_

Version 2.0+ released on July 2012 includes some configuration options where you'll be able to define which urls to skip (ie, links to sharing platforms and such) or what tracking tags to remove (ie, utm, affiliate IDs, referer, etc)
<https://addons.mozilla.org/addon/clean-links/>

Version 2.1 Implemented Event Delegation mode, which needs opt-in. Once enabled, rather than scanning the whole DOM document on page load it'll listen for click events instead.

_If you want to help testing by installing Clean Links straight from this repo try this extension:_

###✔ TODO:###

<ol>
<li> Convert the add-on to restartless.</li>
<li> Once it's restartless, make it compatible with Android Devices.</li>
<li> Implement a "linkify text links and then clean" feature.</li>
<li> Work over the address bar for pasted links rather than just clicked ones (?)</li>
<li> Unshorting links feature (?) </li>
</ol>


䷴䷄䷢
<https://addons.mozilla.org/addon/GitHub-Extension-Installer/>
2 changes: 1 addition & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ function startup(data) {
for(let [k,v] in Iterator({
enabled : !0,
skipwhen : 'ServiceLogin|imgres\\?|watch%3Fv|auth\\?client_id|signup|'
+ 'openid\\.ns|\\.mcstatic\\.com|sVidLoc|[Ll]ogout|submit\\?url=',
+ 'oauth|openid\\.ns|\\.mcstatic\\.com|sVidLoc|[Ll]ogout|submit\\?url=',
remove : '(?:ref|aff)\\w*|utm_\\w+|(?:merchant|programme|media)ID',
skipdoms : 'accounts.google.com,docs.google.com,translate.google.com,'
+ 'login.live.com,plus.google.com,www.facebook.com,twitter.com,'
Expand Down
19 changes: 5 additions & 14 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,12 @@ const cleanlinks = {
.getService(Ci.nsIIOService);
t.observe(null,'nsPref:changed','skipdoms');
t.edc = t.mob ? (function(a) window.content.location = a)
: (typeof window.loadURI !== 'function')
: (typeof window.openUILink !== 'function')
? function(a,b) (b.setAttribute('href', a), b.click())
: function(a,b,c) {
switch(c.button) {
case 0:
if(!(c.ctrlKey || c.metaKey)) {
window.loadURI(a);
break;
}
case 1:
let bTab = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefService)
.getBoolPref('browser.tabs.loadInBackground');
gBrowser.loadOneTab(a,null,null,null,bTab,true)}
};
: function(a,b,c) openUILink(a,c,{
inBackground: gPrefService
.getBoolPref('browser.tabs.loadInBackground'),
relatedToCurrent: true});
break;
case 'unload':
t.ps.removeObserver("", t);
Expand Down
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<em:id>{158d7cb3-7039-4a75-8e0b-3bd0a464edd2}</em:id>
<em:type>2</em:type>
<em:name>Clean Links</em:name>
<em:version>2.4.2</em:version>
<em:version>2.4.3a1</em:version>
<em:creator>Diego Casorran</em:creator>
<em:description>Converts obfuscated/nested links to genuine clean links</em:description>
<em:bootstrap>true</em:bootstrap>
Expand Down

0 comments on commit 400aaf0

Please sign in to comment.