Skip to content

Commit 76bc9fc

Browse files
committed
Open sidebar with location hash
1 parent f999f16 commit 76bc9fc

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

plugins/Sidebar/media/Sidebar.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class Sidebar extends Class
2323
@original_set_site_info = @wrapper.setSiteInfo # We going to override this, save the original
2424

2525
# Start in opened state for debugging
26-
if false
26+
if window.top.location.hash == "#ZeroNet:OpenSidebar"
2727
@startDrag()
28-
@moved()
28+
@moved("x")
2929
@fixbutton_targetx = @fixbutton_initx - @width
3030
@stopDrag()
3131

plugins/Sidebar/media/all.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
/* ---- plugins/Sidebar/media/Class.coffee ---- */
2+
/* ---- Class.coffee ---- */
33

44

55
(function() {
@@ -55,8 +55,7 @@
5555

5656
}).call(this);
5757

58-
59-
/* ---- plugins/Sidebar/media/Console.coffee ---- */
58+
/* ---- Console.coffee ---- */
6059

6160

6261
(function() {
@@ -284,8 +283,7 @@
284283

285284
}).call(this);
286285

287-
288-
/* ---- plugins/Sidebar/media/Menu.coffee ---- */
286+
/* ---- Menu.coffee ---- */
289287

290288

291289
(function() {
@@ -367,8 +365,7 @@
367365

368366
}).call(this);
369367

370-
371-
/* ---- plugins/Sidebar/media/RateLimit.coffee ---- */
368+
/* ---- RateLimit.coffee ---- */
372369

373370

374371
(function() {
@@ -396,8 +393,7 @@
396393

397394
}).call(this);
398395

399-
400-
/* ---- plugins/Sidebar/media/Scrollable.js ---- */
396+
/* ---- Scrollable.js ---- */
401397

402398

403399
/* via http://jsfiddle.net/elGrecode/00dgurnn/ */
@@ -492,7 +488,7 @@ window.initScrollable = function () {
492488
return updateHeight;
493489
};
494490

495-
/* ---- plugins/Sidebar/media/Sidebar.coffee ---- */
491+
/* ---- Sidebar.coffee ---- */
496492

497493

498494
(function() {
@@ -534,9 +530,9 @@ window.initScrollable = function () {
534530
this.globe = null;
535531
this.preload_html = null;
536532
this.original_set_site_info = this.wrapper.setSiteInfo;
537-
if (false) {
533+
if (window.top.location.hash === "#ZeroNet:OpenSidebar") {
538534
this.startDrag();
539-
this.moved();
535+
this.moved("x");
540536
this.fixbutton_targetx = this.fixbutton_initx - this.width;
541537
this.stopDrag();
542538
}
@@ -1279,7 +1275,7 @@ window.initScrollable = function () {
12791275
}).call(this);
12801276

12811277

1282-
/* ---- plugins/Sidebar/media/morphdom.js ---- */
1278+
/* ---- morphdom.js ---- */
12831279

12841280

12851281
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.morphdom = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

0 commit comments

Comments
 (0)