-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProduct Content Downloads.user.js
56 lines (49 loc) · 1.75 KB
/
Product Content Downloads.user.js
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// ==UserScript==
// @name Product Content Downloads
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the world!
// @author You
// @include https://osisoft--fullcopy.*
// @include https://osisoft--prodcopy.*
// @include https://osisoft.lightning.force.*
// ==/UserScript==
(function()
{
if (window.top === window.self)
{
var TextFieldCount = 0;
var observer = new MutationObserver(function(mutations)
{
var TextFieldsStart = document.getElementsByClassName("slds-form-element slds-form-element_readonly slds-grow slds-hint-parent override--slds-form-element");
if (TextFieldsStart != null && (TextFieldsStart.length != TextFieldCount))
{
TextFieldCount = TextFieldsStart.length;
}
else
{
return;
}
var CasesOpen = document.getElementsByClassName("slds-brand-band slds-brand-band_cover slds-brand-band_medium slds-template_default forceBrandBand")
for (let i = 0; i < CasesOpen.length; i++)
{
var TextFields = CasesOpen[i].getElementsByClassName("slds-form-element slds-hint-parent test-id__output-root slds-form-element_readonly slds-form-element_stacked")
for (let j = 0; j < TextFields.length; j++)
{
if (TextFields[j].innerText.match("Visibility\nInternal"))
{
}
}
}
});
observer.observe(document, {
childList: true,
subtree: true
});
return;
}
else
{
return;
}
})();