Skip to content

Instantly share code, notes, and snippets.

View bittu's full-sized avatar
🎯
Thinking...

Sandeep Kumar Vemula bittu

🎯
Thinking...
View GitHub Profile
@bittu
bittu / detect-chromecast.js
Last active August 24, 2022 12:04 — forked from lfalke/detect-chromecast.js
Detect Chromecast Model / Generation in Javascript - Updated for Google TV with Chromecast
/**
* We use this workaround to detect the Chromecast device generation.
* Unfortunately the Cast Application Framework (CAF) does not have an API for that.
*
* cc-1: Chromecast 1st Gen.
* cc-2: Chromecast 2nd Gen.
* cc-3: Chromecast 3rd Gen.
* cc-ultra: Chromecast Ultra
* cc-builtin: Android TV with Chromecast built-in
* cc-googletv: Google TV with Chromecast
@bittu
bittu / intercept.js
Created August 17, 2022 14:57 — forked from suprememoocow/intercept.js
AJAX timing interceptor: this class intercepts all AJAX calls and records the time taken for the HTTP request to complete. These timings are posted back to the server in batches, if there are any to send, about every two seconds. Tested in Firefox, Chrome
(function(XHR) {
"use strict";
var stats = [];
var timeoutId = null;
var open = XHR.prototype.open;
var send = XHR.prototype.send;