Spaces:
Running
Running
Commit
·
50a38e3
1
Parent(s):
b33ff30
Update index.html
Browse files- index.html +17 -0
index.html
CHANGED
@@ -100,7 +100,18 @@
|
|
100 |
} else {
|
101 |
return returnValue;
|
102 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
}
|
|
|
104 |
window['checkPrompt'] = function checkPrompt() {
|
105 |
try {
|
106 |
prompt_work = document.querySelector('.gr-text-input');
|
@@ -109,6 +120,12 @@
|
|
109 |
var prompt = decodeURI(getParamVal("prompt"));
|
110 |
if (prompt.length > 0) {
|
111 |
console.log('prompt_1_'+prompt);
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
}
|
113 |
}
|
114 |
/*
|
|
|
100 |
} else {
|
101 |
return returnValue;
|
102 |
}
|
103 |
+
}
|
104 |
+
function setNativeValue(element, value) {
|
105 |
+
const valueSetter = Object.getOwnPropertyDescriptor(element.__proto__, 'value').set;
|
106 |
+
const prototype = Object.getPrototypeOf(element);
|
107 |
+
const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value').set;
|
108 |
+
|
109 |
+
if (valueSetter && valueSetter !== prototypeValueSetter) {
|
110 |
+
prototypeValueSetter.call(element, value);
|
111 |
+
} else {
|
112 |
+
valueSetter.call(element, value);
|
113 |
}
|
114 |
+
}
|
115 |
window['checkPrompt'] = function checkPrompt() {
|
116 |
try {
|
117 |
prompt_work = document.querySelector('.gr-text-input');
|
|
|
120 |
var prompt = decodeURI(getParamVal("prompt"));
|
121 |
if (prompt.length > 0) {
|
122 |
console.log('prompt_1_'+prompt);
|
123 |
+
setNativeValue(prompt_work, prompt);
|
124 |
+
prompt_work.dispatchEvent(new Event('input', { bubbles: true }));
|
125 |
+
run_btn = document.querySelector('.gr-button');
|
126 |
+
if (run_btn) {
|
127 |
+
run_btn.click();
|
128 |
+
}
|
129 |
}
|
130 |
}
|
131 |
/*
|