mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
Fix indentation
(imported from commit 8f4880ceaa2e84fa842ba195ebe40800fc168eab)
This commit is contained in:
@@ -19,27 +19,27 @@ $(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$.ajaxSetup({
|
$.ajaxSetup({
|
||||||
beforeSend: function (xhr, settings) {
|
beforeSend: function (xhr, settings) {
|
||||||
function getCookie(name) {
|
function getCookie(name) {
|
||||||
var cookieValue = null;
|
var cookieValue = null;
|
||||||
if (document.cookie && document.cookie != '') {
|
if (document.cookie && document.cookie != '') {
|
||||||
var cookies = document.cookie.split(';');
|
var cookies = document.cookie.split(';');
|
||||||
for (var i = 0; i < cookies.length; i++) {
|
for (var i = 0; i < cookies.length; i++) {
|
||||||
var cookie = jQuery.trim(cookies[i]);
|
var cookie = jQuery.trim(cookies[i]);
|
||||||
// Does this cookie string begin with the name we want?
|
// Does this cookie string begin with the name we want?
|
||||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cookieValue;
|
return cookieValue;
|
||||||
}
|
}
|
||||||
if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) {
|
if (!(/^http:.*/.test(settings.url) || /^https:.*/.test(settings.url))) {
|
||||||
// Only send the token to relative URLs i.e. locally.
|
// Only send the token to relative URLs i.e. locally.
|
||||||
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
|
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function sub(zephyr_class) {
|
function sub(zephyr_class) {
|
||||||
@@ -196,10 +196,10 @@ var goto_pressed = false;
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$('input, textarea, button').focus(function () {
|
$('input, textarea, button').focus(function () {
|
||||||
allow_hotkeys = false;
|
allow_hotkeys = false;
|
||||||
});
|
});
|
||||||
$('input, textarea, button').blur(function () {
|
$('input, textarea, button').blur(function () {
|
||||||
allow_hotkeys = true;
|
allow_hotkeys = true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user