Gyao用

// ==UserScript== // @name Gyao link fixer // @namespace http://unknownplace.org/ // @description fix gyao movie links

// @include      http://www.gyao.jp/*

// ==/UserScript==

(function() {
    var anchors = document.getElementsByTagName('a');

    for (var i = 0; i < anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.href.match(/javascript:directScreen/)) {
            var content = anchor.href.match(/cnt\d+/);
            var rate    = anchor.href.match(/bit\d+/);
            var user    = document.cookie.match(/Cookie_UserId=(\w+)/)[1];

            anchor.href
                = 'http://www.gyao.jp/sityou/asx.php?contentsId=' + content +
                '&userNo=' + user + '&rateId=' + rate;
        }
    }
})();
by typester / at 2006-03-17T04:24:00 / gyao · greasemonkey / Comment