-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataFlup.js
More file actions
84 lines (79 loc) · 2.63 KB
/
DataFlup.js
File metadata and controls
84 lines (79 loc) · 2.63 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// ==UserScript==
// @name Data Flup
// @namespace http://esheep.ch/
// @version 0.9.2
// @description Show me some stuff...
// @author Raphael Theiler
// @include *
// @grant GM_registerMenuCommand
// @updateURL https://raw.githubusercontent.com/ammoniak/TamperMonkeyScripts/master/DataFlup.js
// @downloadURL https://raw.githubusercontent.com/ammoniak/TamperMonkeyScripts/master/DataFlup.js
// ==/UserScript==
(function() {
'use strict';
var traversed=[];
var process = function(key,value) {
//console.log(key + " -> " + value);
if(key.pbRender===false){
key.set_pbRender(true);
//console.log(o[i]);
}
if(key.pbVisible===false){
key.set_pbVisible(true);
}
if(key.pbReadOnly===true){
key.set_pbReadOnly(false);
}
if(key.pbEnabled===false){
key.set_pbEnabled(true);
}
if(key.pbServerOnClick===true){
console.log(key);
if (key._eElem!= null) {
key._eElem.style.border="dotted thin red";
}
key.set_psBackgroundColor("#e64812");
}
};
var getReturnMethod = function(key,value){
if (key.psReturnMessage != undefined){
console.log("psReturnMessage: " + key.psReturnMessage + " -> " + key.psReturnObject)
}
}
var traverse = function(o,func) {
traversed.push(o);
for (var i in o) {
//func.apply(this,[i,o[i]]);
if (i.substr(0,1)!="_" && i!="cssRules" && i!="rules"){
if (o[i] !== null && typeof(o[i])=="object" && traversed.indexOf(o[i])<0) {
if (i!="cssRules"){
func(o[i]);
}
//going one step down in the object tree!!
traverse(o[i],func);
}
}
}
};
var showEverything = function (){
console.log("Hello world");
traversed=[];
traverse(oWebApp,process);
console.log("Hello world");
};
var showReturnMessages = function (){
console.log("Hello world");
traversed=[];
traverse(oWebApp,getReturnMethod);
console.log("Hello world");
};
GM_registerMenuCommand("DataFlup - show everything", showEverything, "d")
GM_registerMenuCommand("DataFlup - show all psReturnMessages", showReturnMessages, "d")
document.addEventListener('keydown', function(e) {
// pressed cstrl+shit+a
if (e.keyCode == 65 && e.shiftKey && e.ctrlKey) {
console.log("key!");
showEverything();
}
}, false);
})();