summaryrefslogtreecommitdiffabout
path: root/content
authorMichael Krelin <hacker@klever.net>2006-10-01 21:12:03 (UTC)
committer Michael Krelin <hacker@klever.net>2006-10-01 21:12:03 (UTC)
commitd11f973311060020c6cc760f7304488155f40dd7 (patch) (side-by-side diff)
tree9a6f65554efd5ad3ffda7ac8bef4a188093ff96b /content
parent6f8e1b5f544a41f492ca42dc407d0580cfc67bc0 (diff)
downloadfireflix-d11f973311060020c6cc760f7304488155f40dd7.zip
fireflix-d11f973311060020c6cc760f7304488155f40dd7.tar.gz
fireflix-d11f973311060020c6cc760f7304488155f40dd7.tar.bz2
moved UI authorization code from flickr object
git-svn-id: http://svn.klever.net/kin/fireflix/trunk@176 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (limited to 'content') (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix.js4
-rw-r--r--content/flickr.js12
2 files changed, 6 insertions, 10 deletions
diff --git a/content/fireflix.js b/content/fireflix.js
index 0f01d26..f180379 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -56,3 +56,5 @@ var fireflix = {
this.flickr.authorize_0(
- function() {
+ 'delete',
+ function(x,f,u) {
+ _this.openTab(u);
_this.set_auth_state(_this.flickr.token,true);
diff --git a/content/flickr.js b/content/flickr.js
index add628a..b5bfa43 100644
--- a/content/flickr.js
+++ b/content/flickr.js
@@ -147,3 +147,3 @@ Flickr.prototype = {
frob: null,
- authorize_0: function(on_s, on_f) {
+ authorize_0: function(perms, on_s, on_f) {
var _this = this;
@@ -154,10 +154,4 @@ Flickr.prototype = {
var u = _this.api_call_url(
- { frob: _this.frob, perms: 'delete' }, _this.auth_url );
- var wm = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(
- Components.interfaces.nsIWindowMediator );
- var bw = wm.getMostRecentWindow('navigator:browser');
- var b = bw.getBrowser();
- var t = b.addTab(u);
- b.selectedTab = t;
- if(on_s) on_s();
+ { frob: _this.frob, perms: perms?perms:'delete' }, _this.auth_url );
+ if(on_s) on_s(x,_this.frob,u);
}, function(x,s,c,m) {