-
-
Save konovalov-nk/ccf965a61c7378134bc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// VtigerCRM - Title & Other | |
// version 0.1 BETA! | |
// 2014-07-07 | |
// Copyright (c) 2014, Nikolay Konovalov | |
// Released under the GPL license | |
// http://www.gnu.org/copyleft/gpl.html | |
// | |
// -------------------------------------------------------------------- | |
// | |
// This is a Greasemonkey user script. To install it, you need | |
// Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/ | |
// Then restart Firefox and revisit this script. | |
// Under Tools, there will be a new menu item to "Install User Script". | |
// Accept the default configuration and install. | |
// | |
// To uninstall, go to Tools/Manage User Scripts, | |
// select "VtigerCRM - Title & Other", and click Uninstall. | |
// | |
// -------------------------------------------------------------------- | |
// | |
// ==UserScript== | |
// @name VtigerCRM - Title & Other | |
// @namespace http://vtigercrm.com/ | |
// @description Change the titles. | |
// @include http://wiki.inser.ch/wiki/* | |
// ==/UserScript== | |
function changeTitle() { | |
var head, appnum; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
appnum = getApplicationNum() | |
document.title = "This is the new page title " + appnum; | |
} | |
function getApplicationNum() { | |
var element; | |
element = document.getElementsByClassName('dvtCellInfo')[12]; | |
if (!element) { return; } | |
return element.value; | |
} | |
changeTitle(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment