PageSourceSearch

https://www.soft-material.jp/wp-content/themes/coa_tanakalab/js/fb.js

js soft-material.jp collected 2026-10-08 19:06:06 UTC 1,723 bytes, 33 lines download raw bytes

1$(function() {
2    // ページプラグインの埋め込みコードを返す。
3    function pagePluginCode(w) {
4        // 幅に応じて高さを変更する場合
5        if(w > 400) {
6            var h = 300;
7        } else {
8            var h = 200;
9        }
10        return '<div class="fb-page" data-href="https://ja-jp.facebook.com/kgkponren" data-tabs="timeline" data-width="500" data-height="300" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://ja-jp.facebook.com/kgkponren" class="fb-xfbml-parse-ignore"><a href="https://ja-jp.facebook.com/kgkponren">Facebookを見る</a></blockquote></div>';
11    }
12 
13    // ページプラグインを追加する要素
14    var facebookWrap = $('.facebook-wrapper');
15    var fbBeforeWidth = ''; // 前回変更したときの幅
16    var fbWidth = facebookWrap.width(); // 今回変更する幅
17    var fbTimer = false;
18    $(window).on('load resize', function() {
19        if (fbTimer !== false) {
20            clearTimeout(fbTimer);
21        }
22        fbTimer = setTimeout(function() {
23            fbWidth = facebookWrap.width(); // 変更後の幅を取得
24            // 前回の幅から変更があった場合のみ処理
25            // スマホだとスクロール時にリサイズが発生することがあるため
26            if(fbWidth != fbBeforeWidth) {
27                facebookWrap.html(pagePluginCode(fbWidth)); // ページプラグインのコード変更
28                window.FB.XFBML.parse(); // ページプラグインの再読み込み
29                fbBeforeWidth = fbWidth; // 今回変更分を保存しておく
30            }
31        }, 200);
32    });
33});

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.