Skip to content

Commit

Permalink
2.5.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
diegocr committed May 13, 2014
1 parent 7bb18c1 commit 4ef9ad8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ function setOptions(Reset) {
highlight : !0,
hlstyle : 'background:rgba(252,252,0,0.6); color: #000',
evdm : !0,
evdmki : !0,
progltr : !1,
cbc : !0,
gotarget : !1,
Expand Down
19 changes: 11 additions & 8 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ const cleanlinks = {
tag_l:'data-cleanedlink',
tag_t:"\n \n- " + _("browser.touch"),
tag_h:_("browser.hashtag"),
acev:'aftercustomization',
op:null,
ps:null,
handleEvent: function(ev) {
let t = cleanlinks;
window.removeEventListener(ev.type, t, false);
if(ev.type != t.acev)
window.removeEventListener(ev.type, t, false);
t.pkg = t.addon.name + ' v' + t.addon.version;
switch(ev.type) {
case 'load':
Expand All @@ -47,7 +49,7 @@ const cleanlinks = {
t.ios = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
t.observe(null,'nsPref:changed','skipdoms');
window.addEventListener('aftercustomization', t, !1);
window.addEventListener(t.acev, t, !1);
t.edc = t.mob ? (function(a) window.content.location = a)
: (typeof window.openUILink !== 'function')
? function(a,b) (b.setAttribute('href', a), b.click())
Expand Down Expand Up @@ -85,19 +87,18 @@ const cleanlinks = {
'browser.tabs.loadInBackground')});
}.bind(t);
break;
case 'aftercustomization':
this.si(this.si.last);
case t.acev:
window.setTimeout(() => t.si(t.si.last), 400);
break;
case 'unload':
t.ps.removeObserver("", t);
if(t.op.enabled) t.dd();
window.removeEventListener
('aftercustomization', t, !1);
window.removeEventListener(t.acev, t, !1);
for(let m in t)
delete t[m];
default:break;
}
ev = t = undefined;
ev = undefined;
},
b: function(ev) {
if(ev.originalTarget instanceof HTMLDocument) {
Expand Down Expand Up @@ -534,9 +535,11 @@ const cleanlinks = {
if(!tb) tb = document.getElementById('cleanlinks-toolbar-button');;
if(!tb) return;

this.si.last = i;
if(i == '~' && this.op.evdmki) i = 0;

let s=tb.getAttribute('cui-areatype')=='menu-panel'? 32:16;
tb.setAttribute('image',this.rsc('icons/'+s+(i||'')+'.png'));
this.si.last = i;
},

gd: function() {
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.5.1a1</em:version>
<em:version>2.5.1</em:version>
<em:creator>Diego Casorran</em:creator>
<em:contributor>Simon Chan</em:contributor>
<em:description>Converts obfuscated/nested links to genuine clean links</em:description>
Expand Down

0 comments on commit 4ef9ad8

Please sign in to comment.