Skip to content

Instantly share code, notes, and snippets.

View jemsgit's full-sized avatar
🚀

Evgeniy J jemsgit

🚀
View GitHub Profile
// ==UserScript==
// @name Extract Text from Astrocentr Pages
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Extract text content from multiple pages on Astrocentr website
// @author Your Name
// @match https://www.astrocentr.ru/index.php*
// @grant none
// ==/UserScript==
/**
* Creates multipart body for files with additional headers
* @param formData native FormData
* @param headers object: key - field name, value - object with header: value pairs
* @returns contentType and body
*/
function createMultipartBody(
formData: FormData,
headers: Record<string, AdditionalHeaders> = {},