Skip to content

Instantly share code, notes, and snippets.

@milk1000cc
Created July 6, 2010 07:01
Show Gist options
  • Save milk1000cc/465095 to your computer and use it in GitHub Desktop.
Save milk1000cc/465095 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name AutoMujiSort
// @namespace http://www.milk1000.cc/
// @include http://www.muji.net/store/cmdty/section/*
// ==/UserScript==
(function() {
var OLD_PATTERN = { sort: 4, count: 12 };
var NEW_PATTERN = { sort: 0, count: 150 };
var $ = function(selector) { return document.querySelector(selector); };
if ($('select[name="sort"]') && $('select[name="sort"]').value == OLD_PATTERN.sort &&
$('select[name="count"]') && $('select[name="count"]').value == OLD_PATTERN.count) {
$('select[name="sort"]').value = NEW_PATTERN.sort;
$('select[name="count"]').value = NEW_PATTERN.count;
(typeof unsafeWindow != 'undefined' ? unsafeWindow : window).sort();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment