Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
croxton committed May 29, 2024
1 parent 995f638 commit e3a034a
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ A core tenet of htmx is to inline implementation details, so that the behaviour

1. Include `booster.min.js` in the `<head>` of your page, right after `htmx`:
```html
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/croxton/htmx-booster-pack@1.1.1/dist/booster.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.12/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/croxton/htmx-booster-pack@1.1.2/dist/booster.min.js"></script>
```

2. Create a folder in the webroot of your project to store your scripts, e.g. `/scripts/boosts/`. Add a `<meta>` tag and set the `basePath` of your folder:
Expand Down
2 changes: 1 addition & 1 deletion dist/booster-pack.min.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class BoosterExt {
next: {}
};
function saveToCache(dom, store) {
let markers = dom.querySelectorAll("[data-" + extension + '], [hx-history-preserve]:not([data-reset="false"])');
let markers = dom.querySelectorAll("[data-" + extension + ']:not([data-reset="false"]), [hx-history-preserve]:not([data-reset="false"])');
if (markers)
for (let i = 0; i < markers.length; ++i)
typeof markers[i].id < "u" && (cache[store][markers[i].id] = markers[i].outerHTML);
Expand Down
2 changes: 1 addition & 1 deletion dist/booster.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BoosterExt {
next: {}
};
function saveToCache(dom, store) {
let markers = dom.querySelectorAll("[data-" + extension + '], [hx-history-preserve]:not([data-reset="false"])');
let markers = dom.querySelectorAll("[data-" + extension + ']:not([data-reset="false"]), [hx-history-preserve]:not([data-reset="false"])');
if (markers)
for (let i = 0; i < markers.length; ++i)
typeof markers[i].id < "u" && (cache[store][markers[i].id] = markers[i].outerHTML);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
}'>
<link rel="stylesheet" href="/styles/styles.css" />
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.12/src/htmx.min.js"></script>
<script src="/main.js" type="module"></script>
</head>
<body hx-ext="booster">
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "htmx-booster-pack",
"version": "1.1.1",
"version": "1.1.2",
"description": "Minimal component framework for htmx",
"type": "module",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
}'>
<link rel="stylesheet" href="/styles/styles.css" />
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.12/src/htmx.min.js"></script>
<script src="/main.js" type="module"></script>
</head>
<body hx-ext="booster">
Expand Down
2 changes: 1 addition & 1 deletion page3.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
}'>
<link rel="stylesheet" href="/styles/styles.css" />
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.12/src/htmx.min.js"></script>
<script src="/main.js" type="module"></script>
</head>
<body hx-ext="booster">
Expand Down
2 changes: 1 addition & 1 deletion page4.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
}'>
<link rel="stylesheet" href="/styles/styles.css" />
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.12/src/htmx.min.js"></script>
<script src="/main.js" type="module"></script>
</head>
<body hx-ext="booster">
Expand Down

0 comments on commit e3a034a

Please sign in to comment.