BlueCat Address Manager Favorites button

Add button to access Favorites list without going to MyIPAM first in BlueCat Address Manager

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        BlueCat Address Manager Favorites button
// @namespace   *
// @description Add button to access Favorites list without going to MyIPAM first in BlueCat Address Manager
// @include     */app*
// @license		MIT
// @version     2
// @grant       none
// @copyright   2018, Marius Galm
// @license		MIT
// @icon        https://www.bluecatnetworks.com/wp-content/uploads/2018/03/cropped-bluecat-favicon-32x32.png
// ==/UserScript==

if (document.readyState === "interactive" ) {
	var toolbar = document.getElementsByClassName("ToolBar");
	if (toolbar !== undefined) {
		var tRs = toolbar[0].getElementsByTagName("tr");
		if (tRs !== undefined) {
            var tR = tRs[0];
            var y = tR.insertCell(0);
            y.innerHTML = '<td><div class="ToolBarItemSeparator">&nbsp;</div></td>';
			var x = tR.insertCell(0);
			x.innerHTML='<td><a id="link_fav" onclick="ProteusWaitingPage.start();" name="FavoriteExtra" class="ToolBarItem" href="app?service=direct&amp;page=Favorites&amp;component=$Border&amp;sp=Spage=Favorites"><img src="/images/icons/small/favorite_add.png" border="0" alt="Favorites" title="Favorites"></a></td>';
		}
	}
}