temporary fixes for chrome users who have cookies disabled

v1.18.x
psychobunny 11 years ago
parent aa0b9f9029
commit 22d459d4cc

@ -31,8 +31,16 @@
} }
function renderWidgets(location) { function renderWidgets(location) {
// remove when https://code.google.com/p/chromium/issues/detail?id=357625 is fixed
try {
var temp = localStorage.getItem('cache:widgets:' + url + ':' + location);
} catch (e) {
var temp = null;
}
var area = $('#content [widget-area="' + location + '"]') var area = $('#content [widget-area="' + location + '"]')
.html(localStorage.getItem('cache:widgets:' + url + ':' + location)); .html(temp);
socket.emit('widgets.render', {template: tpl_url + '.tpl', url: url, location: location}, function(err, renderedWidgets) { socket.emit('widgets.render', {template: tpl_url + '.tpl', url: url, location: location}, function(err, renderedWidgets) {
var html = ''; var html = '';
@ -57,7 +65,10 @@
} }
area.html(html); area.html(html);
// remove when https://code.google.com/p/chromium/issues/detail?id=357625 is fixed
try {
localStorage.setItem('cache:widgets:' + url + ':' + location, html); localStorage.setItem('cache:widgets:' + url + ':' + location, html);
} catch (e) {}
if (!renderedWidgets.length) { if (!renderedWidgets.length) {
area.addClass('hidden'); area.addClass('hidden');

Loading…
Cancel
Save