cd..

/*
 * @title cd ..
 * @description up dir
 * @include http://*
 * @license MIT License
 */

a=location.pathname.split('/');
a.pop();
location.pathname=a.join('/');
  1. https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/Array/pop
  2. https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects/Array
  3. https://developer.mozilla.org/ja/JavaScript/Reference/Global_Objects
  4. https://developer.mozilla.org/ja/JavaScript/Reference
  5. https://developer.mozilla.org/ja/JavaScript
  6. https://developer.mozilla.org/ja/

修正

/*
 * @title cd ..
 * @description up dir
 * @include http://*
 * @license MIT License
 */

a=location.pathname.split('/');
(a.pop() == '') ? a.pop() : a;
location.pathname=a.join('/');
  1. http://www.ie.u-ryukyu.ac.jp/~kono/lecture/compiler/index.html
  2. http://ie.u-ryukyu.ac.jp/~kono/lecture/compiler/
  3. http://ie.u-ryukyu.ac.jp/~kono/lecture/
  4. http://ie.u-ryukyu.ac.jp/~kono/
  5. http://ie.u-ryukyu.ac.jp/