From 0c8e1b4e0a5231af78d040c4e3ef0b5302d84ccf Mon Sep 17 00:00:00 2001 From: piro Date: Wed, 8 Jul 2009 11:46:40 +0000 Subject: [PATCH] =?UTF-8?q?=E3=83=84=E3=83=BC=E3=83=AB=E3=83=81=E3=83=83?= =?UTF-8?q?=E3=83=97=E3=82=82=E8=A8=AD=E5=AE=9A=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4679 599a83e7-65a4-db11-8015-0010dcdd6dc2 --- content/treestyletab/group.xul | 13 ++++++++++--- skin/classic/treestyletab/group.css | 3 --- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/content/treestyletab/group.xul b/content/treestyletab/group.xul index dcefdb97..6dbf22ab 100644 --- a/content/treestyletab/group.xul +++ b/content/treestyletab/group.xul @@ -28,12 +28,18 @@ var gLabel = document.getElementById('label'); var gEdit = document.getElementById('editor'); var gDeck = document.getElementById('deck'); +function trim(aString) +{ + return aString.replace(/^\s+|\s+$/g, ''); +} + var title = location.href.split('?')[1]; if (title) { - title = decodeURIComponent(title); + title = trim(decodeURIComponent(title)); document.title = title; document.documentElement.setAttribute('title', title); gLabel.value = title; + gLabel.setAttribute('tooltiptext', title); gEdit.value = title; } @@ -48,9 +54,10 @@ function exitEdit() { if (gDeck.selectedIndex == 0) return; - var old = gLabel.value.replace(/^\s+|\s+$/g, ''); - var value = gEdit.value.replace(/^\s+|\s+$/g, ''); + var old = trim(gLabel.value); + var value = trim(gEdit.value); document.title = gLabel.value = value; + gLabel.setAttribute('tooltiptext', value); document.documentElement.setAttribute('title', value); if (value != old) diff --git a/skin/classic/treestyletab/group.css b/skin/classic/treestyletab/group.css index 26268fb1..3c333237 100644 --- a/skin/classic/treestyletab/group.css +++ b/skin/classic/treestyletab/group.css @@ -7,9 +7,6 @@ page { label { color: -moz-dialogtext; font-family: message-box; -} - -label, editor { font-size: large; font-weight: normal; }