Skip to content

Instantly share code, notes, and snippets.

View ryota-murakami's full-sized avatar
🌴
On home vacation with working

Ryota Murakami ryota-murakami

🌴
On home vacation with working
View GitHub Profile
{"label":"E2E Coverage","message":"93.78%","schemaVersion":1,"color":"brightgreen","namedLogo":"playwright"}
/** @type {import('@types/eslint')} */
module.exports = {
env: {
browser: true,
es2023: true,
jest: true,
node: true,
},
extends: [],
// This overrides apply 'no-undef','no-redeclare', rule only js files because in TypeScript Language Server catch and show error against undefined variable name.
function createIncrement(incBy) {
let value = 0;
function increment() {
value += incBy;
console.log(value);
}
const message = `Current value is ${value}`;
function log() {

Firstly the link JS code is minified to reduce file size that code not served for purpose of read, reuse, modify by programmer.

So you have to reverse-engineering this code if you want to call e.prototype.encrypt function.

Please follow the bellow step to unminify code.

  1. copy all minified code from https://hpc.freedompay.com/api/v1.4/cdn/internal/default_min.js?v=20.42.1-release0003.898
  2. open https://jsfiddle.net/
  3. paste code JavaScript pane at the bottom left
  4. click 'tidy' button at the upper right in JavaScript pane.
@ryota-murakami
ryota-murakami / DragEvent.js
Created July 18, 2020 12:01
DragEvent at onDrop
var e= {
altKey: false
bubbles: true
button: 0
buttons: 0
cancelBubble: false
cancelable: true
clientX: 552
clientY: 421
composed: true
var e = {
altKey: false
bubbles: true
button: 0
buttons: 1
cancelBubble: false
cancelable: true
clientX: 341
clientY: 601
composed: true
@ryota-murakami
ryota-murakami / drag-and-drop-react.js
Last active July 17, 2020 12:04
drag-and-drop-react.js
const viewportDragListeners = useMemo(
() => ({
dragEnter: (event) => {
event.preventDefault();
if (dragState || event.relatedTarget || event.fromElement || uploads.active) {
return;
}
dispatch({ type: DRAG_START });
},
dragLeave: (event) => {
var root = {
fooState: {
wrapper: { depth: 1, child: { boo: () => console.log('nnnnnnnnnnnnnnnnnnnnnnnnn')} },
},
reeState: {
wrapper: { depth2: 1, child2: { boo2: () => console.log("222222222222222222222222222222222222222222") } },
}
};
var initRoot = root;
// include core lib
const chalk = require('chalk')
const { exec } = require('child_process')
// print "I'm process 1" by first process
exec('ls -la', (error, stdout, stderr) => {
if (error) {
console.error(`exec error at process 1: ${error}`)
return
}
var event = new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true
});
var button = document.document.querySelector('you have to set selector string right now.')
for(var i = 0;i < 10000;i++) {
button.dispatchEvent(event)