honkoma/priv/static/packs/flavours/glitch/common.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2020-01-22 15:00:23 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[84],{59:function(t,e,n){var a,r;(function(){(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(this);var o=this.Rails;(function(){(function(){var t;t=null,o.loadCSPNonce=function(){var e;return t=null!=(e=document.querySelector("meta[name=csp-nonce]"))?e.content:void 0},o.cspNonce=function(){return null!=t?t:o.loadCSPNonce()}}).call(this),function(){var t;t=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,o.matches=function(e,n){return null!=n.exclude?t.call(e,n.selector)&&!t.call(e,n.exclude):t.call(e,n)},o.getData=function(t,e){var n;return null!=(n=t._ujsData)?n[e]:void 0},o.setData=function(t,e,n){return null==t._ujsData&&(t._ujsData={}),t._ujsData[e]=n},o.$=function(t){return Array.prototype.slice.call(document.querySelectorAll(t))}}.call(this),function(){var t,e,n;t=o.$,n=o.csrfToken=function(){var t;return(t=document.querySelector("meta[name=csrf-token]"))&&t.content},e=o.csrfParam=function(){var t;return(t=document.querySelector("meta[name=csrf-param]"))&&t.content},o.CSRFProtection=function(t){var e;if(null!=(e=n()))return t.setRequestHeader("X-CSRF-Token",e)},o.refreshCSRFTokens=function(){var a,r;if(r=n(),a=e(),null!=r&&null!=a)return t('form input[name="'+a+'"]').forEach(function(t){return t.value=r})}}.call(this),function(){var t,e,n,a;n=o.matches,"function"!=typeof(t=window.CustomEvent)&&((t=function(t,e){var n;return(n=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}).prototype=window.Event.prototype,a=t.prototype.preventDefault,t.prototype.preventDefault=function(){var t;return t=a.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),t}),e=o.fire=function(e,n,a){var r;return r=new t(n,{bubbles:!0,cancelable:!0,detail:a}),e.dispatchEvent(r),!r.defaultPrevented},o.stopEverything=function(t){return e(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},o.delegate=function(t,e,a,r){return t.addEventListener(a,function(t){var a;for(a=t.target;a instanceof Element&&!n(a,e);)a=a.parentNode;if(a instanceof Element&&!1===r.call(a,t))return t.preventDefault(),t.stopPropagation()})}}.call(this),function(){var t,e,n,a,r,i;a=o.cspNonce,e=o.CSRFProtection,o.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},o.ajax=function(t){var e;return t=r(t),e=n(t,function(){var n,a;return a=i(null!=(n=e.response)?n:e.responseText,e.getResponseHeader("Content-Ty
2018-09-16 21:17:34 +00:00
//# sourceMappingURL=common.js.map