Toggle Simplenote Sidebar

Button in footer to hide Simplenote siadebar.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name Toggle Simplenote Sidebar
// @namespace http://calon.weblogs.us/
// @version 0.1
// @description Button in footer to hide Simplenote siadebar. 
// @match https://app.simplenote.com/*
// @include https://app.simplenote.com/*
// @match http://app.simplenote.com/*
// @include http://app.simplenote.com/*
// @supportURL [email protected]
// ==/UserScript==

var footList = document.createElement("li");
var toggleButton = document.createElement("a");
toggleButton.innerHTML = "Hide";
footList.appendChild(toggleButton);

var footerrightElement = document.getElementsByClassName("footer-right");
footerrightElement[0].insertBefore(footList, footerrightElement[0].firstChild);

var sidebarElement = document.getElementsByClassName("sidebar");
var noteElement = document.getElementsByClassName("note");

toggleButton.onclick = function toggle() {
  if (sidebarElement[0].style.width == "0px") {
    noteElement[0].style.left = "361px";
    sidebarElement[0].style.width = "360px";
    toggleButton.innerHTML = "Hide";
  } else {
    noteElement[0].style.left = "0px";
    sidebarElement[0].style.width = "0px";
    toggleButton.innerHTML = "Show";
  }
}