PageSourceSearch

https://www.e-cosmo.co.jp/script_js/fb.js

js e-cosmo.co.jp collected 2026-09-26 10:04:42 UTC 1,795 bytes, 41 lines download raw bytes

1$(function() {
2    // ページプラグインの埋め込みコードを返す
3    function pagePluginCode(w) {
4
5        // 幅に応じて高さを変更する場合は、変数 h に高さの値を代入
6        
7		
8		if(w > 400) {
9            var h = 720;
10        } else {
11            var h = 360;
12        }
13		
14	
15		
16        
17
18        // 書き換えたStep3のコードを「return」に記述
19        return '<div class="fb-page" data-href="https://www.facebook.com/cosmocurry/" data-tabs="timeline" data-width="500" data-height="720" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/cosmocurry/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/cosmocurry/">コスモ食品株式会社</a></blockquote></div>';
20    }
21 
22    // ページプラグインを追加する要素
23    var facebookWrap = $('.facebook-wrapper');
24    var fbBeforeWidth = ''; // 前回変更したときの幅
25    var fbWidth = facebookWrap.width(); // 今回変更する幅
26    var fbTimer = false;
27    $(window).on('load resize', function() {
28        if (fbTimer !== false) {
29            clearTimeout(fbTimer);
30        }
31        fbTimer = setTimeout(function() {
32            fbWidth = Math.floor(facebookWrap.width()); // 変更後の幅を取得し、小数点以下切り捨て
33            // 前回の幅から変更があった場合のみ処理
34            if(fbWidth != fbBeforeWidth) {
35                facebookWrap.html(pagePluginCode(fbWidth)); // ページプラグインのコード変更
36                window.FB.XFBML.parse(); // ページプラグインの再読み込み
37                fbBeforeWidth = fbWidth; // 今回変更分を保存
38            }
39        }, 200);
40    });
41});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.