├── .gitignore ├── CHANGELOG ├── LICENSE.txt ├── Makefile ├── README.md └── src ├── bookmarklet ├── config-local.js ├── config-production.js ├── controller.js ├── index.html └── yslow.css ├── chrome ├── 128.png ├── 16.png ├── 32.png ├── 48.png ├── background.html ├── content.js ├── controller.js ├── icon.png ├── icon19x19.png ├── icon19x19@2x.png ├── icon_color.png ├── manifest.json ├── options.html ├── pref-init.js ├── yslow-chrome-pref.js └── yslow.html ├── common ├── component-bm-ch.js ├── component.js ├── componentSet.js ├── context.js ├── controller.js ├── doc.js ├── license ├── peeler-bm-ch-ph.js ├── peeler.js ├── renderers.js ├── resultset.js ├── rules.js ├── rulesets │ └── sample.js ├── tabview.css ├── util.js ├── version.js ├── view.js ├── yslow.css └── yslow.js ├── firefox ├── chrome.manifest ├── chrome │ ├── content │ │ ├── bindings.xml │ │ ├── browser.xul │ │ ├── exporter.js │ │ ├── platform-ff.js │ │ ├── view.js │ │ ├── yslow-ff-pref.js │ │ ├── yslow-firebug-net.js │ │ ├── yslow-firebug.js │ │ ├── yslow-firefox-net.js │ │ ├── yslow-firefox.js │ │ ├── yslow │ │ │ ├── ad_rules.js │ │ │ ├── component.js │ │ │ ├── img │ │ │ │ └── logo_32x32.png │ │ │ ├── jslintwrapper.js │ │ │ ├── lib │ │ │ │ ├── beautify.js │ │ │ │ ├── cssmin.js │ │ │ │ ├── fulljslint.js │ │ │ │ ├── fulljsmin.js │ │ │ │ └── json2.js │ │ │ ├── net.js │ │ │ ├── peeler.js │ │ │ ├── printable.css │ │ │ ├── tool.css │ │ │ └── tools.js │ │ ├── yslowOptions.xul │ │ └── yslowOverlay.xul │ └── skin │ │ └── yslow.css ├── defaults │ └── preferences │ │ └── yslow.js ├── install.rdf └── license.txt ├── har ├── component.js ├── export.js ├── har-importer.html └── har-importer.js ├── nodejs ├── controller.js ├── executable └── package.json ├── nodeserver └── server.js ├── opera ├── background.js ├── config.xml ├── images │ ├── icon_18.png │ └── icon_64.png ├── includes │ └── injected.js └── index.html ├── phantomjs ├── component.js └── controller.js ├── rhino ├── blank.html ├── controller.js └── env.rhino.1.2.js ├── safari ├── 16.png ├── Icon-32.png ├── Icon-48.png ├── Info.plist ├── Settings.plist ├── global.html ├── injected.js └── update.plist ├── wsh ├── controller.js └── json2.js └── yui └── 3.3.0 ├── build ├── dom │ ├── dom-base-debug.js │ ├── dom-base-min.js │ ├── dom-base.js │ ├── dom-debug.js │ ├── dom-deprecated-debug.js │ ├── dom-deprecated-min.js │ ├── dom-deprecated.js │ ├── dom-min.js │ ├── dom-screen-debug.js │ ├── dom-screen-min.js │ ├── dom-screen.js │ ├── dom-style-debug.js │ ├── dom-style-ie-debug.js │ ├── dom-style-ie-min.js │ ├── dom-style-ie.js │ ├── dom-style-min.js │ ├── dom-style.js │ ├── dom.js │ ├── selector-css2-debug.js │ ├── selector-css2-min.js │ ├── selector-css2.js │ ├── selector-css3-debug.js │ ├── selector-css3-min.js │ ├── selector-css3.js │ ├── selector-debug.js │ ├── selector-min.js │ ├── selector-native-debug.js │ ├── selector-native-min.js │ ├── selector-native.js │ └── selector.js ├── event-custom │ ├── event-custom-base-debug.js │ ├── event-custom-base-min.js │ ├── event-custom-base.js │ ├── event-custom-complex-debug.js │ ├── event-custom-complex-min.js │ ├── event-custom-complex.js │ ├── event-custom-debug.js │ ├── event-custom-min.js │ └── event-custom.js ├── event │ ├── event-base-debug.js │ ├── event-base-ie-debug.js │ ├── event-base-ie-min.js │ ├── event-base-ie.js │ ├── event-base-min.js │ ├── event-base.js │ ├── event-debug.js │ ├── event-delegate-debug.js │ ├── event-delegate-min.js │ ├── event-delegate.js │ ├── event-focus-debug.js │ ├── event-focus-min.js │ ├── event-focus.js │ ├── event-hover-debug.js │ ├── event-hover-min.js │ ├── event-hover.js │ ├── event-key-debug.js │ ├── event-key-min.js │ ├── event-key.js │ ├── event-min.js │ ├── event-mouseenter-debug.js │ ├── event-mouseenter-min.js │ ├── event-mouseenter.js │ ├── event-mousewheel-debug.js │ ├── event-mousewheel-min.js │ ├── event-mousewheel.js │ ├── event-resize-debug.js │ ├── event-resize-min.js │ ├── event-resize.js │ ├── event-synthetic-debug.js │ ├── event-synthetic-min.js │ ├── event-synthetic.js │ ├── event-touch-debug.js │ ├── event-touch-min.js │ ├── event-touch.js │ └── event.js ├── jsonp │ ├── jsonp-debug.js │ ├── jsonp-min.js │ ├── jsonp-url-debug.js │ ├── jsonp-url-min.js │ ├── jsonp-url.js │ └── jsonp.js ├── node │ ├── align-plugin-debug.js │ ├── align-plugin-min.js │ ├── align-plugin.js │ ├── node-base-debug.js │ ├── node-base-min.js │ ├── node-base.js │ ├── node-debug.js │ ├── node-deprecated-debug.js │ ├── node-deprecated-min.js │ ├── node-deprecated.js │ ├── node-event-delegate-debug.js │ ├── node-event-delegate-min.js │ ├── node-event-delegate.js │ ├── node-event-html5-debug.js │ ├── node-event-html5-min.js │ ├── node-event-html5.js │ ├── node-event-simulate-debug.js │ ├── node-event-simulate-min.js │ ├── node-event-simulate.js │ ├── node-load-debug.js │ ├── node-load-min.js │ ├── node-load.js │ ├── node-min.js │ ├── node-pluginhost-debug.js │ ├── node-pluginhost-min.js │ ├── node-pluginhost.js │ ├── node-screen-debug.js │ ├── node-screen-min.js │ ├── node-screen.js │ ├── node-style-debug.js │ ├── node-style-min.js │ ├── node-style.js │ ├── node.js │ ├── shim-plugin-debug.js │ ├── shim-plugin-min.js │ └── shim-plugin.js ├── oop │ ├── oop-debug.js │ ├── oop-min.js │ └── oop.js ├── yql │ ├── yql-debug.js │ ├── yql-min.js │ └── yql.js └── yui │ ├── features-debug.js │ ├── features-min.js │ ├── features.js │ ├── get-debug.js │ ├── get-min.js │ ├── get.js │ ├── intl-base-debug.js │ ├── intl-base-min.js │ ├── intl-base.js │ ├── rls-debug.js │ ├── rls-min.js │ ├── rls.js │ ├── yui-base-debug.js │ ├── yui-base-min.js │ ├── yui-base.js │ ├── yui-debug.js │ ├── yui-later-debug.js │ ├── yui-later-min.js │ ├── yui-later.js │ ├── yui-log-debug.js │ ├── yui-log-min.js │ ├── yui-log.js │ ├── yui-min.js │ ├── yui-throttle-debug.js │ ├── yui-throttle-min.js │ ├── yui-throttle.js │ └── yui.js └── license /.gitignore: -------------------------------------------------------------------------------- 1 | .svn/ 2 | _site/ 3 | build/ 4 | pkg/ 5 | *.swp 6 | .DS_Store 7 | node_modules/ 8 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | Version 3.1.8 2 | ------------- 3 | * Custom CDNs list entry for PhantomJS. Issue #79 4 | * Fetch assets that are missing from PhantomJS. Issue #76 5 | * Use max-age if exists following 1.1 spec. Issue #74 6 | * ETag IIS7+ compatible. Issue #66 7 | * Location header fix; add YSlow version to beacon; valid protocols check. Issue #65 8 | * Absolute url, fix for @import relative css. Issue #75 9 | * Test failures count to PhantomJS exit status code 10 | 11 | Version 3.1.7 12 | ------------- 13 | * Fixed Firebug 1.12 compatibility issue thanks to Honza 14 | 15 | Version 3.1.6 16 | ------------- 17 | * Fixed bookmarklet yql response *result* on headers. Thanks @souders 18 | 19 | Version 3.1.5 20 | ------------- 21 | * Added onerror handler to PhantomJS 22 | 23 | Version 3.1.4 24 | ------------- 25 | * Fixed Firebug init issue 26 | 27 | Version 3.1.3 28 | ------------- 29 | * Fixed Firefox issue https://bugzilla.mozilla.org/show_bug.cgi?id=777397 30 | 31 | Version 3.1.2 32 | ------------- 33 | * Compatible with Firebug 1.10.0 34 | * Updated Twitter bird and username 35 | * Updated Speedometer URL 36 | * Update CDN list 37 | 38 | Version 3.1.1 39 | ------------- 40 | * Added PhantomJS integration 41 | * Added YSlow testing framework with TAP output format 42 | * Command-line HAR: error output same as --format 43 | * Command-line HAR: error thrown when doc is not found 44 | 45 | Version 3.1.0 46 | ------------- 47 | * Fixed har importer edge cases 48 | * Issue #7 and #9: parsing of url values 49 | * Issue #6: more CDNs 50 | * Issue #5: correct beaconInfo preference 51 | 52 | Version 3.0.9 53 | ------------- 54 | * Firefox 9-11 compatible 55 | 56 | Version 3.0.8 57 | ------------- 58 | * Mobile viewport bugfix, wider on mobile optimized pages 59 | * NodeJS releaase as NPM package 60 | 61 | Version 3.0.7 62 | ------------- 63 | * NodeJS command line support 64 | * Mobile viewport bugfix, wider on mobile optimized pages 65 | 66 | Version 3.0.6 67 | ------------- 68 | * Removing preferences initialization from injected JS to avoid localStorage polution 69 | 70 | Version 3.0.5 71 | ------------- 72 | * Repackaging Chrome, missing options.html 73 | 74 | Version 3.0.4 75 | ------------- 76 | * Fixed Firebug issues: 77 | * FirebugContext removed from latest versions 78 | * Broken "Run Test" button 79 | * Custom CDN loading during initalization 80 | * Fixed empty page when clicking tools on FF5/Win 81 | * New feature: one-click-add-cdn to CDN custom list 82 | * Options/Preferences available on Chrome 83 | 84 | Version 3.0.3 85 | ------------- 86 | 87 | * Added cdn checking from HTTP headers: Server and X-CDN (currently cloudflare) 88 | * Added Social support: Sharing YSlow results through Twitter and Facebook 89 | * Like (Facebook) and Follow (Twitter) links on help menu 90 | 91 | 92 | Version 3.0.2 93 | ------------- 94 | 95 | * YSlow version available on Help; 96 | * Presentation refactoring, using inline images. 97 | * Fixed Chrome open new window bug due to odd screen available height 98 | 99 | 100 | Version 3.0.1 101 | ------------- 102 | 103 | * Warning on blocked pages where YSlow can't run, such as: about:config, chrome://extensions and Google Chrome Extensions pages (https://chrome.google.com/); 104 | * Wait until the page is fully loaded before analyzing it; 105 | * More accurate cookies size for all domains involved on the page; 106 | * Enhanced summary per domain on CDN and DNS lookup rules; 107 | * Fixed some minor bugs on some rules (favicon, image scale, 404, etc). 108 | 109 | 110 | Version 3.0.0 (beta release) 111 | ---------------------------- 112 | 113 | * Feel at home. We have kept the user experience consistent with YSlow for Firefox; 114 | * Added the ability to detect post onload components, including for pages that prevent itself from being embedded and/or iframed (experimental); 115 | * Support for 3 main rulesets: default YSlow V2, Classic V1 and Small Site or Blog and the ability to create new ones based on these 3; 116 | * Offenders in CDN rule are now listed as domains only; 117 | * Runs multiple YSlow instances (new windows). This feature is excellent for comparing YSlow results for different pages side-by-side as shown below. 118 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Yahoo! Inc. All rights reserved. 2 | 3 | Redistribution and use of this software in source and binary forms, 4 | with or without modification, are permitted provided that the following 5 | conditions are met: 6 | 7 | * Redistributions of source code must retain the above 8 | copyright notice, this list of conditions and the 9 | following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the 13 | following disclaimer in the documentation and/or other 14 | materials provided with the distribution. 15 | 16 | * Neither the name of Yahoo! Inc. nor the names of its 17 | contributors may be used to endorse or promote products 18 | derived from this software without specific prior 19 | written permission of Yahoo! Inc. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 22 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 24 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | YSlow 2 | ===== 3 | 4 | YSlow analyzes web pages and suggests ways to improve their performance based on a set of [rules for high performance web pages](http://developer.yahoo.com/performance/rules.html). 5 | 6 | ### Building 7 | 8 | All flavors: 9 | 10 | make 11 | 12 | Specific flavor: 13 | 14 | make 15 | 16 | Available flavors: 17 | 18 | * **firefox**: Mozilla [Firefox add-on](https://addons.mozilla.org/en-US/firefox/) 19 | * **chrome**: Google [Chrome extension](https://chrome.google.com/webstore/category/extensions) 20 | * **bookmarklet**: Mobile/Desktop browser [bookmarklet](http://en.wikipedia.org/wiki/Bookmarklet) 21 | * **opera**: [Opera extension](http://extensions.opera.com/) 22 | * **safari**: Apple [Safari extension](http://extensions.apple.com/) 23 | * **nodejs**: Command line for [HAR](http://www.softwareishard.com/blog/har-12-spec/) files powered by [Node.JS](http://nodejs.org/) and [NPM](http://npmjs.org/) 24 | * **phantomjs**: Command line with headless [WebKit](http://www.webkit.org/) powered by [PhantomJS](http://www.phantomjs.org/) 25 | * **nodeserver**: Node.JS Server powered by [express](http://expressjs.com/) 26 | 27 | e.g.: 28 | 29 | make chrome 30 | 31 | ### Packaging 32 | 33 | All flavors: 34 | 35 | make pkg 36 | 37 | Specific flavor: 38 | 39 | make pkg- 40 | 41 | e.g: 42 | 43 | make pkg-firefox 44 | 45 | More Info 46 | --------- 47 | 48 | [yslow.org](http://yslow.org) 49 | 50 | Licensing 51 | --------- 52 | 53 | Copyright (c) 2012, Yahoo! Inc. All rights reserved. 54 | Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 55 | Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 56 | 57 | 58 | [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/marcelduran/yslow/trend.png)](https://bitdeli.com/free "Bitdeli Badge") 59 | 60 | -------------------------------------------------------------------------------- /src/bookmarklet/config-local.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YUI*/ 8 | 9 | YUI.add('yslow-config', function (Y) { 10 | Y.namespace('YSLOW').config = { 11 | /* make sure host has trailing slash */ 12 | host: 'http://localhost:8000/', 13 | //host: 'http://secondbelong-lm.corp.yahoo.com:8000/', 14 | /* do no include scheme nor colon and double slashes */ 15 | /* comment out to use the default provided by YUI YQL */ 16 | //yql: 'staging.query.yahooapis.com/v1/public/yql?', 17 | /* yql opentable url */ 18 | /* comment out to use the default YQL community table data.headers */ 19 | //table: 'http://sandbox.javascriptrules.com/yql/data.headers.xml', 20 | js: '{{BOOKMARKLET_JS}}', 21 | css: '{{BOOKMARKLET_CSS}}' 22 | }; 23 | }); 24 | -------------------------------------------------------------------------------- /src/bookmarklet/config-production.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YUI*/ 8 | 9 | YUI.add('yslow-config', function (Y) { 10 | Y.namespace('YSLOW').config = { 11 | /* make sure host has trailing slash */ 12 | host: 'http://yslow.org/', 13 | /* do no include scheme nor colon and double slashes */ 14 | /* comment out to use the default provided by YUI YQL */ 15 | //yql: 'staging.query.yahooapis.com/v1/public/yql?', 16 | /* yql opentable url */ 17 | /* comment out to use the default YQL community table data.headers */ 18 | //table: 'http://yslow.org/data.headers.xml', 19 | js: '{{BOOKMARKLET_JS}}', 20 | css: '{{BOOKMARKLET_CSS}}' 21 | }; 22 | }); 23 | -------------------------------------------------------------------------------- /src/bookmarklet/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YSlow 5 | 6 | 7 | 8 |

YSlow bookmarklet

9 | 10 |

Desktop

11 | 15 | 16 |

Mobile

17 |
    18 |
  1. bookmark this current page
  2. 19 |
  3. edit the bookmark URL and remove everything up to and including the hash ("#") so that the bookmark URL starts with "javascript:"
  4. 20 |
21 | 25 | 35 | 36 | 37 | 42 | -------------------------------------------------------------------------------- /src/bookmarklet/yslow.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | #yslowDiv { 8 | display: block !important; 9 | } 10 | -------------------------------------------------------------------------------- /src/chrome/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/128.png -------------------------------------------------------------------------------- /src/chrome/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/16.png -------------------------------------------------------------------------------- /src/chrome/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/32.png -------------------------------------------------------------------------------- /src/chrome/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/48.png -------------------------------------------------------------------------------- /src/chrome/background.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 33 | 34 | 35 | 40 | -------------------------------------------------------------------------------- /src/chrome/content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW:true, chrome*/ 8 | /*jslint white: true, onevar: true, undef: true, newcap: true, nomen: true, regexp: true, plusplus: true, bitwise: true, browser: true, maxerr: 50, indent: 4 */ 9 | function onRequest(request, sender, callback) { 10 | switch (request.action) { 11 | case 'peel': 12 | callback(YSLOW.peeler.peel(document)); 13 | break; 14 | case 'run': 15 | callback(YSLOW.peeler.getBaseHref(document)); 16 | break; 17 | case 'afterOnload': 18 | YSLOW.ComponentSet.prototype.setAfterOnload(callback, { 19 | docBody: request.docBody, 20 | doc: document, 21 | components: request.components 22 | }); 23 | break; 24 | case 'inlineTags': 25 | callback(YSLOW.util.getInlineTags(document)); 26 | break; 27 | case 'domElementsCount': 28 | callback(YSLOW.util.countDOMElements(document)); 29 | break; 30 | case 'getDocCookies': 31 | callback(YSLOW.util.getDocCookies(document)); 32 | break; 33 | case 'injected': 34 | callback(YSLOW.util.setInjected(document, 35 | request.components, request.docBody)); 36 | break; 37 | } 38 | } 39 | 40 | chrome.extension.onRequest.addListener(onRequest); 41 | -------------------------------------------------------------------------------- /src/chrome/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/icon.png -------------------------------------------------------------------------------- /src/chrome/icon19x19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/icon19x19.png -------------------------------------------------------------------------------- /src/chrome/icon19x19@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/icon19x19@2x.png -------------------------------------------------------------------------------- /src/chrome/icon_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/chrome/icon_color.png -------------------------------------------------------------------------------- /src/chrome/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "YSlow", 3 | "version": "{{YSLOW_VERSION}}", 4 | "description": "YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.", 5 | "icons": { 6 | "128": "128.png", 7 | "16": "16.png", 8 | "32": "32.png", 9 | "48": "48.png" 10 | }, 11 | "browser_action": { 12 | "name": "YSlow", 13 | "default_icon": { 14 | "19": "icon38x19.png", 15 | "38": "icon38x19@2x.png" 16 | }, 17 | }, 18 | "background_page": "background.html", 19 | "options_page": "options.html", 20 | "content_scripts": [{ 21 | "matches": [ 22 | "http://*/*", 23 | "https://*/*" 24 | ], 25 | "js": [ 26 | "content.js", 27 | "yslow-chrome.js" 28 | ] 29 | }], 30 | "permissions": [ 31 | "tabs", 32 | "cookies", 33 | "http://*/*", 34 | "https://*/*" 35 | ] 36 | } -------------------------------------------------------------------------------- /src/chrome/pref-init.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | // initialize defaults 8 | (function () { 9 | var i, len, item, value, 10 | pref = YSLOW.util.Preference, 11 | items = [ 12 | {'name': 'extensions.yslow.optinBeacon', 'value': false}, 13 | {'name': 'extensions.yslow.beaconUrl', 'value': 'http://rtblab.pclick.yahoo.com/images/ysb.gif'}, 14 | {'name': 'extensions.yslow.beaconInfo', 'value': 'basic'}, 15 | {'name': 'extensions.yslow.excludeBeaconsFromLint', 'value': true}, 16 | {'name': 'extensions.yslow.excludeAfterOnload', 'value': true}, 17 | {'name': 'extensions.yslow.smushItURL', 'value': 'http://www.smushit.com/ysmush.it'}, 18 | {'name': 'extensions.yslow.minFutureExpiresSeconds', 'value': 172800}, 19 | {'name': 'extensions.yslow.cdnHostnames', 'value': ''} 20 | ]; 21 | 22 | for (i = 0, len = items.length; i < len; i += 1) { 23 | item = items[i]; 24 | value = pref.getPref(item.name); 25 | if (value === null || typeof value === 'undefined') { 26 | pref.setPref(item.name, item.value); 27 | } 28 | } 29 | }()); 30 | 31 | -------------------------------------------------------------------------------- /src/chrome/yslow-chrome-pref.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW, Components*/ 8 | /*jslint white: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */ 9 | 10 | /** 11 | * This class implement YSLOW.util.Preferences for Chrome. 12 | * @class 13 | * @static 14 | */ 15 | 16 | YSLOW.util.Preference.registerNative({ 17 | prefDomain: 'extensions.yslow.', 18 | 19 | /** 20 | * Normalize preference name with domain name 21 | * @param {String} name preference name 22 | * @return {String} normalized name 23 | */ 24 | normalizeName: function (name) { 25 | var prefDomain = this.prefDomain; 26 | 27 | if (name.indexOf(prefDomain) !== 0) { 28 | return prefDomain + name; 29 | } 30 | 31 | return name; 32 | }, 33 | 34 | /** 35 | * Get Preference with default value. If the preference does not exist, 36 | * return the passed defaultValue. 37 | * @param {String} name preference name 38 | * @param defaultValue value to return if no preference is found. 39 | * @return preference value or default value. 40 | */ 41 | getPref: function (name, defaultValue) { 42 | var val; 43 | 44 | name = this.normalizeName(name); 45 | val = localStorage.getItem(name); 46 | 47 | return ((typeof val === 'undefined') ? defaultValue : val); 48 | }, 49 | 50 | /** 51 | * Get child preference list in branch. 52 | * @param {String} branchName branch name 53 | * @param defaultValue value to return if no preference is found. 54 | * @return array of preference name/value pairs. 55 | */ 56 | getPrefList: function (branchName, defaultValue) { 57 | var item, 58 | values = []; 59 | 60 | branchName = this.normalizeName(branchName || ''); 61 | for (item in localStorage) { 62 | if (localStorage.hasOwnProperty(item) && 63 | item.indexOf(branchName) === 0) { 64 | values.push({ 65 | 'name': item, 66 | 'value': localStorage.getItem(item) 67 | }); 68 | } 69 | } 70 | 71 | return (values.length ? values : defaultValue); 72 | }, 73 | 74 | /** 75 | * Set Preference. 76 | * @param {String} name preference name 77 | * @param {String} value preference value 78 | */ 79 | setPref: function (name, value) { 80 | name = this.normalizeName(name); 81 | localStorage.setItem(name, value); 82 | }, 83 | 84 | /** 85 | * Delete Preference with passed name. 86 | * @param {String} name name of preference to be deleted 87 | */ 88 | deletePref: function (name) { 89 | name = this.normalizeName(name); 90 | localStorage.removeItem(name); 91 | }, 92 | 93 | initialize: function (items) { 94 | } 95 | }); 96 | -------------------------------------------------------------------------------- /src/chrome/yslow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /src/common/component-bm-ch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /** 8 | * Parse details (HTTP headers, content, etc) from a 9 | * given source and set component properties. 10 | * @param o The object containing component details. 11 | */ 12 | YSLOW.Component.prototype.setComponentDetails = function (o) { 13 | var comp = this, 14 | 15 | parseComponent = function (component) { 16 | var headerName, h, i, len, m, 17 | reHeader = /^([^:]+):\s*([\s\S]+)$/, 18 | headers = component.rawHeaders; 19 | 20 | // copy from the response object 21 | comp.status = component.status; 22 | comp.raw_headers = headers; 23 | if (component.headers) { 24 | for (headerName in component.headers) { 25 | if (component.headers.hasOwnProperty(headerName)) { 26 | comp.headers[headerName.toLowerCase()] = component.headers[headerName]; 27 | } 28 | } 29 | } else if (typeof headers === 'string') { 30 | h = headers.split('\n'); 31 | for (i = 0, len = h.length; i < len; i += 1) { 32 | m = reHeader.exec(h[i]); 33 | if (m) { 34 | comp.headers[m[1].toLowerCase()] = m[2]; 35 | } 36 | } 37 | } 38 | comp.req_headers = {}; 39 | comp.method = 'GET'; 40 | comp.body = component.content || component.body || ''; 41 | comp.type = component.type; 42 | // for security checking 43 | comp.response_type = comp.type; 44 | comp.cookie = comp.headers['set-cookie'] || ''; 45 | comp.nsize = parseInt(comp.headers['content-length'], 10) || 46 | comp.body.length; 47 | comp.respTime = 0; 48 | if (component.after_onload) { 49 | comp.after_onload = component.after_onload; 50 | } 51 | if (typeof component.injected !== 'undefined') { 52 | comp.injected = component.injected; 53 | } 54 | if (typeof component.defer !== 'undefined') { 55 | comp.defer = component.defer; 56 | } 57 | if (typeof component.async !== 'undefined') { 58 | comp.async = component.async; 59 | } 60 | 61 | comp.populateProperties(); 62 | 63 | comp.get_info_state = 'DONE'; 64 | 65 | // notify parent ComponentSet that this 66 | // component has gotten net response. 67 | comp.parent.onComponentGetInfoStateChange({ 68 | 'comp': comp, 69 | 'state': 'DONE' 70 | }); 71 | }; 72 | 73 | parseComponent(o.component); 74 | }; 75 | -------------------------------------------------------------------------------- /src/common/license: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 4 | */ 5 | -------------------------------------------------------------------------------- /src/common/peeler-bm-ch-ph.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW*/ 8 | 9 | YSLOW.peeler.peel = function (node) { 10 | var url, docs, doc, doct, baseHref, 11 | comps = []; 12 | 13 | try { 14 | // Find all documents in the window. 15 | docs = this.findDocuments(node); 16 | 17 | for (url in docs) { 18 | if (docs.hasOwnProperty(url)) { 19 | doc = docs[url]; 20 | if (doc) { 21 | // add the document. 22 | comps.push({ 23 | type: doc.type, 24 | href: url 25 | }); 26 | 27 | doct = doc.document; 28 | if (doct && url) { 29 | baseHref = this.getBaseHref(doct); 30 | comps = comps.concat(this.findComponentsInNode(doct, 31 | baseHref, doc.type)); 32 | } 33 | } 34 | } 35 | } 36 | } catch (err) { 37 | YSLOW.util.dump(err); 38 | YSLOW.util.event.fire('peelError', { 39 | 'message': err 40 | }); 41 | } 42 | 43 | return comps; 44 | }; 45 | -------------------------------------------------------------------------------- /src/common/resultset.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW*/ 8 | /*jslint white: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */ 9 | 10 | /** 11 | * ResultSet class 12 | * @constructor 13 | * @param {Array} results array of lint result 14 | * @param {Number} overall_score overall score 15 | * @param {YSLOW.Ruleset} ruleset_applied Ruleset used to generate the result. 16 | */ 17 | YSLOW.ResultSet = function (results, overall_score, ruleset_applied) { 18 | this.ruleset_applied = ruleset_applied; 19 | this.overall_score = overall_score; 20 | this.results = results; 21 | }; 22 | 23 | YSLOW.ResultSet.prototype = { 24 | 25 | /** 26 | * Get results array from ResultSet. 27 | * @return results array 28 | * @type Array 29 | */ 30 | getResults: function () { 31 | return this.results; 32 | }, 33 | 34 | /** 35 | * Get ruleset applied from ResultSet 36 | * @return ruleset applied 37 | * @type YSLOW.Ruleset 38 | */ 39 | getRulesetApplied: function () { 40 | return this.ruleset_applied; 41 | }, 42 | 43 | /** 44 | * Get overall score from ResultSet 45 | * @return overall score 46 | * @type Number 47 | */ 48 | getOverallScore: function () { 49 | return this.overall_score; 50 | } 51 | 52 | }; 53 | -------------------------------------------------------------------------------- /src/common/rulesets/sample.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Custom ruleset must be placed in this directory as rulseset_name.js 3 | * 4 | * Here is a very simplified snippet for registering a new rules and ruleset: 5 | * 6 | * YSLOW.registerRule({ 7 | * id: 'foo-rule1', 8 | * name: 'Sample Test #1', 9 | * info: 'How simple is that?', 10 | * 11 | * lint: function (doc, cset, config) { 12 | * return { 13 | * score: 90, 14 | * message: 'close but no cigar', 15 | * components: ['element1'] 16 | * }; 17 | * } 18 | * }); 19 | * 20 | * YSLOW.registerRuleset({ 21 | * id: 'foo', 22 | * name: 'Foobar Ruleset', 23 | * rules: { 24 | * 'foo-rule1': {} 25 | * }, 26 | * weights: { 27 | * 'foo-rule1': 3 28 | * } 29 | * }); 30 | * 31 | */ 32 | -------------------------------------------------------------------------------- /src/common/version.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 4 | */ 5 | 6 | YSLOW.version = '{{YSLOW_VERSION}}'; 7 | -------------------------------------------------------------------------------- /src/firefox/chrome.manifest: -------------------------------------------------------------------------------- 1 | content yslow chrome/content/ 2 | skin yslow classic/1.0 chrome/skin/ 3 | overlay chrome://browser/content/browser.xul chrome://yslow/content/browser.xul 4 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/bindings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | 13 | 14 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/platform-ff.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW, Components*/ 8 | /*jslint white: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true */ 9 | 10 | YSLOW.util.evalInSandbox = function (text) { 11 | var s = new Components.utils.Sandbox("about:blank"); 12 | 13 | return Components.utils.evalInSandbox("(" + text + ")", s); 14 | }; 15 | 16 | YSLOW.util.setTimer = function (callback, delay) { 17 | var timer, 18 | event = { 19 | notify: function (timer) { 20 | try { 21 | callback.call(); 22 | } catch (e) { 23 | YSLOW.util.dump(e); 24 | } 25 | } 26 | }; 27 | 28 | // Now it is time to create the timer... 29 | timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); 30 | 31 | delay = delay || 0; 32 | 33 | // ... and to initialize it, we want to call event.notify() ... 34 | // ... one time after exactly ten second. 35 | timer.initWithCallback(event, delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT); 36 | }; 37 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/view.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /** 8 | * Load CSS needed for YSlow UI. 9 | * @param {Document} doc Document to load the CSS files. 10 | */ 11 | YSLOW.view.prototype.loadCSS = function (doc) { 12 | YSLOW.util.loadCSS('chrome://yslow/content/yslow/tabview.css', doc); 13 | YSLOW.util.loadCSS('chrome://yslow/content/yslow/yslow.css', doc); 14 | }; 15 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/yslow/component.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /** 8 | * Parse details (HTTP headers, content, etc) from 9 | * component response and set as properties. 10 | */ 11 | YSLOW.Component.prototype.setComponentDetails = function () { 12 | var comp = this, 13 | 14 | parseResponse = function (response) { 15 | var headerName; 16 | 17 | // copy from the response object 18 | comp.status = response.status; 19 | for (headerName in response.headers) { 20 | if (response.headers.hasOwnProperty(headerName)) { 21 | comp.headers[headerName.toLowerCase()] = response.headers[headerName]; 22 | } 23 | } 24 | comp.raw_headers = response.raw_headers; 25 | if (response.req_headers) { 26 | comp.req_headers = {}; 27 | for (headerName in response.req_headers) { 28 | if (response.req_headers.hasOwnProperty(headerName)) { 29 | comp.req_headers[headerName.toLowerCase()] = response.req_headers[headerName]; 30 | } 31 | } 32 | } 33 | comp.body = (response.body !== null) ? response.body : ''; 34 | if (typeof response.method === 'string') { 35 | comp.method = response.method; 36 | } 37 | if ((comp.type === 'unknown' && response.type !== undefined) || (comp.type === 'doc' && (response.type !== undefined && response.type !== 'unknown'))) { 38 | comp.type = response.type; 39 | } 40 | // for security checking 41 | comp.response_type = response.type; 42 | if (typeof response.cookie === 'string') { 43 | comp.cookie = response.cookie; 44 | } 45 | if (typeof response.size === 'number' && response.size > 0) { 46 | comp.nsize = response.size; 47 | } 48 | if (typeof response.respTime !== 'undefined') { 49 | comp.respTime = response.respTime; 50 | } 51 | if (typeof response.startTimestamp !== 'undefined' && comp.parent.onloadTimestamp !== null) { 52 | comp.after_onload = (response.startTimestamp > comp.parent.onloadTimestamp); 53 | } else if (typeof response.after_onload !== 'undefined') { 54 | comp.after_onload = response.after_onload; 55 | } 56 | 57 | comp.populateProperties(true); 58 | 59 | comp.get_info_state = 'DONE'; 60 | 61 | // notify parent ComponentSet that this component has gotten net response. 62 | comp.parent.onComponentGetInfoStateChange({ 63 | 'comp': comp, 64 | 'state': 'DONE' 65 | }); 66 | }; 67 | 68 | YSLOW.net.getInfo(comp.url, parseResponse, 69 | (comp.type.indexOf('image') > -1)); 70 | }; 71 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/yslow/img/logo_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/firefox/chrome/content/yslow/img/logo_32x32.png -------------------------------------------------------------------------------- /src/firefox/chrome/content/yslow/peeler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW*/ 8 | /*jslint white: true, onevar: true, undef: true, nomen: true, regexp: true, plusplus: true, bitwise: true, newcap: true, maxerr: 50, indent: 4 */ 9 | 10 | YSLOW.peeler.peel = function (node, onloadTimestamp) { 11 | var url, docs, doc, doct, base_href, objs, cset; 12 | 13 | try { 14 | if (!(cset = new YSLOW.ComponentSet(node, 15 | onloadTimestamp))) { 16 | return; 17 | } 18 | 19 | // Find all documents in the window. 20 | docs = this.findDocuments(node); 21 | 22 | for (url in docs) { 23 | if (docs.hasOwnProperty(url)) { 24 | doc = docs[url]; 25 | if (doc) { 26 | doct = doc.document; 27 | 28 | base_href = this.getBaseHref(doct); 29 | 30 | // add the document. 31 | cset.addComponent(url, doc.type, base_href); 32 | 33 | objs = this.findComponentsInNode(doct, base_href, doc.type); 34 | this.addComponents(cset, objs, base_href); 35 | } 36 | } 37 | } 38 | 39 | this.addComponentsNotInNode(cset, base_href); 40 | 41 | // set page info to avoid using doc on rules 42 | // this was necessary due to issues with direct access to 43 | // document on chrome/bookmarklet/har, ff is ok but needs 44 | // to be cross browser consistent 45 | cset.inline = YSLOW.util.getInlineTags(node); 46 | cset.domElementsCount = YSLOW.util.countDOMElements(node); 47 | cset.cookies = YSLOW.util.getDocCookies(node); 48 | cset.components = YSLOW.util.setInjected(node, cset.components, 49 | cset.doc_comp.body); 50 | } catch (err) { 51 | YSLOW.util.dump('YSLOW.peeler.peel', err); 52 | YSLOW.util.event.fire('peelError', { 53 | 'message': err 54 | }); 55 | } 56 | 57 | return cset; 58 | }; 59 | 60 | /** 61 | * @private 62 | * Add an array of obj in the passed component set. 63 | * @param {YSLOW.ComponentSet} cset ComponentSet object 64 | * @param {Array} comps array of objects to be added to ComponentSet. 65 | * @param {String} baseHref base href 66 | */ 67 | YSLOW.peeler.addComponents = function (cset, comps, baseHref) { 68 | var i, len, comp; 69 | 70 | for (i = 0, len = comps.length; i < len; i += 1) { 71 | comp = comps[i]; 72 | if (typeof comp.type === 'string' && typeof comp.href === 'string') { 73 | cset.addComponent(comp.href, comp.type, 74 | comp.base || baseHref, { 75 | obj: comp.obj, 76 | comp: comp 77 | }); 78 | } 79 | } 80 | }; 81 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/yslow/tool.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /* jslint window */ 8 | .titleheader { font-weight: bold; font-family: Arial, Tahoma, sans-serif; } 9 | .bailed { color: #C00; font-weight: bold; font-size: 1.1em; margin-top: 8px; font-family: Arial; } 10 | .scriptheader { background: #FBB; padding: 8px; border-bottom: 1px solid #C00; font-family: Arial; } 11 | .jserrorOdd { padding-left: 20px; margin-bottom: 4px; background: #FFF; } 12 | .jserrorEven { padding-left: 20px; margin-bottom: 4px; background: #EEE; } 13 | 14 | /* allxxx window */ 15 | .gentitleheader { font-weight: bold; font-family: Arial, Tahoma, sans-serif; font-size: 2em;} 16 | .blockheader { background: #dfdfdf; font-weight: bold; font-size: 1.1em; padding: 10px 20px; margin: 10px 0; } 17 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/yslowOptions.xul: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/firefox/chrome/content/yslowOverlay.xul: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/firefox/chrome/skin/yslow.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /* Panel */ 8 | #yslow-content-splitter { 9 | min-height: 4px; 10 | max-height: 4px; 11 | } 12 | 13 | #yslow-content-box { 14 | -moz-binding: url("chrome://yslow/content/bindings.xml#startup"); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/firefox/defaults/preferences/yslow.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | pref("extensions.yslow.autorun", false); 8 | pref("extensions.yslow.hidestatusbar", false); 9 | pref("extensions.yslow.getFramesComponents", true); 10 | pref("extensions.yslow.observeNetwork", true); 11 | pref("extensions.yslow.xhrWaitingTime", 120000); 12 | 13 | pref("extensions.yslow.optinBeacon", false); 14 | pref("extensions.yslow.beaconUrl", "http://rtblab.pclick.yahoo.com/images/ysb.gif"); 15 | pref("extensions.yslow.beaconInfo", "basic"); 16 | 17 | pref("extensions.yslow.excludeBeaconsFromLint", true); 18 | pref("extensions.yslow.excludeAfterOnload", true); 19 | 20 | pref("extensions.yslow.smushItURL", "http://www.smushit.com/ysmush.it"); 21 | 22 | pref("extensions.yslow.minFutureExpiresSeconds", 172800); // 2days 23 | pref("extensions.yslow.cdnHostnames", ""); 24 | 25 | pref("extensions.yslow.allowNegativeScore", false); 26 | -------------------------------------------------------------------------------- /src/firefox/install.rdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 12 | 13 | 14 | yslow@yahoo-inc.com 15 | YSlow 16 | {{YSLOW_VERSION}} 17 | 18 | 19 | 20 | {ec8030f7-c20a-464f-9b0e-13a3a9e97384} 21 | 3.0 22 | 16.* 23 | 24 | 25 | 26 | Make your pages faster with Yahoo!'s page performance tool 27 | Yahoo! Inc. 28 | http://developer.yahoo.com/yslow 29 | chrome://yslow/content/yslowOptions.xul 30 | chrome://yslow/content/yslow/img/logo_32x32.png 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/firefox/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Yahoo! Inc. All rights reserved. 2 | Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 3 | 4 | Redistribution and use of this software in source and binary forms, 5 | with or without modification, are permitted provided that the following 6 | conditions are met: 7 | 8 | * Redistributions of source code must retain the above 9 | copyright notice, this list of conditions and the 10 | following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the 14 | following disclaimer in the documentation and/or other 15 | materials provided with the distribution. 16 | 17 | * Neither the name of Yahoo! Inc. nor the names of its 18 | contributors may be used to endorse or promote products 19 | derived from this software without specific prior 20 | written permission of Yahoo! Inc. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 23 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 24 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 25 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 26 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /src/har/component.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /** 8 | * Parse details (HTTP headers, content, etc) from a 9 | * given source and set component properties. 10 | * @param o The object containing component details. 11 | */ 12 | YSLOW.Component.prototype.setComponentDetails = function (o) { 13 | var comp = this, 14 | 15 | parseEntry = function (entry) { 16 | var i, header, cookie, len, 17 | response = entry.response, 18 | request = entry.request; 19 | 20 | // copy from the response object 21 | comp.status = response.status; 22 | comp.headers = {}; 23 | comp.raw_headers = ''; 24 | for (i = 0, len = response.headers.length; i < len; i += 1) { 25 | header = response.headers[i]; 26 | comp.headers[header.name.toLowerCase()] = header.value; 27 | comp.raw_headers += header.name + ': ' + header.value + '\n'; 28 | } 29 | comp.req_headers = {}; 30 | for (i = 0, len = request.headers.length; i < len; i += 1) { 31 | header = request.headers[i]; 32 | comp.req_headers[header.name.toLowerCase()] = header.value; 33 | } 34 | comp.method = request.method; 35 | if (response.content && response.content.text) { 36 | comp.body = response.content.text; 37 | } else { 38 | // no body provided, getting size at least and mocking empty string content 39 | comp.body = { 40 | toString: function () {return '';}, 41 | length: response.content.size || 0 42 | }; 43 | } 44 | // for security checking 45 | comp.response_type = comp.type; 46 | comp.cookie = (comp.headers['set-cookie'] || '') + (comp.req_headers['cookie'] || ''); 47 | comp.nsize = parseInt(comp.headers['content-length'], 10) || 48 | response.bodySize || response.content.size; 49 | comp.respTime = entry.time; 50 | comp.after_onload = (new Date(entry.startedDateTime) 51 | .getTime()) > comp.parent.onloadTimestamp; 52 | 53 | // populate properties ignoring redirect 54 | // resolution and image request 55 | comp.populateProperties(false, true); 56 | 57 | comp.get_info_state = 'DONE'; 58 | 59 | // notify parent ComponentSet that this component has gotten net response. 60 | comp.parent.onComponentGetInfoStateChange({ 61 | 'comp': comp, 62 | 'state': 'DONE' 63 | }); 64 | }; 65 | 66 | parseEntry(o.entry); 67 | }; 68 | -------------------------------------------------------------------------------- /src/har/export.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | if (typeof exports !== 'undefined') { 8 | exports.YSLOW = YSLOW; 9 | } 10 | -------------------------------------------------------------------------------- /src/nodejs/executable: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | -------------------------------------------------------------------------------- /src/nodejs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yslow", 3 | "version": "{{YSLOW_VERSION}}", 4 | "description": "Commnad line version of YSlow web performance analysis tool from HAR files", 5 | "keywords": ["yslow", "performance", "har", "yahoo", "wpo", "command", "line", "automation"], 6 | "homepage": "http://yslow.org", 7 | "author": "Marcel Duran (http://yslow.org)", 8 | "main": "./lib/yslow", 9 | "bin": {"yslow": "./bin/yslow"}, 10 | "repository": {"type": "", "url": ""}, 11 | "dependencies": { 12 | "jsdom": ">=0.2.10", 13 | "commander": ">=0.2.0" 14 | }, 15 | "engines": { "node": ">= 0.4.1" } 16 | } 17 | -------------------------------------------------------------------------------- /src/opera/background.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | window.addEventListener('DOMContentLoaded', function () { 8 | // Specify the properties of the button before creating it. 9 | var UIItemProperties = { 10 | disabled: true, 11 | title: 'YSlow', 12 | icon: 'images/icon_18.png', 13 | onclick: function (event) { 14 | // Send a message to the currently-selected tab. 15 | var tab = opera.extension.tabs.getFocused(); 16 | if (tab) { 17 | // Null if the focused tab is not accessible 18 | // by this extension 19 | tab.postMessage('go'); 20 | } 21 | } 22 | }, 23 | button = opera.contexts.toolbar.createItem(UIItemProperties), 24 | 25 | toggleButton = function () { 26 | var tab = opera.extension.tabs.getFocused(); 27 | if (tab) { 28 | button.disabled = false; 29 | } else { 30 | button.disabled = true; 31 | } 32 | }; 33 | 34 | // Create the button and add it to the toolbar. 35 | opera.contexts.toolbar.addItem(button); 36 | 37 | // Only enable the button when the extension and page are ready. 38 | opera.extension.onconnect = toggleButton; 39 | opera.extension.tabs.onfocus = toggleButton; 40 | opera.extension.tabs.onblur = toggleButton; 41 | }, false); 42 | -------------------------------------------------------------------------------- /src/opera/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | YSlow 4 | YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. For more details, see http://yslow.org/ 5 | YSlow (@yslow) 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/opera/images/icon_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/opera/images/icon_18.png -------------------------------------------------------------------------------- /src/opera/images/icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/opera/images/icon_64.png -------------------------------------------------------------------------------- /src/opera/includes/injected.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | window.addEventListener('DOMContentLoaded', function () { 8 | // Wait for a message from the background process 9 | // i.e. when the toolbar button is pressed 10 | opera.extension.onmessage = function (event) { 11 | 12 | (function (y, p, o) { 13 | p = y.body.appendChild(y.createElement('iframe')); 14 | p.id = 'YSLOW-bookmarklet'; 15 | p.style.cssText = 'display:none'; 16 | o = p.contentWindow.document; 17 | o.open().write( 18 | '' + 19 | '' 30 | ); 31 | o.close() 32 | }(document)) 33 | 34 | }; 35 | }, false); 36 | -------------------------------------------------------------------------------- /src/opera/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | YSlow (Opera extension) 7 | 8 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /src/phantomjs/component.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | /*global YSLOW*/ 8 | /*jslint browser: true, sloppy: true*/ 9 | 10 | /** 11 | * Parse details (HTTP headers, content, etc) from a 12 | * given source and set component properties. 13 | * @param o The object containing component details. 14 | */ 15 | YSLOW.Component.prototype.setComponentDetails = function (o) { 16 | var comp = this, 17 | 18 | parse = function (request, response) { 19 | var xhr; 20 | 21 | // copy from the response object 22 | comp.status = response.status; 23 | comp.headers = {}; 24 | comp.raw_headers = ''; 25 | response.headers.forEach(function (header) { 26 | comp.headers[header.name.toLowerCase()] = header.value; 27 | comp.raw_headers += header.name + ': ' + header.value + '\n'; 28 | }); 29 | comp.req_headers = {}; 30 | request.headers.forEach(function (header) { 31 | comp.req_headers[header.name.toLowerCase()] = header.value; 32 | }); 33 | comp.method = request.method; 34 | if (response.contentText) { 35 | comp.body = response.contentText; 36 | } else { 37 | // try to fetch component again using sync xhr while 38 | // content is not available through phantomjs. 39 | // see: http://code.google.com/p/phantomjs/issues/detail?id=158 40 | // and http://code.google.com/p/phantomjs/issues/detail?id=156 41 | try { 42 | xhr = new XMLHttpRequest(); 43 | xhr.open('GET', comp.url, false); 44 | xhr.send(); 45 | comp.body = xhr.responseText; 46 | } catch (err) { 47 | comp.body = { 48 | toString: function () { 49 | return ''; 50 | }, 51 | length: response.bodySize || 0 52 | }; 53 | } 54 | } 55 | // for security checking 56 | comp.response_type = comp.type; 57 | comp.cookie = (comp.headers['set-cookie'] || '') + 58 | (comp.req_headers.cookie || ''); 59 | comp.nsize = parseInt(comp.headers['content-length'], 10) || 60 | response.bodySize; 61 | comp.respTime = response.time; 62 | comp.after_onload = (new Date(request.time) 63 | .getTime()) > comp.parent.onloadTimestamp; 64 | 65 | // populate properties ignoring redirect 66 | // resolution and image request 67 | comp.populateProperties(false, true); 68 | 69 | comp.get_info_state = 'DONE'; 70 | 71 | // notify parent ComponentSet that this component has gotten net response. 72 | comp.parent.onComponentGetInfoStateChange({ 73 | 'comp': comp, 74 | 'state': 'DONE' 75 | }); 76 | }; 77 | 78 | if (o.request && o.response) { 79 | parse(o.request, o.response); 80 | } 81 | }; 82 | -------------------------------------------------------------------------------- /src/rhino/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/rhino/controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | load('lib/yslow.js'); 8 | load('lib/env.rhino.1.2.js'); 9 | 10 | var content, har, res, doc, 11 | args = arguments; 12 | 13 | window.onload = function () { 14 | doc = document; 15 | content = readFile(args[0]), 16 | har = JSON.parse(content, null); 17 | res = YSLOW.harImporter.run(doc, har, 'ydefault'); 18 | content = YSLOW.util.getResults(res.context, 'basic'); 19 | print(JSON.stringify(content)); 20 | }; 21 | window.location = 'lib/blank.html'; 22 | -------------------------------------------------------------------------------- /src/safari/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/safari/16.png -------------------------------------------------------------------------------- /src/safari/Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/safari/Icon-32.png -------------------------------------------------------------------------------- /src/safari/Icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcelduran/yslow/1f9bcab64ca6c8c1444c2a8d5e7e99ed0d6b465f/src/safari/Icon-48.png -------------------------------------------------------------------------------- /src/safari/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Author 6 | YSlow 7 | CFBundleDisplayName 8 | YSlow 9 | CFBundleIdentifier 10 | com.yahoo.yslow 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleShortVersionString 14 | {{YSLOW_VERSION}} 15 | CFBundleVersion 16 | {{YSLOW_VERSION}} 17 | Chrome 18 | 19 | Database Quota 20 | 5242880 21 | Global Page 22 | global.html 23 | Toolbar Items 24 | 25 | 26 | Command 27 | yslow 28 | Identifier 29 | showButton 30 | Image 31 | 16.png 32 | Label 33 | YSlow 34 | Palette Label 35 | YSlow 36 | Tool Tip 37 | YSlow 38 | 39 | 40 | 41 | Content 42 | 43 | Scripts 44 | 45 | End 46 | 47 | injected.js 48 | 49 | 50 | 51 | Description 52 | YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. 53 | ExtensionInfoDictionaryVersion 54 | 1.0 55 | Permissions 56 | 57 | Website Access 58 | 59 | Include Secure Pages 60 | 61 | Level 62 | All 63 | 64 | 65 | Update Manifest URL 66 | http://d.yimg.com/jc/safari/update.plist 67 | Website 68 | http://yslow.org/ 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/safari/Settings.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/safari/global.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YSlow 5 | 12 | 13 | 14 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /src/safari/injected.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | safari.self.addEventListener('message', function (msg) { 8 | var ifrm, idoc, 9 | id = 'YSLOW-bookmarklet', 10 | win = window, 11 | doc = document; 12 | 13 | if (msg.name === 'init' && win === win.top && !doc.getElementById(id)) { 14 | ifrm = doc.body.appendChild(doc.createElement('iframe')); 15 | ifrm.id = id; 16 | ifrm.style.cssText = 'display:none'; 17 | idoc = ifrm.contentWindow.document; 18 | idoc.open().write( 19 | '' + 20 | '' 31 | ); 32 | idoc.close() 33 | } 34 | }, false); 35 | -------------------------------------------------------------------------------- /src/safari/update.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extension Updates 6 | 7 | 8 | CFBundleIdentifier 9 | com.yahoo.yslow 10 | Developer Identifier 11 | 8LD2Q8N8RM 12 | CFBundleVersion 13 | {{YSLOW_VERSION}} 14 | CFBundleShortVersionString 15 | {{YSLOW_VERSION}} 16 | URL 17 | http://d.yimg.com/jc/safari/yslow.safariextz 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/wsh/controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2012, Yahoo! Inc. All rights reserved. 3 | * Copyright (c) 2013, Marcel Duran and other contributors. All rights reserved. 4 | * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5 | */ 6 | 7 | function readFile(filename) { 8 | var rline = [], 9 | fs = new ActiveXObject('Scripting.FileSystemObject'), 10 | f = fs.GetFile(filename); 11 | is = f.OpenAsTextStream(1, 0); 12 | 13 | while (!is.AtEndOfStream) { 14 | rline.push(is.ReadLine()); 15 | } 16 | is.Close(); 17 | return rline.join(''); 18 | } 19 | 20 | var i, har, content, res, doc, 21 | objArgs = WScript.Arguments, 22 | ie = WScript.CreateObject('InternetExplorer.Application'); 23 | 24 | ie.Navigate('about:blank'); 25 | doc = ie.document; 26 | for (i = 0; i < objArgs.length; i++) { 27 | content = readFile(objArgs(i)); 28 | har = JSON.parse(content, null); 29 | res = YSLOW.harImporter.run(doc, har, 'ydefault'); 30 | content = YSLOW.util.getResults(res.context, 'basic'); 31 | WScript.Echo(JSON.stringify(content)); 32 | } 33 | ie.Quit(); 34 | 35 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/dom/dom-deprecated-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('dom-deprecated', function(Y) { 9 | 10 | 11 | Y.mix(Y.DOM, { 12 | // @deprecated 13 | children: function(node, tag) { 14 | var ret = []; 15 | if (node) { 16 | tag = tag || '*'; 17 | ret = Y.Selector.query('> ' + tag, node); 18 | } 19 | return ret; 20 | }, 21 | 22 | // @deprecated 23 | firstByTag: function(tag, root) { 24 | var ret; 25 | root = root || Y.config.doc; 26 | 27 | if (tag && root.getElementsByTagName) { 28 | ret = root.getElementsByTagName(tag)[0]; 29 | } 30 | 31 | return ret || null; 32 | }, 33 | 34 | /* 35 | * Finds the previous sibling of the element. 36 | * @method previous 37 | * @deprecated Use elementByAxis 38 | * @param {HTMLElement} element The html element. 39 | * @param {Function} fn optional An optional boolean test to apply. 40 | * The optional function is passed the current DOM node being tested as its only argument. 41 | * If no function is given, the first sibling is returned. 42 | * @param {Boolean} all optional Whether all node types should be scanned, or just element nodes. 43 | * @return {HTMLElement | null} The matching DOM node or null if none found. 44 | */ 45 | previous: function(element, fn, all) { 46 | return Y.DOM.elementByAxis(element, 'previousSibling', fn, all); 47 | }, 48 | 49 | /* 50 | * Finds the next sibling of the element. 51 | * @method next 52 | * @deprecated Use elementByAxis 53 | * @param {HTMLElement} element The html element. 54 | * @param {Function} fn optional An optional boolean test to apply. 55 | * The optional function is passed the current DOM node being tested as its only argument. 56 | * If no function is given, the first sibling is returned. 57 | * @param {Boolean} all optional Whether all node types should be scanned, or just element nodes. 58 | * @return {HTMLElement | null} The matching DOM node or null if none found. 59 | */ 60 | next: function(element, fn, all) { 61 | return Y.DOM.elementByAxis(element, 'nextSibling', fn, all); 62 | } 63 | 64 | }); 65 | 66 | 67 | 68 | }, '3.3.0' ,{requires:['dom-base']}); 69 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/dom/dom-deprecated-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("dom-deprecated",function(a){a.mix(a.DOM,{children:function(d,b){var c=[];if(d){b=b||"*";c=a.Selector.query("> "+b,d);}return c;},firstByTag:function(b,c){var d;c=c||a.config.doc;if(b&&c.getElementsByTagName){d=c.getElementsByTagName(b)[0];}return d||null;},previous:function(b,d,c){return a.DOM.elementByAxis(b,"previousSibling",d,c);},next:function(b,d,c){return a.DOM.elementByAxis(b,"nextSibling",d,c);}});},"3.3.0",{requires:["dom-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/dom/dom-deprecated.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('dom-deprecated', function(Y) { 9 | 10 | 11 | Y.mix(Y.DOM, { 12 | // @deprecated 13 | children: function(node, tag) { 14 | var ret = []; 15 | if (node) { 16 | tag = tag || '*'; 17 | ret = Y.Selector.query('> ' + tag, node); 18 | } 19 | return ret; 20 | }, 21 | 22 | // @deprecated 23 | firstByTag: function(tag, root) { 24 | var ret; 25 | root = root || Y.config.doc; 26 | 27 | if (tag && root.getElementsByTagName) { 28 | ret = root.getElementsByTagName(tag)[0]; 29 | } 30 | 31 | return ret || null; 32 | }, 33 | 34 | /* 35 | * Finds the previous sibling of the element. 36 | * @method previous 37 | * @deprecated Use elementByAxis 38 | * @param {HTMLElement} element The html element. 39 | * @param {Function} fn optional An optional boolean test to apply. 40 | * The optional function is passed the current DOM node being tested as its only argument. 41 | * If no function is given, the first sibling is returned. 42 | * @param {Boolean} all optional Whether all node types should be scanned, or just element nodes. 43 | * @return {HTMLElement | null} The matching DOM node or null if none found. 44 | */ 45 | previous: function(element, fn, all) { 46 | return Y.DOM.elementByAxis(element, 'previousSibling', fn, all); 47 | }, 48 | 49 | /* 50 | * Finds the next sibling of the element. 51 | * @method next 52 | * @deprecated Use elementByAxis 53 | * @param {HTMLElement} element The html element. 54 | * @param {Function} fn optional An optional boolean test to apply. 55 | * The optional function is passed the current DOM node being tested as its only argument. 56 | * If no function is given, the first sibling is returned. 57 | * @param {Boolean} all optional Whether all node types should be scanned, or just element nodes. 58 | * @return {HTMLElement | null} The matching DOM node or null if none found. 59 | */ 60 | next: function(element, fn, all) { 61 | return Y.DOM.elementByAxis(element, 'nextSibling', fn, all); 62 | } 63 | 64 | }); 65 | 66 | 67 | 68 | }, '3.3.0' ,{requires:['dom-base']}); 69 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/dom/dom-style-ie-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("dom-style-ie",function(a){(function(d){var A="hasLayout",l="px",m="filter",b="filters",x="opacity",q="auto",h="borderWidth",k="borderTopWidth",u="borderRightWidth",z="borderBottomWidth",i="borderLeftWidth",j="width",s="height",v="transparent",w="visible",c="getComputedStyle",C=undefined,B=d.config.doc.documentElement,p=d.Features.test,n=d.Features.add,t=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,o=(d.UA.ie>=8),f=function(e){return e.currentStyle||e.style;},r={CUSTOM_STYLES:{},get:function(e,E){var D="",F;if(e){F=f(e)[E];if(E===x&&d.DOM.CUSTOM_STYLES[x]){D=d.DOM.CUSTOM_STYLES[x].get(e);}else{if(!F||(F.indexOf&&F.indexOf(l)>-1)){D=F;}else{if(d.DOM.IE.COMPUTED[E]){D=d.DOM.IE.COMPUTED[E](e,E);}else{if(t.test(F)){D=r.getPixel(e,E)+l;}else{D=F;}}}}}return D;},sizeOffsets:{width:["Left","Right"],height:["Top","Bottom"],top:["Top"],bottom:["Bottom"]},getOffset:function(E,e){var I=f(E)[e],J=e.charAt(0).toUpperCase()+e.substr(1),F="offset"+J,D="pixel"+J,H=r.sizeOffsets[e],G=E.ownerDocument.compatMode,K="";if(I===q||I.indexOf("%")>-1){K=E["offset"+J];if(G!=="BackCompat"){if(H[0]){K-=r.getPixel(E,"padding"+H[0]);K-=r.getBorderWidth(E,"border"+H[0]+"Width",1);}if(H[1]){K-=r.getPixel(E,"padding"+H[1]);K-=r.getBorderWidth(E,"border"+H[1]+"Width",1);}}}else{if(!E.style[D]&&!E.style[e]){E.style[e]=I;}K=E.style[D];}return K+l;},borderMap:{thin:(o)?"1px":"2px",medium:(o)?"3px":"4px",thick:(o)?"5px":"6px"},getBorderWidth:function(D,F,e){var E=e?"":l,G=D.currentStyle[F];if(G.indexOf(l)<0){if(r.borderMap[G]&&D.currentStyle.borderStyle!=="none"){G=r.borderMap[G];}else{G=0;}}return(e)?parseFloat(G):G;},getPixel:function(E,e){var G=null,D=f(E),H=D.right,F=D[e];E.style.right=F;G=E.style.pixelRight;E.style.right=H;return G;},getMargin:function(E,e){var F,D=f(E);if(D[e]==q){F=0;}else{F=r.getPixel(E,e);}return F+l;},getVisibility:function(D,e){var E;while((E=D.currentStyle)&&E[e]=="inherit"){D=D.parentNode;}return(E)?E[e]:w;},getColor:function(D,e){var E=f(D)[e];if(!E||E===v){d.DOM.elementByAxis(D,"parentNode",null,function(F){E=f(F)[e];if(E&&E!==v){D=F;return true;}});}return d.Color.toRGB(E);},getBorderColor:function(D,e){var E=f(D),F=E[e]||E.color;return d.Color.toRGB(d.Color.toHex(F));}},g={};n("style","computedStyle",{test:function(){return"getComputedStyle" in d.config.win;}});n("style","opacity",{test:function(){return"opacity" in B.style;}});n("style","filter",{test:function(){return"filters" in B;}});if(!p("style","opacity")&&p("style","filter")){d.DOM.CUSTOM_STYLES[x]={get:function(E){var G=100;try{G=E[b]["DXImageTransform.Microsoft.Alpha"][x];}catch(F){try{G=E[b]("alpha")[x];}catch(D){}}return G/100;},set:function(E,H,D){var G,F=f(E),e=F[m];D=D||E.style;if(H===""){G=(x in F)?F[x]:1;H=G;}if(typeof e=="string"){D[m]=e.replace(/alpha([^)]*\))/gi,"")+((H<1)?"alpha("+x+"="+H*100+")":"");if(!D[m]){D.removeAttribute(m);}if(!F[A]){D.zoom=1;}}}};}try{d.config.doc.createElement("div").style.height="-1px";}catch(y){d.DOM.CUSTOM_STYLES.height={set:function(E,F,D){var e=parseFloat(F);if(e>=0||F==="auto"||F===""){D.height=F;}else{}}};d.DOM.CUSTOM_STYLES.width={set:function(E,F,D){var e=parseFloat(F);if(e>=0||F==="auto"||F===""){D.width=F;}else{}}};}if(!p("style","computedStyle")){g[j]=g[s]=r.getOffset;g.color=g.backgroundColor=r.getColor;g[h]=g[k]=g[u]=g[z]=g[i]=r.getBorderWidth;g.marginTop=g.marginRight=g.marginBottom=g.marginLeft=r.getMargin;g.visibility=r.getVisibility;g.borderColor=g.borderTopColor=g.borderRightColor=g.borderBottomColor=g.borderLeftColor=r.getBorderColor;d.DOM[c]=r.get;d.namespace("DOM.IE");d.DOM.IE.COMPUTED=g;d.DOM.IE.ComputedStyle=r;}})(a);},"3.3.0",{requires:["dom-style"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/dom/dom-style-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("dom-style",function(a){(function(e){var p="documentElement",b="defaultView",n="ownerDocument",h="style",i="float",r="cssFloat",s="styleFloat",k="transparent",d="getComputedStyle",c="getBoundingClientRect",o=e.config.win,g=e.config.doc,t=undefined,q=e.DOM,f="transform",l=["WebkitTransform","MozTransform","OTransform"],m=/color$/i,j=/width|height|top|left|right|bottom|margin|padding/i;e.Array.each(l,function(u){if(u in g[p].style){f=u;}});e.mix(q,{DEFAULT_UNIT:"px",CUSTOM_STYLES:{},setStyle:function(x,u,y,w){w=w||x.style;var v=q.CUSTOM_STYLES;if(w){if(y===null||y===""){y="";}else{if(!isNaN(new Number(y))&&j.test(u)){y+=q.DEFAULT_UNIT;}}if(u in v){if(v[u].set){v[u].set(x,y,w);return;}else{if(typeof v[u]==="string"){u=v[u];}}}else{if(u===""){u="cssText";y="";}}w[u]=y;}},getStyle:function(x,u,w){w=w||x.style;var v=q.CUSTOM_STYLES,y="";if(w){if(u in v){if(v[u].get){return v[u].get(x,u,w);}else{if(typeof v[u]==="string"){u=v[u];}}}y=w[u];if(y===""){y=q[d](x,u);}}return y;},setStyles:function(v,w){var u=v.style;e.each(w,function(x,y){q.setStyle(v,y,x,u);},q);},getComputedStyle:function(v,u){var x="",w=v[n];if(v[h]&&w[b]&&w[b][d]){x=w[b][d](v,null)[u];}return x;}});if(g[p][h][r]!==t){q.CUSTOM_STYLES[i]=r;}else{if(g[p][h][s]!==t){q.CUSTOM_STYLES[i]=s;}}if(e.UA.opera){q[d]=function(w,v){var u=w[n][b],x=u[d](w,"")[v];if(m.test(v)){x=e.Color.toRGB(x);}return x;};}if(e.UA.webkit){q[d]=function(w,v){var u=w[n][b],x=u[d](w,"")[v];if(x==="rgba(0, 0, 0, 0)"){x=k;}return x;};}e.DOM._getAttrOffset=function(y,v){var A=e.DOM[d](y,v),x=y.offsetParent,u,w,z;if(A==="auto"){u=e.DOM.getStyle(y,"position");if(u==="static"||u==="relative"){A=0;}else{if(x&&x[c]){w=x[c]()[v];z=y[c]()[v];if(v==="left"||v==="top"){A=z-w;}else{A=w-y[c]()[v];}}}}return A;};e.DOM._getOffset=function(u){var w,v=null;if(u){w=q.getStyle(u,"position");v=[parseInt(q[d](u,"left"),10),parseInt(q[d](u,"top"),10)];if(isNaN(v[0])){v[0]=parseInt(q.getStyle(u,"left"),10);if(isNaN(v[0])){v[0]=(w==="relative")?0:u.offsetLeft||0;}}if(isNaN(v[1])){v[1]=parseInt(q.getStyle(u,"top"),10);if(isNaN(v[1])){v[1]=(w==="relative")?0:u.offsetTop||0;}}}return v;};q.CUSTOM_STYLES.transform={set:function(v,w,u){u[f]=w;},get:function(v,u){return q[d](v,f);}};})(a);(function(d){var b=parseInt,c=RegExp;d.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Color.re_RGB.test(e)){e=d.Color.toHex(e);}if(d.Color.re_hex.exec(e)){e="rgb("+[b(c.$1,16),b(c.$2,16),b(c.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Color.KEYWORDS[f]||f;if(d.Color.re_RGB.exec(f)){f=[Number(c.$1).toString(16),Number(c.$2).toString(16),Number(c.$3).toString(16)];for(var e=0;e=0&&l[e]===d){return true;}}}else{for(var e=l.length-k,g=l.length;e>=0;e-=m){if(e-1;},"checked":function(b){return(b.checked===true||b.selected===true);},enabled:function(b){return(b.disabled!==undefined&&!b.disabled);},disabled:function(b){return(b.disabled);}});a.mix(a.Selector.operators,{"^=":"^{val}","$=":"{val}$","*=":"{val}"});a.Selector.combinators["~"]={axis:"previousSibling"};},"3.3.0",{requires:["dom-base","selector-native","selector-css2"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/dom/selector-native-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("selector-native",function(a){(function(e){e.namespace("Selector");var c="compareDocumentPosition",d="ownerDocument";var b={_foundCache:[],useNative:true,_compare:("sourceIndex" in e.config.doc.documentElement)?function(i,h){var g=i.sourceIndex,f=h.sourceIndex;if(g===f){return 0;}else{if(g>f){return 1;}}return -1;}:(e.config.doc.documentElement[c]?function(g,f){if(g[c](f)&4){return -1;}else{return 1;}}:function(j,i){var h,f,g;if(j&&i){h=j[d].createRange();h.setStart(j,0);f=i[d].createRange();f.setStart(i,0);g=h.compareBoundaryPoints(1,f);}return g;}),_sort:function(f){if(f){f=e.Array(f,0,true);if(f.sort){f.sort(b._compare);}}return f;},_deDupe:function(f){var g=[],h,j;for(h=0;(j=f[h++]);){if(!j._found){g[g.length]=j;j._found=true;}}for(h=0;(j=g[h++]);){j._found=null;j.removeAttribute("_found");}return g;},query:function(g,o,p,f){o=o||e.config.doc;var l=[],h=(e.Selector.useNative&&e.config.doc.querySelector&&!f),k=[[g,o]],m,q,j,n=(h)?e.Selector._nativeQuery:e.Selector._bruteQuery;if(g&&n){if(!f&&(!h||o.tagName)){k=b._splitQueries(g,o);}for(j=0;(m=k[j++]);){q=n(m[0],m[1],p);if(!p){q=e.Array(q,0,true);}if(q){l=l.concat(q);}}if(k.length>1){l=b._sort(b._deDupe(l));}}return(p)?(l[0]||null):l;},_splitQueries:function(h,l){var g=h.split(","),j=[],m="",k,f;if(l){if(l.tagName){l.id=l.id||e.guid();m='[id="'+l.id+'"] ';}for(k=0,f=g.length;k-1&&(e.Selector.pseudos&&e.Selector.pseudos.checked)){return e.Selector.query(f,g,h,true);}try{return g["querySelector"+(h?"":"All")](f);}catch(i){return e.Selector.query(f,g,h,true);}},filter:function(g,f){var h=[],j,k;if(g&&f){for(j=0;(k=g[j++]);){if(e.Selector.test(k,f)){h[h.length]=k;}}}else{}return h;},test:function(h,k,p){var n=false,g=k.split(","),f=false,q,t,o,s,m,l,r;if(h&&h.tagName){if(!p&&!e.DOM.inDoc(h)){q=h.parentNode;if(q){p=q;}else{s=h[d].createDocumentFragment();s.appendChild(h);p=s;f=true;}}p=p||h[d];if(!h.id){h.id=e.guid();}for(m=0;(r=g[m++]);){r+='[id="'+h.id+'"]';o=e.Selector.query(r,p);for(l=0;t=o[l++];){if(t===h){n=true;break;}}if(n){break;}}if(f){s.removeChild(h);}}return n;},ancestor:function(g,f,h){return e.DOM.ancestor(g,function(i){return e.Selector.test(i,f);},h);}};e.mix(e.Selector,b,true);})(a);},"3.3.0",{requires:["dom-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event-custom/event-custom-complex-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-custom-complex",function(f){var b,e,d={},a=f.CustomEvent.prototype,c=f.EventTarget.prototype;f.EventFacade=function(h,g){h=h||d;this._event=h;this.details=h.details;this.type=h.type;this._type=h.type;this.target=h.target;this.currentTarget=g;this.relatedTarget=h.relatedTarget;};f.extend(f.EventFacade,Object,{stopPropagation:function(){this._event.stopPropagation();this.stopped=1;},stopImmediatePropagation:function(){this._event.stopImmediatePropagation();this.stopped=2;},preventDefault:function(){this._event.preventDefault();this.prevented=1;},halt:function(g){this._event.halt(g);this.prevented=1;this.stopped=(g)?2:1;}});a.fireComplex=function(p){var r,l,g,n,i,o,u,j,h,t=this,s=t.host||t,m,k;if(t.stack){if(t.queuable&&t.type!=t.stack.next.type){t.log("queue "+t.type);t.stack.queue.push([t,p]);return true;}}r=t.stack||{id:t.id,next:t,silent:t.silent,stopped:0,prevented:0,bubbling:null,type:t.type,afterQueue:new f.Queue(),defaultTargetOnly:t.defaultTargetOnly,queue:[]};j=t.getSubs();t.stopped=(t.type!==r.type)?0:r.stopped;t.prevented=(t.type!==r.type)?0:r.prevented;t.target=t.target||s;u=new f.EventTarget({fireOnce:true,context:s});t.events=u;if(t.preventedFn){u.on("prevented",t.preventedFn);}if(t.stoppedFn){u.on("stopped",t.stoppedFn);}t.currentTarget=s;t.details=p.slice();t.log("Firing "+t.type);t._facade=null;l=t._getFacade(p);if(f.Lang.isObject(p[0])){p[0]=l;}else{p.unshift(l);}if(j[0]){t._procSubs(j[0],p,l);}if(t.bubbles&&s.bubble&&!t.stopped){k=r.bubbling;r.bubbling=t.type;if(r.type!=t.type){r.stopped=0;r.prevented=0;}o=s.bubble(t,p,null,r);t.stopped=Math.max(t.stopped,r.stopped);t.prevented=Math.max(t.prevented,r.prevented);r.bubbling=k;}if(t.defaultFn&&!t.prevented&&((!t.defaultTargetOnly&&!r.defaultTargetOnly)||s===l.target)){t.defaultFn.apply(s,p);}t._broadcast(p);if(j[1]&&!t.prevented&&t.stopped<2){if(r.id===t.id||t.type!=s._yuievt.bubbling){t._procSubs(j[1],p,l);while((m=r.afterQueue.last())){m();}}else{h=j[1];if(r.execDefaultCnt){h=f.merge(h);f.each(h,function(q){q.postponed=true;});}r.afterQueue.add(function(){t._procSubs(h,p,l);});}}t.target=null;if(r.id===t.id){n=r.queue;while(n.length){g=n.pop();i=g[0];r.next=i;i.fire.apply(i,g[1]);}t.stack=null;}o=!(t.stopped);if(t.type!=s._yuievt.bubbling){r.stopped=0;r.prevented=0;t.stopped=0;t.prevented=0;}return o;};a._getFacade=function(){var g=this._facade,j,i,h=this.details;if(!g){g=new f.EventFacade(this,this.currentTarget);}j=h&&h[0];if(f.Lang.isObject(j,true)){i={};f.mix(i,g,true,e);f.mix(g,j,true);f.mix(g,i,true,e);g.type=j.type||g.type;}g.details=this.details;g.target=this.originalTarget||this.target;g.currentTarget=this.currentTarget;g.stopped=0;g.prevented=0;this._facade=g;return this._facade;};a.stopPropagation=function(){this.stopped=1;if(this.stack){this.stack.stopped=1;}this.events.fire("stopped",this);};a.stopImmediatePropagation=function(){this.stopped=2;if(this.stack){this.stack.stopped=2;}this.events.fire("stopped",this);};a.preventDefault=function(){if(this.preventable){this.prevented=1;if(this.stack){this.stack.prevented=1;}this.events.fire("prevented",this);}};a.halt=function(g){if(g){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};c.addTarget=function(g){this._yuievt.targets[f.stamp(g)]=g;this._yuievt.hasTargets=true;};c.getTargets=function(){return f.Object.values(this._yuievt.targets);};c.removeTarget=function(g){delete this._yuievt.targets[f.stamp(g)];};c.bubble=function(u,q,o,s){var m=this._yuievt.targets,p=true,v,r=u&&u.type,h,l,n,j,g=o||(u&&u.target)||this,k;if(!u||((!u.stopped)&&m)){for(l in m){if(m.hasOwnProperty(l)){v=m[l];h=v.getEvent(r,true);j=v.getSibling(r,h);if(j&&!h){h=v.publish(r);}k=v._yuievt.bubbling;v._yuievt.bubbling=r;if(!h){if(v._yuievt.hasTargets){v.bubble(u,q,g,s);}}else{h.sibling=j;h.target=g;h.originalTarget=g;h.currentTarget=v;n=h.broadcast;h.broadcast=false;h.emitFacade=true;h.stack=s;p=p&&h.fire.apply(h,q||u.details||[]);h.broadcast=n;h.originalTarget=null;if(h.stopped){break;}}v._yuievt.bubbling=k;}}}return p;};b=new f.EventFacade();e=f.Object.keys(b);},"3.3.0",{requires:["event-custom-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-base-ie-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | (function(){var b,f=YUI.Env,d=YUI.config,g=d.doc,c=g&&g.documentElement,e="onreadystatechange",a=d.pollInterval||40;if(c.doScroll&&!f._ieready){f._ieready=function(){f._ready();}; 9 | /*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ 10 | if(self!==self.top){b=function(){if(g.readyState=="complete"){f.remove(g,e,b);f.ieready();}};f.add(g,e,b);}else{f._dri=setInterval(function(){try{c.doScroll("left");clearInterval(f._dri);f._dri=null;f._ieready();}catch(h){}},a);}}})();YUI.add("event-base-ie",function(c){var a=function(){c.DOM2EventFacade.apply(this,arguments);};c.extend(a,c.DOM2EventFacade,{init:function(){a.superclass.init.apply(this,arguments);var j=this._event,i=c.DOM2EventFacade.resolve,g,m,k,f,l,h;this.target=i(j.srcElement);if(("clientX" in j)&&(!g)&&(0!==g)){g=j.clientX;m=j.clientY;k=c.config.doc;f=k.body;l=k.documentElement;g+=(l.scrollLeft||(f&&f.scrollLeft)||0);m+=(l.scrollTop||(f&&f.scrollTop)||0);this.pageX=g;this.pageY=m;}if(j.type=="mouseout"){h=j.toElement;}else{if(j.type=="mouseover"){h=j.fromElement;}}this.relatedTarget=i(h);if(j.button){switch(j.button){case 2:this.which=3;break;case 4:this.which=2;break;default:this.which=j.button;}this.button=this.which;}},stopPropagation:function(){var d=this._event;d.cancelBubble=true;this._wrapper.stopped=1;this.stopped=1;},stopImmediatePropagation:function(){this.stopPropagation();this._wrapper.stopped=2;this.stopped=2;},preventDefault:function(d){this._event.returnValue=d||false;this._wrapper.prevented=1;this.prevented=1;}});var b=c.config.doc&&c.config.doc.implementation;if(b&&(!b.hasFeature("Events","2.0"))){c.DOMEventFacade=a;}},"3.3.0"); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-delegate-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-delegate",function(a){var c=a.Array,h=a.Lang,b=h.isString,i=h.isObject,e=h.isArray,g=a.Selector.test,d=a.Env.evt.handles;function f(u,w,l,k){var s=c(arguments,0,true),t=b(l)?l:null,r,o,j,n,v,m,q,x,p;if(i(u)){x=[];if(e(u)){for(m=0,q=u.length;m1){v=r.shift();u=r.shift();}o=a.Node.DOM_EVENTS[u];if(i(o)&&o.delegate){p=o.delegate.apply(o,arguments);}if(!p){if(!u||!w||!l||!k){return;}j=(t)?a.Selector.query(t,null,true):l;if(!j&&b(l)){p=a.on("available",function(){a.mix(p,a.delegate.apply(a,s),true);},l);}if(!p&&j){s.splice(2,2,j);p=a.Event._attach(s,{facade:false});p.sub.filter=k;p.sub._notify=f.notifySub;}}if(p&&v){n=d[v]||(d[v]={});n=n[u]||(n[u]=[]);n.push(p);}return p;}f.notifySub=function(q,l,p){l=l.slice();if(this.args){l.push.apply(l,this.args);}var o=f._applyFilter(this.filter,l,p),n,m,j,k;if(o){o=c(o);n=l[0]=new a.DOMEventFacade(l[0],p.el,p);n.container=a.one(p.el);for(m=0,j=o.length;m').onbeforeactivate);function f(h,g,j){var i="_"+h+"Notifiers";e.Event.define(h,{_attach:function(l,m,k){if(e.DOM.isWindow(l)){return d._attach([h,function(n){m.fire(n);},l]);}else{return d._attach([g,this._proxy,l,this,m,k],{capture:true});}},_proxy:function(o,s,p){var m=o.target,q=m.getData(i),t=e.stamp(o.currentTarget._node),k=(b||o.target!==o.currentTarget),l=s.handle.sub,r=[m,o].concat(l.args||[]),n;s.currentTarget=(p)?m:o.currentTarget;s.container=(p)?o.currentTarget:null;if(!l.filter||l.filter.apply(m,r)){if(!q){q={};m.setData(i,q);if(k){n=d._attach([j,this._notify,m._node]).sub;n.once=true;}}if(!q[t]){q[t]=[];}q[t].push(s);if(!k){this._notify(o);}}},_notify:function(p,l){var m=p.currentTarget,r=m.getData(i),s=m.get("ownerDocument")||m,q=m,k=[],t,n,o;if(r){while(q&&q!==s){k.push.apply(k,r[e.stamp(q)]||[]);q=q.get("parentNode");}k.push.apply(k,r[e.stamp(s)]||[]);for(n=0,o=k.length;n 14 | * 15 | *
node.on("hover", overFn, outFn);
16 |  * node.delegate("hover", overFn, outFn, ".filterSelector");
17 |  * Y.on("hover", overFn, outFn, ".targetSelector");
18 |  * Y.delegate("hover", overFn, outFn, "#container", ".filterSelector");
19 |  * 
20 | * 21 | *

Additionally, for compatibility with a more typical subscription 22 | * signature, the following are also supported:

23 | * 24 | *
Y.on("hover", overFn, ".targetSelector", outFn);
25 |  * Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
26 |  * 
27 | * 28 | * @module event 29 | * @submodule event-hover 30 | */ 31 | var isFunction = Y.Lang.isFunction, 32 | noop = function () {}, 33 | conf = { 34 | processArgs: function (args) { 35 | // Y.delegate('hover', over, out, '#container', '.filter') 36 | // comes in as ['hover', over, out, '#container', '.filter'], but 37 | // node.delegate('hover', over, out, '.filter') 38 | // comes in as ['hover', over, containerEl, out, '.filter'] 39 | var i = isFunction(args[2]) ? 2 : 3; 40 | 41 | return (isFunction(args[i])) ? args.splice(i,1)[0] : noop; 42 | }, 43 | 44 | on: function (node, sub, notifier, filter) { 45 | sub._detach = node[(filter) ? "delegate" : "on"]({ 46 | mouseenter: Y.bind(notifier.fire, notifier), 47 | mouseleave: sub._extra 48 | }, filter); 49 | }, 50 | 51 | detach: function (node, sub, notifier) { 52 | sub._detacher.detach(); 53 | } 54 | }; 55 | 56 | conf.delegate = conf.on; 57 | conf.detachDelegate = conf.detach; 58 | 59 | Y.Event.define("hover", conf); 60 | 61 | 62 | }, '3.3.0' ,{requires:['event-mouseenter']}); 63 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-hover-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-hover",function(d){var c=d.Lang.isFunction,b=function(){},a={processArgs:function(e){var f=c(e[2])?2:3;return(c(e[f]))?e.splice(f,1)[0]:b;},on:function(h,f,g,e){f._detach=h[(e)?"delegate":"on"]({mouseenter:d.bind(g.fire,g),mouseleave:f._extra},e);},detach:function(g,e,f){e._detacher.detach();}};a.delegate=a.on;a.detachDelegate=a.detach;d.Event.define("hover",a);},"3.3.0",{requires:["event-mouseenter"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-hover.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-hover', function(Y) { 9 | 10 | /** 11 | * Adds support for a "hover" event. The event provides a convenience wrapper 12 | * for subscribing separately to mouseenter and mouseleave. The signature for 13 | * subscribing to the event is

14 | * 15 | *
node.on("hover", overFn, outFn);
16 |  * node.delegate("hover", overFn, outFn, ".filterSelector");
17 |  * Y.on("hover", overFn, outFn, ".targetSelector");
18 |  * Y.delegate("hover", overFn, outFn, "#container", ".filterSelector");
19 |  * 
20 | * 21 | *

Additionally, for compatibility with a more typical subscription 22 | * signature, the following are also supported:

23 | * 24 | *
Y.on("hover", overFn, ".targetSelector", outFn);
25 |  * Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
26 |  * 
27 | * 28 | * @module event 29 | * @submodule event-hover 30 | */ 31 | var isFunction = Y.Lang.isFunction, 32 | noop = function () {}, 33 | conf = { 34 | processArgs: function (args) { 35 | // Y.delegate('hover', over, out, '#container', '.filter') 36 | // comes in as ['hover', over, out, '#container', '.filter'], but 37 | // node.delegate('hover', over, out, '.filter') 38 | // comes in as ['hover', over, containerEl, out, '.filter'] 39 | var i = isFunction(args[2]) ? 2 : 3; 40 | 41 | return (isFunction(args[i])) ? args.splice(i,1)[0] : noop; 42 | }, 43 | 44 | on: function (node, sub, notifier, filter) { 45 | sub._detach = node[(filter) ? "delegate" : "on"]({ 46 | mouseenter: Y.bind(notifier.fire, notifier), 47 | mouseleave: sub._extra 48 | }, filter); 49 | }, 50 | 51 | detach: function (node, sub, notifier) { 52 | sub._detacher.detach(); 53 | } 54 | }; 55 | 56 | conf.delegate = conf.on; 57 | conf.detachDelegate = conf.detach; 58 | 59 | Y.Event.define("hover", conf); 60 | 61 | 62 | }, '3.3.0' ,{requires:['event-mouseenter']}); 63 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-key-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-key', function(Y) { 9 | 10 | /** 11 | * Functionality to listen for one or more specific key combinations. 12 | * @module event 13 | * @submodule event-key 14 | */ 15 | 16 | /** 17 | * Add a key listener. The listener will only be notified if the 18 | * keystroke detected meets the supplied specification. The 19 | * spec consists of the key event type, followed by a colon, 20 | * followed by zero or more comma separated key codes, followed 21 | * by zero or more modifiers delimited by a plus sign. Ex: 22 | * press:12,65+shift+ctrl 23 | * @event key 24 | * @for YUI 25 | * @param type {string} 'key' 26 | * @param fn {function} the function to execute 27 | * @param id {string|HTMLElement|collection} the element(s) to bind 28 | * @param spec {string} the keyCode and modifier specification 29 | * @param o optional context object 30 | * @param args 0..n additional arguments to provide to the listener. 31 | * @return {Event.Handle} the detach handle 32 | */ 33 | Y.Env.evt.plugins.key = { 34 | 35 | on: function(type, fn, id, spec, o) { 36 | var a = Y.Array(arguments, 0, true), parsed, etype, criteria, ename; 37 | 38 | parsed = spec && spec.split(':'); 39 | 40 | if (!spec || spec.indexOf(':') == -1 || !parsed[1]) { 41 | Y.log('Illegal key spec, creating a regular keypress listener instead.', 'info', 'event'); 42 | a[0] = 'key' + ((parsed && parsed[0]) || 'press'); 43 | return Y.on.apply(Y, a); 44 | } 45 | 46 | // key event type: 'down', 'up', or 'press' 47 | etype = parsed[0]; 48 | 49 | // list of key codes optionally followed by modifiers 50 | criteria = (parsed[1]) ? parsed[1].split(/,|\+/) : null; 51 | 52 | // the name of the custom event that will be created for the spec 53 | ename = (Y.Lang.isString(id) ? id : Y.stamp(id)) + spec; 54 | 55 | ename = ename.replace(/,/g, '_'); 56 | 57 | if (!Y.getEvent(ename)) { 58 | 59 | // subscribe spec validator to the DOM event 60 | Y.on(type + etype, function(e) { 61 | 62 | // Y.log('keylistener: ' + e.keyCode); 63 | 64 | var passed = false, failed = false, i, crit, critInt; 65 | 66 | for (i=0; iAdds subscription and delegation support for mouseenter and mouseleave 12 | * events. Unlike mouseover and mouseout, these events aren't fired from child 13 | * elements of a subscribed node.

14 | * 15 | *

This avoids receiving three mouseover notifications from a setup like

16 | * 17 | *
div#container > p > a[href]
18 | * 19 | *

where

20 | * 21 | *
Y.one('#container').on('mouseover', callback)
22 | * 23 | *

When the mouse moves over the link, one mouseover event is fired from 24 | * #container, then when the mouse moves over the p, another mouseover event is 25 | * fired and bubbles to #container, causing a second notification, and finally 26 | * when the mouse moves over the link, a third mouseover event is fired and 27 | * bubbles to #container for a third notification.

28 | * 29 | *

By contrast, using mouseenter instead of mouseover, the callback would be 30 | * executed only once when the mouse moves over #container.

31 | * 32 | * @module event 33 | * @submodule event-mouseenter 34 | */ 35 | function notify(e, notifier) { 36 | var current = e.currentTarget, 37 | related = e.relatedTarget; 38 | 39 | if (current !== related && !current.contains(related)) { 40 | notifier.fire(e); 41 | } 42 | } 43 | 44 | var config = { 45 | proxyType: "mouseover", 46 | 47 | on: function (node, sub, notifier) { 48 | sub.onHandle = node.on(this.proxyType, notify, null, notifier); 49 | }, 50 | 51 | detach: function (node, sub) { 52 | sub.onHandle.detach(); 53 | }, 54 | 55 | delegate: function (node, sub, notifier, filter) { 56 | sub.delegateHandle = 57 | Y.delegate(this.proxyType, notify, node, filter, null, notifier); 58 | }, 59 | 60 | detachDelegate: function (node, sub) { 61 | sub.delegateHandle.detach(); 62 | } 63 | }; 64 | 65 | Y.Event.define("mouseenter", config, true); 66 | Y.Event.define("mouseleave", Y.merge(config, { proxyType: "mouseout" }), true); 67 | 68 | 69 | }, '3.3.0' ,{requires:['event-synthetic']}); 70 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-mouseenter-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-mouseenter",function(c){function b(h,d){var g=h.currentTarget,f=h.relatedTarget;if(g!==f&&!g.contains(f)){d.fire(h);}}var a={proxyType:"mouseover",on:function(f,d,e){d.onHandle=f.on(this.proxyType,b,null,e);},detach:function(e,d){d.onHandle.detach();},delegate:function(g,e,f,d){e.delegateHandle=c.delegate(this.proxyType,b,g,d,null,f);},detachDelegate:function(e,d){d.delegateHandle.detach();}};c.Event.define("mouseenter",a,true);c.Event.define("mouseleave",c.merge(a,{proxyType:"mouseout"}),true);},"3.3.0",{requires:["event-synthetic"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-mouseenter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-mouseenter', function(Y) { 9 | 10 | /** 11 | *

Adds subscription and delegation support for mouseenter and mouseleave 12 | * events. Unlike mouseover and mouseout, these events aren't fired from child 13 | * elements of a subscribed node.

14 | * 15 | *

This avoids receiving three mouseover notifications from a setup like

16 | * 17 | *
div#container > p > a[href]
18 | * 19 | *

where

20 | * 21 | *
Y.one('#container').on('mouseover', callback)
22 | * 23 | *

When the mouse moves over the link, one mouseover event is fired from 24 | * #container, then when the mouse moves over the p, another mouseover event is 25 | * fired and bubbles to #container, causing a second notification, and finally 26 | * when the mouse moves over the link, a third mouseover event is fired and 27 | * bubbles to #container for a third notification.

28 | * 29 | *

By contrast, using mouseenter instead of mouseover, the callback would be 30 | * executed only once when the mouse moves over #container.

31 | * 32 | * @module event 33 | * @submodule event-mouseenter 34 | */ 35 | function notify(e, notifier) { 36 | var current = e.currentTarget, 37 | related = e.relatedTarget; 38 | 39 | if (current !== related && !current.contains(related)) { 40 | notifier.fire(e); 41 | } 42 | } 43 | 44 | var config = { 45 | proxyType: "mouseover", 46 | 47 | on: function (node, sub, notifier) { 48 | sub.onHandle = node.on(this.proxyType, notify, null, notifier); 49 | }, 50 | 51 | detach: function (node, sub) { 52 | sub.onHandle.detach(); 53 | }, 54 | 55 | delegate: function (node, sub, notifier, filter) { 56 | sub.delegateHandle = 57 | Y.delegate(this.proxyType, notify, node, filter, null, notifier); 58 | }, 59 | 60 | detachDelegate: function (node, sub) { 61 | sub.delegateHandle.detach(); 62 | } 63 | }; 64 | 65 | Y.Event.define("mouseenter", config, true); 66 | Y.Event.define("mouseleave", Y.merge(config, { proxyType: "mouseout" }), true); 67 | 68 | 69 | }, '3.3.0' ,{requires:['event-synthetic']}); 70 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-mousewheel-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-mousewheel', function(Y) { 9 | 10 | /** 11 | * Adds mousewheel event support 12 | * @module event 13 | * @submodule event-mousewheel 14 | */ 15 | var DOM_MOUSE_SCROLL = 'DOMMouseScroll', 16 | fixArgs = function(args) { 17 | var a = Y.Array(args, 0, true), target; 18 | if (Y.UA.gecko) { 19 | a[0] = DOM_MOUSE_SCROLL; 20 | target = Y.config.win; 21 | } else { 22 | target = Y.config.doc; 23 | } 24 | 25 | if (a.length < 3) { 26 | a[2] = target; 27 | } else { 28 | a.splice(2, 0, target); 29 | } 30 | 31 | return a; 32 | }; 33 | 34 | /** 35 | * Mousewheel event. This listener is automatically attached to the 36 | * correct target, so one should not be supplied. Mouse wheel 37 | * direction and velocity is stored in the 'mouseDelta' field. 38 | * @event mousewheel 39 | * @param type {string} 'mousewheel' 40 | * @param fn {function} the callback to execute 41 | * @param context optional context object 42 | * @param args 0..n additional arguments to provide to the listener. 43 | * @return {EventHandle} the detach handle 44 | * @for YUI 45 | */ 46 | Y.Env.evt.plugins.mousewheel = { 47 | on: function() { 48 | return Y.Event._attach(fixArgs(arguments)); 49 | }, 50 | 51 | detach: function() { 52 | return Y.Event.detach.apply(Y.Event, fixArgs(arguments)); 53 | } 54 | }; 55 | 56 | 57 | }, '3.3.0' ,{requires:['node-base']}); 58 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-mousewheel-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-mousewheel",function(c){var b="DOMMouseScroll",a=function(e){var d=c.Array(e,0,true),f;if(c.UA.gecko){d[0]=b;f=c.config.win;}else{f=c.config.doc;}if(d.length<3){d[2]=f;}else{d.splice(2,0,f);}return d;};c.Env.evt.plugins.mousewheel={on:function(){return c.Event._attach(a(arguments));},detach:function(){return c.Event.detach.apply(c.Event,a(arguments));}};},"3.3.0",{requires:["node-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-mousewheel.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-mousewheel', function(Y) { 9 | 10 | /** 11 | * Adds mousewheel event support 12 | * @module event 13 | * @submodule event-mousewheel 14 | */ 15 | var DOM_MOUSE_SCROLL = 'DOMMouseScroll', 16 | fixArgs = function(args) { 17 | var a = Y.Array(args, 0, true), target; 18 | if (Y.UA.gecko) { 19 | a[0] = DOM_MOUSE_SCROLL; 20 | target = Y.config.win; 21 | } else { 22 | target = Y.config.doc; 23 | } 24 | 25 | if (a.length < 3) { 26 | a[2] = target; 27 | } else { 28 | a.splice(2, 0, target); 29 | } 30 | 31 | return a; 32 | }; 33 | 34 | /** 35 | * Mousewheel event. This listener is automatically attached to the 36 | * correct target, so one should not be supplied. Mouse wheel 37 | * direction and velocity is stored in the 'mouseDelta' field. 38 | * @event mousewheel 39 | * @param type {string} 'mousewheel' 40 | * @param fn {function} the callback to execute 41 | * @param context optional context object 42 | * @param args 0..n additional arguments to provide to the listener. 43 | * @return {EventHandle} the detach handle 44 | * @for YUI 45 | */ 46 | Y.Env.evt.plugins.mousewheel = { 47 | on: function() { 48 | return Y.Event._attach(fixArgs(arguments)); 49 | }, 50 | 51 | detach: function() { 52 | return Y.Event.detach.apply(Y.Event, fixArgs(arguments)); 53 | } 54 | }; 55 | 56 | 57 | }, '3.3.0' ,{requires:['node-base']}); 58 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-resize-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-resize', function(Y) { 9 | 10 | /** 11 | * Adds a window resize event that has its behavior normalized to fire at the 12 | * end of the resize rather than constantly during the resize. 13 | * @module event 14 | * @submodule event-resize 15 | */ 16 | (function() { 17 | 18 | var detachHandle, 19 | 20 | timerHandle, 21 | 22 | CE_NAME = 'window:resize', 23 | 24 | handler = function(e) { 25 | 26 | if (Y.UA.gecko) { 27 | 28 | Y.fire(CE_NAME, e); 29 | 30 | } else { 31 | 32 | if (timerHandle) { 33 | timerHandle.cancel(); 34 | } 35 | 36 | timerHandle = Y.later(Y.config.windowResizeDelay || 40, Y, function() { 37 | Y.fire(CE_NAME, e); 38 | }); 39 | } 40 | 41 | }; 42 | 43 | 44 | /** 45 | * Firefox fires the window resize event once when the resize action 46 | * finishes, other browsers fire the event periodically during the 47 | * resize. This code uses timeout logic to simulate the Firefox 48 | * behavior in other browsers. 49 | * @event windowresize 50 | * @for YUI 51 | */ 52 | Y.Env.evt.plugins.windowresize = { 53 | 54 | on: function(type, fn) { 55 | 56 | // check for single window listener and add if needed 57 | if (!detachHandle) { 58 | detachHandle = Y.Event._attach(['resize', handler]); 59 | } 60 | 61 | var a = Y.Array(arguments, 0, true); 62 | a[0] = CE_NAME; 63 | 64 | return Y.on.apply(Y, a); 65 | } 66 | }; 67 | 68 | })(); 69 | 70 | 71 | }, '3.3.0' ,{requires:['node-base']}); 72 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-resize-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-resize",function(a){(function(){var c,b,e="window:resize",d=function(f){if(a.UA.gecko){a.fire(e,f);}else{if(b){b.cancel();}b=a.later(a.config.windowResizeDelay||40,a,function(){a.fire(e,f);});}};a.Env.evt.plugins.windowresize={on:function(h,g){if(!c){c=a.Event._attach(["resize",d]);}var f=a.Array(arguments,0,true);f[0]=e;return a.on.apply(a,f);}};})();},"3.3.0",{requires:["node-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-resize.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('event-resize', function(Y) { 9 | 10 | /** 11 | * Adds a window resize event that has its behavior normalized to fire at the 12 | * end of the resize rather than constantly during the resize. 13 | * @module event 14 | * @submodule event-resize 15 | */ 16 | (function() { 17 | 18 | var detachHandle, 19 | 20 | timerHandle, 21 | 22 | CE_NAME = 'window:resize', 23 | 24 | handler = function(e) { 25 | 26 | if (Y.UA.gecko) { 27 | 28 | Y.fire(CE_NAME, e); 29 | 30 | } else { 31 | 32 | if (timerHandle) { 33 | timerHandle.cancel(); 34 | } 35 | 36 | timerHandle = Y.later(Y.config.windowResizeDelay || 40, Y, function() { 37 | Y.fire(CE_NAME, e); 38 | }); 39 | } 40 | 41 | }; 42 | 43 | 44 | /** 45 | * Firefox fires the window resize event once when the resize action 46 | * finishes, other browsers fire the event periodically during the 47 | * resize. This code uses timeout logic to simulate the Firefox 48 | * behavior in other browsers. 49 | * @event windowresize 50 | * @for YUI 51 | */ 52 | Y.Env.evt.plugins.windowresize = { 53 | 54 | on: function(type, fn) { 55 | 56 | // check for single window listener and add if needed 57 | if (!detachHandle) { 58 | detachHandle = Y.Event._attach(['resize', handler]); 59 | } 60 | 61 | var a = Y.Array(arguments, 0, true); 62 | a[0] = CE_NAME; 63 | 64 | return Y.on.apply(Y, a); 65 | } 66 | }; 67 | 68 | })(); 69 | 70 | 71 | }, '3.3.0' ,{requires:['node-base']}); 72 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/event/event-synthetic-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("event-synthetic",function(b){var h=b.Env.evt.dom_map,d=b.Array,g=b.Lang,j=g.isObject,c=g.isString,e=b.Selector.query,i=function(){};function f(l,k){this.handle=l;this.emitFacade=k;}f.prototype.fire=function(q){var k=d(arguments,0,true),o=this.handle,p=o.evt,m=o.sub,r=m.context,l=m.filter,n=q||{};if(this.emitFacade){if(!q||!q.preventDefault){n=p._getFacade();if(j(q)&&!q.preventDefault){b.mix(n,q,true);k[0]=n;}else{k.unshift(n);}}n.type=p.type;n.details=k.slice();if(l){n.container=p.host;}}else{if(l&&j(q)&&q.currentTarget){k.shift();}}m.context=r||n.currentTarget||p.host;p.fire.apply(p,k);m.context=r;};function a(){this._init.apply(this,arguments);}b.mix(a,{Notifier:f,getRegistry:function(q,p,n){var o=q._node,m=b.stamp(o),l="event:"+m+p+"_synth",k=h[m]||(h[m]={});if(!k[l]&&n){k[l]={type:"_synth",fn:i,capture:false,el:o,key:l,domkey:m,notifiers:[],detachAll:function(){var r=this.notifiers,s=r.length;while(--s>=0){r[s].detach();}}};}return(k[l])?k[l].notifiers:null;},_deleteSub:function(l){if(l&&l.fn){var k=this.eventDef,m=(l.filter)?"detachDelegate":"detach";this.subscribers={};this.subCount=0;k[m](l.node,l,this.notifier,l.filter);k._unregisterSub(l);delete l.fn;delete l.node;delete l.context;}},prototype:{constructor:a,_init:function(){var k=this.publishConfig||(this.publishConfig={});this.emitFacade=("emitFacade" in k)?k.emitFacade:true;k.emitFacade=false;},processArgs:i,on:i,detach:i,delegate:i,detachDelegate:i,_on:function(n,p){var o=[],l=this.processArgs(n,p),k=n[2],r=p?"delegate":"on",m,q;m=(c(k))?e(k):d(k);if(!m.length&&c(k)){q=b.on("available",function(){b.mix(q,b[r].apply(b,n),true);},k);return q;}b.Array.each(m,function(t){var u=n.slice(),s;t=b.one(t);if(t){if(p){s=u.splice(3,1)[0];}u.splice(0,4,u[1],u[3]);if(!this.preventDups||!this.getSubs(t,n,null,true)){q=this._getNotifier(t,u,l,s);this[r](t,q.sub,q.notifier,s);o.push(q);}}},this);return(o.length===1)?o[0]:new b.EventHandle(o);},_getNotifier:function(n,q,o,m){var s=new b.CustomEvent(this.type,this.publishConfig),p=s.on.apply(s,q),r=new f(p,this.emitFacade),l=a.getRegistry(n,this.type,true),k=p.sub;p.notifier=r;k.node=n;k.filter=m;if(o){this.applyArgExtras(o,k);}b.mix(s,{eventDef:this,notifier:r,host:n,currentTarget:n,target:n,el:n._node,_delete:a._deleteSub},true);l.push(p);return p;},applyArgExtras:function(k,l){l._extra=k;},_unregisterSub:function(m){var k=a.getRegistry(m.node,this.type),l;if(k){for(l=k.length-1;l>=0;--l){if(k[l].sub===m){k.splice(l,1);break;}}}},_detach:function(m){var r=m[2],p=(c(r))?e(r):d(r),q,o,k,n,l;m.splice(2,1);for(o=0,k=p.length;o=0;--l){n[l].detach();}}}}},getSubs:function(l,q,k,n){var r=a.getRegistry(l,this.type),s=[],m,p,o;if(r){if(!k){k=this.subMatch;}for(m=0,p=r.length;m=0;--h){if(k[h].charAt(0)==="@"){k[h]=j[parseInt(k[h].substr(1),10)];}}l=c(d.config.win,k)||c(d,k)||c(d,k.slice(1));}}return l||b;},_format:function(e,g){var h=this._template.replace(/\{callback\}/,g),f;if(this._pattern.test(e)){return e.replace(this._pattern,h);}else{f=e.slice(-1);if(f!=="&"&&f!=="?"){e+=(e.indexOf("?")>-1)?"&":"?";}return e+h;}}},true);},"3.3.0",{requires:["jsonp"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/align-plugin-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("align-plugin",function(c){var e="offsetWidth",d="offsetHeight",b=b;function a(f){if(f.host){this._host=f.host;}}a.prototype={to:function(j,t,l,o){this._syncArgs=c.Array(arguments);if(j.top===b){j=c.one(j).get("region");}if(j){var s=[j.left,j.top],q=[j.width,j.height],n=a.points,f=this._host,h=null,r=f.getAttrs([d,e]),k=[0-r[e],0-r[d]],p=t?n[t.charAt(0)]:h,m=(t&&t!=="cc")?n[t.charAt(1)]:h,i=l?n[l.charAt(0)]:h,g=(l&&l!=="cc")?n[l.charAt(1)]:h;if(p){s=p(s,q,t);}if(m){s=m(s,q,t);}if(i){s=i(s,k,l);}if(g){s=g(s,k,l);}if(s&&f){f.setXY(s);}this._resize(o);}return this;},sync:function(){this.to.apply(this,this._syncArgs);return this;},_resize:function(g){var f=this._handle;if(g&&!f){this._handle=c.on("resize",this._onresize,window,this);}else{if(!g&&f){f.detach();}}},_onresize:function(){var f=this;setTimeout(function(){f.sync();});},center:function(g,f){this.to(g,"cc","cc",f);return this;},destroy:function(){var f=this._handle;if(f){f.detach();}}};a.points={"t":function(f,g){return f;},"r":function(f,g){return[f[0]+g[0],f[1]];},"b":function(f,g){return[f[0],f[1]+g[1]];},"l":function(f,g){return f;},"c":function(i,k,f){var h=(f[0]==="t"||f[0]==="b")?0:1,g,j;if(f==="cc"){g=[i[0]+k[0]/2,i[1]+k[1]/2];}else{j=i[h]+k[h]/2;g=(h)?[i[0],j]:[j,i[1]];}return g;}};a.NAME="Align";a.NS="align";a.prototype.constructor=a;c.namespace("Plugin");c.Plugin.Align=a;},"3.3.0",{requires:["node-screen"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-deprecated-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-deprecated', function(Y) { 9 | 10 | var Y_Node = Y.Node; 11 | 12 | /* 13 | * Flat data store for off-DOM usage 14 | * @config data 15 | * @type any 16 | * @deprecated Use getData/setData 17 | */ 18 | Y_Node.ATTRS.data = { 19 | getter: function() { 20 | return this._dataVal; 21 | }, 22 | setter: function(val) { 23 | this._dataVal = val; 24 | return val; 25 | }, 26 | value: null 27 | }; 28 | 29 | /** 30 | * Returns a single Node instance bound to the node or the 31 | * first element matching the given selector. 32 | * @method Y.get 33 | * @deprecated Use Y.one 34 | * @static 35 | * @param {String | HTMLElement} node a node or Selector 36 | * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. 37 | */ 38 | Y.get = Y_Node.get = function() { 39 | Y.log('Y.get is deprecated, use Y.one', 'warn', 'deprecated'); 40 | return Y_Node.one.apply(Y_Node, arguments); 41 | }; 42 | 43 | 44 | Y.mix(Y_Node.prototype, { 45 | /** 46 | * Retrieves a Node instance of nodes based on the given CSS selector. 47 | * @method query 48 | * @deprecated Use one() 49 | * @param {string} selector The CSS selector to test against. 50 | * @return {Node} A Node instance for the matching HTMLElement. 51 | */ 52 | query: function(selector) { 53 | Y.log('query() is deprecated, use one()', 'warn', 'deprecated'); 54 | return this.one(selector); 55 | }, 56 | 57 | /** 58 | * Retrieves a nodeList based on the given CSS selector. 59 | * @method queryAll 60 | * @deprecated Use all() 61 | * @param {string} selector The CSS selector to test against. 62 | * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. 63 | */ 64 | queryAll: function(selector) { 65 | Y.log('queryAll() is deprecated, use all()', 'warn', 'deprecated'); 66 | return this.all(selector); 67 | }, 68 | 69 | /** 70 | * Applies the given function to each Node in the NodeList. 71 | * @method each 72 | * @deprecated Use NodeList 73 | * @param {Function} fn The function to apply 74 | * @param {Object} context optional An optional context to apply the function with 75 | * Default context is the NodeList instance 76 | * @chainable 77 | */ 78 | each: function(fn, context) { 79 | context = context || this; 80 | Y.log('each is deprecated on Node', 'warn', 'deprecated'); 81 | return fn.call(context, this); 82 | }, 83 | 84 | /** 85 | * Retrieves the Node instance at the given index. 86 | * @method item 87 | * @deprecated Use NodeList 88 | * 89 | * @param {Number} index The index of the target Node. 90 | * @return {Node} The Node instance at the given index. 91 | */ 92 | item: function(index) { 93 | Y.log('item is deprecated on Node', 'warn', 'deprecated'); 94 | return this; 95 | }, 96 | 97 | /** 98 | * Returns the current number of items in the Node. 99 | * @method size 100 | * @deprecated Use NodeList 101 | * @return {Int} The number of items in the Node. 102 | */ 103 | size: function() { 104 | Y.log('size is deprecated on Node', 'warn', 'deprecated'); 105 | return this._node ? 1 : 0; 106 | } 107 | 108 | }); 109 | 110 | 111 | 112 | 113 | }, '3.3.0' ,{requires:['node-base']}); 114 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-deprecated-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-deprecated",function(b){var a=b.Node;a.ATTRS.data={getter:function(){return this._dataVal;},setter:function(c){this._dataVal=c;return c;},value:null};b.get=a.get=function(){return a.one.apply(a,arguments);};b.mix(a.prototype,{query:function(c){return this.one(c);},queryAll:function(c){return this.all(c);},each:function(d,c){c=c||this;return d.call(c,this);},item:function(c){return this;},size:function(){return this._node?1:0;}});},"3.3.0",{requires:["node-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-deprecated.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-deprecated', function(Y) { 9 | 10 | var Y_Node = Y.Node; 11 | 12 | /* 13 | * Flat data store for off-DOM usage 14 | * @config data 15 | * @type any 16 | * @deprecated Use getData/setData 17 | */ 18 | Y_Node.ATTRS.data = { 19 | getter: function() { 20 | return this._dataVal; 21 | }, 22 | setter: function(val) { 23 | this._dataVal = val; 24 | return val; 25 | }, 26 | value: null 27 | }; 28 | 29 | /** 30 | * Returns a single Node instance bound to the node or the 31 | * first element matching the given selector. 32 | * @method Y.get 33 | * @deprecated Use Y.one 34 | * @static 35 | * @param {String | HTMLElement} node a node or Selector 36 | * @param {Y.Node || HTMLElement} doc an optional document to scan. Defaults to Y.config.doc. 37 | */ 38 | Y.get = Y_Node.get = function() { 39 | return Y_Node.one.apply(Y_Node, arguments); 40 | }; 41 | 42 | 43 | Y.mix(Y_Node.prototype, { 44 | /** 45 | * Retrieves a Node instance of nodes based on the given CSS selector. 46 | * @method query 47 | * @deprecated Use one() 48 | * @param {string} selector The CSS selector to test against. 49 | * @return {Node} A Node instance for the matching HTMLElement. 50 | */ 51 | query: function(selector) { 52 | return this.one(selector); 53 | }, 54 | 55 | /** 56 | * Retrieves a nodeList based on the given CSS selector. 57 | * @method queryAll 58 | * @deprecated Use all() 59 | * @param {string} selector The CSS selector to test against. 60 | * @return {NodeList} A NodeList instance for the matching HTMLCollection/Array. 61 | */ 62 | queryAll: function(selector) { 63 | return this.all(selector); 64 | }, 65 | 66 | /** 67 | * Applies the given function to each Node in the NodeList. 68 | * @method each 69 | * @deprecated Use NodeList 70 | * @param {Function} fn The function to apply 71 | * @param {Object} context optional An optional context to apply the function with 72 | * Default context is the NodeList instance 73 | * @chainable 74 | */ 75 | each: function(fn, context) { 76 | context = context || this; 77 | return fn.call(context, this); 78 | }, 79 | 80 | /** 81 | * Retrieves the Node instance at the given index. 82 | * @method item 83 | * @deprecated Use NodeList 84 | * 85 | * @param {Number} index The index of the target Node. 86 | * @return {Node} The Node instance at the given index. 87 | */ 88 | item: function(index) { 89 | return this; 90 | }, 91 | 92 | /** 93 | * Returns the current number of items in the Node. 94 | * @method size 95 | * @deprecated Use NodeList 96 | * @return {Int} The number of items in the Node. 97 | */ 98 | size: function() { 99 | return this._node ? 1 : 0; 100 | } 101 | 102 | }); 103 | 104 | 105 | 106 | 107 | }, '3.3.0' ,{requires:['node-base']}); 108 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-delegate-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-event-delegate', function(Y) { 9 | 10 | /** 11 | * Functionality to make the node a delegated event container 12 | * @module node 13 | * @submodule node-event-delegate 14 | */ 15 | 16 | /** 17 | *

Sets up a delegation listener for an event occurring inside the Node. 18 | * The delegated event will be verified against a supplied selector or 19 | * filtering function to test if the event references at least one node that 20 | * should trigger the subscription callback.

21 | * 22 | *

Selector string filters will trigger the callback if the event originated 23 | * from a node that matches it or is contained in a node that matches it. 24 | * Function filters are called for each Node up the parent axis to the 25 | * subscribing container node, and receive at each level the Node and the event 26 | * object. The function should return true (or a truthy value) if that Node 27 | * should trigger the subscription callback. Note, it is possible for filters 28 | * to match multiple Nodes for a single event. In this case, the delegate 29 | * callback will be executed for each matching Node.

30 | * 31 | *

For each matching Node, the callback will be executed with its 'this' 32 | * object set to the Node matched by the filter (unless a specific context was 33 | * provided during subscription), and the provided event's 34 | * currentTarget will also be set to the matching Node. The 35 | * containing Node from which the subscription was originally made can be 36 | * referenced as e.container. 37 | * 38 | * @method delegate 39 | * @param type {String} the event type to delegate 40 | * @param fn {Function} the callback function to execute. This function 41 | * will be provided the event object for the delegated event. 42 | * @param spec {String|Function} a selector that must match the target of the 43 | * event or a function to test target and its parents for a match 44 | * @param context {Object} optional argument that specifies what 'this' refers to. 45 | * @param args* {any} 0..n additional arguments to pass on to the callback function. 46 | * These arguments will be added after the event object. 47 | * @return {EventHandle} the detach handle 48 | * @for Node 49 | */ 50 | Y.Node.prototype.delegate = function(type) { 51 | 52 | var args = Y.Array(arguments, 0, true), 53 | index = (Y.Lang.isObject(type) && !Y.Lang.isArray(type)) ? 1 : 2; 54 | 55 | args.splice(index, 0, this._node); 56 | 57 | return Y.delegate.apply(Y, args); 58 | }; 59 | 60 | 61 | }, '3.3.0' ,{requires:['node-base', 'event-delegate']}); 62 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-delegate-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-event-delegate",function(a){a.Node.prototype.delegate=function(d){var c=a.Array(arguments,0,true),b=(a.Lang.isObject(d)&&!a.Lang.isArray(d))?1:2;c.splice(b,0,this._node);return a.delegate.apply(a,c);};},"3.3.0",{requires:["node-base","event-delegate"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-delegate.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-event-delegate', function(Y) { 9 | 10 | /** 11 | * Functionality to make the node a delegated event container 12 | * @module node 13 | * @submodule node-event-delegate 14 | */ 15 | 16 | /** 17 | *

Sets up a delegation listener for an event occurring inside the Node. 18 | * The delegated event will be verified against a supplied selector or 19 | * filtering function to test if the event references at least one node that 20 | * should trigger the subscription callback.

21 | * 22 | *

Selector string filters will trigger the callback if the event originated 23 | * from a node that matches it or is contained in a node that matches it. 24 | * Function filters are called for each Node up the parent axis to the 25 | * subscribing container node, and receive at each level the Node and the event 26 | * object. The function should return true (or a truthy value) if that Node 27 | * should trigger the subscription callback. Note, it is possible for filters 28 | * to match multiple Nodes for a single event. In this case, the delegate 29 | * callback will be executed for each matching Node.

30 | * 31 | *

For each matching Node, the callback will be executed with its 'this' 32 | * object set to the Node matched by the filter (unless a specific context was 33 | * provided during subscription), and the provided event's 34 | * currentTarget will also be set to the matching Node. The 35 | * containing Node from which the subscription was originally made can be 36 | * referenced as e.container. 37 | * 38 | * @method delegate 39 | * @param type {String} the event type to delegate 40 | * @param fn {Function} the callback function to execute. This function 41 | * will be provided the event object for the delegated event. 42 | * @param spec {String|Function} a selector that must match the target of the 43 | * event or a function to test target and its parents for a match 44 | * @param context {Object} optional argument that specifies what 'this' refers to. 45 | * @param args* {any} 0..n additional arguments to pass on to the callback function. 46 | * These arguments will be added after the event object. 47 | * @return {EventHandle} the detach handle 48 | * @for Node 49 | */ 50 | Y.Node.prototype.delegate = function(type) { 51 | 52 | var args = Y.Array(arguments, 0, true), 53 | index = (Y.Lang.isObject(type) && !Y.Lang.isArray(type)) ? 1 : 2; 54 | 55 | args.splice(index, 0, this._node); 56 | 57 | return Y.delegate.apply(Y, args); 58 | }; 59 | 60 | 61 | }, '3.3.0' ,{requires:['node-base', 'event-delegate']}); 62 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-html5-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-event-html5', function(Y) { 9 | 10 | Y.mix(Y.Node.DOM_EVENTS, { 11 | DOMActivate: 1, 12 | DOMContentLoaded: 1, 13 | afterprint: 1, 14 | beforeprint: 1, 15 | canplay: 1, 16 | canplaythrough: 1, 17 | durationchange: 1, 18 | emptied: 1, 19 | ended: 1, 20 | formchange: 1, 21 | forminput: 1, 22 | hashchange: 1, 23 | input: 1, 24 | invalid: 1, 25 | loadedmetadata: 1, 26 | loadeddata: 1, 27 | loadstart: 1, 28 | offline: 1, 29 | online: 1, 30 | pagehide: 1, 31 | pageshow: 1, 32 | pause: 1, 33 | play: 1, 34 | playing: 1, 35 | popstate: 1, 36 | progress: 1, 37 | ratechange: 1, 38 | readystatechange: 1, 39 | redo: 1, 40 | seeking: 1, 41 | seeked: 1, 42 | show: 1, 43 | stalled: 1, 44 | suspend: 1, 45 | timeupdate: 1, 46 | undeo: 1, 47 | volumechange: 1, 48 | waiting: 1 49 | }); 50 | 51 | 52 | }, '3.3.0' ,{requires:['node-base']}); 53 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-html5-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-event-html5",function(a){a.mix(a.Node.DOM_EVENTS,{DOMActivate:1,DOMContentLoaded:1,afterprint:1,beforeprint:1,canplay:1,canplaythrough:1,durationchange:1,emptied:1,ended:1,formchange:1,forminput:1,hashchange:1,input:1,invalid:1,loadedmetadata:1,loadeddata:1,loadstart:1,offline:1,online:1,pagehide:1,pageshow:1,pause:1,play:1,playing:1,popstate:1,progress:1,ratechange:1,readystatechange:1,redo:1,seeking:1,seeked:1,show:1,stalled:1,suspend:1,timeupdate:1,undeo:1,volumechange:1,waiting:1});},"3.3.0",{requires:["node-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-html5.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-event-html5', function(Y) { 9 | 10 | Y.mix(Y.Node.DOM_EVENTS, { 11 | DOMActivate: 1, 12 | DOMContentLoaded: 1, 13 | afterprint: 1, 14 | beforeprint: 1, 15 | canplay: 1, 16 | canplaythrough: 1, 17 | durationchange: 1, 18 | emptied: 1, 19 | ended: 1, 20 | formchange: 1, 21 | forminput: 1, 22 | hashchange: 1, 23 | input: 1, 24 | invalid: 1, 25 | loadedmetadata: 1, 26 | loadeddata: 1, 27 | loadstart: 1, 28 | offline: 1, 29 | online: 1, 30 | pagehide: 1, 31 | pageshow: 1, 32 | pause: 1, 33 | play: 1, 34 | playing: 1, 35 | popstate: 1, 36 | progress: 1, 37 | ratechange: 1, 38 | readystatechange: 1, 39 | redo: 1, 40 | seeking: 1, 41 | seeked: 1, 42 | show: 1, 43 | stalled: 1, 44 | suspend: 1, 45 | timeupdate: 1, 46 | undeo: 1, 47 | volumechange: 1, 48 | waiting: 1 49 | }); 50 | 51 | 52 | }, '3.3.0' ,{requires:['node-base']}); 53 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-simulate-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-event-simulate', function(Y) { 9 | 10 | /** 11 | * Adds functionality to simulate events. 12 | * @module node 13 | * @submodule node-event-simulate 14 | */ 15 | 16 | /** 17 | * Simulates an event on the node. 18 | * @param {String} type The type of event to simulate (i.e., "click"). 19 | * @param {Object} options (Optional) Extra options to copy onto the event object. 20 | * @return {void} 21 | * @for Node 22 | * @method simulate 23 | */ 24 | Y.Node.prototype.simulate = function(type, options) { 25 | Y.Event.simulate(Y.Node.getDOMNode(this), type, options); 26 | }; 27 | 28 | 29 | 30 | }, '3.3.0' ,{requires:['node-base', 'event-simulate']}); 31 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-simulate-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-event-simulate",function(a){a.Node.prototype.simulate=function(c,b){a.Event.simulate(a.Node.getDOMNode(this),c,b);};},"3.3.0",{requires:["node-base","event-simulate"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-event-simulate.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-event-simulate', function(Y) { 9 | 10 | /** 11 | * Adds functionality to simulate events. 12 | * @module node 13 | * @submodule node-event-simulate 14 | */ 15 | 16 | /** 17 | * Simulates an event on the node. 18 | * @param {String} type The type of event to simulate (i.e., "click"). 19 | * @param {Object} options (Optional) Extra options to copy onto the event object. 20 | * @return {void} 21 | * @for Node 22 | * @method simulate 23 | */ 24 | Y.Node.prototype.simulate = function(type, options) { 25 | Y.Event.simulate(Y.Node.getDOMNode(this), type, options); 26 | }; 27 | 28 | 29 | 30 | }, '3.3.0' ,{requires:['node-base', 'event-simulate']}); 31 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-load-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-load', function(Y) { 9 | 10 | /** 11 | * Extended Node interface with an basic IO api. 12 | * @module node 13 | * @submodule node-load 14 | */ 15 | 16 | /** 17 | * The default IO complete handler. 18 | * @method _ioComplete 19 | * @protected 20 | * @for Node 21 | * @param {String} code The response code. 22 | * @param {Object} response The response object. 23 | * @param {Array} args An array containing the callback and selector 24 | */ 25 | 26 | Y.Node.prototype._ioComplete = function(code, response, args) { 27 | var selector = args[0], 28 | callback = args[1], 29 | tmp, 30 | content; 31 | 32 | if (response && response.responseText) { 33 | content = response.responseText; 34 | if (selector) { 35 | tmp = Y.DOM.create(content); 36 | content = Y.Selector.query(selector, tmp); 37 | } 38 | this.setContent(content); 39 | } 40 | if (callback) { 41 | callback.call(this, code, response); 42 | } 43 | }; 44 | 45 | /** 46 | * Loads content from the given url and replaces the Node's 47 | * existing content with it. 48 | * @method load 49 | * @param {String} html The markup to wrap around the node. 50 | * @param {String} selector An optional selector representing subset 51 | * @param {Function} callback An optional function to run after the content has been loaded. 52 | * of the content. 53 | * @chainable 54 | */ 55 | Y.Node.prototype.load = function(url, selector, callback) { 56 | if (typeof selector == 'function') { 57 | callback = selector; 58 | selector = null; 59 | } 60 | var config = { 61 | context: this, 62 | on: { 63 | complete: this._ioComplete 64 | }, 65 | arguments: [selector, callback] 66 | }; 67 | 68 | Y.io(url, config); 69 | return this; 70 | } 71 | 72 | 73 | }, '3.3.0' ,{requires:['node-base', 'io-base']}); 74 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-load-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-load",function(a){a.Node.prototype._ioComplete=function(g,c,d){var b=d[0],h=d[1],e,f;if(c&&c.responseText){f=c.responseText;if(b){e=a.DOM.create(f);f=a.Selector.query(b,e);}this.setContent(f);}if(h){h.call(this,g,c);}};a.Node.prototype.load=function(d,b,e){if(typeof b=="function"){e=b;b=null;}var c={context:this,on:{complete:this._ioComplete},arguments:[b,e]};a.io(d,c);return this;};},"3.3.0",{requires:["node-base","io-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-load.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-load', function(Y) { 9 | 10 | /** 11 | * Extended Node interface with an basic IO api. 12 | * @module node 13 | * @submodule node-load 14 | */ 15 | 16 | /** 17 | * The default IO complete handler. 18 | * @method _ioComplete 19 | * @protected 20 | * @for Node 21 | * @param {String} code The response code. 22 | * @param {Object} response The response object. 23 | * @param {Array} args An array containing the callback and selector 24 | */ 25 | 26 | Y.Node.prototype._ioComplete = function(code, response, args) { 27 | var selector = args[0], 28 | callback = args[1], 29 | tmp, 30 | content; 31 | 32 | if (response && response.responseText) { 33 | content = response.responseText; 34 | if (selector) { 35 | tmp = Y.DOM.create(content); 36 | content = Y.Selector.query(selector, tmp); 37 | } 38 | this.setContent(content); 39 | } 40 | if (callback) { 41 | callback.call(this, code, response); 42 | } 43 | }; 44 | 45 | /** 46 | * Loads content from the given url and replaces the Node's 47 | * existing content with it. 48 | * @method load 49 | * @param {String} html The markup to wrap around the node. 50 | * @param {String} selector An optional selector representing subset 51 | * @param {Function} callback An optional function to run after the content has been loaded. 52 | * of the content. 53 | * @chainable 54 | */ 55 | Y.Node.prototype.load = function(url, selector, callback) { 56 | if (typeof selector == 'function') { 57 | callback = selector; 58 | selector = null; 59 | } 60 | var config = { 61 | context: this, 62 | on: { 63 | complete: this._ioComplete 64 | }, 65 | arguments: [selector, callback] 66 | }; 67 | 68 | Y.io(url, config); 69 | return this; 70 | } 71 | 72 | 73 | }, '3.3.0' ,{requires:['node-base', 'io-base']}); 74 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-pluginhost-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-pluginhost', function(Y) { 9 | 10 | /** 11 | * Registers plugins to be instantiated at the class level (plugins 12 | * which should be plugged into every instance of Node by default). 13 | * 14 | * @method Node.plug 15 | * @static 16 | * 17 | * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) 18 | * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin 19 | */ 20 | Y.Node.plug = function() { 21 | var args = Y.Array(arguments); 22 | args.unshift(Y.Node); 23 | Y.Plugin.Host.plug.apply(Y.Base, args); 24 | return Y.Node; 25 | }; 26 | 27 | /** 28 | * Unregisters any class level plugins which have been registered by the Node 29 | * 30 | * @method Node.unplug 31 | * @static 32 | * 33 | * @param {Function | Array} plugin The plugin class, or an array of plugin classes 34 | */ 35 | Y.Node.unplug = function() { 36 | var args = Y.Array(arguments); 37 | args.unshift(Y.Node); 38 | Y.Plugin.Host.unplug.apply(Y.Base, args); 39 | return Y.Node; 40 | }; 41 | 42 | Y.mix(Y.Node, Y.Plugin.Host, false, null, 1); 43 | 44 | // allow batching of plug/unplug via NodeList 45 | // doesn't use NodeList.importMethod because we need real Nodes (not tmpNode) 46 | Y.NodeList.prototype.plug = function() { 47 | var args = arguments; 48 | Y.NodeList.each(this, function(node) { 49 | Y.Node.prototype.plug.apply(Y.one(node), args); 50 | }); 51 | }; 52 | 53 | Y.NodeList.prototype.unplug = function() { 54 | var args = arguments; 55 | Y.NodeList.each(this, function(node) { 56 | Y.Node.prototype.unplug.apply(Y.one(node), args); 57 | }); 58 | }; 59 | 60 | 61 | }, '3.3.0' ,{requires:['node-base', 'pluginhost']}); 62 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-pluginhost-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-pluginhost",function(a){a.Node.plug=function(){var b=a.Array(arguments);b.unshift(a.Node);a.Plugin.Host.plug.apply(a.Base,b);return a.Node;};a.Node.unplug=function(){var b=a.Array(arguments);b.unshift(a.Node);a.Plugin.Host.unplug.apply(a.Base,b);return a.Node;};a.mix(a.Node,a.Plugin.Host,false,null,1);a.NodeList.prototype.plug=function(){var b=arguments;a.NodeList.each(this,function(c){a.Node.prototype.plug.apply(a.one(c),b);});};a.NodeList.prototype.unplug=function(){var b=arguments;a.NodeList.each(this,function(c){a.Node.prototype.unplug.apply(a.one(c),b);});};},"3.3.0",{requires:["node-base","pluginhost"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-pluginhost.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-pluginhost', function(Y) { 9 | 10 | /** 11 | * Registers plugins to be instantiated at the class level (plugins 12 | * which should be plugged into every instance of Node by default). 13 | * 14 | * @method Node.plug 15 | * @static 16 | * 17 | * @param {Function | Array} plugin Either the plugin class, an array of plugin classes or an array of objects (with fn and cfg properties defined) 18 | * @param {Object} config (Optional) If plugin is the plugin class, the configuration for the plugin 19 | */ 20 | Y.Node.plug = function() { 21 | var args = Y.Array(arguments); 22 | args.unshift(Y.Node); 23 | Y.Plugin.Host.plug.apply(Y.Base, args); 24 | return Y.Node; 25 | }; 26 | 27 | /** 28 | * Unregisters any class level plugins which have been registered by the Node 29 | * 30 | * @method Node.unplug 31 | * @static 32 | * 33 | * @param {Function | Array} plugin The plugin class, or an array of plugin classes 34 | */ 35 | Y.Node.unplug = function() { 36 | var args = Y.Array(arguments); 37 | args.unshift(Y.Node); 38 | Y.Plugin.Host.unplug.apply(Y.Base, args); 39 | return Y.Node; 40 | }; 41 | 42 | Y.mix(Y.Node, Y.Plugin.Host, false, null, 1); 43 | 44 | // allow batching of plug/unplug via NodeList 45 | // doesn't use NodeList.importMethod because we need real Nodes (not tmpNode) 46 | Y.NodeList.prototype.plug = function() { 47 | var args = arguments; 48 | Y.NodeList.each(this, function(node) { 49 | Y.Node.prototype.plug.apply(Y.one(node), args); 50 | }); 51 | }; 52 | 53 | Y.NodeList.prototype.unplug = function() { 54 | var args = arguments; 55 | Y.NodeList.each(this, function(node) { 56 | Y.Node.prototype.unplug.apply(Y.one(node), args); 57 | }); 58 | }; 59 | 60 | 61 | }, '3.3.0' ,{requires:['node-base', 'pluginhost']}); 62 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-screen-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-screen",function(a){a.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(b){a.Node.ATTRS[b]={getter:function(){var c=Array.prototype.slice.call(arguments);c.unshift(a.Node.getDOMNode(this));return a.DOM[b].apply(this,c);}};});a.Node.ATTRS.scrollLeft={getter:function(){var b=a.Node.getDOMNode(this);return("scrollLeft" in b)?b.scrollLeft:a.DOM.docScrollX(b);},setter:function(c){var b=a.Node.getDOMNode(this);if(b){if("scrollLeft" in b){b.scrollLeft=c;}else{if(b.document||b.nodeType===9){a.DOM._getWin(b).scrollTo(c,a.DOM.docScrollY(b));}}}else{}}};a.Node.ATTRS.scrollTop={getter:function(){var b=a.Node.getDOMNode(this);return("scrollTop" in b)?b.scrollTop:a.DOM.docScrollY(b);},setter:function(c){var b=a.Node.getDOMNode(this);if(b){if("scrollTop" in b){b.scrollTop=c;}else{if(b.document||b.nodeType===9){a.DOM._getWin(b).scrollTo(a.DOM.docScrollX(b),c);}}}else{}}};a.Node.importMethod(a.DOM,["getXY","setXY","getX","setX","getY","setY","swapXY"]);a.Node.ATTRS.region={getter:function(){var b=a.Node.getDOMNode(this),c;if(b&&!b.tagName){if(b.nodeType===9){b=b.documentElement;}}if(b.alert){c=a.DOM.viewportRegion(b);}else{c=a.DOM.region(b);}return c;}};a.Node.ATTRS.viewportRegion={getter:function(){return a.DOM.viewportRegion(a.Node.getDOMNode(this));}};a.Node.importMethod(a.DOM,"inViewportRegion");a.Node.prototype.intersect=function(b,d){var c=a.Node.getDOMNode(this);if(a.instanceOf(b,a.Node)){b=a.Node.getDOMNode(b);}return a.DOM.intersect(c,b,d);};a.Node.prototype.inRegion=function(b,d,e){var c=a.Node.getDOMNode(this);if(a.instanceOf(b,a.Node)){b=a.Node.getDOMNode(b);}return a.DOM.inRegion(c,b,d,e);};},"3.3.0",{requires:["dom-screen"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-style-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-style', function(Y) { 9 | 10 | (function(Y) { 11 | /** 12 | * Extended Node interface for managing node styles. 13 | * @module node 14 | * @submodule node-style 15 | */ 16 | 17 | var methods = [ 18 | /** 19 | * Returns the style's current value. 20 | * @method getStyle 21 | * @for Node 22 | * @param {String} attr The style attribute to retrieve. 23 | * @return {String} The current value of the style property for the element. 24 | */ 25 | 'getStyle', 26 | 27 | /** 28 | * Returns the computed value for the given style property. 29 | * @method getComputedStyle 30 | * @param {String} attr The style attribute to retrieve. 31 | * @return {String} The computed value of the style property for the element. 32 | */ 33 | 'getComputedStyle', 34 | 35 | /** 36 | * Sets a style property of the node. 37 | * @method setStyle 38 | * @param {String} attr The style attribute to set. 39 | * @param {String|Number} val The value. 40 | * @chainable 41 | */ 42 | 'setStyle', 43 | 44 | /** 45 | * Sets multiple style properties on the node. 46 | * @method setStyles 47 | * @param {Object} hash An object literal of property:value pairs. 48 | * @chainable 49 | */ 50 | 'setStyles' 51 | ]; 52 | Y.Node.importMethod(Y.DOM, methods); 53 | /** 54 | * Returns an array of values for each node. 55 | * @method getStyle 56 | * @for NodeList 57 | * @see Node.getStyle 58 | * @param {String} attr The style attribute to retrieve. 59 | * @return {Array} The current values of the style property for the element. 60 | */ 61 | 62 | /** 63 | * Returns an array of the computed value for each node. 64 | * @method getComputedStyle 65 | * @see Node.getComputedStyle 66 | * @param {String} attr The style attribute to retrieve. 67 | * @return {Array} The computed values for each node. 68 | */ 69 | 70 | /** 71 | * Sets a style property on each node. 72 | * @method setStyle 73 | * @see Node.setStyle 74 | * @param {String} attr The style attribute to set. 75 | * @param {String|Number} val The value. 76 | * @chainable 77 | */ 78 | 79 | /** 80 | * Sets multiple style properties on each node. 81 | * @method setStyles 82 | * @see Node.setStyles 83 | * @param {Object} hash An object literal of property:value pairs. 84 | * @chainable 85 | */ 86 | Y.NodeList.importMethod(Y.Node.prototype, methods); 87 | })(Y); 88 | 89 | 90 | }, '3.3.0' ,{requires:['dom-style', 'node-base']}); 91 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-style-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("node-style",function(a){(function(c){var b=["getStyle","getComputedStyle","setStyle","setStyles"];c.Node.importMethod(c.DOM,b);c.NodeList.importMethod(c.Node.prototype,b);})(a);},"3.3.0",{requires:["dom-style","node-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/node-style.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('node-style', function(Y) { 9 | 10 | (function(Y) { 11 | /** 12 | * Extended Node interface for managing node styles. 13 | * @module node 14 | * @submodule node-style 15 | */ 16 | 17 | var methods = [ 18 | /** 19 | * Returns the style's current value. 20 | * @method getStyle 21 | * @for Node 22 | * @param {String} attr The style attribute to retrieve. 23 | * @return {String} The current value of the style property for the element. 24 | */ 25 | 'getStyle', 26 | 27 | /** 28 | * Returns the computed value for the given style property. 29 | * @method getComputedStyle 30 | * @param {String} attr The style attribute to retrieve. 31 | * @return {String} The computed value of the style property for the element. 32 | */ 33 | 'getComputedStyle', 34 | 35 | /** 36 | * Sets a style property of the node. 37 | * @method setStyle 38 | * @param {String} attr The style attribute to set. 39 | * @param {String|Number} val The value. 40 | * @chainable 41 | */ 42 | 'setStyle', 43 | 44 | /** 45 | * Sets multiple style properties on the node. 46 | * @method setStyles 47 | * @param {Object} hash An object literal of property:value pairs. 48 | * @chainable 49 | */ 50 | 'setStyles' 51 | ]; 52 | Y.Node.importMethod(Y.DOM, methods); 53 | /** 54 | * Returns an array of values for each node. 55 | * @method getStyle 56 | * @for NodeList 57 | * @see Node.getStyle 58 | * @param {String} attr The style attribute to retrieve. 59 | * @return {Array} The current values of the style property for the element. 60 | */ 61 | 62 | /** 63 | * Returns an array of the computed value for each node. 64 | * @method getComputedStyle 65 | * @see Node.getComputedStyle 66 | * @param {String} attr The style attribute to retrieve. 67 | * @return {Array} The computed values for each node. 68 | */ 69 | 70 | /** 71 | * Sets a style property on each node. 72 | * @method setStyle 73 | * @see Node.setStyle 74 | * @param {String} attr The style attribute to set. 75 | * @param {String|Number} val The value. 76 | * @chainable 77 | */ 78 | 79 | /** 80 | * Sets multiple style properties on each node. 81 | * @method setStyles 82 | * @see Node.setStyles 83 | * @param {Object} hash An object literal of property:value pairs. 84 | * @chainable 85 | */ 86 | Y.NodeList.importMethod(Y.Node.prototype, methods); 87 | })(Y); 88 | 89 | 90 | }, '3.3.0' ,{requires:['dom-style', 'node-base']}); 91 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/shim-plugin-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('shim-plugin', function(Y) { 9 | 10 | /** 11 | * Provides shimming support for Node via a Plugin. 12 | * This fixes SELECT bleedthrough for IE6 & Mac scrollbars 13 | * @module shim-plugin 14 | */ 15 | 16 | /** 17 | * Node plugin which can be used to add shim support. 18 | * 19 | * @class Plugin.Shim 20 | * @param {Object} User configuration object 21 | */ 22 | function Shim(config) { 23 | this.init(config); 24 | } 25 | 26 | /** 27 | * Default class used to mark the shim element 28 | * 29 | * @property Shim.CLASS_NAME 30 | * @type String 31 | * @static 32 | * @default "yui-node-shim" 33 | */ 34 | // TODO: use ClassNameManager 35 | Shim.CLASS_NAME = 'yui-node-shim'; 36 | 37 | /** 38 | * Default markup template used to generate the shim element. 39 | * 40 | * @property Shim.TEMPLATE 41 | * @type String 42 | * @static 43 | */ 44 | Shim.TEMPLATE = ''; 48 | 49 | Shim.prototype = { 50 | init: function(config) { 51 | this._host = config.host; 52 | this.initEvents(); 53 | this.insert(); 54 | this.sync(); 55 | }, 56 | 57 | initEvents: function() { 58 | this._resizeHandle = this._host.on('resize', this.sync, this); 59 | }, 60 | 61 | getShim: function() { 62 | return this._shim || ( 63 | this._shim = Y.Node.create( 64 | Shim.TEMPLATE, 65 | this._host.get('ownerDocument') 66 | ) 67 | ); 68 | }, 69 | 70 | insert: function() { 71 | var node = this._host; 72 | this._shim = node.insertBefore( this.getShim(), 73 | node.get('firstChild')); 74 | }, 75 | 76 | /** 77 | * Updates the size of the shim to fill its container 78 | * @method sync 79 | */ 80 | sync: function() { 81 | var shim = this._shim, 82 | node = this._host; 83 | 84 | if (shim) { 85 | shim.setAttrs({ 86 | width: node.getStyle('width'), 87 | height: node.getStyle('height') 88 | }); 89 | } 90 | }, 91 | 92 | /** 93 | * Removes the shim and destroys the plugin 94 | * @method destroy 95 | */ 96 | destroy: function() { 97 | var shim = this._shim; 98 | if (shim) { 99 | shim.remove(true); 100 | } 101 | 102 | this._resizeHandle.detach(); 103 | } 104 | }; 105 | 106 | Shim.NAME = 'Shim'; 107 | Shim.NS = 'shim'; 108 | 109 | Y.namespace('Plugin'); 110 | Y.Plugin.Shim = Shim; 111 | 112 | 113 | }, '3.3.0' ,{requires:['node-style', 'node-pluginhost']}); 114 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/shim-plugin-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("shim-plugin",function(b){function a(c){this.init(c);}a.CLASS_NAME="yui-node-shim";a.TEMPLATE='';a.prototype={init:function(c){this._host=c.host;this.initEvents();this.insert();this.sync();},initEvents:function(){this._resizeHandle=this._host.on("resize",this.sync,this);},getShim:function(){return this._shim||(this._shim=b.Node.create(a.TEMPLATE,this._host.get("ownerDocument")));},insert:function(){var c=this._host;this._shim=c.insertBefore(this.getShim(),c.get("firstChild"));},sync:function(){var d=this._shim,c=this._host;if(d){d.setAttrs({width:c.getStyle("width"),height:c.getStyle("height")});}},destroy:function(){var c=this._shim;if(c){c.remove(true);}this._resizeHandle.detach();}};a.NAME="Shim";a.NS="shim";b.namespace("Plugin");b.Plugin.Shim=a;},"3.3.0",{requires:["node-style","node-pluginhost"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/node/shim-plugin.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('shim-plugin', function(Y) { 9 | 10 | /** 11 | * Provides shimming support for Node via a Plugin. 12 | * This fixes SELECT bleedthrough for IE6 & Mac scrollbars 13 | * @module shim-plugin 14 | */ 15 | 16 | /** 17 | * Node plugin which can be used to add shim support. 18 | * 19 | * @class Plugin.Shim 20 | * @param {Object} User configuration object 21 | */ 22 | function Shim(config) { 23 | this.init(config); 24 | } 25 | 26 | /** 27 | * Default class used to mark the shim element 28 | * 29 | * @property Shim.CLASS_NAME 30 | * @type String 31 | * @static 32 | * @default "yui-node-shim" 33 | */ 34 | // TODO: use ClassNameManager 35 | Shim.CLASS_NAME = 'yui-node-shim'; 36 | 37 | /** 38 | * Default markup template used to generate the shim element. 39 | * 40 | * @property Shim.TEMPLATE 41 | * @type String 42 | * @static 43 | */ 44 | Shim.TEMPLATE = ''; 48 | 49 | Shim.prototype = { 50 | init: function(config) { 51 | this._host = config.host; 52 | this.initEvents(); 53 | this.insert(); 54 | this.sync(); 55 | }, 56 | 57 | initEvents: function() { 58 | this._resizeHandle = this._host.on('resize', this.sync, this); 59 | }, 60 | 61 | getShim: function() { 62 | return this._shim || ( 63 | this._shim = Y.Node.create( 64 | Shim.TEMPLATE, 65 | this._host.get('ownerDocument') 66 | ) 67 | ); 68 | }, 69 | 70 | insert: function() { 71 | var node = this._host; 72 | this._shim = node.insertBefore( this.getShim(), 73 | node.get('firstChild')); 74 | }, 75 | 76 | /** 77 | * Updates the size of the shim to fill its container 78 | * @method sync 79 | */ 80 | sync: function() { 81 | var shim = this._shim, 82 | node = this._host; 83 | 84 | if (shim) { 85 | shim.setAttrs({ 86 | width: node.getStyle('width'), 87 | height: node.getStyle('height') 88 | }); 89 | } 90 | }, 91 | 92 | /** 93 | * Removes the shim and destroys the plugin 94 | * @method destroy 95 | */ 96 | destroy: function() { 97 | var shim = this._shim; 98 | if (shim) { 99 | shim.remove(true); 100 | } 101 | 102 | this._resizeHandle.detach(); 103 | } 104 | }; 105 | 106 | Shim.NAME = 'Shim'; 107 | Shim.NS = 'shim'; 108 | 109 | Y.namespace('Plugin'); 110 | Y.Plugin.Shim = Shim; 111 | 112 | 113 | }, '3.3.0' ,{requires:['node-style', 'node-pluginhost']}); 114 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/oop/oop-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("oop",function(h){var d=h.Lang,c=h.Array,b=Object.prototype,a="_~yuim~_",e="each",g="some",f=function(l,k,m,i,j){if(l&&l[j]&&l!==h){return l[j].call(l,k,m);}else{switch(c.test(l)){case 1:return c[j](l,k,m);case 2:return c[j](h.Array(l,0,true),k,m);default:return h.Object[j](l,k,m,i);}}};h.augment=function(i,x,l,v,p){var n=x.prototype,t=null,w=x,q=(p)?h.Array(p):[],k=i.prototype,o=k||i,u=false,j,m;if(k&&w){j={};m={};t={};h.Object.each(n,function(s,r){m[r]=function(){for(var y in j){if(j.hasOwnProperty(y)&&(this[y]===m[y])){this[y]=j[y];}}w.apply(this,q);return j[r].apply(this,arguments);};if((!v||(r in v))&&(l||!(r in this))){if(d.isFunction(s)){j[r]=s;this[r]=m[r];}else{this[r]=s;}}},t,true);}else{u=true;}h.mix(o,t||n,l,v);if(u){x.apply(o,q);}return i;};h.aggregate=function(k,j,i,l){return h.mix(k,j,i,l,0,true);};h.extend=function(l,k,i,n){if(!k||!l){h.error("extend failed, verify dependencies");}var m=k.prototype,j=h.Object(m);l.prototype=j;j.constructor=l;l.superclass=m;if(k!=Object&&m.constructor==b.constructor){m.constructor=k;}if(i){h.mix(j,i,true);}if(n){h.mix(l,n,true);}return l;};h.each=function(k,j,l,i){return f(k,j,l,i,e);};h.some=function(k,j,l,i){return f(k,j,l,i,g);};h.clone=function(l,m,r,s,k,q){if(!d.isObject(l)){return l;}if(h.instanceOf(l,YUI)){return l;}var n,j=q||{},i,p=h.each;switch(d.type(l)){case"date":return new Date(l);case"regexp":return l;case"function":return l;case"array":n=[];break;default:if(l[a]){return j[l[a]];}i=h.guid();n=(m)?{}:h.Object(l);l[a]=i;j[i]=l;}if(!l.addEventListener&&!l.attachEvent){p(l,function(t,o){if((o||o===0)&&(!r||(r.call(s||this,t,o,this,l)!==false))){if(o!==a){if(o=="prototype"){}else{this[o]=h.clone(t,m,r,s,k||l,j);}}}},n);}if(!q){h.Object.each(j,function(t,o){if(t[a]){try{delete t[a];}catch(u){t[a]=null;}}},this);j=null;}return n;};h.bind=function(i,k){var j=arguments.length>2?h.Array(arguments,2,true):null;return function(){var m=d.isString(i)?k[i]:i,l=(j)?j.concat(h.Array(arguments,0,true)):arguments;return m.apply(k||m,l);};};h.rbind=function(i,k){var j=arguments.length>2?h.Array(arguments,2,true):null;return function(){var m=d.isString(i)?k[i]:i,l=(j)?h.Array(arguments,0,true).concat(j):arguments;return m.apply(k||m,l);};};},"3.3.0"); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yql/yql-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("yql",function(B){var A=function(E,F,D,C){if(!D){D={};}D.q=E;if(!D.format){D.format=B.YQLRequest.FORMAT;}if(!D.env){D.env=B.YQLRequest.ENV;}this._params=D;this._opts=C;this._callback=F;};A.prototype={_jsonp:null,_opts:null,_callback:null,_params:null,send:function(){var C="",D=((this._opts&&this._opts.proto)?this._opts.proto:B.YQLRequest.PROTO);B.each(this._params,function(G,F){C+=F+"="+encodeURIComponent(G)+"&";});D+=((this._opts&&this._opts.base)?this._opts.base:B.YQLRequest.BASE_URL)+C;var E=(!B.Lang.isFunction(this._callback))?this._callback:{on:{success:this._callback}};if(E.allowCache!==false){E.allowCache=true;}if(!this._jsonp){this._jsonp=B.jsonp(D,E);}else{this._jsonp.url=D;if(E.on&&E.on.success){this._jsonp._config.on.success=E.on.success;}this._jsonp.send();}return this;}};A.FORMAT="json";A.PROTO="http";A.BASE_URL=":/"+"/query.yahooapis.com/v1/public/yql?";A.ENV="http:/"+"/datatables.org/alltables.env";B.YQLRequest=A;B.YQL=function(D,E,C){return new B.YQLRequest(D,E,C).send();};},"3.3.0",{requires:["jsonp"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/features-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("features",function(b){var c={};b.mix(b.namespace("Features"),{tests:c,add:function(d,e,f){c[d]=c[d]||{};c[d][e]=f;},all:function(e,f){var g=c[e],d="";if(g){b.Object.each(g,function(i,h){d+=h+":"+(b.Features.test(e,h,f)?1:0)+";";});}return d;},test:function(e,g,f){f=f||[];var d,i,k,j=c[e],h=j&&j[g];if(!h){}else{d=h.result;if(b.Lang.isUndefined(d)){i=h.ua;if(i){d=(b.UA[i]);}k=h.test;if(k&&((!i)||d)){d=k.apply(b,f);}h.result=d;}}return d;}});var a=b.Features.add;a("load","0",{"test":function(d){return !(d.UA.ios||d.UA.android);},"trigger":"autocomplete-list"});a("load","1",{"test":function(j){var h=j.Features.test,i=j.Features.add,f=j.config.win,g=j.config.doc,d="documentElement",e=false;i("style","computedStyle",{test:function(){return f&&"getComputedStyle" in f;}});i("style","opacity",{test:function(){return g&&"opacity" in g[d].style;}});e=(!h("style","opacity")&&!h("style","computedStyle"));return e;},"trigger":"dom-style"});a("load","2",{"trigger":"widget-base","ua":"ie"});a("load","3",{"test":function(e){var d=e.config.doc&&e.config.doc.implementation;return(d&&(!d.hasFeature("Events","2.0")));},"trigger":"node-base"});a("load","4",{"test":function(d){return(d.config.win&&("ontouchstart" in d.config.win&&!d.UA.chrome));},"trigger":"dd-drag"});a("load","5",{"test":function(e){var d=e.config.doc.documentMode;return e.UA.ie&&(!("onhashchange" in e.config.win)||!d||d<8);},"trigger":"history-hash"});},"3.3.0",{requires:["yui-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/get-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("get",function(f){var b=f.UA,a=f.Lang,d="text/javascript",e="text/css",c="stylesheet";f.Get=function(){var m,n,j,l={},k=0,u,w=function(A,x,B){var y=B||f.config.win,C=y.document,D=C.createElement(A),z;for(z in x){if(x[z]&&x.hasOwnProperty(z)){D.setAttribute(z,x[z]);}}return D;},t=function(y,z,x){var A={id:f.guid(),type:e,rel:c,href:y};if(x){f.mix(A,x);}return w("link",A,z);},s=function(y,z,x){var A={id:f.guid(),type:d};if(x){f.mix(A,x);}A.src=y;return w("script",A,z);},p=function(y,z,x){return{tId:y.tId,win:y.win,data:y.data,nodes:y.nodes,msg:z,statusText:x,purge:function(){n(this.tId);}};},o=function(B,A,x){var y=l[B],z;if(y&&y.onEnd){z=y.context||y;y.onEnd.call(z,p(y,A,x));}},v=function(A,z){var x=l[A],y;if(x.timer){clearTimeout(x.timer);}if(x.onFailure){y=x.context||x;x.onFailure.call(y,p(x,z));}o(A,z,"failure");},i=function(A){var x=l[A],z,y;if(x.timer){clearTimeout(x.timer);}x.finished=true;if(x.aborted){z="transaction "+A+" was aborted";v(A,z);return;}if(x.onSuccess){y=x.context||x;x.onSuccess.call(y,p(x));}o(A,z,"OK");},q=function(z){var x=l[z],y;if(x.onTimeout){y=x.context||x;x.onTimeout.call(y,p(x));}o(z,"timeout","timeout");},h=function(z,C){var y=l[z],B,G,F,D,A,x,H,E;if(y.timer){clearTimeout(y.timer);}if(y.aborted){B="transaction "+z+" was aborted";v(z,B);return;}if(C){y.url.shift();if(y.varName){y.varName.shift();}}else{y.url=(a.isString(y.url))?[y.url]:y.url;if(y.varName){y.varName=(a.isString(y.varName))?[y.varName]:y.varName;}}G=y.win;F=G.document;D=F.getElementsByTagName("head")[0];if(y.url.length===0){i(z);return;}x=y.url[0];if(!x){y.url.shift();return h(z);}if(y.timeout){y.timer=setTimeout(function(){q(z);},y.timeout);}if(y.type==="script"){A=s(x,G,y.attributes);}else{A=t(x,G,y.attributes);}j(y.type,A,z,x,G,y.url.length);y.nodes.push(A);E=y.insertBefore||F.getElementsByTagName("base")[0];if(E){H=m(E,z);if(H){H.parentNode.insertBefore(A,H);}}else{D.appendChild(A);}if((b.webkit||b.gecko)&&y.type==="css"){h(z,x);}},g=function(){if(u){return;}u=true;var x,y;for(x in l){if(l.hasOwnProperty(x)){y=l[x];if(y.autopurge&&y.finished){n(y.tId);delete l[x];}}}u=false;},r=function(y,x,z){z=z||{};var C="q"+(k++),A,B=z.purgethreshold||f.Get.PURGE_THRESH;if(k%B===0){g();}l[C]=f.merge(z,{tId:C,type:y,url:x,finished:false,nodes:[]});A=l[C];A.win=A.win||f.config.win;A.context=A.context||A;A.autopurge=("autopurge" in A)?A.autopurge:(y==="script")?true:false;A.attributes=A.attributes||{};A.attributes.charset=z.charset||A.attributes.charset||"utf-8";h(C);return{tId:C};};j=function(z,E,D,y,C,B,x){var A=x||h;if(b.ie){E.onreadystatechange=function(){var F=this.readyState;if("loaded"===F||"complete"===F){E.onreadystatechange=null;A(D,y);}};}else{if(b.webkit){if(z==="script"){E.addEventListener("load",function(){A(D,y);});}}else{E.onload=function(){A(D,y);};E.onerror=function(F){v(D,F+": "+y);};}}};m=function(x,A){var y=l[A],z=(a.isString(x))?y.win.document.getElementById(x):x;if(!z){v(A,"target node not found: "+x);}return z;};n=function(C){var y,A,G,D,H,B,z,F,E,x=l[C];if(x){y=x.nodes;A=y.length;G=x.win.document;D=G.getElementsByTagName("head")[0];E=x.insertBefore||G.getElementsByTagName("base")[0];if(E){H=m(E,C);if(H){D=H.parentNode;}}for(B=0;B 0) { 70 | result = scan(language); 71 | if (result) { 72 | return result; 73 | } else { 74 | index = language.lastIndexOf('-'); 75 | if (index >= 0) { 76 | language = language.substring(0, index); 77 | // one-character subtags get cut along with the 78 | // following subtag 79 | if (index >= 2 && language.charAt(index - 2) === '-') { 80 | language = language.substring(0, index - 2); 81 | } 82 | } else { 83 | // nothing available for this language 84 | break; 85 | } 86 | } 87 | } 88 | } 89 | 90 | return ''; 91 | } 92 | }); 93 | 94 | 95 | }, '3.3.0' ,{requires:['yui-base']}); 96 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/intl-base-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("intl-base",function(b){var a=/[, ]/;b.mix(b.namespace("Intl"),{lookupBestLang:function(g,h){var f,j,c,e;function d(l){var k;for(k=0;k0){c=d(j);if(c){return c;}else{e=j.lastIndexOf("-");if(e>=0){j=j.substring(0,e);if(e>=2&&j.charAt(e-2)==="-"){j=j.substring(0,e-2);}}else{break;}}}}return"";}});},"3.3.0",{requires:["yui-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/intl-base.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('intl-base', function(Y) { 9 | 10 | /** 11 | * The Intl utility provides a central location for managing sets of 12 | * localized resources (strings and formatting patterns). 13 | * 14 | * @class Intl 15 | * @uses EventTarget 16 | * @static 17 | */ 18 | 19 | var SPLIT_REGEX = /[, ]/; 20 | 21 | Y.mix(Y.namespace('Intl'), { 22 | 23 | /** 24 | * Returns the language among those available that 25 | * best matches the preferred language list, using the Lookup 26 | * algorithm of BCP 47. 27 | * If none of the available languages meets the user's preferences, 28 | * then "" is returned. 29 | * Extended language ranges are not supported. 30 | * 31 | * @method lookupBestLang 32 | * @param {String[] | String} preferredLanguages The list of preferred 33 | * languages in descending preference order, represented as BCP 47 34 | * language tags. A string array or a comma-separated list. 35 | * @param {String[]} availableLanguages The list of languages 36 | * that the application supports, represented as BCP 47 language 37 | * tags. 38 | * 39 | * @return {String} The available language that best matches the 40 | * preferred language list, or "". 41 | * @since 3.1.0 42 | */ 43 | lookupBestLang: function(preferredLanguages, availableLanguages) { 44 | 45 | var i, language, result, index; 46 | 47 | // check whether the list of available languages contains language; 48 | // if so return it 49 | function scan(language) { 50 | var i; 51 | for (i = 0; i < availableLanguages.length; i += 1) { 52 | if (language.toLowerCase() === 53 | availableLanguages[i].toLowerCase()) { 54 | return availableLanguages[i]; 55 | } 56 | } 57 | } 58 | 59 | if (Y.Lang.isString(preferredLanguages)) { 60 | preferredLanguages = preferredLanguages.split(SPLIT_REGEX); 61 | } 62 | 63 | for (i = 0; i < preferredLanguages.length; i += 1) { 64 | language = preferredLanguages[i]; 65 | if (!language || language === '*') { 66 | continue; 67 | } 68 | // check the fallback sequence for one language 69 | while (language.length > 0) { 70 | result = scan(language); 71 | if (result) { 72 | return result; 73 | } else { 74 | index = language.lastIndexOf('-'); 75 | if (index >= 0) { 76 | language = language.substring(0, index); 77 | // one-character subtags get cut along with the 78 | // following subtag 79 | if (index >= 2 && language.charAt(index - 2) === '-') { 80 | language = language.substring(0, index - 2); 81 | } 82 | } else { 83 | // nothing available for this language 84 | break; 85 | } 86 | } 87 | } 88 | } 89 | 90 | return ''; 91 | } 92 | }); 93 | 94 | 95 | }, '3.3.0' ,{requires:['yui-base']}); 96 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/rls-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('rls', function(Y) { 9 | 10 | /** 11 | * Implentation for building the remote loader service url. 12 | * @method _rls 13 | * @param {Array} what the requested modules. 14 | * @since 3.2.0 15 | * @return {string} the url for the remote loader service call. 16 | */ 17 | Y._rls = function(what) { 18 | 19 | var config = Y.config, 20 | 21 | // the configuration 22 | rls = config.rls || { 23 | m: 1, // required in the template 24 | v: Y.version, 25 | gv: config.gallery, 26 | env: 1, // required in the template 27 | lang: config.lang, 28 | '2in3v': config['2in3'], 29 | '2v': config.yui2, 30 | filt: config.filter, 31 | filts: config.filters, 32 | tests: 1 // required in the template 33 | }, 34 | 35 | // The rls base path 36 | rls_base = config.rls_base || 'load?', 37 | 38 | // the template 39 | rls_tmpl = config.rls_tmpl || function() { 40 | var s = '', param; 41 | for (param in rls) { 42 | if (param in rls && rls[param]) { 43 | s += param + '={' + param + '}&'; 44 | } 45 | } 46 | // console.log('rls_tmpl: ' + s); 47 | return s; 48 | }(), 49 | 50 | url; 51 | 52 | // update the request 53 | rls.m = what; 54 | rls.env = Y.Object.keys(YUI.Env.mods); 55 | rls.tests = Y.Features.all('load', [Y]); 56 | 57 | url = Y.Lang.sub(rls_base + rls_tmpl, rls); 58 | 59 | config.rls = rls; 60 | config.rls_tmpl = rls_tmpl; 61 | 62 | // console.log(url); 63 | return url; 64 | }; 65 | 66 | 67 | 68 | }, '3.3.0' ,{requires:['get','features']}); 69 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/rls-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("rls",function(a){a._rls=function(g){var d=a.config,f=d.rls||{m:1,v:a.version,gv:d.gallery,env:1,lang:d.lang,"2in3v":d["2in3"],"2v":d.yui2,filt:d.filter,filts:d.filters,tests:1},b=d.rls_base||"load?",e=d.rls_tmpl||function(){var h="",i;for(i in f){if(i in f&&f[i]){h+=i+"={"+i+"}&";}}return h;}(),c;f.m=g;f.env=a.Object.keys(YUI.Env.mods);f.tests=a.Features.all("load",[a]);c=a.Lang.sub(b+e,f);d.rls=f;d.rls_tmpl=e;return c;};},"3.3.0",{requires:["get","features"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/rls.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('rls', function(Y) { 9 | 10 | /** 11 | * Implentation for building the remote loader service url. 12 | * @method _rls 13 | * @param {Array} what the requested modules. 14 | * @since 3.2.0 15 | * @return {string} the url for the remote loader service call. 16 | */ 17 | Y._rls = function(what) { 18 | 19 | var config = Y.config, 20 | 21 | // the configuration 22 | rls = config.rls || { 23 | m: 1, // required in the template 24 | v: Y.version, 25 | gv: config.gallery, 26 | env: 1, // required in the template 27 | lang: config.lang, 28 | '2in3v': config['2in3'], 29 | '2v': config.yui2, 30 | filt: config.filter, 31 | filts: config.filters, 32 | tests: 1 // required in the template 33 | }, 34 | 35 | // The rls base path 36 | rls_base = config.rls_base || 'load?', 37 | 38 | // the template 39 | rls_tmpl = config.rls_tmpl || function() { 40 | var s = '', param; 41 | for (param in rls) { 42 | if (param in rls && rls[param]) { 43 | s += param + '={' + param + '}&'; 44 | } 45 | } 46 | // console.log('rls_tmpl: ' + s); 47 | return s; 48 | }(), 49 | 50 | url; 51 | 52 | // update the request 53 | rls.m = what; 54 | rls.env = Y.Object.keys(YUI.Env.mods); 55 | rls.tests = Y.Features.all('load', [Y]); 56 | 57 | url = Y.Lang.sub(rls_base + rls_tmpl, rls); 58 | 59 | config.rls = rls; 60 | config.rls_tmpl = rls_tmpl; 61 | 62 | // console.log(url); 63 | return url; 64 | }; 65 | 66 | 67 | 68 | }, '3.3.0' ,{requires:['get','features']}); 69 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-later-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('yui-later', function(Y) { 9 | 10 | /** 11 | * Provides a setTimeout/setInterval wrapper 12 | * @module yui 13 | * @submodule yui-later 14 | */ 15 | 16 | /** 17 | * Executes the supplied function in the context of the supplied 18 | * object 'when' milliseconds later. Executes the function a 19 | * single time unless periodic is set to true. 20 | * @method later 21 | * @for YUI 22 | * @param when {int} the number of milliseconds to wait until the fn 23 | * is executed. 24 | * @param o the context object. 25 | * @param fn {Function|String} the function to execute or the name of 26 | * the method in the 'o' object to execute. 27 | * @param data [Array] data that is provided to the function. This 28 | * accepts either a single item or an array. If an array is provided, 29 | * the function is executed with one parameter for each array item. 30 | * If you need to pass a single array parameter, it needs to be wrapped 31 | * in an array [myarray]. 32 | * @param periodic {boolean} if true, executes continuously at supplied 33 | * interval until canceled. 34 | * @return {object} a timer object. Call the cancel() method on this 35 | * object to stop the timer. 36 | */ 37 | Y.later = function(when, o, fn, data, periodic) { 38 | when = when || 0; 39 | 40 | var m = fn, f, id; 41 | 42 | if (o && Y.Lang.isString(fn)) { 43 | m = o[fn]; 44 | } 45 | 46 | f = !Y.Lang.isUndefined(data) ? function() { 47 | m.apply(o, Y.Array(data)); 48 | } : function() { 49 | m.call(o); 50 | }; 51 | 52 | id = (periodic) ? setInterval(f, when) : setTimeout(f, when); 53 | 54 | return { 55 | id: id, 56 | interval: periodic, 57 | cancel: function() { 58 | if (this.interval) { 59 | clearInterval(id); 60 | } else { 61 | clearTimeout(id); 62 | } 63 | } 64 | }; 65 | }; 66 | 67 | Y.Lang.later = Y.later; 68 | 69 | 70 | 71 | }, '3.3.0' ,{requires:['yui-base']}); 72 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-later-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("yui-later",function(a){a.later=function(c,i,d,h,g){c=c||0;var b=d,e,j;if(i&&a.Lang.isString(d)){b=i[d];}e=!a.Lang.isUndefined(h)?function(){b.apply(i,a.Array(h));}:function(){b.call(i);};j=(g)?setInterval(e,c):setTimeout(e,c);return{id:j,interval:g,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};};a.Lang.later=a.later;},"3.3.0",{requires:["yui-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-later.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('yui-later', function(Y) { 9 | 10 | /** 11 | * Provides a setTimeout/setInterval wrapper 12 | * @module yui 13 | * @submodule yui-later 14 | */ 15 | 16 | /** 17 | * Executes the supplied function in the context of the supplied 18 | * object 'when' milliseconds later. Executes the function a 19 | * single time unless periodic is set to true. 20 | * @method later 21 | * @for YUI 22 | * @param when {int} the number of milliseconds to wait until the fn 23 | * is executed. 24 | * @param o the context object. 25 | * @param fn {Function|String} the function to execute or the name of 26 | * the method in the 'o' object to execute. 27 | * @param data [Array] data that is provided to the function. This 28 | * accepts either a single item or an array. If an array is provided, 29 | * the function is executed with one parameter for each array item. 30 | * If you need to pass a single array parameter, it needs to be wrapped 31 | * in an array [myarray]. 32 | * @param periodic {boolean} if true, executes continuously at supplied 33 | * interval until canceled. 34 | * @return {object} a timer object. Call the cancel() method on this 35 | * object to stop the timer. 36 | */ 37 | Y.later = function(when, o, fn, data, periodic) { 38 | when = when || 0; 39 | 40 | var m = fn, f, id; 41 | 42 | if (o && Y.Lang.isString(fn)) { 43 | m = o[fn]; 44 | } 45 | 46 | f = !Y.Lang.isUndefined(data) ? function() { 47 | m.apply(o, Y.Array(data)); 48 | } : function() { 49 | m.call(o); 50 | }; 51 | 52 | id = (periodic) ? setInterval(f, when) : setTimeout(f, when); 53 | 54 | return { 55 | id: id, 56 | interval: periodic, 57 | cancel: function() { 58 | if (this.interval) { 59 | clearInterval(id); 60 | } else { 61 | clearTimeout(id); 62 | } 63 | } 64 | }; 65 | }; 66 | 67 | Y.Lang.later = Y.later; 68 | 69 | 70 | 71 | }, '3.3.0' ,{requires:['yui-base']}); 72 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-log-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("yui-log",function(d){var c=d,e="yui:log",a="undefined",b={debug:1,info:1,warn:1,error:1};c.log=function(j,s,g,q){var l,p,n,k,o,i=c,r=i.config,h=(i.fire)?i:YUI.Env.globalEvents;if(r.debug){if(g){p=r.logExclude;n=r.logInclude;if(n&&!(g in n)){l=1;}else{if(p&&(g in p)){l=1;}}}if(!l){if(r.useBrowserConsole){k=(g)?g+": "+j:j;if(i.Lang.isFunction(r.logFn)){r.logFn.call(i,j,s,g);}else{if(typeof console!=a&&console.log){o=(s&&console[s]&&(s in b))?s:"log";console[o](k);}else{if(typeof opera!=a){opera.postError(k);}}}}if(h&&!q){if(h==i&&(!h.getEvent(e))){h.publish(e,{broadcast:2});}h.fire(e,{msg:j,cat:s,src:g});}}}return i;};c.message=function(){return c.log.apply(c,arguments);};},"3.3.0",{requires:["yui-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-throttle-debug.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('yui-throttle', function(Y) { 9 | 10 | /** 11 | * Provides a throttle/limiter for function calls 12 | * @module yui 13 | * @submodule yui-throttle 14 | */ 15 | 16 | /*! Based on work by Simon Willison: http://gist.github.com/292562 */ 17 | /** 18 | * Throttles a call to a method based on the time between calls. 19 | * @method throttle 20 | * @for YUI 21 | * @param fn {function} The function call to throttle. 22 | * @param ms {int} The number of milliseconds to throttle the method call. 23 | * Can set globally with Y.config.throttleTime or by call. Passing a -1 will 24 | * disable the throttle. Defaults to 150. 25 | * @return {function} Returns a wrapped function that calls fn throttled. 26 | * @since 3.1.0 27 | */ 28 | Y.throttle = function(fn, ms) { 29 | ms = (ms) ? ms : (Y.config.throttleTime || 150); 30 | 31 | if (ms === -1) { 32 | return (function() { 33 | fn.apply(null, arguments); 34 | }); 35 | } 36 | 37 | var last = Y.Lang.now(); 38 | 39 | return (function() { 40 | var now = Y.Lang.now(); 41 | if (now - last > ms) { 42 | last = now; 43 | fn.apply(null, arguments); 44 | } 45 | }); 46 | }; 47 | 48 | 49 | }, '3.3.0' ,{requires:['yui-base']}); 50 | -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-throttle-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add("yui-throttle",function(a){ 9 | /*! Based on work by Simon Willison: http://gist.github.com/292562 */ 10 | a.throttle=function(c,b){b=(b)?b:(a.config.throttleTime||150);if(b===-1){return(function(){c.apply(null,arguments);});}var d=a.Lang.now();return(function(){var e=a.Lang.now();if(e-d>b){d=e;c.apply(null,arguments);}});};},"3.3.0",{requires:["yui-base"]}); -------------------------------------------------------------------------------- /src/yui/3.3.0/build/yui/yui-throttle.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | YUI.add('yui-throttle', function(Y) { 9 | 10 | /** 11 | * Provides a throttle/limiter for function calls 12 | * @module yui 13 | * @submodule yui-throttle 14 | */ 15 | 16 | /*! Based on work by Simon Willison: http://gist.github.com/292562 */ 17 | /** 18 | * Throttles a call to a method based on the time between calls. 19 | * @method throttle 20 | * @for YUI 21 | * @param fn {function} The function call to throttle. 22 | * @param ms {int} The number of milliseconds to throttle the method call. 23 | * Can set globally with Y.config.throttleTime or by call. Passing a -1 will 24 | * disable the throttle. Defaults to 150. 25 | * @return {function} Returns a wrapped function that calls fn throttled. 26 | * @since 3.1.0 27 | */ 28 | Y.throttle = function(fn, ms) { 29 | ms = (ms) ? ms : (Y.config.throttleTime || 150); 30 | 31 | if (ms === -1) { 32 | return (function() { 33 | fn.apply(null, arguments); 34 | }); 35 | } 36 | 37 | var last = Y.Lang.now(); 38 | 39 | return (function() { 40 | var now = Y.Lang.now(); 41 | if (now - last > ms) { 42 | last = now; 43 | fn.apply(null, arguments); 44 | } 45 | }); 46 | }; 47 | 48 | 49 | }, '3.3.0' ,{requires:['yui-base']}); 50 | -------------------------------------------------------------------------------- /src/yui/3.3.0/license: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2010, Yahoo! Inc. All rights reserved. 3 | Code licensed under the BSD License: 4 | http://developer.yahoo.com/yui/license.html 5 | version: 3.3.0 6 | build: 3167 7 | */ 8 | --------------------------------------------------------------------------------