pokec-utils

Knižnica prepoužiteľných funkcií pre userscripty určené pre stránku pokec.sk

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/26504/169147/pokec-utils.js

/**
 * Collection of reusable functions for userscripts for pokec.sk
 *
 * Author:
 * Version: 1.0
 * Date: 2017-January-13
 * License: MIT
 */

var PokecUtils = (function (doc) {
	"use strict";

	var userName = "";

	return {
		/**
		 * Returns name of logged user
		 *
		 * @return
		 *   name of logged user
		 */
		getUserName: function() {
			if (!userName) {
				userName = doc.getElementById("nickBull").innerHTML;
			}
			return userName;
		}
	};

}(document));