Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created April 19, 2009 05:35
Show Gist options
  • Select an option

  • Save yosmoc/97934 to your computer and use it in GitHub Desktop.

Select an option

Save yosmoc/97934 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name rtm_today's_task
// @namespace http://d.hatena.ne.jp/samurai20000/
// @include http://www.rememberthemilk.com/*
// ==/UserScript==
(function() {
var contents = document.getElementById("content");
if (contents) {
var filter = document.getElementById("listFilter");
var button = document.createElement("button");
button.innerHTML = "today's tasks";
button.addEventListener("click", function() {
if (filter.value.indexOf("due: today") == -1) {
filter.value = "due: today";
} else {
filter.value = "";
};
//filter.form.submit();
unsafeWindow.control.updateListFilter();
}, true);
document.getElementById("tools").appendChild(button);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment