This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(a,b,c,d,e,f,g,h,i){function j(a){var b,c=a.length,e=this,f=0,g=e.i=e.j=0,h=e.S=[];for(c||(a=[c++]);d>f;)h[f]=f++;for(f=0;d>f;f++)h[f]=h[g=s&g+a[f%c]+(b=h[f])],h[g]=b;(e.g=function(a){for(var b,c=0,f=e.i,g=e.j,h=e.S;a--;)b=h[f=s&f+1],c=c*d+h[s&(h[f]=h[g=s&g+b])+(h[g]=b)];return e.i=f,e.j=g,c})(d)}function k(a,b){var c,d=[],e=typeof a;if(b&&"object"==e)for(c in a)try{d.push(k(a[c],b-1))}catch(f){}return d.length?d:"string"==e?a:a+"\0"}function l(a,b){for(var c,d=a+"",e=0;e<d.length;)b[s&e]=s&(c^=19*b[s&e])+d.charCodeAt(e++);return n(b)}function m(c){try{return o?n(o.randomBytes(d)):(a.crypto.getRandomValues(c=new Uint8Array(d)),n(c))}catch(e){return[+new Date,a,(c=a.navigator)&&c.plugins,a.screen,n(b)]}}function n(a){return String.fromCharCode.apply(0,a)}var o,p=c.pow(d,e),q=c.pow(2,f),r=2*q,s=d-1,t=c["seed"+i]=function(a,f,g){var h=[];f=1==f?{entropy:!0}:f||{};var o=l(k(f.entropy?[a,n(b)]:null==a?m():a,3),h),s=new j(h);return l(n(s.S),b),(f.pass||g||function(a,b,d){return d?(c[i]=a,b):a})(function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="fr"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <meta name="description" content="Compte a rebours pour le daily"> | |
| <style> | |
| .countdown-container { | |
| display: block; | |
| width:200px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { | |
| EMPTY, | |
| of, | |
| } = require("rxjs"); | |
| const { | |
| filter, | |
| map, | |
| mergeMap, | |
| } = require("rxjs/operators"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| navigator.requestMediaKeySystemAccess("com.microsoft.playready", [ | |
| { | |
| "initDataTypes":["cenc"], | |
| "videoCapabilities": [ | |
| { "contentType": "video/mp4;codecs=\"avc1.4d401e\"" }, | |
| { "contentType":"video/mp4;codecs=\"avc1.42e01e\"" }, | |
| { "contentType":"video/webm;codecs=\"vp8\"" } | |
| ], | |
| "audioCapabilities": [ | |
| { "contentType":"audio/mp4;codecs=\"mp4a.40.2\"" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setTimeout(() => { | |
| console.log("timeout1"); | |
| }, 0); | |
| function toto() { | |
| Promise.resolve().then(() => { | |
| console.log("promise2"); | |
| }); | |
| } | |
| function titi() { | |
| console.log(7); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Pretty print a TimeRanges Object, to see the current content of it in a | |
| * one-liner string. | |
| * | |
| * @param {TimeRanges} buffered | |
| * @returns {string} | |
| * @example | |
| * This function is called by giving it directly the TimeRanges, such as: | |
| * ```js | |
| * prettyPrintBuffered(document.getElementsByTagName("video")[0].buffered); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Player Tools | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.3.0 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://www.youtube.com/* | |
| // @match https://www.primevideo.com/* | |
| // @match http://127.0.0.1:8000/ | |
| // @grant none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Translate groups of 4 big-endian bytes to Integer. | |
| * @param {Uint8Array} bytes | |
| * @param {Number} offset - The offset (from the start of the given array) | |
| * @returns {Number} | |
| */ | |
| function be4toi(bytes, offset) { | |
| return ( | |
| (bytes[offset + 0] * 0x1000000) + | |
| (bytes[offset + 1] * 0x0010000) + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const INIT_AUDIO_URL = "https://bitmovin-a.akamaihd.net/content/sintel/audio/stereo/en/128kbit/init.mp4"; | |
| const INIT_VIDEO_URL = "https://bitmovin-a.akamaihd.net/content/sintel/video/500kbit/init.mp4"; | |
| const VIDEO_SEGMENTS = [ | |
| "https://bitmovin-a.akamaihd.net/content/sintel/video/500kbit/segment_1.m4s", | |
| ]; | |
| const AUDIO_SEGMENTS = [ | |
| "https://bitmovin-a.akamaihd.net/content/sintel/audio/stereo/en/128kbit/segment_1.m4s", | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pb = function prettifyBuffered(buffered) { | |
| var str = ""; | |
| var start, end, fixedStart, fixedEnd, fixedDuration, nextStart, fixedDiff; | |
| for (var i = 0; i < buffered.length; i++) { | |
| start = buffered.start(i); | |
| end = buffered.end(i); | |
| fixedStart = start.toFixed(2); | |
| fixedEnd = end.toFixed(2); | |
| fixedDuration = (end - start).toFixed(2); | |
| str += `|${fixedStart}----(${fixedDuration})----|${fixedEnd}`; |