Tinkaton is a library that can be used to extract information from popular frontend framework entrypoints on websites.
Important
Tinkaton is a project made to tinker with web projects in an exploratory fashion, so it should be only used for educational purposes!
You can get Tinkaton via NPM:
$ npm install tinkaton
Or directly in the browser:
<!-- IIFE build -->
<script src="https://unpkg.com/tinkaton/dist/tinkaton.global.js"></script>
// If you want to use the ESM build, import Tinkaton
import Tinkaton from "https://unpkg.com/tinkaton/dist/tinkaton.js";
const tinkaton = new Tinkaton();
tinkaton.run(); // returns an array with extracted data for each entrypoint found
If you use the IIFE build tinkaton.global.js
, you do the following:
// Assuming you loaded tinkaton.global.js beforehand, either importing it through a script or another way
const tinkaton = new Tinkaton.default();
tinkaton.run();
Framework | How is it detected? | What is extracted? |
---|---|---|
Alpine.js | Elements with the x-data attribute |
The data instance proxy |
Livewire | Elements with the wire:id attribute |
Livewire snapshot information (from the __livewire property) |
Vue 2 | #app elements with a __vue__ property |
The entire root component |
Vue 3 | #app elements with a __vue_app__ property |
The global properties of the Vue instance |
React | Elements with _reactRootContainer or __reactContainer properties |
All properties passed to components down the element tree |
Stimulus | window.Stimulus being defined |
The global Stimulus instance (window.Stimulus ) |
Turbo | window.Turbo being defined |
The global Turbo instance (window.Turbo ) |
Ember | window.Ember being defined |
The global Ember instance (window.Ember ) |
Backbone | window.Backbone being defined |
The global Backbone instance (window.Backbone ) |
Knockout | window.ko being defined |
The global Knockout instance (window.ko ) |
All element-focused extractors also support being passed a custom selector that will be tested for matching properties!
To work on Tinkaton locally, you need a current version of Node.js and NPM on your development environment.
- Install required dependencies using
npm install
. - Build the project files using
npm run build
. - Check the project code style using:
npm run lint
for ESLintnpm run format-check
for Prettier
If you want to contribute to the project, please check out the Contribution Guidelines!
tinkaton is licensed under aGPL v3.
This project is not affiliated with Game Freak or the Pokémon Company and Tinkaton is solely used as a project name/mascot while all trademarks and copyrights are with their respective holders.