mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
edit document title
This commit is contained in:
parent
44ff6ee6dd
commit
d01d783cf9
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user