[楽天] 送料分かりづらい

    @@ -26,55 +26,58 @@ console.log($data); - if (!$data) { - alert('このショップには対応していません(´・ω・`)'); - return; - } + if ($data) { + + $shipping + .css({ + 'display': 'none', + 'position': 'fixed', + 'bottom': '0', + 'left': '0', + 'z-index': '2147483648', + 'height': '500px', + 'border': '7px solid #bf0000', + 'background': '#fff' + }); + + $content + .css({ + 'height': '500px', + 'overflow': 'auto' + }) + .html($data) + .appendTo($shipping); + + $close + .css({ + 'position': 'absolute', + 'top': '0', + 'right': '0', + 'width': '80px', + 'height': '30px', + 'line-height': '30px', + 'text-align': 'center', + 'background': '#bf0000', + 'color': '#fff', + 'font-weight': 'bold', + 'font-size': '16px', + 'cursor': 'pointer' + }) + .appendTo($shipping); + + $shipping + .appendTo('body') + .fadeIn('slow'); - $shipping - .css({ - 'display': 'none', - 'position': 'fixed', - 'bottom': '0', - 'left': '0', - 'z-index': '2147483648', - 'height': '500px', - 'border': '7px solid #bf0000', - 'background': '#fff' + $(document).delegate('.mod-shipping-close', 'click', function() { + $shipping.fadeOut(); }); - $content - .css({ - 'height': '500px', - 'overflow': 'auto' - }) - .html($data) - .appendTo($shipping); - - $close - .css({ - 'position': 'absolute', - 'top': '0', - 'right': '0', - 'width': '80px', - 'height': '30px', - 'line-height': '30px', - 'text-align': 'center', - 'background': '#bf0000', - 'color': '#fff', - 'font-weight': 'bold', - 'font-size': '16px', - 'cursor': 'pointer' - }) - .appendTo($shipping); - - $shipping - .appendTo('body') - .fadeIn('slow'); - - $(document).delegate('.mod-shipping-close', 'click', function() { - $shipping.fadeOut(); - }); + } else { + + alert('このショップには対応していません(´・ω・`)'); + + } }); })(jQuery);
  • /*
     * @title R送料
     * @description 楽天の商品ページでこれを使うと、そのショップの送料を画面下部に読み込める。
     * @include http://*
     * @license MIT License
     * @require jquery
     * @require https://raw.github.com/padolsey/jquery.fn/master/cross-domain-ajax/jquery.xdomainajax.js
     * @private
     */
    
    
    (function($) {
    	var shopname = location.pathname.split('/')[1];
    	var url = 'http://www.rakuten.co.jp/' + shopname + '/info2.html';
    	
    	$.get(url, function(data) {
    
    		var $shipping = $('<div></div>').addClass('mod-shipping');
    		var $content = $('<div></div>').addClass('mod-shipping-content');
    		var $close = $('<div>CLOSE</div>').addClass('mod-shipping-close');
    
    		var $data = $(data.responseText)
    			.find('font:contains("配送について")')
    			.parent()
    			.nextUntil('hr');
    
    		console.log($data);
    
    		if ($data) {
    
    			$shipping
    				.css({
    					'display': 'none',
    					'position': 'fixed',
    					'bottom': '0',
    					'left': '0',
    					'z-index': '2147483648',
    					'height': '500px',
    					'border': '7px solid #bf0000',
    					'background': '#fff'
    				});
    
    			$content
    				.css({
    					'height': '500px',
    					'overflow': 'auto'
    				})
    				.html($data)
    				.appendTo($shipping);
    
    			$close
    				.css({
    					'position': 'absolute',
    					'top': '0',
    					'right': '0',
    					'width': '80px',
    					'height': '30px',
    					'line-height': '30px',
    					'text-align': 'center',
    					'background': '#bf0000',
    					'color': '#fff',
    					'font-weight': 'bold',
    					'font-size': '16px',
    					'cursor': 'pointer'
    				})
    				.appendTo($shipping);
    
    			$shipping
    				.appendTo('body')
    				.fadeIn('slow');
    
    			$(document).delegate('.mod-shipping-close', 'click', function() {
    				$shipping.fadeOut();
    			});
    
    		} else {
    
    			alert('このショップには対応していません(´・ω・`)');
    			
    		}
    	});
    
    })(jQuery);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2013/09/25 06:44:49 - 2013-09-25
  2. 2013/09/25 06:40:48 - 2013-09-25
  3. 2013/09/25 06:33:26 - 2013-09-25
  4. 2013/09/25 06:32:59 - 2013-09-25
  5. 2013/09/25 06:30:22 - 2013-09-25
  6. 2013/09/25 06:29:04 - 2013-09-25
  7. 2013/09/25 06:27:47 - 2013-09-25
  8. 2013/09/25 06:27:28 - 2013-09-25
  9. 2013/09/25 06:26:19 - 2013-09-25
  10. 2013/09/25 06:23:55 - 2013-09-25
  11. 2013/09/25 06:22:35 - 2013-09-25
  12. 2013/09/25 06:20:17 - 2013-09-25
  13. 2013/09/25 06:15:33 - 2013-09-25
  14. 2013/09/24 10:50:03 - 2013-09-24
  15. 2013/09/24 10:44:02 - 2013-09-24
  16. 2013/09/24 10:43:27 - 2013-09-24
  17. 2013/09/24 10:41:48 - 2013-09-24
  18. 2013/09/24 10:30:50 - 2013-09-24
  19. 2013/09/24 10:30:31 - 2013-09-24
  20. 2013/09/24 10:15:36 - 2013-09-24
  21. 2013/09/24 10:10:47 - 2013-09-24
  22. 2013/09/24 10:08:25 - 2013-09-24
  23. 2013/09/24 10:06:55 - 2013-09-24
  24. 2013/09/24 10:03:58 - 2013-09-24
  25. 2013/09/24 10:02:19 - 2013-09-24
  26. 2013/09/24 10:00:39 - 2013-09-24
  27. 2013/09/24 09:20:08 - 2013-09-24
  28. 2013/09/24 09:17:07 - 2013-09-24
  29. 2013/09/24 09:15:30 - 2013-09-24
  30. 2013/09/24 09:13:18 - 2013-09-24
  31. 2013/09/24 09:12:17 - 2013-09-24
  32. 2013/09/24 09:06:33 - 2013-09-24
  33. 2013/09/24 09:05:26 - 2013-09-24
  34. 2013/09/24 09:04:37 - 2013-09-24
  35. 2013/09/24 09:02:43 - 2013-09-24
  36. 2013/09/24 08:57:58 - 2013-09-24
  37. 2013/09/24 08:55:02 - 2013-09-24
  38. 2013/09/24 08:53:26 - 2013-09-24
  39. 2013/09/24 08:52:36 - 2013-09-24
  40. 2013/09/24 08:49:25 - 2013-09-24
  41. 2013/09/24 08:47:50 - 2013-09-24
  42. 2013/09/24 08:47:15 - 2013-09-24
  43. 2013/09/24 08:46:28 - 2013-09-24
  44. 2013/09/24 08:43:09 - 2013-09-24
  45. 2013/09/24 08:34:07 - 2013-09-24
  46. 2013/09/23 19:36:51 - 2013-09-23
  47. 2013/09/23 19:30:29 - 2013-09-23
  48. 2013/09/23 19:24:56 - 2013-09-23
  49. 2013/09/23 19:22:49 - 2013-09-23
  50. 2013/09/23 19:21:20 - 2013-09-23
  51. 2013/09/23 19:20:05 - 2013-09-23
  52. 2013/09/23 19:18:49 - 2013-09-23
  53. 2013/09/23 19:17:45 - 2013-09-23
  54. 2013/09/23 19:10:28 - 2013-09-23
  55. 2013/09/23 19:07:34 - 2013-09-23
  56. 2013/09/23 19:06:03 - 2013-09-23
  57. 2013/09/23 19:03:43 - 2013-09-23
  58. 2013/09/23 19:01:01 - 2013-09-23