Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commonplace

Package Overview
Dependencies
Maintainers
6
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commonplace - npm Package Compare versions

Comparing version 0.2.9 to 0.3.0

2

package.json
{
"name": "commonplace",
"version": "0.2.9",
"version": "0.3.0",
"preferGlobal": true,

@@ -5,0 +5,0 @@ "repository": {

@@ -26,22 +26,27 @@ define('login',

e.preventDefault();
user.clear_token();
z.body.removeClass('logged-in');
z.page.trigger('reload_chrome').trigger('before_logout');
if (capabilities.persona) {
console.log('Triggering Persona logout');
navigator.id.logout();
}
requests.del(urls.api.url('logout')).done(function() {
// Moved here from the onlogout callback for now until
// https://github.com/mozilla/browserid/issues/3229
// gets fixed.
user.clear_token();
z.body.removeClass('logged-in');
z.page.trigger('reload_chrome').trigger('before_logout');
// Moved here from the onlogout callback for now until
// https://github.com/mozilla/browserid/issues/3229
// gets fixed.
if (!z.context.dont_reload_on_login) {
require('views').reload().done(function(){
z.page.trigger('logged_out');
signOutNotification();
});
} else {
console.log('Reload on logout aborted by current view');
}
if (capabilities.persona) {
console.log('Triggering Persona logout');
navigator.id.logout();
}
if (!z.context.dont_reload_on_login) {
require('views').reload().done(function(){
z.page.trigger('logged_out');
signOutNotification();
});
} else {
console.log('Reload on logout aborted by current view');
}
}).fail(function() {
notification.notification({message: gettext('Error signing out')});
});
});

@@ -48,0 +53,0 @@

@@ -20,2 +20,10 @@ define('storage', ['settings'], function(settings) {

// Expose storage version (which is prefixed to every key).
// For instance, used in Zamboni login.js.
try {
ls.setItem('latestStorageVersion', settings.storage_version);
} catch(e) {
fakeStorage.latestStorageVersion = settings.storage_version;
}
return {

@@ -22,0 +30,0 @@ clear: function() {

@@ -19,6 +19,7 @@ define('user',

if (save_to_ls) {
// Try to initialize items from localStorage.
token = storage.getItem('user');
log.unmention(token);
settings = JSON.parse(storage.getItem('settings') || '{}');
permissions = JSON.parse(storage.getItem('permissions') || '{}');
var _stored = storage.getItem('user_apps');

@@ -28,5 +29,4 @@ if (_stored) {

}
}
if (save_to_ls) {
log.unmention(token);
save_settings();

@@ -33,0 +33,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc