RabbitMQ MGMT UI Additions

Depends on rabbitmq being in the URL somewhere

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         RabbitMQ MGMT UI Additions
// @namespace    cpriest
// @version      0.1
// @description  Depends on rabbitmq being in the URL somewhere
//                 • Adds Update every 1 & .5 second to rabbitmq UI's
// @author       Clint Priest
// @homepage	 https://github.com/cpriest/userscripts/tree/master/RabbitMQ
// @include      http*://*rabbitmq*
// @grant        none
// @license		 MIT
// @compatible 	 firefox
// @compatible 	 chrome
// @compatible 	 opera
// @compatible 	 safari
// ==/UserScript==

(function() {
    'use strict';
	if(!document.querySelector('IMG[src="img/rabbitmqlogo.png"]'))
		return;

	let sel = document.querySelector('SELECT#update-every');
	if(sel) {
		sel.innerHTML = '<option value="500">Refresh every 1/2 second</option>' +
			'<option value="1000">Refresh every 1 second</option>' + sel.innerHTML;
		sel.selectedIndex = 2;
	}
})();