creating standalone script for installation
This commit is contained in:
parent
1bc57aeb92
commit
88e87a2066
|
|
@ -1,6 +1,6 @@
|
|||
// ==UserScript==
|
||||
// @name Status.io Selector 2
|
||||
// @require file:///home/tyler/code/js-statusio-selector/statusio-selector.js
|
||||
// @name Status.io Selector Pointer Script
|
||||
// @require file:///home/tyler/code/js-statusio-selector/code-payload.js
|
||||
// @version 0.0.1
|
||||
// @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/create$/
|
||||
// @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/.*/?edit$/
|
||||
|
|
|
|||
|
|
@ -1,15 +1,48 @@
|
|||
// ==UserScript==
|
||||
// @name Status.io Selector 2
|
||||
// @name Status.io Selector
|
||||
// @namespace https://status.io
|
||||
// @description Effort to simplify configuration of incidents/maintenance windows
|
||||
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
|
||||
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js
|
||||
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
|
||||
// @version 0.0.1
|
||||
// @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/create$/
|
||||
// @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/.*/?edit$/
|
||||
// @grant GM_addStyle
|
||||
// @grant GM_setClipboard
|
||||
// @version 0.0.1
|
||||
// ==/UserScript==
|
||||
|
||||
//--- Style our newly added elements using CSS.
|
||||
GM_addStyle ( multilineStr ( function () {/*!
|
||||
#myContainer {
|
||||
position: fixed;
|
||||
bottom: 150px;
|
||||
right: 0;
|
||||
font-size: 14px;
|
||||
background: orange;
|
||||
border: 3px outset black;
|
||||
margin: 3px;
|
||||
opacity: 0.7;
|
||||
z-index: 222;
|
||||
padding: 5px 5px;
|
||||
}
|
||||
#myButton {
|
||||
cursor: pointer;
|
||||
}
|
||||
#myContainer p {
|
||||
color: red;
|
||||
background: white;
|
||||
}
|
||||
*/} ) );
|
||||
|
||||
function multilineStr (dummyFunc) {
|
||||
var str = dummyFunc.toString ();
|
||||
str = str.replace (/^[^\/]+\/\*!?/, '') // Strip function () { /*!
|
||||
.replace (/\s*\*\/\s*\}\s*$/, '') // Strip */ }
|
||||
.replace (/\/\/.+$/gm, '') // Double-slash comments wreck CSS. Strip them.
|
||||
;
|
||||
return str;
|
||||
}
|
||||
|
||||
// draw frame
|
||||
var zNode = document.createElement('div');
|
||||
zNode.setAttribute('id', 'myContainer');
|
||||
|
|
@ -1000,6 +1033,56 @@ if (window.location.href.indexOf("60087ab5608daf0535dc8e23") > -1) {
|
|||
document.getElementById("resetButton").addEventListener("click", resetButtonClickAction, false);
|
||||
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
|
||||
};
|
||||
function loadStages() {
|
||||
currentMode = "stage";
|
||||
console.log("Loading GCP stages profile");
|
||||
var stagesHTML = '<center><button id="stage1Button" style="width:468px" type="button">Stage-1</button></center>';
|
||||
|
||||
zNode.innerHTML = profilesHTML + '<hr class="solid">' + stagesHTML + '<hr class="solid">' + componentsHTML + auxHTML;
|
||||
if (debugFlag == true) {
|
||||
toggleButtonColor("debugButton");
|
||||
}
|
||||
|
||||
// array of active buttons
|
||||
buttonArray = ["stage1"];
|
||||
|
||||
// clear everything on profile load
|
||||
reset();
|
||||
|
||||
// regional listeners
|
||||
document.getElementById("stage1Button").addEventListener("click", stage1ButtonClickAction, false);
|
||||
|
||||
// profile listeners
|
||||
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
|
||||
document.getElementById("stagesButton").addEventListener("click", stagesButtonClickAction, false);
|
||||
document.getElementById("shrinkButton").addEventListener("click", shrinkButtonClickAction, false);
|
||||
|
||||
// component listeners
|
||||
document.getElementById("apiButton").addEventListener("click", apiButtonClickAction, false);
|
||||
document.getElementById("authButton").addEventListener("click", authButtonClickAction, false);
|
||||
document.getElementById("computeButton").addEventListener("click", computeButtonClickAction, false);
|
||||
document.getElementById("jobsButton").addEventListener("click", jobsButtonClickAction, false);
|
||||
document.getElementById("odbcButton").addEventListener("click", odbcButtonClickAction, false);
|
||||
document.getElementById("webappButton").addEventListener("click", webappButtonClickAction, false);
|
||||
document.getElementById("allComponentsButton").addEventListener("click", allComponentsButtonClickAction, false);
|
||||
|
||||
// aux listeners
|
||||
document.getElementById("resetButton").addEventListener("click", resetButtonClickAction, false);
|
||||
document.getElementById("applyButton").addEventListener("click", applyButtonClickAction, false);
|
||||
};
|
||||
function shrink() {
|
||||
currentMode = "";
|
||||
zNode.innerHTML = profilesHTML
|
||||
if (debugFlag == true) {
|
||||
toggleButtonColor("debugButton");
|
||||
};
|
||||
|
||||
document.getElementById("controlplanesButton").addEventListener("click", controlplanesButtonClickAction, false);
|
||||
document.getElementById("stagesButton").addEventListener("click", stagesButtonClickAction, false);
|
||||
document.getElementById("shrinkButton").addEventListener("click", shrinkButtonClickAction, false);
|
||||
document.getElementById("debugButton").addEventListener("click", debugButtonClickAction, false);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// profile functions
|
||||
|
|
|
|||
Loading…
Reference in New Issue