Reduce Page Titles

Reduces certain page titles by removing substrings

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
harl
日安装量
0
总安装量
55
评分
1 0 0
版本
0.0.8
创建于
2017-07-17
更新于
2017-07-17
大小
919 字节
许可证
暂无
适用于
所有网站

This is a simple script that's supposed to reduce page titles by removing certain parts of it, like " - Google Search" or " - Wikipedia".
In order for it to work with a specific title, you'll have to edit the script and add the part(s) you want it to remove. (It's easy, just make sure the list/array structure remains intact. Site-specific strings obviously make more sense than single common words.)

Its main purpose is to reduce the screen space needed by titles, and to increase intuitive readability when there are many tabs (or page titles) visible - particularly with limited or variable width tabs in mind (e.g. with Tab Mix Plus' option to adapt tab width to the page title, as well as userChrome styles that increase the active tab's width).

This script:
- is rather inefficient (the more entries the array contains)
- doesn't take into account subsequent changes to the title (after the page is loaded), e.g. on some sites going forward/back resets the title, and some sites change their page titles dynamically.
Feel free to make any code suggestions (or a better script).