-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevops_release.user.js
More file actions
41 lines (33 loc) · 1.18 KB
/
devops_release.user.js
File metadata and controls
41 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// ==UserScript==
// @name Stop clicking Releases
// @version 1
// @grant none
// @match https://dev.azure.com/*
// ==/UserScript==
function colorRelease() {
var element = document.getElementById('__bolt-ms-vss-releaseManagement-web-hub-explorer-2-link');
if (element !== 'undefined') {
element.style.backgroundColor = "#f00";
var icon = element.getElementsByClassName("fabric-icon")[0];
icon.classList.remove("ms-Icon--Rocket");
icon.classList.add("ms-Icon--Blocked");
}
}
function tempercode() {
setInterval(colorRelease, 2000);
console.log("Hello");
}
//Dom loading snippet found at https://stackoverflow.com/questions/37798132/tampermonkey-userscript-doesnt-fire-domcontentloaded-event
(function() {
'use strict';
if (document.readyState == "complete" || document.readyState == "loaded" || document.readyState == "interactive") {
tempercode();
} else {
document.addEventListener("DOMContentLoaded", function(event) {
tempercode();
});
}
document.addEventListener("scroll", function(event) {
tempercode();
});
})();