Confirm suggest title if they already entered a title

This commit is contained in:
Chad Birch
2013-02-22 13:46:57 -07:00
parent 0eee54b008
commit cb0949ac45

View File

@@ -694,6 +694,10 @@ function fetch_title() {
var status = url_field.find(".title-status");
var url = $("#url").val();
if (url) {
if ($('form#newlink textarea[name="title"]').val() &&
!confirm("This will replace your existing title, proceed?")) {
return
}
status.show().text(reddit.status_msg.loading);
error.hide();
$.request("fetch_title", {url: url});