Skip to content

Instantly share code, notes, and snippets.

View AeonFX's full-sized avatar

AeonFX AeonFX

View GitHub Profile
{
"info": {
"_postman_id": "96aec7b1-839e-4fdf-b854-84b0396ee357",
"name": "Twitch",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Twitch log-in get oauth token",
"event": [
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, private
Content-Type: application/vnd.apple.mpegurl
Vary: Accept-Encoding
Date: Wed, 28 Oct 2020 19:05:39 GMT
Content-Length: 9579
#EXTM3U
#EXT-X-VERSION:3
@AeonFX
AeonFX / ad.js
Last active November 6, 2020 15:47
/// twitch-videoad.js
const origFetch = window.fetch;
window.fetch = (url, init, ...args) => {
if (typeof url === "string") {
if (url.includes("/access_token")) {
url = url.replace("player_type=site", "player_type=site");
} else if (
url.includes("/gql") &&
init &&
typeof init.body === "string" &&