Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
Pages: 12Next
Current Page: 1 of 2
TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: April 18, 2010 10:59PM

The problem with some sites is, that all their page titles are the same in the beginning, so in the tab bar you don't kow wich is wich. For example youtube, you'd rather crop the beginning and see the video titles in the tab bar too, huh?
And other sites too, e.g. the tabs of one of my forums look all the same too - but no longer :cool:
You can replace or shorten parts of the titles, the rest stays original. You can also have different automatic replacements working at once. Either generally on all pages that contain one of your replacement strings, and/or specific strings only on specific domains. If a replacement string isn't part of the original title, the original title will stay complete.

Of course this doesn't just change the tab bar titles, but the page titles, wouldn't work otherwise.
And this works automatic, once it's switched ON with a menu entry, but can also be switched OFF there again.

In this screenshot I've replaced "YouTube - " with "" (=nothing):
Of course all tab titles would be video titles now, but I switched the macro "ON" only for 1 tab, after the others were already loaded, to show the difference.



You can configure this now, which text in titles you want to REPLACE with what, or just delete completely, either on all pages that contain that text, or only if that text is on certain domains.
Define as many replacement-sets as you wish, but configure them by editing the kmm-file. Example:

$_TiCu3_ori="YouTube - ";
$_TiCu3_new="Y: ";
$_TiCu3_url="youtube.com";

$_TiCu4_ori="John Doe Forum * Show Thread - ";
$_TiCu4_new="JD: ";
$_TiCu4_url="";

Special Thanx to JamesD+desga2 for the javascript line, which is the key to this, and I had struggled so long to find without succes! Until finally noticing it in the related macro "PrivateTitle" :-)

DOWNLOAD Version 2.0.0:
7z: http://kmeleonbrowser.org/forum/file.php?9,file=746,filename=TitlesCustom_v2.7z (7z-file, unzip in K-Meleon root folder, contains ini for KEM, and screenshot)

UPDATE Version 2.0.1: http://kmeleonbrowser.org/forum/file.php?9,file=1894,filename=TitlesCustom_v201.kmm
(kmm: only the macro file, store directly in any macros folder)

Note that after first installation you need to switch it ON per menu first! (Tools > Titles Customized)



Edited 13 time(s). Last edit at 09/06/2019 08:59PM by siria.

Attachments: TitlesCustom_v2.7z (58.1 KB)   TitlesCustom_v201.kmm (7.5 KB)  
Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: senna
Date: April 20, 2010 10:41PM

Nice work dude, I thought this bug just happened with me...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: April 21, 2010 03:40AM

Hi, siria,

(btw, @ senna: the dude is a lady)

thank you so much, I had silently hoped for such a thing since
my first days with K-M.

May I kindle your ambition a bit further?

  • Give the user a way to configure a tab coiour per (sub)domain
  • Give the user a way to define a variable in the page title,
    to show that variable's content in the customized tab title.

example: shorten this:
"www.abfallspiegel.de/vm/stuttgart/list
.asp?Page=3&Kategorie=Alle&Rubrik=Alle"

to this: V 3

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: April 21, 2010 05:33AM

Thanks guys smiling smiley

Ah Soeren, thanx for the suggestions, but I'm afraid different tab colors is too difficult for me (and strongly suspect for KM too ;-)
What I had considered is perhaps custom favicons too, that is a page property and possible, guess have seen that somewhere sometime. Would have to investigate.... Ah yes, and perhaps a color for URL-bar, for changed titles.

That variable thing is in reach of my little skills, but would probably bloat the macro quite a bit, depending on automatic degree.... Perhaps better just as a little "how to tip" in the macro text again... how to add a certain part of the URL to the title... Will think about it... smiling smiley

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: April 21, 2010 07:12AM

Quote
Perhaps better just as a little "how to tip" in the macro text again

Yes, definitely - if that's needded to keep it small!

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: April 21, 2010 10:48PM

UPDATE: Version-2! grinning smiley

Try it out Soeren, your variable now works semi-automatic like the other titles too. At least your test page works for me, but haven't tried others. They 'should' work too, in theory... ;-)

DOWNLOAD:
Open Link, then left-click on "Click Here" to download (needs cookies):
kmm Version 2.0: http://www.datafilehost.com/download-fcccf221.html (macro file, store directly in any macros folder)

EDIT: OOPS... sorry Senna, I had to replace that link again, there was a little glitch if loading again from cache. Please download again... ;-)



Edited 5 time(s). Last edit at 04/21/2010 11:55PM by siria.

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: senna
Date: April 21, 2010 11:10PM

oh... once i heard something like "think first, speak second", maybe sometimes i should consider this sentence hehe... tnx SoerenB, and sorry Siria.

so lets test the 2.0 version!

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: April 22, 2010 07:08PM

No prob senna grinning smiley

Have now updated the download links in the first post to version 2.0 smiling smiley

Thanks for the suggestions Soeren, I like that variable thing too now grinning smiley Although currently don't have a need for it yet, but some day perhaps...

PS: Der Link ist übrigens auch interessant, leider nix in meiner Gegend. Aber musste grinsen, zwei Tüftler ausm Tüfterländle, LOL!



Edited 1 time(s). Last edit at 04/22/2010 07:09PM by siria.

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: May 10, 2010 07:51AM

Hi, siria,

thanks a lot for the "variable" thing - works flawlessly on the site I wanted it for.
Now, as announced in the "General" thread ("TabTitles & FavIcons"), here's some clarifying what web masters/web designers can do to make this almost impossible to accomplish. :mad:

Lets just take this our K-Meleon site:

Title of the Home/News page: "K-Meleon"
Title of the screenshots page: "K-Meleon" (a meaningful TabTitle would be "Screenshots of K-Meleon"
Title of the downloads page: "K-Meleon" (a meaningful TabTitle would be "Download K-Meleon"
(note: all have the same "#$_TiCuX_url"

and so on.

Now, the hard part comes when we get to our Forum (Title: Yes, it IS "K-Meleon", not: "Forum Index K-Meleon" sad smiley )

As I know already I'm here due to the favicon, I'd love to see "General", "Bugs". "Search", and thread captions, and so on, in the Tabs. Well, that is not so easy. There are three kinds of titles there:

"K-Meleon :: K-Meleon "
"K-Meleon :: "
"K-Meleon: "

I do not see a way how any extension will ever be able to solve all of these renaming tasks equally satisfying.
There's no way around making those who write the pages aware of the "new" requirements that tabbed browsing brought to their page naming routines.

This site is not alone at all as far as this is concerned - one of the best renowned publishers of IT/tech/Communication periodicals in Germany, www.heise.de, "excels" in that respect.

siria, I have experimented with "substr" and "basename( $URL )".
The latter was rather successful at heise.de, try:

index($URL,"heise.de/foto/")>-1?$_newtitle=basename( $URL ).hFoto:0;
index($URL,"heise.de/autos/")>-1?$_newtitle=basename( $URL ).hAuto:0;

but this is all rather more than I can grasp at the moment. So I'm looking forward to your next version.

Oh, yes, everybody: Editing the K-Meleon's sites' various page titles would be worth being dicussed, wouldn't it?

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: JujuLand
Date: May 10, 2010 09:44AM

I don't use this extension, but I'm adapting mail to Linux use, and in the forum, when for example, I mail Extensions webpage URL, I keep this :

K-Meleon :: K-Meleon Extensions

it just uses $TITLE variable. I know it's limited to the displayed page, but it's better than using basename function. basename ought to be used if and only if $TITLE is empty.

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: May 10, 2010 11:54AM

Hi, JujuLand,

this extension is for making each tab look different.

If $TITLE of the "forum list", subforum list, and threads begins with "K-Meleon" in all cases, all tabs look the same, - on my screen, at least.
(I admit to: 1024x768, big fonts, many tabs open).

Quote

basename ought to be used if and only if $TITLE is empty.
Do you mean, used in an extension? What is the reason for that?

Well, on this site, it doesn*t help much, anyway. But it does on www.heise.de - maybe I'll have a look at some french sites later.

As I stated, if the combination of (favicon & $TITLE) of web pages would yield well discernible tabs, this extension wouldn't be needed.

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: May 10, 2010 12:29PM

Hi,

Three french examples:

Le Monde: good job, sauf aux DEBATS -> Forums

www.lecanardenchaine.fr : good job, but mini-site only

Le Figaro: complete failure: each tab's title: Le Figa..

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: May 10, 2010 02:36PM

Danke Soeren, auch für die guten Beispiel-Seiten! Und glaub ich muss dich schnell noch als Beta-Tester rekrutieren, wenn du gerade so schön in Schwung bist :cool: grinning smiley Also wenn du Lust hast, click mal hier. Auch wenn ich selber noch mitten in ständigen Änderungen bin, aber beim jetzigen Stand sind die meisten eher kosmetischer Natur, betreffend Menüanordnung (">>>" wird Untermenü) und kleine Hilfetexte und so Zeug. Also den Teil ignorier bitte noch, der ist in dieser Version eh noch totaler Murks und teilweise veraltet, und blick bei meinem eigenen Chaos schon nicht mehr ganz durch ;-) Aber so rein 'funktionsmäßig' bin ich momentan glaub fast durch, und der Teil interessiert dich ja bestimmt auch am meisten...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: May 10, 2010 03:19PM

siria,

Waaahnsinn... leider hab ich heute nicht mehr so viel Zeit um die Funktionen zu testen, aber das schaut schon sehr gut aus, soweit ich das beurteilen kann ... obwohl vieles weit über meinen Horizont rausgeht.
Was mir -in dem "Murks-Teil (HilfeText)" schon aufgefallen ist: Le Monde braucht praktisch kein renaming, dagegen ist der Figaro aussichtslos.

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: May 11, 2010 09:50PM

Ähm, bitte alles wieder wegschmeissen, hier kommt 06alpha ;-) Die fast-mass-renaming Funktion kann jetzt wenigstens die einfacheren Titel ohne Reload rekonstruieren, und die Ausnahmen kann man jetzt auch über Schlüsselwörter im Titel definieren, nicht nur URL. Das könnte noch einen sehr praktischen Nebeneffekt haben, um später mal einzelne Seiten vor versehentlichem Mass-Reload zu schützen. Aber das war wieder ein Kampf, nur an zwei kleinen Schräubchen gedreht, und schon kracht links und rechts wieder alles komplett zusammen, haufenweise neue Bugs, wie so üblich. Von daher macht ausführliches Testen momentan noch nicht soviel Sinn, aber zum Spielen ist es glaub auch schon ganz nett ;-)



Edited 5 time(s). Last edit at 05/12/2010 12:13PM by siria.

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: mars
Date: May 13, 2010 04:05PM

siria,
--- you wrote ---
"Note that after first installation you need to switch it ON per menu first!"

How is it turned on?
I put the file in the macro folder.

Thankx.



Edited 1 time(s). Last edit at 05/13/2010 04:30PM by mars.

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: May 13, 2010 04:44PM

Ah, actually a second user willing to try and the new version still isn't finished, argh...! It's a bit embarassing because that 'old' version above still has a rather complicated configuration, the next one (in the works) is partly much easier and more flexible. Finally want to get that thing finished, grmpf.

Anyway, since you have the old one already downloaded, click Tools>Custom Titles and the checkmark will appear. Now it's active. You can also access it by right-clicking on a tab. Good luck... ;-)

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: mars
Date: May 13, 2010 04:53PM

I was able to find those directions in the file itself but thank you anyway.
I did download and install your latest/revised version 2.

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: May 14, 2010 10:03AM

WHOAH... After thousand hours of struggling (at least it felt that much tongue sticking out smiley), now finally the breakthrough!! *happydance* At last found half a line of javascript that can simply store the original title inside the page itself, and so restore it later in a blink without any reloading or hundred lines of buggy workarounds - uff, at last out of that endless jungle where I didn't see the forest anymore with all the countless trees around (as the germans say :coolsmiling smiley Now it starts getting fun again grinning smiley

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: May 14, 2010 06:05PM

Hallo, siria,

tut mir leid, das schaffe ich grade nicht - alpha06, wie auch schon 05 - überfordern mich.
Z.T. verstehe ich nicht mal, was die Menüs bedeuten, geschweige ihre Hierarchie.
Aufmachen und reingucken wäre meine übliche Vorgehensweise - aber ich hab's nicht mal geschafft auch nur reinzulinsen...

Also ich bin jetzt grade mal kein alpha-Tester. Ich hoffe, Dir macht es trotzdem noch Spaß, diese neue Spur zu verfolgen!

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: siria
Date: May 14, 2010 09:05PM

Oh schade, aber vielleicht ja später wieder... Dass das Menü momentan noch total abschreckend ist, hatte ich ja wenigstens schon gewarnt ;-)

Quote
siria
Menüanordnung (">>>" wird Untermenü) und kleine Hilfetexte und so Zeug. Also den Teil ignorier bitte noch, der ist in dieser Version eh noch totaler Murks und teilweise veraltet

Langsam aber sicher geht's weiter vorwärts, die neue Reset-Funktion läuft wie geschmiert und erleichtert vieles :-)

Options: ReplyQuote
Re: TitlesCustom (Example: replace "Youtube - " with "Y: " in tab bar)
Posted by: SoerenB
Date: June 04, 2010 12:21PM

Hi, siria,

could

this

be any help?

Cheers
SoerenB


Back again ...

Options: ReplyQuote
Re: TitlesCustom
Posted by: siria
Date: June 04, 2010 01:48PM

Thanks for helping Soeren, but the macro functions themselves are all completed and working for a while. The one big problem is still: How to NOT make (at least not ALL) users run away screaming when they try to customize inside, in that big mess currently?? grinning smiley And in the next step will have to divide the giant menu into smaller (less scary) chunks, but that should be feasable once the #1 is done ;-) Actually there are some much more user-friendly settings now per menu, just not all.

Must admit it didnt exactly speed me up to get sidetracked and drop this one completely for 1-2 months while working on two other major macros, now I have everything forgotten!! Just started trying to get all that complicated stuff in memory again *blush*

That replacement thing in your link looks interesting though, perhaps it will help me some day for another macro... smiling smiley



Edited 1 time(s). Last edit at 06/04/2010 01:49PM by siria.

Options: ReplyQuote
Re: TitlesCustom
Posted by: D
Date: August 30, 2011 09:51PM

"The file you requested (id fcccf221) does not exist. It might have been deleted due to inactivity (no downloads) or due to not complying with our terms."
sad smiley

Options: ReplyQuote
Re: TitlesCustom
Posted by: siria
Date: August 31, 2011 04:24AM

Yeah, after 4 weeks without a single download, all files are automatically deleted at datafilehost sad smiley
Most of my macros have vanished that way, but can't find another file hoster with 1) a longer time span and 2) no huge, unbearable ads and 3) a download COUNTER :cool:

Some of the macros I have re-uploaded, others I was too lazy yet to re-upload (guess no one really needs it anyway), and yet others, like this one, I was working on an update, which then started growing, and growing, and growing, especially the menus... much better functions and countless options, but the code getting more and more complicated, then usually struggle endlessly with it to clean it up and shorten again, but often don't manage to finally get it finished into a ready-to-publish state... until some day I silently give it up... (except for my personal use). Just not enough time for finishing such monster macros, while new interesting macro ideas keep jumping at me to write them tongue sticking out smiley
This one here gave me an especially hard time, due to depending on a script method which works differently in KM1.5 and KM1.6. Was first completely buggy in KM1.6. Finally got that solved, but meanwhile the menu options had grown to -let me look- ah yes, 1 1/2 pages :O Definitely not postable yet.
Now, meanwhile have long since forgotten anyway how I build that complicated thing, would take a very long time just to study and remember everything again, not to mention finish it :-(

Options: ReplyQuote
Re: TitlesCustom
Posted by: cpm1a_new
Date: September 06, 2019 02:33PM

thanks!



Edited 5 time(s). Last edit at 09/06/2019 03:25PM by cpm1a_new.

Options: ReplyQuote
Re: TitlesCustom
Posted by: siria
Date: September 06, 2019 04:09PM

Yikes.... 9 years - where's the time going??
And that thing had grown into a monster with 1 1/2 pages long menus?
Can now only find the tiny 8kB version on my disk....
Ah it dawns: guess I had the monster version renamed! Still have an unpublished "StyleScriptia+Rename" macro version here, yeah this has some nice functions which I occasionally use, but overall got far too long and complicated to post it :-/

But I saw the previous version of your posting, now curious: what had caused the prob?



Edited 1 time(s). Last edit at 09/06/2019 08:55PM by siria.

Attachments: TitlesCustom.png (54.8 KB)  
Options: ReplyQuote
Re: TitlesCustom
Posted by: cpm1a_new
Date: September 06, 2019 04:16PM

...https://forum.guns.ru/forummessage/64/1850873.html...

this works:

$_TiCu1_ori="- Guns.ru Talks";
$_TiCu1_new="";
$_TiCu1_url="";
==================

this doesn't work:

$_TiCu2_ori=":Обзор Кондратов 12/13.5 и НДК-13 от Волчьего века";
$_TiCu2_new="My Topic:";
$_TiCu2_url="";
=================
wot am doing wrong?



Edited 3 time(s). Last edit at 09/06/2019 04:22PM by cpm1a_new.

Options: ReplyQuote
Re: TitlesCustom
Posted by: siria
Date: September 06, 2019 05:56PM

Quote
cpm1a_new
...https://forum.guns.ru/forummessage/64/1850873.html...

$_TiCu2_ori=":Обзор Кондратов 12/13.5 и НДК-13 от Волчьего века";

Your title extract starts with a semicolon, but that's not part of the real title. Looks like a typo?

And please convert the file encoding. My old file was set to "UTF-8 without BOM", but meanwhile realized some text editors need UTF-8 with that BOM marker.

And remembered something else: the engine in KM1.6 and newer automatically collapses all multiple blanks in titles into a single one! Gave me endless headaches in the past, before figuring this out.
That can be a prob when someone copies the title from the page source directly.
Recommand to always copy titles from the macro input prompt to be sure it works.



Edited 1 time(s). Last edit at 09/06/2019 06:03PM by siria.

Options: ReplyQuote
Re: TitlesCustom
Posted by: cpm1a_new
Date: September 06, 2019 07:29PM

>Looks like a typo?
my bad

TitlesCustom_v201.kmm works like a charm (including _guns.ru_ where i just LIVE)

thank you very, very much. always wanted such a feature...



Edited 5 time(s). Last edit at 09/07/2019 07:47AM by cpm1a_new.

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


K-Meleon forum is powered by Phorum.