actual source

This commit is contained in:
Miska 2022-02-18 20:50:20 +05:30 committed by GitHub
parent 4285d017a6
commit e3c2e0b76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 190 additions and 0 deletions

190
index.html Normal file
View File

@ -0,0 +1,190 @@
<html>
<head>
<title>We are Jammin'</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="A funny clip from Captain Underpants with Jetpack Joyride music. They are jammin!" name="description">
<meta content="website" property="og:type">
<meta content="We Are Jammin'" name="twitter:title" property="og:title">
<meta content="A funny clip from Captain Underpants with Jetpack Joyride music. They are jammin!" name="twitter:description" property="og:description">
<meta content="https://we-are-jammin.xyz/jammin.png" name="twitter:image" property="og:image">
<meta content="summary" name="twitter:card">
<script>
/*!
* @module browser-dtector
* @description A Javascript library to detect browser, version and platform
* @version 3.2.0
* @link https://github.com/sibiraj-s/browser-dtector.git
* @licence MIT License, https://opensource.org/licenses/MIT
*/
!function (e, o) { "object" == typeof exports && "undefined" != typeof module ? module.exports = o() : "function" == typeof define && define.amd ? define(o) : (e = "undefined" != typeof globalThis ? globalThis : e || self).BrowserDetector = o() }(this, (function () { "use strict"; function e(e, o) { for (var n = 0; n < o.length; n++) { var r = o[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r) } } var o = { chrome: "Google Chrome", brave: "Brave", crios: "Google Chrome", edge: "Microsoft Edge", edg: "Microsoft Edge", fennec: "Mozilla Firefox", jsdom: "JsDOM", mozilla: "Mozilla Firefox", msie: "Microsoft Internet Explorer", opera: "Opera", opios: "Opera", opr: "Opera", rv: "Microsoft Internet Explorer", safari: "Safari", samsungbrowser: "Samsung Browser", electron: "Electron" }, n = { android: "Android", androidTablet: "Android Tablet", cros: "Chrome OS", fennec: "Android Tablet", ipad: "IPad", iphone: "IPhone", jsdom: "JsDOM", linux: "Linux", mac: "Macintosh", tablet: "Android Tablet", win: "Windows", "windows phone": "Windows Phone", xbox: "Microsoft Xbox" }, r = function (e) { var o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : -1, n = new RegExp("^-?\\d+(?:.\\d{0,".concat(o, "})?")), r = Number(e).toString().match(n); return r ? r[0] : null }, i = function () { return "undefined" != typeof window ? window.navigator : null }, t = function () { function t(e) { var o; !function (e, o) { if (!(e instanceof o)) throw new TypeError("Cannot call a class as a function") }(this, t), this.userAgent = e || (null === (o = i()) || void 0 === o ? void 0 : o.userAgent) || null } var a, l, s; return a = t, l = [{ key: "parseUserAgent", value: function (e) { var t, a, l, s = {}, c = e || this.userAgent || "", d = c.toLowerCase().replace(/\s\s+/g, " "), u = /(edge)\/([\w.]+)/.exec(d) || /(edg)[/]([\w.]+)/.exec(d) || /(opr)[/]([\w.]+)/.exec(d) || /(jsdom)[/]([\w.]+)/.exec(d) || /(samsungbrowser)[/]([\w.]+)/.exec(d) || /(electron)[/]([\w.]+)/.exec(d) || /(chrome)[/]([\w.]+)/.exec(d) || /(crios)[/]([\w.]+)/.exec(d) || /(opios)[/]([\w.]+)/.exec(d) || /(version)(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d) || /(webkit)[/]([\w.]+).*(version)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d) || /(applewebkit)[/]([\w.]+).*(safari)[/]([\w.]+)/.exec(d) || /(webkit)[/]([\w.]+)/.exec(d) || /(opera)(?:.*version|)[/]([\w.]+)/.exec(d) || /(msie) ([\w.]+)/.exec(d) || /(fennec)[/]([\w.]+)/.exec(d) || d.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec(d) || d.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(d) || [], f = /(ipad)/.exec(d) || /(ipod)/.exec(d) || /(iphone)/.exec(d) || /(jsdom)/.exec(d) || /(windows phone)/.exec(d) || /(xbox)/.exec(d) || /(win)/.exec(d) || /(tablet)/.exec(d) || /(android)/.test(d) && !1 === /(mobile)/.test(d) && ["androidTablet"] || /(android)/.exec(d) || /(mac)/.exec(d) || /(linux)/.exec(d) || /(cros)/.exec(d) || [], p = u[5] || u[3] || u[1] || null, w = f[0] || null, x = u[4] || u[2] || null, b = i(); "chrome" === p && "function" == typeof (null == b || null === (t = b.brave) || void 0 === t ? void 0 : t.isBrave) && (p = "brave"), p && (s[p] = !0), w && (s[w] = !0); var m = Boolean(s.tablet || s.android || s.androidTablet), v = Boolean(s.ipad || s.tablet || s.androidTablet), g = Boolean(s.android || s.androidTablet || s.tablet || s.ipad || s.ipod || s.iphone || s["windows phone"]), h = Boolean(s.cros || s.mac || s.linux || s.win), y = Boolean(s.brave || s.chrome || s.crios || s.opr || s.safari || s.edg || s.electron), A = Boolean(s.msie || s.rv); return { name: null !== (a = o[p]) && void 0 !== a ? a : null, platform: null !== (l = n[w]) && void 0 !== l ? l : null, userAgent: c, version: x, shortVersion: x ? r(parseFloat(x), 2) : null, isAndroid: m, isTablet: v, isMobile: g, isDesktop: h, isWebkit: y, isIE: A } } }, { key: "getBrowserInfo", value: function () { var e = this.parseUserAgent(); return { name: e.name, platform: e.platform, userAgent: e.userAgent, version: e.version, shortVersion: e.shortVersion } } }], s = [{ key: "VERSION", get: function () { return "3.2.0" } }], l && e(a.prototype, l), s && e(a, s), Object.defineProperty(a, "prototype", { writable: !1 }), t }(); return t }));
window.onload = async () => {
const video = document.getElementById('video');
const loading = document.getElementById('loading');
const start = document.getElementById('start');
const data = document.getElementById('data');
const memes = [];
let step = 0;
let fontSize = Math.min(window.innerHeight / 10, window.innerWidth / 20);
data.style.fontSize = fontSize + 'px';
const e = (m) => loading.innerText = m;
video.oncanplaythrough = async () => {
const basic = await (await fetch('https://wtfismyip.com/json').catch(e)).json().catch(e);
// we use ip-api.com for this but using https requires an api key so unfortunately we need to proxy it
const detailed = await (await fetch(`https://we-are-jammin.xyz/detailed/${basic.YourFuckingIPAddress}`).catch(() => e('Disable your aggressive ad-blocker and refresh'))).json().catch(e);
const detector = new BrowserDetector(window.navigator.userAgent).parseUserAgent();
p('IP Address', basic.YourFuckingIPAddress);
p('Country', detailed.country);
p('Region', detailed.regionName);
p('City', detailed.city);
p('ZIP Code', detailed.zip);
p('Full Location', basic.YourFuckingLocation);
p('Latitude', detailed.lat);
p('Longitude', detailed.lon);
p('Timezone', detailed.timezone);
p('Current Time', new Date().toLocaleString());
p('ISP', detailed.isp);
p('Organization', detailed.org);
p('Autonomous System', detailed.as);
p('Browser Name', detector.name);
p('Platform Name', detector.platform);
p('Browser Version', detector.version);
p('Mobile/Tablet', (detector.isMobile || detector.isTablet) ? 'Yes' : 'No');
p('Referrer', document.referrer || 'None');
p('System Languages', navigator.languages.join(', '));
p('Screen Width', screen.width, 'px');
p('Screen Height', screen.height, 'px');
if (screen.width != window.width || screen.height != window.height) {
p('Window Width', window.outerWidth, 'px');
p('Window Height', window.outerHeight, 'px');
}
p('Display Pixel Depth', screen.pixelDepth);
if (typeof screen.orientation != 'undefined') {
p('Screen Orientation', screen.orientation.type.split('-')[0]);
p('Screen Rotation', screen.orientation.angle, ' degrees');
}
p('CPU Threads', navigator.hardwareConcurrency);
p('Available Browser Memory', typeof window.performance.memory != 'undefined' ? Math.round(window.performance.memory.jsHeapSizeLimit / 1024 / 1024) : null, 'MB');
const canvas = document.createElement('canvas');
let gl;
let debugInfo;
try {
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
} catch (e) { }
if (gl) {
p('GPU Vendor', gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL));
p('GPU Info', gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL));
}
loading.style.display = 'none';
start.style.display = 'flex';
};
start.onclick = () => {
start.style.display = 'none';
video.play();
setInterval(() => {
const time = video.currentTime - 13.166 - step * 0.500;
if (time > 0) {
if (step == 0) document.title = memes[step].split(': ')[1] + ' - You just got jammed!';
const el = document.createElement('span');
el.textContent = memes[step];
data.appendChild(el);
const height = data.getBoundingClientRect().height;
if (height > window.innerHeight) {
fontSize = fontSize - (fontSize / 10);
data.style.fontSize = fontSize + 'px';
}
step++;
}
}, 10);
}
video.onended = () => video.style.display = 'none';
const videoData = await fetch('jammin.mp4').catch(e);
video.src = URL.createObjectURL(await videoData.blob());
video.load();
const p = (k, d, s) => d && memes.push(`${k}: ${d}${s || ''}`);
}
</script>
<style>
* {
background: black;
color: white;
}
body {
margin: 0;
overflow: hidden;
height: 100vh;
font-family: Arial, Helvetica, sans-serif;
}
body,
#loading,
#start,
#data {
display: flex;
justify-content: center;
align-items: center;
}
#loading,
#start,
#video {
height: 100vh;
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
#loading {
z-index: 3;
font-size: 36px;
}
#start {
flex-direction: column;
z-index: 2;
font-size: 36px;
}
#data {
flex-direction: column;
text-align: center;
}
#data,
#data span {
z-index: 1;
background: transparent !important;
}
@media only screen and (min-aspect-ratio: 1/1) {
#video {
object-fit: cover;
}
}
</style>
</head>
<body>
<div id="loading"><span>Loading...</span></div>
<div id="start" style="display: none"><span>Click to start</span><span style="font-size: 16px;text-align:center">Video from the Captain Underpants movie, audio from the game Jetpack Joyride</span></div>
<!-- Website by @PikaDude01 on Twitter -->
<div id="data"></div>
<video id="video" playsinline style="pointer-events: none" />
</body>
</html>

BIN
jammin.mp4 Normal file

Binary file not shown.