This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jsExceptionStore(JsException) { | |
var request = new XMLHttpRequest(); | |
request.open('GET', 'js-exception-store?user_agent='.concat(navigator.userAgent, '&js_exception_message=', JsException.message, '&js_exception_file_name=', JsException.fileName, '&js_exception_line_number=', JsException.lineNumber), false); | |
request.send(); | |
} | |
try { | |
throw 'JsException #0'; | |
} | |
catch (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function queryText(selector, text) { | |
try { | |
var elements = document.querySelectorAll(selector); | |
return Array.prototype.filter.call(elements, function (element) { | |
return RegExp(text).test(element.textContent); | |
}); | |
} catch (e) { | |
console.log(e); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Document.prototype.transformProperty = function (selector, property, transformGetter, transformSetter) { | |
Object.defineProperty(document.querySelector(selector), property, { | |
get: function () { | |
return transformGetter(document.querySelector(selector).cloneNode()[property]); | |
}, | |
set: function (value) { | |
let clone = document.querySelector(selector).cloneNode(true); | |
clone.value = transformSetter(value); | |
document.querySelector(selector).replaceWith(clone); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var send = XMLHttpRequest.prototype.send; | |
var params; | |
var sendNew; | |
XMLHttpRequest.prototype.send = function(data) { | |
params = new URLSearchParams(data); | |
if (new URLSearchParams(data).get('D') === '75') { | |
sendNew = function () { | |
params.set('PRICE', '9999'); | |
send.call(this, params); | |
}.bind(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
document.addEventListener('readystatechange', function () { | |
try { | |
if (document.readyState === 'interactive') { | |
let i = 0; | |
let Map_ = new Map(); | |
let Headers_ = new Headers() | |
let DOMParser_ = new DOMParser(); | |
let URLSearchParams_ = new URLSearchParams(location.search); | |
Headers_.set('Cache-Control', 'no-cache, no-store, must-revalidate'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const phoneMask = selector => { | |
const phoneElement = document.querySelector(selector); | |
phoneElement.addEventListener('keyup', () => { | |
const match = phoneElement.value.replace(/\D+/g, '').match(/(\d{1})(\d{3})(\d{3})(\d{2})(\d{2})/); | |
phoneElement.value = `${match[1]} (${match[2]}) ${match[3]}-${match[4]}-${match[4]}`; | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.defineProperty(document.getElementById('test'), 'value', { | |
set: function(newValue) { | |
alert(); | |
let node = document.getElementById('test').cloneNode(true); | |
node.value = newValue; | |
document.getElementById('test').parentNode.replaceChild(node, document.getElementById('test')); | |
}, | |
}); | |
document.getElementById('test').value = 'qeqw1e' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browserWindow.webContents.sendInputEvent({ | |
type: "keyDown", | |
keyCode: '\u0008' | |
}); | |
browserWindow.webContents.sendInputEvent({ | |
type: "keyUp", | |
keyCode: '\u0008' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.defineProperty(document.body, 'addEventListener', { | |
value: function (e, callback) { | |
callback({ | |
target: { | |
value: 'hhhhh' | |
} | |
}); | |
} | |
}); | |
document.body.addEventListener('click', function (e) { |
OlderNewer