Fix redirect in "disable responsive mode" link.

This commit is contained in:
evazion
2018-04-26 21:31:53 -05:00
parent e29f73ac31
commit f7a44ae8dd
2 changed files with 7 additions and 4 deletions

View File

@@ -29,13 +29,14 @@ $(function() {
e.preventDefault();
});
$("#desktop-version-link a").click(function() {
$.ajax("/users/" + Danbooru.meta("current-user-id"), {
$("#desktop-version-link a").click(function(e) {
e.preventDefault();
$.ajax("/users/" + Danbooru.meta("current-user-id") + ".json", {
method: "PUT",
data: {
"user[disable_responsive_mode]": "true"
}
}).success(function() {
}).then(function() {
location.reload();
});
});