Back

Template Source: bdgenerix/snippets/_extra_scripts.html

{% load i18n %}{% load facebook_tags socialregistration_tags %} {# Put in any scripts that should not be compressed here #} <script type="text/javascript"> var INVITE_MESSAGE = "{% blocktrans %}I'm a member of {{ SITE_NAME }}, an exclusive shopping club in {{ OPERATION_COUNTRY }} providing international fashion and lifestyle brands at up to {{ DISCOUNT_RATE }} retail prices and I think you should join too!{% endblocktrans %}"; var SITE_NAME = "{{ SITE_NAME }}"; var FACEBOOK_LOGIN_URL = "{% url facebook-connect %}"; var INVITATION_URL = "{{ SITE_HTTP_URL }}/invite/{{ user }}/"; var SITE_HTTP_URL = "{{ SITE_HTTP_URL }}" var CSRF_TOKEN = "{% csrf_token %}"; var SOCIAL_CSRF_TOKEN = "{% social_csrf_token %}"; var addthis_config = { data_track_clickback: true, services_exclude: 'print,email', data_ga_property: '{{ GOOGLE_ANALYTICS_ID }}', data_ga_social : true }; $(document).ready(function() { $.facebook_init("{{ FACEBOOK_APP_ID }}", "{{ FACEBOOK_LOCALE }}"); {% if not user.is_anonymous %} {% if not user.user_profiles.earliest.is_genuine %} $('body').one('mousemove', function () { $.post("{% url bdauth-userprofile-mark-genuine %}", { "is_human" : true } ); }); {% endif %} {% endif %} }); {% if LOGIN_WITH_PAYPAL %} var handler_login_with_paypal = function(){ client_id = "{{ PAYPAL_CLIENT_ID }}"; redirect_uri = "{{ PAYPAL_REDIRECT_URI }}"; url = "{{ PAYPAL_ENDPOINT_LOGIN }}/webapps/auth/protocol/openidconnect/v1/authorize?client_id=" + client_id + "&response_type=code&scope=profile+email+address+phone+https%3A%2F%2Furi.paypal.com%2Fservices%2Fpaypalattributes&redirect_uri=" + redirect_uri; var win = window.open(url); } $(".paypal-login-button").click(handler_login_with_paypal); $(".paypal-signup-button").click(handler_login_with_paypal); {% endif %} </script> {% comment %} {% if ZOPIM_ID %} <!--Start of Zopim Live Chat Script--> <script type="text/javascript"> window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8'); $.src='//cdn.zopim.com/?{{ ZOPIM_ID }}';z.t=+new Date;$. type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script'); </script> <!--End of Zopim Live Chat Script--> {% endif %} {% endcomment %} {% if INSTANCE_ID == 'sg' %} <script> var _prum = [['id', '51746364abe53d5d01000000'], ['mark', 'firstbyte', (new Date()).getTime()]]; (function() { var s = document.getElementsByTagName('script')[0] , p = document.createElement('script'); p.async = 'async'; p.src = '//rum-static.pingdom.net/prum.min.js'; s.parentNode.insertBefore(p, s); })(); </script> <script type="text/javascript"> adroll_adv_id = "EGOBPL4L3ZEVNLNNVDWQDH"; adroll_pix_id = "CJ5LGXNTDRGUJDKY4FCCDT"; (function () { var oldonload = window.onload; window.onload = function(){ __adroll_loaded=true; var scr = document.createElement("script"); var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com"); scr.setAttribute('async', 'true'); scr.type = "text/javascript"; scr.src = host + "/j/roundtrip.js"; ((document.getElementsByTagName('head') || [null])[0] || document.getElementsByTagName('script')[0].parentNode).appendChild(scr); if(oldonload){oldonload()}}; }()); </script> {% endif %} <!-- START: AngularJs module definition --> {% include "bdgenerix/snippets/_angularjs_urls.html" %} <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}bdgenerix/plugins/jquery-fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script> <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}bdex/js/angularjs/app.js"></script> <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}bdex/js/angularjs/directives/lazyload.js"></script> <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}bdex/js/angularjs/directives/fancybox.js"></script> <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}bdex/js/angularjs/controllers/cart.js"></script> <script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}bdex/js/angularjs/controllers/browse_history.js"></script> <!-- END: AngularJs module definition -->