mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-01 06:51:32 +00:00
add warning if people aren't using the correct version of extensions
This commit is contained in:
parent
dc1c0fad1a
commit
ddb7597629
4
dist/ext/ajax-header.js
vendored
4
dist/ext/ajax-header.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('ajax-header', {
|
||||
onEvent: function (name, evt) {
|
||||
if (name === "htmx:configRequest") {
|
||||
|
4
dist/ext/alpine-morph.js
vendored
4
dist/ext/alpine-morph.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('alpine-morph', {
|
||||
isInlineSwap: function (swapStyle) {
|
||||
return swapStyle === 'morph';
|
||||
|
5
dist/ext/class-tools.js
vendored
5
dist/ext/class-tools.js
vendored
@ -1,5 +1,10 @@
|
||||
(function () {
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
function splitOnWhitespace(trigger) {
|
||||
return trigger.split(/\s+/);
|
||||
}
|
||||
|
4
dist/ext/client-side-templates.js
vendored
4
dist/ext/client-side-templates.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('client-side-templates', {
|
||||
transformResponse : function(text, xhr, elt) {
|
||||
|
||||
|
4
dist/ext/debug.js
vendored
4
dist/ext/debug.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('debug', {
|
||||
onEvent: function (name, evt) {
|
||||
if (console.debug) {
|
||||
|
6
dist/ext/disable-element.js
vendored
6
dist/ext/disable-element.js
vendored
@ -1,5 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
// Disable Submit Button
|
||||
htmx.defineExtension('disable-element', {
|
||||
onEvent: function (name, evt) {
|
||||
|
4
dist/ext/event-header.js
vendored
4
dist/ext/event-header.js
vendored
@ -1,4 +1,8 @@
|
||||
(function(){
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
function stringifyEvent(event) {
|
||||
var obj = {};
|
||||
for (var key in event) {
|
||||
|
5
dist/ext/head-support.js
vendored
5
dist/ext/head-support.js
vendored
@ -5,6 +5,11 @@
|
||||
//==========================================================
|
||||
(function(){
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
var api = null;
|
||||
|
||||
function log() {
|
||||
|
4
dist/ext/include-vals.js
vendored
4
dist/ext/include-vals.js
vendored
@ -1,4 +1,8 @@
|
||||
(function(){
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
function mergeObjects(obj1, obj2) {
|
||||
for (var key in obj2) {
|
||||
|
4
dist/ext/json-enc.js
vendored
4
dist/ext/json-enc.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('json-enc', {
|
||||
onEvent: function (name, evt) {
|
||||
if (name === "htmx:configRequest") {
|
||||
|
6
dist/ext/loading-states.js
vendored
6
dist/ext/loading-states.js
vendored
@ -1,4 +1,10 @@
|
||||
;(function () {
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
let loadingStatesUndoQueue = []
|
||||
|
||||
function loadingStateContainer(target) {
|
||||
|
4
dist/ext/method-override.js
vendored
4
dist/ext/method-override.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('method-override', {
|
||||
onEvent: function (name, evt) {
|
||||
if (name === "htmx:configRequest") {
|
||||
|
4
dist/ext/morphdom-swap.js
vendored
4
dist/ext/morphdom-swap.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('morphdom-swap', {
|
||||
isInlineSwap: function(swapStyle) {
|
||||
return swapStyle === 'morphdom';
|
||||
|
5
dist/ext/multi-swap.js
vendored
5
dist/ext/multi-swap.js
vendored
@ -1,5 +1,10 @@
|
||||
(function () {
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
/** @type {import("../htmx").HtmxInternalApi} */
|
||||
var api;
|
||||
|
||||
|
5
dist/ext/path-deps.js
vendored
5
dist/ext/path-deps.js
vendored
@ -1,6 +1,9 @@
|
||||
(function(undefined){
|
||||
'use strict';
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
// Save a reference to the global object (window in the browser)
|
||||
var _root = this;
|
||||
|
||||
|
4
dist/ext/path-params.js
vendored
4
dist/ext/path-params.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('path-params', {
|
||||
onEvent: function(name, evt) {
|
||||
if (name === "htmx:configRequest") {
|
||||
|
4
dist/ext/preload.js
vendored
4
dist/ext/preload.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
// This adds the "preload" extension to htmx. By default, this will
|
||||
// preload the targets of any tags with `href` or `hx-get` attributes
|
||||
// if they also have a `preload` attribute as well. See documentation
|
||||
|
4
dist/ext/rails-method.js
vendored
4
dist/ext/rails-method.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('rails-method', {
|
||||
onEvent: function (name, evt) {
|
||||
if (name === "configRequest.htmx") {
|
||||
|
4
dist/ext/remove-me.js
vendored
4
dist/ext/remove-me.js
vendored
@ -1,4 +1,8 @@
|
||||
(function(){
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
function maybeRemoveMe(elt) {
|
||||
var timing = elt.getAttribute("remove-me") || elt.getAttribute("data-remove-me");
|
||||
if (timing) {
|
||||
|
5
dist/ext/response-targets.js
vendored
5
dist/ext/response-targets.js
vendored
@ -1,5 +1,10 @@
|
||||
(function(){
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
/** @type {import("../htmx").HtmxInternalApi} */
|
||||
var api;
|
||||
|
||||
|
4
dist/ext/restored.js
vendored
4
dist/ext/restored.js
vendored
@ -1,3 +1,7 @@
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
htmx.defineExtension('restored', {
|
||||
onEvent : function(name, evt) {
|
||||
if (name === 'htmx:restored'){
|
||||
|
5
dist/ext/sse.js
vendored
5
dist/ext/sse.js
vendored
@ -7,6 +7,11 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
||||
|
||||
(function() {
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
/** @type {import("../htmx").HtmxInternalApi} */
|
||||
var api;
|
||||
|
||||
|
5
dist/ext/ws.js
vendored
5
dist/ext/ws.js
vendored
@ -6,6 +6,11 @@ This extension adds support for WebSockets to htmx. See /www/extensions/ws.md f
|
||||
|
||||
(function () {
|
||||
|
||||
if (htmx.version && !htmx.version.startsWith("1.")) {
|
||||
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
||||
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
||||
}
|
||||
|
||||
/** @type {import("../htmx").HtmxInternalApi} */
|
||||
var api;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user