Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
Add supporting files for 1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
weebney committed Mar 20, 2023
1 parent 9bf3b6c commit 361f22c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/content/cms/copy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const codeBlock = document.getElementById("codeBlock")
const copyButton = document.getElementById("copier")

codeBlock.innerText = '<script src="https://unpkg.com/[email protected].2/tachyon.min.js" integrity="sha384-mWEnITn0upRV8CTm3KnqWW5XKFt7bnWaT6RBKBRIcCPyZx9dxqbAH56ew8NwOTgN" type="module" crossorigin defer></script>';
codeBlock.innerText = '<script src="https://unpkg.com/[email protected].3/tachyon.min.js" integrity="sha384-V5UK6PaMtG5fx05ToAClLlgsvoCVR0KpFYIGKcdw95yKQwRpKnOISeAXVK9EQG/V" type="module" crossorigin defer></script>';

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Easy Setup Instructions:
Using Tachyon is unbelieveably easy. If you're not using node, you can just include it via script tags. Provided below is the script hosted by [unpkg](https://unpkg.com/). The source itself lives in the [tachyon directory](https://github.com/weebney/tachyon/tree/main/tachyon).

```html
<script src="https://unpkg.com/[email protected].2/tachyon.min.js" integrity="sha384-mWEnITn0upRV8CTm3KnqWW5XKFt7bnWaT6RBKBRIcCPyZx9dxqbAH56ew8NwOTgN" type="module" crossorigin defer></script>
<script src="https://unpkg.com/[email protected].3/tachyon.min.js" integrity="sha384-V5UK6PaMtG5fx05ToAClLlgsvoCVR0KpFYIGKcdw95yKQwRpKnOISeAXVK9EQG/V" type="module" crossorigin defer></script>
```

If you look on the website, there are also easy install instructions for [Google Tag Manager](https://fasterthanlight.net/#easy-setup-instructions), [Shopify](https://fasterthanlight.net/#easy-setup-instructions), [WordPress](https://fasterthanlight.net/#easy-setup-instructions), and more.
Expand All @@ -91,7 +91,7 @@ npm i tachyonjs
Tachyon is super tiny, so you can also inline it. If you use the following inlined `<script>` tags, you are waived from the legal requirement to include a copy of the license.

```html
<script type="module" defer>/* tachyon 1.1.2 */var e=document.body.dataset;const n="tachyonWhitelist"in e,o="tachyonSameOrigin"in e,r=e.tachyonTimer||50;let a=null;function i(){a=a?null:this;const t="tachyon";var e=document.getElementById(t);e?e.remove():setTimeout(()=>{var e;a===this&&((e=document.createElement("link")).id=t,e.href=this.href,e.rel="prerender",document.head.appendChild(e))},r)}function t(t){"A"!==t.tagName||!t.href||"tachyon"in t.dataset!=n||o&&t.origin!==window.location.origin||["mouseover","mouseout","touchstart","touchend"].forEach(e=>t.addEventListener(e,i,{passive:!0}))}new MutationObserver(e=>{e.forEach(e=>e.forEach(t))}).observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll("a").forEach(t);</script>
<script type="module" defer>/* tachyon 1.1.3 */var e=document.body.dataset;const o="tachyonWhitelist"in e,n="tachyonSameOrigin"in e,a=e.tachyonTimer||50;let r=null;function i(){r=r?null:this;const t="tachyon";var e=document.getElementById(t);e?e.remove():setTimeout(()=>{var e;r===this&&((e=document.createElement("link")).id=t,e.href=this.href,e.rel="prerender",document.head.appendChild(e))},a)}function t(t){"A"!==t.tagName||!t.href||"tachyon"in t.dataset!=o||n&&t.origin!==window.location.origin||["mouseover","mouseout","touchstart","touchend"].forEach(e=>t.addEventListener(e,i,{passive:!0}))}new MutationObserver(e=>e.forEach(e=>e.addedNodes.forEach(t))).observe(document.body,{childList:!0,subtree:!0}),document.querySelectorAll("a").forEach(t);</script>
```
### Configuration
Expand Down
4 changes: 2 additions & 2 deletions tachyon/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tachyonjs",
"version": "1.1.2",
"description": "Make your site faster than light in <1 minute; instant page loads in 698 bytes.",
"version": "1.1.3",
"description": "Make your site faster than light in <1 minute; instant page loads in 707 bytes.",
"main": "tachyon.js",
"scripts": {
"minify": "uglifyjs -c -m --module --verbose tachyon.js > tachyon.min.js"
Expand Down
2 changes: 1 addition & 1 deletion tachyon/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tachyon
## Make your site faster than light in <1 minute; instant page loads in 698 bytes.
## Make your site faster than light in <1 minute; instant page loads in 707 bytes.

**For documentation related to Tachyon, please reference the [website](https://fasterthanlight.net/) and [github repository](https://github.com/weebney/tachyon).**
2 changes: 1 addition & 1 deletion tachyon/tachyon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// tachyon.js 1.1.2 - @weebney - MIT License
// tachyon.js 1.1.3 - @weebney - MIT License
const bodyDataValues = document.body.dataset;
const whitelistEnabled = 'tachyonWhitelist' in bodyDataValues;
const sameOriginOnly = 'tachyonSameOrigin' in bodyDataValues;
Expand Down
2 changes: 1 addition & 1 deletion tachyon/tachyon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tachyon/wordpress/tachyon.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Tachyon
* Plugin URI: https://fasterthanlight.net/
* Description: Make your WordPress site faster than light.
* Version: 1.1.2
* Version: 1.1.3
* Author: weebney
* Author URI: https://github.com/weebney
* License: MIT
Expand Down
Binary file modified tachyon/wordpress/tachyon.zip
Binary file not shown.

0 comments on commit 361f22c

Please sign in to comment.