TwitchFunFacts

Fun Facts Twitch

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        TwitchFunFacts
// @version     BETA
// @description Fun Facts Twitch
// @author      elaw
// @url         https://twitch.com/dsgb1202
// @Instagram   https://www.twitter.com/dsgb1202/
// @license     Copyright (C) DSGB1202
// @icon        https://i.imgur.com/0qNzA6A.png
// @match       https://www.twitch.tv/dsgb1202
// @grant       none
// @run-at      document-start
// @jsversion   jshint esversion: 6
// @namespace https://greasyfork.org/en/users/153402
// ==/UserScript==

       
var limit = 3;
$.ajax({
    method: 'GET',
    url: 'https://api.api-ninjas.com/v1/facts?limit=' + limit,
    headers: { 'X-Api-Key': 'ZVpWh7oi0eCFW35DGlXgMQ==DCaFrFPVzEHGSUPT'},
    contentType: 'application/json',
    success: function(result) {
        console.log(result);
    },
    error: function ajaxError(jqXHR) {
        console.error('Error: ', jqXHR.responseText);
    }
});