"score_pic" => theme_image($link, get_score_pic($score))));
}
+ function setpanelmode() {
+ $wide = (int) $_REQUEST["wide"];
+
+ $_SESSION["widescreen"] = $wide;
+
+ print json_encode(array("wide" => $wide));
+ }
+
}
?>
$params["hotkeys"] = get_hotkeys_map($link);
$params["csrf_token"] = $_SESSION["csrf_token"];
+ $params["widescreen"] = (int) $_SESSION["widescreen"];
return $params;
}
updateFeedList();
closeArticlePanel();
+ _widescreen_mode = getInitParam("widescreen");
+
+ if (_widescreen_mode) {
+ switchPanelMode(_widescreen_mode);
+ }
+
if (typeof themeAfterLayout == 'function') {
themeAfterLayout();
}
if (article_id) view(article_id);
+ new Ajax.Request("backend.php", {
+ parameters: "op=rpc&method=setpanelmode&wide=" + (wide ? 1 : 0),
+ onComplete: function(transport) {
+ console.log(transport.responseText);
+ } });
+
+
} catch (e) {
exception_error("switchPanelMode", e);
}