├── .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 Additionally, for compatibility with a more typical subscription
22 | * signature, the following are also supported:YSlow bookmarklet
9 |
10 | Desktop
11 |
12 |
15 |
16 | Mobile
17 |
18 |
21 | #
") so that the bookmark URL starts with "javascript:
"
22 |
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 | 1){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
20 | *
21 | * 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 | *
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 isY.on("hover", overFn, ".targetSelector", outFn);
25 | * Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
26 | *
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; iThis 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;--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;k