Forentitel umdrehen

Kritik und Vorschläge für dieses Board bitte hier rein.
Antworten
Dauerbaustelle
User
Beiträge: 996
Registriert: Mittwoch 9. Januar 2008, 13:48

Das deutsche Python-Forum :: Thema anzeigen :: THEMA
ist, finde ich sehr schlecht für Bookmarking.
Wie wäre es mit
THEMA :: Thema anzeigen :: Das deutsche Python-Forum?
Ansonsten habe ich hier mal Greasemonkey-Script für genau dies gebastelt.

Code: Alles auswählen

// ==UserScript==
// @name           phpBB Fix Titles
// @description    Revers phpBB titles
// @version        0.1
// @date           2007-01-08
// @creator        Jonas <jonas@jonashaag.de>, Pepino
// @include        */viewtopic.php*

// ==/UserScript==
// 
// **COPYRIGHT NOTICE**
// 
// Copyright (C) 2006 and onwards Dauerbaustelle (origianlly from Pepino)
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// The GNU General Public License is available by visiting
//   http://www.gnu.org/copyleft/gpl.html
// or by writing to
//   Free Software Foundation, Inc.
//   51 Franklin Street, Fifth Floor
//   Boston, MA  02110-1301
//   USA
// 
// **END COPYRIGHT NOTICE**

t = document.title;
i = t.indexOf(' - ');
if (i > 0) site = t.substring(0, i);

// Thema
if (i > 0) rest = t.substring(i + 3);
i = rest.indexOf(' - ');
if (i > 0) thread = rest.substring(0, i) + " - ";
else thread = rest + " - ";

// Title
if (i > 0) title = rest.substring(i + 3) + " - ";
else title = "";

if (title=="Thema anzeigen") document.title = thread + title + site;
else  document.title = title + thread + site;
Grüße,DB
Antworten