[楽天] 送料分かりづらい
by
tacamy
2013-09-25 [2013/09/25 06:44:49]
楽天市場の商品ページでこれを使うと、そのショップの送料を画面下部に読み込める。
@@ -11,7 +11,7 @@
var shopname = location.pathname.split('/')[1];
var url = 'http://www.rakuten.co.jp/' + shopname + '/info2.html';
- document.domain = 'www.rakuten.co.jp';
+ document.domain = 'rakuten.co.jp';
$('<iframe></iframe>')
.attr({
@@ -23,22 +23,7 @@
})
.prependTo('body')
.bind('load', function() {
- $(this)
- .contents()
- .find('body')
- .css({
- 'zoom': '70%'
- })
- .find('font:contains("配送について")')
- .attr({
- 'id': 'shipping'
- })
- .end()
- .end()
- .end()
- .attr({
- 'src': url + '#shipping'
- });
+ console.log( $(this).contents() );
});
})(jQuery);
/*
* @title R送料
* @description 楽天の商品ページでこれを使うと、そのショップの送料を画面上部にiframeで読み込める。
* @include http://*
* @license MIT License
* @require jquery
* @private
*/
(function($) {
var shopname = location.pathname.split('/')[1];
var url = 'http://www.rakuten.co.jp/' + shopname + '/info2.html';
document.domain = 'rakuten.co.jp';
$('<iframe></iframe>')
.attr({
'src': url
})
.css({
'height': '300px',
'width': '100%'
})
.prependTo('body')
.bind('load', function() {
console.log( $(this).contents() );
});
})(jQuery);
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。