Skip to content

Commit

Permalink
There is no FaviconService on Fennec...
Browse files Browse the repository at this point in the history
  • Loading branch information
diegocr committed Jun 3, 2014
1 parent da00f48 commit a1c5538
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ let _ = (function(strings) {
return function _(key) strings.GetStringFromName(key);
})(Services.strings.createBundle("chrome://cleanlinks/locale/browser.properties"));

let FaviconService = Cc["@mozilla.org/browser/favicon-service;1"]
let FaviconService = Cc["@mozilla.org/browser/favicon-service;1"];
FaviconService = FaviconService && FaviconService
.getService(Ci.nsIFaviconService).QueryInterface(Ci.mozIAsyncFavicons);

let i$ = {
Expand Down
6 changes: 3 additions & 3 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ const cleanlinks = {
tcl: function(n) {
let c,p,t,s = n.ownerDocument.defaultView.getSelection();

this.d(['SEL', s.isCollapsed, s.focusNode&&s.focusNode.data, s.focusOffset]);
// this.d(['SEL', s.isCollapsed, s.focusNode&&s.focusNode.data, s.focusOffset]);

if(s.isCollapsed && s.focusNode && s.focusNode.data && (p=s.focusOffset)) {
let zx = ' "\'<>\n\r\t()[]|';
Expand All @@ -392,10 +392,10 @@ const cleanlinks = {
t = t.shift().trim().replace(RegExp("["+zx.replace(/(.)/g,'\\$1')+"]+$"),'');
if(!~t.indexOf('://')) t = 'http://'+t;
}
this.d(['RES',p,t,c]);
// this.d(['RES',p,t,c]);
}

this.d(['TEXTCL ' + t]);
// this.d(['TEXTCL ' + t]);

return 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.6a2</em:version>
<em:version>2.6.0</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 a1c5538

Please sign in to comment.