From db52595c28557128a0b0d3bfc6f801f18a014b71 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Sat, 16 Aug 2008 10:21:00 +0000 Subject: [PATCH] better fix for :hs --- content/events.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content/events.js b/content/events.js index fb3669df..8208cdb8 100644 --- a/content/events.js +++ b/content/events.js @@ -447,10 +447,8 @@ liberator.Events = function () //{{{ // code which should happen for all (also background) newly loaded tabs goes here: - // loaded page can be not current (e.g. background tab loaded) - // so we should use defaultView from event object, not liberator.buffer. - var url = doc.defaultView.location.href; - var title = doc.defaultView.title; + var url = doc.location.href; + var title = doc.title; // update history if (url && liberator.history) @@ -479,7 +477,7 @@ liberator.Events = function () //{{{ } else // background tab { - liberator.commandline.echo("Background tab loaded: " + doc.title || doc.location.href, liberator.commandline.HL_INFOMSG); + liberator.commandline.echo("Background tab loaded: " + title || url, liberator.commandline.HL_INFOMSG); } } }