can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r21397: LJSUP-11444: Open the picture must be di...

Committer: dpetrov
LJSUP-11444: Open the picture must be displayed after a refresh page
U   trunk/htdocs/js/journal.js
Modified: trunk/htdocs/js/journal.js
===================================================================
--- trunk/htdocs/js/journal.js	2012-03-13 13:06:47 UTC (rev 21396)
+++ trunk/htdocs/js/journal.js	2012-03-13 13:12:01 UTC (rev 21397)
@@ -263,7 +263,7 @@
 (function() {
 	var storage = {
 		init: function() {
-			this._store = jQuery.storage.getItem('placeholders') || '';
+			this._store = window.sessionStorage && sessionStorage.getItem('placeholders') || '';
 		},
 
 		makeHash: function(link) {
@@ -275,10 +275,11 @@
 		},
 
 		addUrl: function(link) {
+			if (!window.sessionStorage) { return; }
 			if (this.inStorage(link)) { return; }
 
 			this._store += this.makeHash(link);
-			jQuery.storage.setItem('placeholders', this._store);
+			sessionStorage.setItem('placeholders', this._store);
 		}
 	};
 

Tags: can3p, dpetrov, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments