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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>My App</title> | |
</head> | |
<body> | |
<script src='main.js'></script> | |
</body> | |
</html> |
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
{ | |
"name": "my-app", | |
"version": "1.0.0", | |
"private": true, | |
"license": "MIT", | |
"dependencies": { | |
"webpack": "^5.45.0", | |
"webpack-cli": "^4.7.2" | |
} | |
} |
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
alert('hello, webpack world!') |
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
{ | |
"name": "my-app", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"webpack": "^5.45.0", | |
"webpack-cli": "^4.7.2" | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>My App</title> | |
</head> | |
<body> | |
<script src='./src/index.js'></script> | |
</body> | |
</html> |
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 random = (min, max) => { | |
return Math.random() * (max - min) + min; | |
} | |
const data = [/* user id array */] | |
data.map((item, index) => { | |
setTimeout(() => followUser(item), random(60000, 120000) * index) | |
}) |
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 getCookieObject = () => { | |
let obj = {} | |
document.cookie.split(';').map((item) => { | |
const keyValArray = item.split('=') | |
try { | |
const key = keyValArray[0].trim() | |
const val = keyValArray[1].trim() | |
obj[key] = val | |
} 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
const requestHeaders = [ | |
{ | |
name: 'accept', | |
value: '*/*' | |
}, | |
{ | |
name: 'accept-language', | |
value: 'en-US;q=0.9,en;q=0.8' | |
}, | |
{ |
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 updateQueryHashes = () => { | |
let urlManifest = window.__s.js | |
let urlManifestKeys = Object.keys(urlManifest) | |
let consumerFilePathKey = urlManifestKeys.filter((key) => { | |
return urlManifest[key].includes('Consumer.js') | |
}) | |
let consumerFilePath = urlManifest[consumerFilePathKey] | |
fetch(consumerFilePath) | |
.then(res => res.text()) | |
.then(data => { |
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 write = (arr) => { /* utility function to write our array of user id's somewhere */ } | |
const getGraphqlUrl = (queryHash, variables) => { | |
return `https://www.instagram.com/graphql/query/?query_hash=${queryHash}&variables=${encodeURIComponent(JSON.stringify(variables))}` | |
} | |
const getPageRequest = ({ | |
err, | |
res, | |
body, |