YF-GoogleCodeBackups / firefox-hide-caption-titlebar-plus

Automatically exported from code.google.com/p/firefox-hide-caption-titlebar-plus
0 stars 0 forks source link

[Proposed Feature] Offer user to cut off page title that exceeds arbitrary length in HCP's Current Page Title Toolbar Label. #142

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use HCP's Current Page Title label on my toolbar. It allows me to clearly see 
the title of the page I'm looking at. However, it can ruin aesthetics quite 
severely when the page title is very long; it pushes the Awesomebar to right, 
making it too short -- not to mention it just looks wrong.

It would be better if you could add an option in HCP that allows user to limit 
maximum length of page title displayed in the label. I managed to perform 
rather crude modification to the source (HideCaption.js) to show how much 
improved HCP would be with this feature (see screenshots).

This is the only modification I made to HideCaption.js: 

SetWebTitle : function(sTitle) {
            var sValue = sTitle;
            if( sValue.length >= 60 ) {
                sValue = sValue.slice( 0, 57 ) + "..";
            }
        this.setAttr_smart('hcp-title-box-label'   , 'value'      , sValue, true);
        this.setAttr_smart('hcp-status-panel-title', 'label'      , sValue, true);
        this.setAttr_smart('hcp-status-panel-title', 'tooltiptext', sTitle, true);
        this.setAttr_smart('hcp-web-title-label1'  , 'value'      , sValue, true);
        this.setAttr_smart('hcp-web-title-label1'  , 'tooltiptext', sTitle, true);
        this.setAttr_smart('hcp-web-title-label2'  , 'value'      , sValue, true);
        this.setAttr_smart('hcp-web-title-label2'  , 'tooltiptext', sTitle, true);
        this.setAttr_smart('hcp-web-title-label3'  , 'value'      , sValue, true);
        this.setAttr_smart('hcp-web-title-label3'  , 'tooltiptext', sTitle, true);

},

What version of "Hide Caption Titlebar Plus" addon are you using?
2.1.6
What version of Firefox?
3.6.17
On what operating system?
Windows XP Professional SP3

Original issue reported on code.google.com by garda.ne...@gmail.com on 2 Jun 2011 at 6:48

GoogleCodeExporter commented 9 years ago
Sorry, the screeners were messed up. Here are the revised versions.

Original comment by garda.ne...@gmail.com on 2 Jun 2011 at 6:59

Attachments: