Created
May 16, 2019 01:44
-
-
Save kohenkatz/7a5430365d6fc28fbf5b217657212826 to your computer and use it in GitHub Desktop.
UserScript to widen the Site Switcher dropdown in the Ubiquiti Unifi Controller
This file contains hidden or 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
// ==UserScript== | |
// @name Widen Unifi Site Switcher | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description The Unifi Site Switcher defaults to 200px. We want it wider! | |
// @author Moshe Katz | |
// @match https://your.unifi.controller.domain/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
function addGlobalStyle(css) { | |
let head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
let style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle('.appOrgSwitcher > .ubntPopover { width: 400px !important; }'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment