Skip to content

Instantly share code, notes, and snippets.

@x3388638
Last active May 21, 2019 02:48
Show Gist options
  • Save x3388638/db069582b81d7811f61ff7f60948e20a to your computer and use it in GitHub Desktop.
Save x3388638/db069582b81d7811f61ff7f60948e20a to your computer and use it in GitHub Desktop.
(function(root) {
root.YUI_config = root.YUI_config || {};
root.YUI_config.lang = 'en-GB';
}(this));
var YMedia = YUI({
bootstrap: true,
lang: 'en-GB',
comboBase: 'https://s.yimg.com/zz/combo?',
comboSep: '&',
root: 'yui:' + YUI.version + '/',
filter: 'min',
combine: false,
maxURLLength: 2000,
groups: {
arcade : {
base: 'https://s.yimg.com',
combine: false,
comboSep: '&',
comboBase: 'https://s.yimg.com/zz/combo?',
root: '',
modules: {
'type_customizedbutton': {
'requires': ['node','event'],
'path': '/nn/lib/metro/g/customizedbutton/customizedbutton_0.0.12.js'
},
'type_d3': {
'requires': [],
'path': '/nn/lib/metro/g/debug/d3_0.0.13.js'
},
'type_d3_timeline': {
'requires': [],
'path': '/nn/lib/metro/g/debug/d3-timeline_0.0.16.js'
},
'type_events_js': {
'requires': ['af-applet-contentmodel','af-applet-contentsettingsview'],
'path': '/nn/lib/metro/g/events/events_0.0.7.js'
},
'type_featuredvideo': {
'requires': [],
'path': '/nn/lib/metro/g/featuredvideo/featuredvideo_0.0.7.js'
},
'type_geminiads': {
'requires': [],
'path': '/nn/lib/metro/g/geminiads/geminiads_0.0.7.js'
},
'type_myy': {
'requires': ['stencil-toggle','stencil','stencil-sticker','stencil-lightbox','stencil-bquery','af-applets','app','af-rapid','af-eu-tracking'],
'path': '/nn/lib/metro/g/myy/myy_0.0.56.js'
},
'type_myy_stub_rapid': {
'requires': ['stencil-toggle','stencil','stencil-sticker','stencil-lightbox','stencil-bquery','af-applets','app'],
'path': '/nn/lib/metro/g/myy/myy_stub_rapid_0.0.7.js'
},
'type_myy_mobile': {
'requires': [],
'path': '/nn/lib/metro/g/myy/myy_mobile_0.0.13.js'
},
'type_myy_viewer': {
'requires': ['highlander-client'],
'path': '/nn/lib/metro/g/myy/myy_viewer_0.0.14.js'
},
'type_myy_viewer_atomic': {
'requires': ['highlander-client','event-custom'],
'path': '/nn/lib/metro/g/myy/myy_viewer_atomic_0.0.15.js'
},
'type_advance': {
'requires': ['node'],
'path': '/nn/lib/metro/g/myy/advance_0.0.7.js'
},
'type_caas_viewer': {
'requires': [],
'path': '/nn/lib/metro/g/myy/caas-viewer_0.0.196.js'
},
'type_history': {
'requires': [],
'path': '/nn/lib/metro/g/myy/history_0.0.25.js'
},
'type_myy_yui_base': {
'requires': [],
'path': '/nn/lib/metro/g/myy/yui_base_0.0.2.js'
},
'type_video_manager': {
'requires': ['af-content','af-event','base','event-synthetic','node-core','node-scroll-info'],
'path': '/nn/lib/metro/g/myy/video_manager_0.0.224.js'
},
'type_flash_detection': {
'requires': ['base'],
'path': '/nn/lib/metro/g/myy/flash_detection_0.0.21.js'
},
'type_abk': {
'requires': [],
'path': '/nn/lib/metro/g/myy/advertisement_0.0.16.js'
},
'type_video_stage': {
'requires': [],
'path': '/nn/lib/metro/g/myy/video_stage_0.0.11.js'
},
'type_yahoodotcom_client': {
'requires': ['node'],
'path': '/nn/lib/metro/g/myy/yahoodotcom_client_0.0.18.js'
},
'type_myy_scroller': {
'requires': ['node'],
'path': '/nn/lib/metro/g/myy/myy_scroller_0.0.11.js'
},
'type_rapidworker_1_1': {
'requires': [],
'path': '/nn/lib/metro/g/myy/rapidworker_1_1_0.0.7.js'
},
'type_rapidworker_1_2': {
'requires': [],
'path': '/nn/lib/metro/g/myy/rapidworker_1_2_0.0.31.js'
},
'type_featurecue': {
'requires': [],
'path': '/nn/lib/metro/g/myy/featurecue_0.0.17.js'
},
'type_fp': {
'requires': ['stencil-toggle','stencil','stencil-sticker','stencil-lightbox','stencil-bquery','af-applets','app','af-rapid'],
'path': '/nn/lib/metro/g/myy/myy_0.0.56.js'
},
'type_addtomy': {
'requires': ['node','event','io','panel','io-base','transition','json-stringify'],
'path': '/nn/lib/metro/g/myy/addtomy_0.0.24.js'
},
'af-applet-basemodel': {
'requires': ['af-config','af-sync','af-utils','model'],
'path': '/nn/lib/metro/g/myy/af_applet_basemodel_0.0.8.js'
},
'af-applet-contentmodel': {
'requires': ['af-applet-basemodel'],
'path': '/nn/lib/metro/g/myy/af_applet_contentmodel_0.0.8.js'
},
'af-applet-baseview': {
'requires': ['af-dom','view'],
'path': '/nn/lib/metro/g/myy/af_applet_baseview_0.0.8.js'
},
'af-applet-contentview': {
'requires': ['af-applet-baseview','af-trans'],
'path': '/nn/lib/metro/g/myy/af_applet_contentview_0.0.8.js'
},
'af-applet-contentsettingsview': {
'requires': ['af-applet-contentview','af-utils','ape-applet-templates-settingswrap'],
'path': '/nn/lib/metro/g/myy/af_applet_contentsettingsview_0.0.8.js'
},
'af-applet-dd': {
'requires': ['af-applet-dom','af-message','event-custom-base'],
'path': '/nn/lib/metro/g/myy/af_applet_dd_0.0.9.js'
},
'type_abu': {
'requires': ['af-event'],
'path': '/nn/lib/metro/g/myy/abu_0.0.30.js'
},
'type_abu_event': {
'requires': ['event-synthetic','node-scroll-info'],
'path': '/nn/lib/metro/g/myy/abu_event_0.0.15.js'
},
'type_abu_video': {
'requires': ['af-content','af-event','base','event-custom','type_abu_event','node-core'],
'path': '/nn/lib/metro/g/myy/abu_video_0.0.23.js'
},
'type_abu_video_manager': {
'requires': ['af-content','af-event','base','event-custom','type_abu_event','type_abu_video','node-core'],
'path': '/nn/lib/metro/g/myy/abu_video_manager_0.0.35.js'
},
'type_halloween_js': {
'requires': [],
'path': '/nn/lib/metro/g/myy/halloween_0.0.3.js'
},
'type_advance_desktop': {
'requires': ['stencil','stencil-base','stencil-sticker','af-applets','base','af-rapid'],
'path': '/nn/lib/metro/g/myy/advance_desktop_0.0.20.js'
},
'type_advance_desktop_viewer': {
'requires': ['stencil','stencil-base','stencil-sticker','af-applets','base','af-rapid','highlander-client'],
'path': '/nn/lib/metro/g/myy/advance_desktop-viewer_0.0.21.js'
},
'type_app_declarations': {
'requires': ['af-cookie'],
'path': '/nn/lib/metro/g/myy/app_declarations_0.0.9.js'
},
'pure_client_darla': {
'requires': [],
'path': '/nn/lib/metro/g/myy/pure_client_darla_0.0.11.js'
},
'pure_client_darla_events': {
'requires': [],
'path': '/nn/lib/metro/g/myy/pure_client_darla_events_0.0.5.js'
},
'pure_client_darla_events_bucket': {
'requires': [],
'path': '/nn/lib/metro/g/myy/pure_client_darla_events_bucket_0.0.3.js'
},
'type_idletimer': {
'requires': [],
'path': '/nn/lib/metro/g/myy/idletimer_0.0.19.js'
},
'type_spacebar_scroll': {
'requires': [],
'path': '/nn/lib/metro/g/myy/spacebar_scroll_0.0.23.js'
},
'type_backbutton_detect': {
'requires': [],
'path': '/nn/lib/metro/g/myy/backbutton-detect_0.0.5.js'
},
'type_video_manager_standalone': {
'requires': [],
'path': '/nn/lib/metro/g/myy/video-manager-standalone_0.0.62.js'
},
'type_livestream_manager': {
'requires': [],
'path': '/nn/lib/metro/g/myy/livestream-manager_0.0.33.js'
},
'type_sponsored_moments': {
'requires': [],
'path': '/nn/lib/metro/g/myy/sponsored-moments_0.0.11.js'
},
'type_polyfill': {
'requires': [],
'path': '/nn/lib/metro/g/myy/polyfill_0.0.16.js'
},
'type_c2s_desktop_th': {
'requires': [],
'path': '/nn/lib/metro/g/myy/c2s_desktop_th_0.0.72.js'
},
'type_c2s_mobile_th': {
'requires': [],
'path': '/nn/lib/metro/g/myy/c2s_mobile_th_0.0.73.js'
},
'type_c2s_desktop_ei': {
'requires': [],
'path': '/nn/lib/metro/g/myy/c2s_desktop_ei_0.0.62.js'
},
'type_c2s_mobile_ei': {
'requires': [],
'path': '/nn/lib/metro/g/myy/c2s_mobile_ei_0.0.62.js'
},
'type_c2s_desktop_sa': {
'requires': [],
'path': '/nn/lib/metro/g/myy/c2s_desktop_sa_0.0.62.js'
},
'type_myycontentdb': {
'requires': [],
'path': '/nn/lib/metro/g/myycontentdb/myycontentdb_0.0.61.js'
},
'type_uh_init': {
'requires': [],
'path': '/nn/lib/metro/g/myyheader/uh_init_0.0.24.js'
},
'type_myyrss_js': {
'requires': ['af-applet-contentmodel','af-applet-contentsettingsview'],
'path': '/nn/lib/metro/g/myyrss/myyrss_0.0.19.js'
},
'type_nux': {
'requires': ['node-base','event-base','panel','io-base','json-stringify','af-transport'],
'path': '/nn/lib/metro/g/nux/nux_0.0.48.js'
},
'type_changelayout': {
'requires': [],
'path': '/nn/lib/metro/g/pagenav/changelayout_0.0.46.js'
},
'type_changetheme': {
'requires': ['af-transport'],
'path': '/nn/lib/metro/g/pagenav/changetheme_0.0.55.js'
},
'type_addmodule': {
'requires': ['node','event','io','json-parse','json-stringify'],
'path': '/nn/lib/metro/g/pagenav/addmodule_0.0.21.js'
},
'type_addpage': {
'requires': ['af-transport'],
'path': '/nn/lib/metro/g/pagenav/addpage_0.0.32.js'
},
'type_pagenav': {
'requires': ['af-transport'],
'path': '/nn/lib/metro/g/pagenav/pagenav_0.0.40.js'
},
'type_pushdownad_js': {
'requires': [],
'path': '/nn/lib/metro/g/pushdownad/pushdownad_0.0.15.js'
},
'type_reco': {
'requires': [],
'path': '/nn/lib/metro/g/reco/reco_0.0.13.js'
},
'type_sda': {
'requires': [],
'path': '/nn/lib/metro/g/sda/sda_0.0.88.js'
},
'type_uba_sda': {
'requires': [],
'path': '/nn/lib/metro/g/sda/uba_sda_0.0.21.js'
},
'type_sdarotate': {
'requires': [],
'path': '/nn/lib/metro/g/sda/sdarotate_0.0.57.js'
},
'type_sda_modern_js': {
'requires': [],
'path': '/nn/lib/metro/g/sda/sda_modern_0.0.1.js'
},
'type_signoutcta': {
'requires': ['node','event'],
'path': '/nn/lib/metro/g/signoutcta/signoutcta_0.0.13.js'
},
'type_uac': {
'requires': [],
'path': '/nn/lib/metro/g/uac/uac_0.0.1.js'
},
'type_windowshade_js': {
'requires': [],
'path': '/nn/lib/metro/g/windowshade/windowshade_0.0.11.js'
},
'type_partner_windowshade_js': {
'requires': [],
'path': '/nn/lib/metro/g/windowshade/partner_windowshade_0.0.7.js'
}
}
}
}
});
if (!YMedia.config.patches || !YMedia.config.patches.length) {
YMedia.config.patches = [
function patchLangBundlesRequires(Y, loader) {
var getRequires = loader.getRequires;
loader.getRequires = function (mod) {
var i, j, m, name, mods, loadDefaultBundle,
locales = Y.config.lang || [],
r = getRequires.apply(this, arguments);
// expanding requirements with optional requires
if (mod.langBundles && !mod.langBundlesExpanded) {
mod.langBundlesExpanded = [];
locales = typeof locales === 'string' ? [locales] : locales.concat();
for (i = 0; i < mod.langBundles.length; i += 1) {
mods = [];
loadDefaultBundle = false;
name = mod.group + '-lang-' + mod.langBundles[i];
for (j = 0; j < locales.length; j += 1) {
m = this.getModule(name + '_' + locales[j].toLowerCase());
if (m) {
mods.push(m);
} else {
// if one of the requested locales is missing,
// the default lang should be fetched
loadDefaultBundle = true;
}
}
if (!mods.length || loadDefaultBundle) {
// falling back to the default lang bundle when needed
m = this.getModule(name);
if (m) {
mods.push(m);
}
}
// adding requirements for each lang bundle
// (duplications are not a problem since they will be deduped)
for (j = 0; j < mods.length; j += 1) {
mod.langBundlesExpanded = mod.langBundlesExpanded.concat(this.getRequires(mods[j]), [mods[j].name]);
}
}
}
return mod.langBundlesExpanded && mod.langBundlesExpanded.length ?
[].concat(mod.langBundlesExpanded, r) : r;
};
}
];
}
for (var i = 0; i < YMedia.config.patches.length; i += 1) {YMedia.config.patches[i](YMedia, YMedia.Env._loader);}
YUI().use('node-base', function(Y) {
Y.Global.publish('ymediaReady', { fireOnce: true });
Y.Global.fire('ymediaReady', {e: YMedia});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment