Title Manager

Manage page titles per (sub)domain. On any website, click Greasemonkey > User Script Commands > Title Manager's menu.

< Rückmeldungen auf Title Manager

Rezension: Gut - Skript funktioniert

§
Veröffentlicht: 15.03.2014
Bearbeitet: 20.03.2014

Excellent Script Thankyou!


Oh... that is soooo easy !
Thankyou very much for this scriptGrom ❤ !


http://img834.imageshack.us/img834/6435/pwqe.png

● However... Shift+T+M only works for me in a clean profile because my usual profile has
FIrefoxAddon "Findbar Tweak" and Shift+T Opens or focuses to the findbar.
How do I change the Keyboard Shortcut please ?
PS: Have you posted any FirefoxAddons ?


● I made the input boxes wider. Not sure if I need text-align:center though.


#grom-TitleManager input#tm-domain
{width: 200px!important;
text-align:center !important;}

#grom-TitleManager input#tm-find
{width: 400px!important;
text-align:center !important;}

#grom-TitleManager input#tm-with
{width: 400px!important;
text-align:center !important;}

§
Veröffentlicht: 15.03.2014
Bearbeitet: 16.03.2014

Key Codes: http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes
At very end of script:

var kbd = [];
onkeydown = onkeyup = function(e) {
kbd[e.keyCode] = e.type == 'keydown';
if (kbd[16] && kbd[84] && kbd[77]) {
tm_QuickMenu();
kbd = [];
return false;
}
}

16 = shift
84 = t
77 = m

Change numbers to whatever.

Also can replace code above with this, which closes the menu with Esc key (perhaps grom will add it to the script):

var kbd = [];
onkeydown = onkeyup = function(e) {
kbd[e.keyCode] = e.type == 'keydown';
if (kbd[16] && kbd[84] && kbd[77]) {
tm_QuickMenu();
kbd = [];
return false;
}
if (kbd[27]) {
var qm = document.getElementById("grom-TitleManager");
qm.parentNode.removeChild(qm);
}
}

Or better yet, a close button:

§
Veröffentlicht: 15.03.2014

Okay I tested with the Esc key and it works!
Good idea ❤srazzano❤ thanks very much.
Also tested changing the keys for shortcut and it works great thanks very much.

Close button is a great idea too!

However it all only works in a clean profile and not my usual profile. I disabled Findbar Tweak and it still doesn't function... so I am gonna have to spend tomorrow disabling addons to find out which is the culprit.

gromVerfasser
§
Veröffentlicht: 15.03.2014
Bearbeitet: 15.03.2014

You are welcome, Barbiegirl. :)

● However... Shift+T+M only works for me in a clean profile because my usual profile has
FIrefoxAddon "Findbar Tweak" and Shift+T Opens or focuses to the findbar.
How do I change the Keyboard Shortcut please ?

I'll change the hotkey into something less... conflicting. Hopefully. Any ideas?
Thank you srazzano for explaining very nicely what would need to be changed.

PS: Have you posted any FirefoxAddons ?

No, not yet.

● I made the input boxes wider.

I will make them wider in the next version, thank you.

Also can replace code above with this, which closes the menu with Esc key (perhaps grom will add it to the script):

Closes the menu? Did I not... How thoughtless of me! I forgot to document that the same hotkey which opens the menu, will close the menu if it is already open. Please read it as "Shift-T-M to open or close options/menu".

I don't want to touch the Esc key in order to avoid unexpected behavior on websites which also do stuff with Esc.

Or better yet, a close button:

Excellent idea! Will add, thank you :)

§
Veröffentlicht: 15.03.2014
Bearbeitet: 15.03.2014

grom

● I like using any of these:
Ctrl+Shift+Tabkey
Ctrl+TabKey
Shift+TabKey
Such an easy combo to press... all with one hand... and TabKey reminds me of Tabs.

Ctrl+Shift+Tabkey
if (kbd[17] && kbd[16] && kbd[9]) {

● Not sure why you didn't name the script "Tab Title Manager".

● Good point about the Esc Key. Close button is the best choice.
Thanks for response grom.

§
Veröffentlicht: 15.03.2014

Ctrl+Tab opens tabs preview (many use it with TMP). Don't use it, it's Fx default: .KUI-panel (chrome://browser/content/browser-tabPreviews.xml)

gromVerfasser
§
Veröffentlicht: 17.03.2014
Bearbeitet: 17.03.2014
I like using any of these:
Ctrl+Shift+Tabkey
Ctrl+TabKey
Shift+TabKey
Such an easy combo to press... all with one hand... and TabKey reminds me of Tabs.

TabKey + modifier keys is much more likely to cause conflicts. I've added Shift-1-2 alongside Shift-T-M. At least one of them should work... ;)

Not sure why you didn't name the script "Tab Title Manager".

Because it would be an understatement. Thanks for asking, I updated description to reflect this:
"Besides window and tab titles, it also affects offered bookmark names and offered file names when saving web pages."

Ctrl+Tab opens tabs preview (many use it with TMP). Don't use it, it's Fx default: .KUI-panel (chrome://browser/content/browser-tabPreviews.xml)

Don't worry, I'm afraid of the TabKey. ;) It won't be used.


PS edit: build 3, version 1.0.20140317.3 is posted. Changes:
- added Shift-1-2, works alongside Shift-T-M;
- added close button on menu;
- wider input fields...

§
Veröffentlicht: 21.03.2014
Bearbeitet: 21.03.2014

WindowsVista   Still on Firefox27.0.1


Thankyou very much for this latest version 1.0.20140317.3 grom.
Works for me in my usual profile thankyou.

For me
● The Shift+T+M still leads to focus Findbar textbox
● Shift+1+2 leads to scrolling the webpage.
● ✔ But Ctrl+Shift+Tab works great for me with no problems...and so I am using that one... the one I really wanted so it is all just how I wanted!



ISSUE

Tested in a Squeaky Clean Profile - Only GreasemonkeyAddon - No other Userscripts - No Plugins

● Only one tab, and only the last tab changed, will retain the new title for each domain.

▬Change forum.userstyles.org tab1
▬Change forum.userstyles.org tab2
▬Change forum.userstyles.org tab3
But only tab3, the last tab changed, retains the new title.
Tab1 and Tab2 revert back to original title after adding more tab title changes for this domain.

▬Change custombuttons.net tab1
▬Change custombuttons.net tab2
▬Change custombuttons.net tab3
But only tab3, the last tab that was changed, retains the new title.
Tab1 and Tab2 revert back to original title after adding more tab title changes for this domain.

Does this not happen to you or anyone else?
● Could this be fixed please? Because usually several tabs of each domain require the title change, not just the one.

Thankyou.

gromVerfasser
§
Veröffentlicht: 21.03.2014
Bearbeitet: 24.03.2014

Side note: I have just noticed the updated screenshot of Mr. Razzano's mod, and I love it. I've changed the interface of mine to resemble his. :)

Back to the main issue. It works on all tabs for me, both on Linux and Windows XP.
Before: Tabs before
After: Tabs after

However, I think I understand what you are saying. You tried setting 3 different rules for a single domain:
"Custom Buttons • View topic - "
"Custom Buttons • View forum - "
"Custom Buttons • "
Unfortunately, at this time, this script allows only a single rule per (sub)domain. I would have to re-think and change code logic if there were going to be more than one rules per (sub)domain...
However, this is what regex support is built in for. You can accommodate various alterations with just a single regex rule:

^[\w\s\.-]+• (View topic - |View forum - )?

It will match "Custom Buttons • " and optionally "View topic - " or "View forum - " if they exist.

Is this the issue that you are describing, or did I get it all wrong?

If regex rule works the way you desired, any time you find a website which requires regex rules, you can ask here or in https://greasyfork.org/forum/discussion/32/importing-list-and-creating-rules
and I'll try to help with a proper regex rule.


Build 4, version 1.0.20140321.4 is posted. Changes:
- changed menu appearance to look like Mr. Razzano's;
- added "Prepare for export" button in the manager.

§
Veröffentlicht: 21.03.2014
Bearbeitet: 22.03.2014

@grom,
Good job.
What I modified: I added @grant GM_addStyle and moved all css into one block, this will keep the popup box display the same on all pages, and also position: fixed; the box. The h1 element did not show up for me so I changed it into a label and gave it an id for styling.

box.innerHTML = '

Title Manager

\

Full title: "' + tOriginal + '"

\

Regex supported in "Search for" with single backslash \\ as escaping character.

\

Domain:

\

Search for:

\

Replace with:

\

or \
     

';

GM_addStyle('\
#grom-TitleManager { background: #EEE; border-top: 6px solid #999; border-radius: 10px 10px 0 0; box-shadow: 0 0 10px #999; left: 33%; width: 600px; position: fixed; text-align: center; top: 10%; }\
#grom-TitleManager > p { font-size: 11px; line-height: 26px; margin: 4px; }\
#grom-TitleManager > p > #tm-title { font-weight: bold; font-size: 130%; margin-left: 28px;}\
#grom-TitleManager > p > input { line-height: 22px; }\
#grom-TitleManager > #tm-error-notifier { margin-bottom: 10px; }\
#tm-domain, #tm-find, #tm-with { -moz-appearance: none; border: 1px solid #CCC; float: right; width: 500px; }\
#tm-close { float:right; }\
');

§
Veröffentlicht: 21.03.2014

grom

Yes I am trying to change custombuttons to

CB • Bug Report
CB • Active Topics
CB • Buttons (support)
CB • Buttons Made by Forum Users
CB • General Discussion
CB • Index

or at least

Custom Buttons • Bug Report
Custom Buttons • Active Topics
Custom Buttons • Buttons (support)
Custom Buttons • Buttons Made by Forum Users
Custom Buttons • General Discussion
Custom Buttons • Index

I didn't take notice of the regex before. I just upgraded to firefox28 and am dealing with changes and messups from that now. So will re-look this with regex later.
Thanks for info.
And just to note... now that there are ratings... I rated this script to it's well deserved great/good rating.

gromVerfasser
§
Veröffentlicht: 24.03.2014
Bearbeitet: 24.03.2014

I apologize for sparse replies, my free time is not as plentiful as it once was.

@srazzano, I will try to explain my reasoning behind taking this approach.
1) GM_addStyle doesn't have an easy GM_removeStyle for a clean removal of the style when the menu is closed. So there needs to be some custom code to remove the style.
Other than changing the title, I'd like the page to remain as it was. One of the reasons for this is that I use a "faithful save" feature of an add-on in Firefox, and it saves a page exactly as it is.
2) Regarding position:fixed and making it a popup, I tried that early on and it didn't play nice with many dark user styles. Many of them declare background:none globally and then specify specific backgrounds as needed, essentially making the popup transparent and text-on-text hard to read. It would even be incompatible with some of my own styles, such as dark wikipedia ones. That is the sole reason I made it expand at the bottom of the screen, where no text overlapping should occur.

Besides, I find it interesting when the buttons in the menu look native to the page. I know it doesn't look perfect on all pages, but it does on most, and it's compatible with dark user styles.

I really apologize if it sounds like I'm dissing your idea, I'm not. The popup is ideally preferred to the current implementation of the "menu". But as a dark styles user, I wanted it to play nice...

@Barbiegirl, try entering this
domain

custombuttons.sourceforge.net

search for

regex:^[a-zA-Z\s\.-]+• (View topic - |View forum - )?

replace with

CB • 

Or alternatively import that rule:

========
custombuttons.sourceforge.net
regex:^[a-zA-Z\s\.-]+• (View topic - |View forum - )?
CB •
========

Thank you for rating it, and thank you @makondo as well. ;) I noticed the other thread is also green, don't know when that happened. Thanks, cheers :)

§
Veröffentlicht: 24.03.2014
Bearbeitet: 24.03.2014

Yeah, i renamed it too. It (rating) was my intention in the first place but Jason didn't have ratings back then, so i just marked the spot
About the popup (i probably don't really understand what you 2 are talking about and should keep my nose out of it). How about what Sonny uses in his script - an overlay, like options in the gf.o table script, for instance? That will go with any theme/style/colors.

§
Veröffentlicht: 27.03.2014
Bearbeitet: 27.03.2014

Thanks for the details grom !
Hoping you will be posting more scripts here in the future !

Antwort schreiben

Anmelden um eine Antwort zu senden.