Completed
Push — master ( 6f3751...ba7898 )
by Dimas
13:22
created

index.js ➔ sendBlog   A

Complexity

Conditions 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 9
dl 0
loc 12
rs 9.95
c 0
b 0
f 0
1
$("#blog-set").on("change focusout", sendBlog);
2
$("#form-set").on("submit", sendBlog);
3
4
formsaver();
5
6
/**
7
 *
8
 * @param {JQuery.Event} e
9
 */
10
function sendBlog(e) {
11
  e.preventDefault();
12
  var url = $("#blog-set").val().trim();
13
  $.ajax({
14
    url: location.href,
15
    method: "post",
16
    data: {
17
      "set-blog": url,
18
    },
19
    proxy: false,
20
  });
21
}
22