08/08/08 08:35:29 SiQEvKFz0
>>643
ありがとうございます。
// ==UserScript==
// @name amazon_sort_url
// @namespace amazon_sort_url
// @include URLリンク(www.amazon.co.jp)
// ==/UserScript==
location.href = 'URLリンク(amazon.jp)' + document.getElementById('ASIN').value;
if(location.href.match(/\/dp\//)){
var keyword = '/dp/';
var p = location.href.indexOf(keyword);
var p2 = location.href.indexOf('ref=');
var cutword = location.href.substring(p+keyword.length,p2);
location.href = 'URLリンク(www.amazon.co.jp)' + cutword;
}
else if(location.href.match(/\/gp\//)){
var keyword = '/product/';
var p = location.href.indexOf(keyword);
var p2 = location.href.indexOf('ref=');
var cutword = location.href.substring(p+keyword.length,p2);
location.href = 'URLリンク(www.amazon.co.jp)' + cutword;
}
}
これを入れてみたのですが、だめっぽいのですが何が間違っているのでしょうか?