Toggle Simplenote Sidebar

Button in footer to hide Simplenote siadebar.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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";
  }
}