add pointer script for local development
This commit is contained in:
parent
a161c58766
commit
16cae2c74b
|
|
@ -0,0 +1,41 @@
|
|||
// ==UserScript==
|
||||
// @name Status.io Selector 2
|
||||
// @require file:///home/tyler/code/js-statusio-selector/statusio-selector.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
|
||||
// ==/UserScript==
|
||||
|
||||
//--- Style our newly added elements using CSS.
|
||||
GM_addStyle ( multilineStr ( function () {/*!
|
||||
#myContainer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
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;
|
||||
}
|
||||
Loading…
Reference in New Issue