3

尝试加载 Pinterest API JS 代码时收到以下警告:

Resource interpreted as Script but transferred with MIME type text/plain: "http://widgets.pinterest.com/v3/pidgets/log/?via=http%3A%2F%2Fsamplesite…are%2F&type=pidget&callback=PIDGET_1361830898800.f.devNull&t=1361830898802". 

访问脚本:

 <script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>

还有这个代码:

$(".div5").append('<div class="pin-it"><a id="pinterest_a" data-pin-config="above" href="//pinterest.com/pin/create/button/?url=' + source_url + '&media=' + source_image + '&description=' + image_description + '" data-pin-do="buttonPin" ><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></div>');


    var element = document.getElementById('pinterest_a');

    try{
        (function (x) {
            for (var n in x)
                if (n.indexOf('PIN_') == 0)
                    return x[n];

            return null;
        })(window).f.render.buttonPin(element);
    }
    catch (e) {
        //catch and just suppress error
    }

使用谷歌浏览器

4

1 回答 1

3

这是 Pinterest 设置 Web 服务的方式的一个小问题。您可以放心地忽略它。

于 2013-02-25T22:31:43.780 回答