comparison shoutbox/static/js/shoutbox.js @ 672:69e8aa135c2e

For issue #34, make social media share buttons more privacy concious.
author Brian Neal <bgneal@gmail.com>
date Sun, 26 May 2013 13:29:44 -0500
parents ee87ea74d46b
children
comparison
equal deleted inserted replaced
671:be5b37719059 672:69e8aa135c2e
19 if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) { 19 if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) {
20 // Only send the token to relative URLs i.e. locally. 20 // Only send the token to relative URLs i.e. locally.
21 xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); 21 xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
22 } 22 }
23 } 23 }
24 });
25
26 // social bookmarking pop-up support
27 $('.social-sharing').delegate('a', 'click', function(e) {
28 if ($(window).width() > 700)
29 {
30 e.preventDefault();
31 window.open(this.href,'share-this','height=300,width=500,status=no,toolbar=no');
32 }
24 }); 33 });
25 34
26 $("html").bind("ajaxStart", function() { 35 $("html").bind("ajaxStart", function() {
27 $(this).addClass('busy'); 36 $(this).addClass('busy');
28 }).bind("ajaxStop", function() { 37 }).bind("ajaxStop", function() {