Skip to content

Commit

Permalink
Merge pull request zmanring-zz#47 from rocketraman/issue-44
Browse files Browse the repository at this point in the history
Added link to delicious.com in popup footer
  • Loading branch information
Zach Manring committed Jan 21, 2014
2 parents 8ee28ee + 1f075a4 commit 47b4759
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/javascripts/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@
var manifest = chrome.runtime.getManifest();
return manifest.name + ' ' + manifest.version;
};

$scope.username = function() {
return localStorage.getItem('chrome-ext-delicious-username');
};
});

controllers.controller('LoginCtrl', function($scope, $rootScope, $location, delicious) {
Expand All @@ -510,10 +514,12 @@

delicious.authenticate($scope.username, $scope.password)
.success(function(data) {
localStorage.setItem('chrome-ext-delicious-username', $scope.username);
$rootScope.loggedIn = true;
$location.path('/new');
})
.error(function(data) {
localStorage.removeItem('chrome-ext-delicious-username', $scope.username);
$rootScope.loginFailed = true;
$location.path('/new');
});
Expand Down
1 change: 1 addition & 0 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
| <a title="Edit your options" ng-href="#/options" href="#/options">Options</a>
| <a target="_blank" title="Follow @DeliciousExt on Twitter" href="https://twitter.com/DeliciousExt">Follow</a>
| <a target="_blank" title="Give a tip on Gittip" href="https://www.gittip.com/zmanring/" class="donate">Beer me</a>
| <a target="_blank" title="Delicious.com" ng-href="https://delicious.com/{{username()}}">Delicious.com</a>
<span ng-show="loggedIn">| <a href="" ng-click="logout()">Logout</a></span>
</p>
</footer>
Expand Down
4 changes: 4 additions & 0 deletions updated.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ <h4 class="latest">Note: When using Delicious.com and this extension, multiple t

<h2>New Features</h2>
<ul>
<li class="latest">
Added link to delicious.com in popup. Thanks @Rocketraman
</li>
<li class="latest">
Added option to single-space delimit tags when user's tags contain no spaces. Thanks @Rocketraman
</li>
Expand Down Expand Up @@ -71,6 +74,7 @@ <h2>Changelog</h2>
<article class="latest">
<h4>Version 2.9.6 (in development)</h4>
<ul>
<li>Feature - add link to delicious.com.</li>
<li>Feature - handle single space delimited tags via user option.</li>
</ul>
</article>
Expand Down

0 comments on commit 47b4759

Please sign in to comment.