Download node_modules/jquery/src/dimensions.js from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/dimensions.js
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/node_modules/jquery/src/dimensions.js
-
curl -L -o dimensions.js https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/dimensions.js
1.76 kB
| define( [ | |
| "./core", | |
| "./core/access", | |
| "./var/isWindow", | |
| "./css" | |
| ], function( jQuery, access, isWindow ) { | |
| ; | |
| // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods | |
| jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { | |
| jQuery.each( { | |
| padding: "inner" + name, | |
| content: type, | |
| "": "outer" + name | |
| }, function( defaultExtra, funcName ) { | |
| // Margin is only for outerHeight, outerWidth | |
| jQuery.fn[ funcName ] = function( margin, value ) { | |
| var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), | |
| extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); | |
| return access( this, function( elem, type, value ) { | |
| var doc; | |
| if ( isWindow( elem ) ) { | |
| // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) | |
| return funcName.indexOf( "outer" ) === 0 ? | |
| elem[ "inner" + name ] : | |
| elem.document.documentElement[ "client" + name ]; | |
| } | |
| // Get document width or height | |
| if ( elem.nodeType === 9 ) { | |
| doc = elem.documentElement; | |
| // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], | |
| // whichever is greatest | |
| return Math.max( | |
| elem.body[ "scroll" + name ], doc[ "scroll" + name ], | |
| elem.body[ "offset" + name ], doc[ "offset" + name ], | |
| doc[ "client" + name ] | |
| ); | |
| } | |
| return value === undefined ? | |
| // Get width or height on the element, requesting but not forcing parseFloat | |
| jQuery.css( elem, type, extra ) : | |
| // Set width or height on the element | |
| jQuery.style( elem, type, value, extra ); | |
| }, type, chainable ? margin : undefined, chainable ); | |
| }; | |
| } ); | |
| } ); | |
| return jQuery; | |
| } ); | |