From d01d783cf98b113640389dc38a8d2f90311b5e43 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Tue, 22 Apr 2014 09:45:58 +0800 Subject: [PATCH] edit document title --- js/ditto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ditto.js b/js/ditto.js index 6ca2f3b..e8ccfaf 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -186,7 +186,7 @@ function router() { $.get(path , function(data) { $(ditto.error_id).hide(); $(ditto.content_id).html(marked(data)); - if ($(ditto.content_id h1) === ditto.document_title){ + if ($(ditto.content_id+" h1").text() === ditto.document_title){ document.title = ditto.document_title; } else { document.title = $(ditto.content_id h1).text() + " - " + ditto.document_title;