Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Properly set title #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/assets/javascripts/_response.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ class Response
@_title ?= @_extract_title()

_extract_title: ->
if @_is_full_document_response()
$('title', @_get_doc()).text()
else
@xhr.getResponseHeader('X-Wiselinks-Title')
title_header = decodeURIComponent @xhr.getResponseHeader 'X-Wiselinks-Title'
$("<p>").html(title_header).text() || $('title', @_get_doc()).text()

description: ->
@_description ?= @_extract_description()
Expand Down