VK wall title text

VK wall content text in tab title.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        VK wall title text
// @description VK wall content text in tab title.
// @namespace   2k1dmg@userscript
// @license     GPL version 3 or any later version; http://www.gnu.org/licenses/gpl.html
// @include     *://vk.com/wall*
// @version     1.1
// @author      2k1dmg
// @grant       none
// @noframes
// ==/UserScript==

(function() {
    'use strict';
	var groupName = document.querySelector('.author').innerText;
	var groupText = document.querySelector('.wall_post_text').innerText;
	var titleText = groupName +' - '+ ((groupText.length > 56) ? groupText.slice(0,55)+'\u2026' : groupText);
	document.title = titleText.replace(/\n/g, ' ');
})();