Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Style normalization: use tabs for whitespace and newlines for stateme…

…nt termination.
  • Loading branch information...
commit 2d87473820bc7d85e995085fa6bf8a5cc111431c 1 parent 0d8d987
@marcuswestin marcuswestin authored
Showing with 12 additions and 12 deletions.
  1. +12 −12 store.js
View
24 store.js
@@ -20,9 +20,9 @@
*/
(function(root, store) {
- if (typeof module != 'undefined') { module.exports = store }
- else if (typeof define === 'function' && define.amd) { define(store); }
- else { root.store = store; }
+ if (typeof module != 'undefined') { module.exports = store }
+ else if (typeof define === 'function' && define.amd) { define(store) }
+ else { root.store = store }
})(this, (function(){
var api = {},
win = window,
@@ -82,7 +82,7 @@
} else if (doc.documentElement.addBehavior) {
var storage,
storageOwner,
- storageContainer;
+ storageContainer
// Since #userData storage applies only to specific paths, we need to
// somehow link our data to a specific path. We choose /favicon.ico
// as a pretty safe option, since all browsers already make a request to
@@ -94,17 +94,17 @@
// document can be used instead of the current document (which would
// have been limited to the current path) to perform #userData storage.
try {
- storageContainer = new ActiveXObject('htmlfile');
- storageContainer.open();
- storageContainer.write('<s' + 'cript>document.w=window</s' + 'cript><iframe src="/favicon.ico"></frame>');
- storageContainer.close();
- storageOwner = storageContainer.w.frames[0].document;
- storage = storageOwner.createElement('div');
+ storageContainer = new ActiveXObject('htmlfile')
+ storageContainer.open()
+ storageContainer.write('<s' + 'cript>document.w=window</s' + 'cript><iframe src="/favicon.ico"></frame>')
+ storageContainer.close()
+ storageOwner = storageContainer.w.frames[0].document
+ storage = storageOwner.createElement('div')
} catch(e) {
// somehow ActiveXObject instantiation failed (perhaps some special
// security settings or otherwse), fall back to per-path storage
- storage = doc.createElement('div');
- storageOwner = doc.body;
+ storage = doc.createElement('div')
+ storageOwner = doc.body
}
function withIEStorage(storeFunction) {
return function() {
Please sign in to comment.
Something went wrong with that request. Please try again.