GithubHelp home page GithubHelp logo

tti-polyfill's Introduction

Time to Interactive Polyfill

THIS REPOSITORY IS NO LONGER MAINTAINED. Use the official TTI polyfill.

Usage

npm install
npm run generate_polyfill

This should produce gen/ttci.js.

See index.html for how this should be used. You need to include a snippet very early in the page load (src/snippet.js), and the larger polyfill file (gen/ttci.js) should be async loaded.

Minified polyfill

npm run generate_polyfill_minified

Installing as a userscript

If you to see TTCI values of different sites, it may be useful to install it as a userscript:

  • Install a user script runner like tampermonkey on chrome.
  • npm run generate_userscript
  • Add the generated TTI-UserScript.js as a user script.
  • Navigate to a site and keep an eye on devtools console.

Easier Usage if you don't want to change the code

  • Install tampermonkey.
  • Click on extension, then Dashboard, then Utilities.
  • Paste in http://deepanjan.me/tti-polyfill/TTI-Polyfill-UserScript-Generated.js in the URL box and click import to install script.

This version may lag from the tip of tree.

Console output

By default, right now the polyfill is very verbose about what it's doing. You should eventually see something along the lines of First interactive found: $timestamp. The $timestamp is number of miliseconds since navigationStart.

If you want to turn off the chattiness, pass in {debugMode: false} in the FirstInteractiveDetector constructor (which is called in main.js).

tti-polyfill's People

Contributors

deepanjanroy avatar tdresser avatar

Stargazers

Mateusz Tondos avatar Sarath Singapati avatar Wills avatar Teruo Kunihiro avatar Nic Jansma avatar

Watchers

Philip Walton avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.