1

我无法在我的页面上显示 Uservoice 小部件。我从 Uservoice 管理员复制了 javascript 代码,将其转换为 HAML,然后粘贴到我的应用程序中:

布局/_uservoice.html.haml

    :javascript
      (function(){
        var uv=document.createElement('script');
        uv.type='text/javascript';uv.async=true;
        uv.src='//widget.uservoice.com/Qho4ZF2W4O43bJ8Opc65g.js';
        var s=document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(uv,s)
        })()

    :javascript
      UserVoice = window.UserVoice || [];
      UserVoice.push(['showTab', 'classic_widget', {
        mode: 'full',
        primary_color: '#cc6d00',
        link_color: '#007dbf',
        default_mode: 'support',
        forum_id: 216289,
        tab_label: 'Feedback & Support',
        tab_color: '#cc6d00',
        tab_position: 'middle-right',
        tab_inverted: false
     }]);

和我的家庭视图:

    <doctype html>
    %html
      %head
        = render 'shared/meta'
        = favicon_link_tag 'tgnd_favicon.png'
      %body

        = render 'shared/fb'
        #main{:role => "main"}
           = render 'shared/header'
           = render 'shared/sub_header'

          .content_wrap.container
           .content.box_normal
              = render 'layouts/messages'
              = yield
           / ! end of .container
       .push
        = render 'layouts/uservoice'
        = render 'shared/footer'
        = render 'shared/dialogs'
4

0 回答 0