diff --git a/lib/shimmie.js b/lib/shimmie.js
index 3b26466e..14af3ce7 100644
--- a/lib/shimmie.js
+++ b/lib/shimmie.js
@@ -15,7 +15,6 @@ window.onload = function(e) {
}
}
-
function initGray(boxname, text) {
var box = byId(boxname);
if(!box) return;
diff --git a/themes/default/layout.class.php b/themes/default/layout.class.php
index eed06b9b..290d1a8c 100644
--- a/themes/default/layout.class.php
+++ b/themes/default/layout.class.php
@@ -56,6 +56,7 @@ class Layout {
{$page->title}
+
$header_html
diff --git a/themes/default/sidebar.js b/themes/default/sidebar.js
new file mode 100644
index 00000000..585f8ca8
--- /dev/null
+++ b/themes/default/sidebar.js
@@ -0,0 +1,83 @@
+/*
+ * This script shamelessly stolen from wakachan.org d(^_^)b
+ */
+
+var cookie_name="shimmie_sidebar";
+var default_sections=["upload", "edit_tags"];
+
+function toggle(id)
+{
+ var e=document.getElementById(id);
+ if(!e) return;
+ if(e.style.display)
+ {
+ remove_section(id);
+ e.style.display="";
+
+ var e2 = document.getElementById(id+"-toggle");
+ if(e2) {
+ e2.style.color = "#000";
+ }
+ }
+ else
+ {
+ add_section(id);
+ e.style.display="none";
+
+ var e2 = document.getElementById(id+"-toggle");
+ if(e2) {
+ e2.style.color = "#AAA";
+ }
+ }
+}
+
+function add_section(id)
+{
+ var sections=get_sections();
+ for(var i=0;i