update.greasyfork.org
Open in
urlscan Pro
2600:3c01:1::68c8:1b31
Public Scan
URL:
https://update.greasyfork.org/scripts/943/YouTube%20Center.user.js
Submission: On November 28 via api from LU — Scanned from DE
Submission: On November 28 via api from LU — Scanned from DE
Form analysis
0 forms found in the DOMText Content
/** The MIT License (MIT) Copyright (c) 2014 Jeppe Rune Mortensen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **/ // ==UserScript== // @id YouTubeCenter // @name YouTube Center // @namespace http://www.facebook.com/YouTubeCenter // @version 2.1.7 // @author Jeppe Rune Mortensen <jepperm@gmail.com> // @description YouTube Center contains all kind of different useful functions which makes your visit on YouTube much more entertaining. // @icon https://raw.github.com/YePpHa/YouTubeCenter/master/assets/icon48.png // @icon64 https://raw.github.com/YePpHa/YouTubeCenter/master/assets/icon64.png // @domain yeppha.github.io // @domain youtube.com // @domain www.youtube.com // @domain gdata.youtube.com // @domain apis.google.com // @domain plus.googleapis.com // @domain googleapis.com // @domain raw.github.com // @domain raw2.github.com // @domain raw.githubusercontent.com // @domain s.ytimg.com // @match http://www.youtube.com/* // @match https://www.youtube.com/* // @match http://youtube.com/* // @match https://youtube.com/* // @match https://yeppha.github.io/downloads/YouTubeCenter.meta.js // @match http://s.ytimg.com/yts/jsbin/* // @match https://s.ytimg.com/yts/jsbin/* // @match https://raw.github.com/YePpHa/YouTubeCenter/master/* // @match https://raw.githubusercontent.com/YePpHa/YouTubeCenter/master/* // @match http://raw.github.com/YePpHa/YouTubeCenter/master/* // @match http://raw.githubusercontent.com/YePpHa/YouTubeCenter/master/* // @match http://apis.google.com/*/widget/render/comments?* // @match https://apis.google.com/*/widget/render/comments?* // @match http://plus.googleapis.com/*/widget/render/comments?* // @match https://plus.googleapis.com/*/widget/render/comments?* // @include http://www.youtube.com/* // @include https://www.youtube.com/* // @include http://youtube.com/* // @include https://youtube.com/* // @include http://apis.google.com/*/widget/render/comments?* // @include https://apis.google.com/*/widget/render/comments?* // @include http://plus.googleapis.com/*/widget/render/comments?* // @include https://plus.googleapis.com/*/widget/render/comments?* // @exclude http://apiblog.youtube.com/* // @exclude https://apiblog.youtube.com/* // @exclude http://*.youtube.com/subscribe_embed?* // @exclude https://*.youtube.com/subscribe_embed?* // @grant GM_getValue // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @grant GM_log // @grant GM_registerMenuCommand // @grant unsafeWindow // @updateVersion 156 // @run-at document-start // @priority 9001 // @contributionURL https://github.com/YePpHa/YouTubeCenter/wiki/Donate // @license MIT // @resource translations https://yeppha.github.io/downloads/translations.json // @downloadURL https://update.greasyfork.org/scripts/943/YouTube%20Center.user.js // @updateURL https://update.greasyfork.org/scripts/943/YouTube%20Center.meta.js // ==/UserScript== (function(){ "use strict"; function inject(func) { var script = document.createElement("script"); var p = document.body || document.head || document.documentElement; if (!p) { setTimeout(bind(null, inject, func), 0); return; } script.setAttribute("type", "text/javascript"); if (typeof func === "string") { func = "function(){" + func + "}"; } script.appendChild(document.createTextNode("(" + func + ")(true, 0, false, 406, " + GM_getResourceText("translations") + ");\n//# sourceURL=YouTubeCenter.js")); p.appendChild(script); p.removeChild(script); } var main_function = function(injected, identifier, devbuild, devnumber, ytcenter_locales, _unsafeWindow, preloadedSettings, undefined){ "use strict"; /* UTILS */ function $UpdateChecker() { if (!ytcenter.settings.enableUpdateChecker) return; var curr = (new Date().getTime()), c = curr - 1000*60*60*parseInt(ytcenter.settings.updateCheckerInterval); con.log("Checking for updates in " + ((ytcenter.settings.updateCheckerLastUpdate - c)/1000/60/60) + " hours..."); if (c >= ytcenter.settings.updateCheckerLastUpdate) { con.log("Checking for updates now..."); ytcenter.settings.updateCheckerLastUpdate = curr; ytcenter.saveSettings(); ytcenter.checkForUpdates(); } } function $HasAttribute(elm, attr) { var i; for (i = 0; i < elm.attributes.length; i++) { if (elm.attributes[i].name == attr) return true; } return false; } function $GetOffset(elm) { var x = 0, y = 0; while (elm != null) { y += elm.offsetTop; x += elm.offsetLeft; elm = elm.offsetParent; } return [x, y]; } function $CreateAspectButton() { var btn = document.createElement("button"); btn.className = "yt-uix-button yt-uix-tooltip" + (ytcenter.settings.aspectEnable ? "" : " hid") + (!ytcenter.watch7 ? " yt-uix-button-default" : " yt-uix-button-text"); btn.setAttribute("title", ytcenter.language.getLocale("BUTTON_ASPECT_TOOLTIP")); btn.setAttribute("type", "button"); btn.setAttribute("role", "button"); ytcenter.events.addEvent("ui-refresh", function(){ btn.setAttribute("title", ytcenter.language.getLocale("BUTTON_ASPECT_TOOLTIP")); if (ytcenter.settings.aspectEnable) { ytcenter.utils.removeClass(btn, "hid"); } else { ytcenter.utils.addClass(btn, "hid"); } }); var btnContent = document.createElement("span"); btnContent.className = "yt-uix-button-content"; btnContent.textContent = ytcenter.language.getLocale("BUTTON_ASPECT_TEXT"); ytcenter.language.addLocaleElement(btnContent, "BUTTON_ASPECT_TEXT", "@textContent"); btn.appendChild(btnContent); var arrow = document.createElement("img"); arrow.className = "yt-uix-button-arrow"; arrow.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; arrow.setAttribute("alt", ""); btn.appendChild(arrow); var groups = { 'crop': 'BUTTON_ASPECT_CROP', 'stretch': 'BUTTON_ASPECT_STRETCH' }; var groupChoices = { '4:3': 'BUTTON_ASPECT_4:3', '3:2': 'BUTTON_ASPECT_3:2', '16:9': 'BUTTON_ASPECT_16:9' }; var menu = document.createElement("ul"); menu.className = "yt-uix-button-menu yt-uix-button-menu-default yt-uix-button-menu-external hid"; menu.setAttribute("role", "menu"); menu.setAttribute("aria-haspopup", "true"); var playerAspectTMP = ytcenter.settings['aspectValue']; var item; item = document.createElement("span"); if (ytcenter.settings.aspectValue === "none") { item.setAttribute("style", "background:#555!important;color:#FFF!important;"); } item.className = "yt-uix-button-menu-item"; item.setAttribute("onclick", ";return false;"); item.textContent = ytcenter.language.getLocale("BUTTON_ASPECT_NONE"); ytcenter.language.addLocaleElement(item, "BUTTON_ASPECT_NONE", "@textContent"); ytcenter.utils.addEventListener(item, "click", function(){ playerAspectTMP = "none"; if (ytcenter.settings.aspectSave) { ytcenter.settings['aspectValue'] = "none"; } for (var i = 0; i < this.parentNode.parentNode.children.length; i++) { if (this.parentNode.parentNode.children[i].children[0] && this.parentNode.parentNode.children[i].children[0].tagName === "SPAN") { this.parentNode.parentNode.children[i].children[0].setAttribute("style", ""); } } this.setAttribute("style", "background:#555!important;color:#FFF!important;"); ytcenter.saveSettings(); ytcenter.player.aspect("none"); }, false); var li = document.createElement("li"); li.setAttribute("role", "menuitem"); li.appendChild(item); menu.appendChild(li); item = document.createElement("span"); if (ytcenter.settings.aspectValue === "default") { item.setAttribute("style", "background:#555!important;color:#FFF!important;"); } item.className = "yt-uix-button-menu-item"; item.setAttribute("onclick", ";return false;"); item.textContent = ytcenter.language.getLocale("BUTTON_ASPECT_DEFAULT"); ytcenter.utils.addEventListener(item, "click", function(){ playerAspectTMP = "default"; if (ytcenter.settings.aspectSave) { ytcenter.settings['aspectValue'] = "default"; } for (var i = 0; i < this.parentNode.parentNode.children.length; i++) { if (this.parentNode.parentNode.children[i].children[0] && this.parentNode.parentNode.children[i].children[0].tagName === "SPAN") { this.parentNode.parentNode.children[i].children[0].setAttribute("style", ""); } } this.setAttribute("style", "background:#555!important;color:#FFF!important;"); ytcenter.saveSettings(); ytcenter.player.aspect("default"); }, false); ytcenter.language.addLocaleElement(item, "BUTTON_ASPECT_DEFAULT", "@textContent"); li = document.createElement("li"); li.setAttribute("role", "menuitem"); li.appendChild(item); menu.appendChild(li); for (var group in groups) { if (groups.hasOwnProperty(group)) { item = document.createElement("li"); item.style.fontWeight = "bold"; item.style.padding = "6px"; item.textContent = ytcenter.language.getLocale(groups[group]); ytcenter.language.addLocaleElement(item, groups[group], "@textContent"); menu.appendChild(item); for (var child in groupChoices) { if (groupChoices.hasOwnProperty(child)) { if (child === "4:3" && group === "crop") continue; var val = "yt:" + group + "=" + child; item = document.createElement("span"); if (val === ytcenter.settings.aspectValue) { item.setAttribute("style", "background:#555!important;color:#FFF!important;"); } item.className = "yt-uix-button-menu-item"; item.setAttribute("role", "menuitem"); item.setAttribute("onclick", ";return false;"); item.textContent = ytcenter.language.getLocale(groupChoices[child]); ytcenter.language.addLocaleElement(item, groupChoices[child], "@textContent"); ytcenter.utils.addEventListener(item, "click", (function(val, group, child){ return function(){ var val = "yt:" + group + "=" + child; playerAspectTMP = val; if (ytcenter.settings.aspectSave) { ytcenter.settings['aspectValue'] = val; } for (var i = 0; i < this.parentNode.parentNode.children.length; i++) { if (this.parentNode.parentNode.children[i].children[0] && this.parentNode.parentNode.children[i].children[0].tagName === "SPAN") { this.parentNode.parentNode.children[i].children[0].setAttribute("style", ""); } } this.setAttribute("style", "background:#555!important;color:#FFF!important;"); ytcenter.saveSettings(); ytcenter.player.aspect(val); }; })(val, group, child), false); var li = document.createElement("li"); li.setAttribute("role", "menuitem"); li.appendChild(item); menu.appendChild(li); } } if (group === "crop") { var val = "yt:" + group + "=24:10"; item = document.createElement("span"); if (val === ytcenter.settings.aspectValue) { item.setAttribute("style", "background:#555!important;color:#FFF!important;"); } item.className = "yt-uix-button-menu-item"; item.setAttribute("role", "menuitem"); item.setAttribute("onclick", ";return false;"); item.textContent = ytcenter.language.getLocale("BUTTON_ASPECT_24:10"); ytcenter.language.addLocaleElement(item, "BUTTON_ASPECT_24:10", "@textContent"); ytcenter.utils.addEventListener(item, "click", (function(val, group, child){ return function(){ var val = "yt:" + group + "=24:10"; playerAspectTMP = val; if (ytcenter.settings.aspectSave) { ytcenter.settings['aspectValue'] = val; } for (var i = 0; i < this.parentNode.parentNode.children.length; i++) { if (this.parentNode.parentNode.children[i].children[0] && this.parentNode.parentNode.children[i].children[0].tagName === "SPAN") { this.parentNode.parentNode.children[i].children[0].setAttribute("style", ""); } } this.setAttribute("style", "background:#555!important;color:#FFF!important;"); ytcenter.saveSettings(); ytcenter.player.aspect(val); }; })(val, group, child), false); var li = document.createElement("li"); li.setAttribute("role", "menuitem"); li.appendChild(item); menu.appendChild(li); } } } item = document.createElement("div"); item.style.padding = "7px 9px 0 9px"; item.style.borderTop = "1px #555 solid"; var itemLabel = document.createElement("label"); var label = document.createTextNode(ytcenter.language.getLocale("SETTINGS_ASPECT_REMEMBER")); itemLabel.appendChild(label); ytcenter.language.addLocaleElement(label, "SETTINGS_ASPECT_REMEMBER", "@textContent"); var itemCheckbox = $CreateCheckbox(ytcenter.settings.aspectSave); itemCheckbox.style.marginLeft = "3px"; ytcenter.utils.addEventListener(itemLabel, "click", function(){ ytcenter.settings.aspectSave = !ytcenter.settings.aspectSave; if (ytcenter.settings.aspectSave) { ytcenter.utils.addClass(itemCheckbox, "checked"); ytcenter.settings.aspectValue = playerAspectTMP; } else { ytcenter.utils.removeClass(itemCheckbox, "checked"); } ytcenter.saveSettings(); }, false); itemLabel.appendChild(itemCheckbox); item.appendChild(itemLabel); menu.appendChild(item); btn.appendChild(menu); ytcenter.placementsystem.addElement("ytcenter", "aspectbtn", btn); } function $CreateResizeButton() { function getItemTitle(item) { var dim = ytcenter.utils.calculateDimensions(item.config.width, item.config.height); if (typeof item.config.customName !== "undefined" && item.config.customName !== "") { return item.config.customName; } else if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { return (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")); } else { return dim[0] + "×" + dim[1]; } } function getItemSubText(item) { if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { return (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.config.scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } else { return (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")) + " - " + (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.config.scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } } function setValue(id) { var item; ytcenter.utils.each(ytcenter.settings["resize-playersizes"], function(i, val){ if (val.id !== ytcenter.player.currentResizeId) return; item = val; return false; }); } function updateItems(items) { menu.innerHTML = ""; var db = []; ytcenter.utils.each(items, function(i, item){ var li = document.createElement("li"); li.setAttribute("role", "menuitem"); var span = document.createElement("span"); db.push(span); span.className = "yt-uix-button-menu-item" + (ytcenter.player.currentResizeId === item.id ? " ytcenter-resize-dropdown-selected" : ""); span.style.paddingBottom = "12px"; if (ytcenter.player.currentResizeId === item.id) { setValue(ytcenter.player.currentResizeId); } var title = document.createElement("span"); title.textContent = getItemTitle(item); ytcenter.events.addEvent("ui-refresh", function(){ title.textContent = getItemTitle(item); }); title.style.display = "block"; title.style.fontWeight = "bold"; var subtext = document.createElement("span"); subtext.textContent = getItemSubText(item); ytcenter.events.addEvent("ui-refresh", function(){ subtext.textContent = getItemSubText(item); }); subtext.style.display = "block"; subtext.style.fontSize = "11px"; subtext.style.lineHeight = "0px"; ytcenter.utils.addEventListener(li, "click", function(){ try { ytcenter.player.currentResizeId = item.id; ytcenter.player.updateResize(); setValue(ytcenter.player.currentResizeId); try { document.body.click(); } catch (e) { con.error(e); } ytcenter.utils.each(db, function(_i, elm){ ytcenter.utils.removeClass(elm, "ytcenter-resize-dropdown-selected"); }); ytcenter.utils.addClass(span, "ytcenter-resize-dropdown-selected"); } catch (e) { con.error(e); } }); span.appendChild(title); span.appendChild(subtext); li.appendChild(span); menu.appendChild(li); }); } var btnLabel = ytcenter.gui.createYouTubeButtonTextLabel("BUTTON_RESIZE_TEXT"); var menu = document.createElement("ul"); menu.className = "yt-uix-button-menu yt-uix-button-menu-default yt-uix-button-menu-external hid"; menu.setAttribute("role", "menu"); var arrow = ytcenter.gui.createYouTubeButtonArrow(); var btn = ytcenter.gui.createYouTubeButton("BUTTON_RESIZE_TOOLTIP", [btnLabel, arrow, menu]); btn.style.textAlign = "left"; if (ytcenter.settings.resizeEnable) { ytcenter.utils.removeClass(btn, "hid"); } else { ytcenter.utils.addClass(btn, "hid"); } updateItems(ytcenter.settings["resize-playersizes"]); ytcenter.events.addEvent("settings-update", function(){ updateItems(ytcenter.settings["resize-playersizes"]); }); ytcenter.player.resizeCallback.push(function(){ updateItems(ytcenter.settings["resize-playersizes"]); }); ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.resizeEnable) { ytcenter.utils.removeClass(btn, "hid"); } else { ytcenter.utils.addClass(btn, "hid"); } }); ytcenter.placementsystem.addElement("ytcenter", "resizebtn", btn); } function $CreateCheckbox(_checked) { var checked = _checked || false; var cont = document.createElement("span"); cont.className = "yt-uix-form-input-checkbox-container" + (checked ? " checked" : ""); var inp = document.createElement("input"); inp.setAttribute("type", "checkbox"); inp.className = "yt-uix-form-input-checkbox"; inp.value = "true"; if (checked) { inp.checked = "checked"; } var span = document.createElement("span"); span.className = "yt-uix-form-input-checkbox-element"; cont.appendChild(inp); cont.appendChild(span); return cont; } function $CreateLightButton() { var btn = document.createElement("button"); ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.lightbulbEnable) { ytcenter.utils.removeClass(btn, "hid"); } else { ytcenter.utils.addClass(btn, "hid"); } }); btn.setAttribute("onclick", ";return false;"); btn.setAttribute("type", "button"); btn.setAttribute("role", "button"); btn.className = "yt-uix-button yt-uix-tooltip" + (ytcenter.settings.lightbulbEnable ? "" : " hid") + (!ytcenter.watch7 ? " yt-uix-button-default" : " yt-uix-button-text"); btn.title = ytcenter.language.getLocale("LIGHTBULB_TOOLTIP"); //btn.style.marginLeft = ".5em"; ytcenter.language.addLocaleElement(btn, "LIGHTBULB_TOOLTIP", "title"); var s = document.createElement("span"); s.className = "yt-uix-button-content"; var icon = document.createElement("img"); icon.setAttribute("alt", ""); icon.src = ytcenter.icon.lightbulb; s.appendChild(icon); btn.appendChild(s); ytcenter.utils.addEventListener(btn, "click", function(){ ytcenter.player.toggleLights(); }, false); ytcenter.placementsystem.addElement("ytcenter", "lightbtn", btn); } function $CreateRepeatButton() { var btn = document.createElement("button"); btn.style.margin = "0 2px 0 0"; ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.enableRepeat) { ytcenter.utils.removeClass(btn, 'hid'); } else { ytcenter.utils.addClass(btn, 'hid'); } }); btn.title = ytcenter.language.getLocale("BUTTON_REPEAT_TOOLTIP"); ytcenter.language.addLocaleElement(btn, "BUTTON_REPEAT_TOOLTIP", "title"); btn.setAttribute("role", "button"); btn.setAttribute("type", "button"); btn.setAttribute("onclick", ";return false;"); btn.className = "yt-uix-button yt-uix-tooltip" + (ytcenter.settings.autoActivateRepeat ? " ytcenter-uix-button-toggled" : " yt-uix-button-text") + (ytcenter.settings.enableRepeat ? "" : " hid"); ytcenter.utils.addEventListener(btn, "click", function(){ if (ytcenter.doRepeat) { ytcenter.utils.removeClass(this, 'ytcenter-uix-button-toggled'); ytcenter.utils.addClass(this, 'yt-uix-button-text'); ytcenter.doRepeat = false; } else { ytcenter.utils.addClass(this, 'ytcenter-uix-button-toggled'); ytcenter.utils.removeClass(this, 'yt-uix-button-text'); ytcenter.doRepeat = true; } }, false); if (ytcenter.settings.autoActivateRepeat) { ytcenter.doRepeat = true; } else { ytcenter.doRepeat = false; } var iconw = document.createElement("span"); iconw.className = "yt-uix-button-icon-wrapper"; if (!ytcenter.settings.repeatShowIcon) { iconw.style.display = "none"; } var icon = document.createElement("img"); icon.className = "yt-uix-button-icon " + (ytcenter.watch7 ? "ytcenter-repeat-icon" : "yt-uix-button-icon-playlist-bar-autoplay"); icon.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; if (!ytcenter.watch7) { icon.style.background = "no-repeat url(//s.ytimg.com/yts/imgbin/www-refresh-vflMaphyY.png) -173px -60px"; icon.style.width = "20px"; icon.style.height = "17px"; } /*icon.style.width = "20px"; icon.style.height = "18px"; icon.style.background = "no-repeat url(//s.ytimg.com/yt/imgbin/www-master-vfl8ZHa_q.png) -303px -38px";*/ icon.setAttribute("alt", ""); iconw.appendChild(icon); btn.appendChild(iconw); var t = document.createElement("span"); t.className = "yt-uix-button-content"; t.textContent = ytcenter.language.getLocale("BUTTON_REPEAT_TEXT"); ytcenter.language.addLocaleElement(t, "BUTTON_REPEAT_TEXT", "@textContent"); if (!ytcenter.settings.repeatShowText) { t.style.display = "none"; } ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.repeatShowIcon) { iconw.style.display = ""; } else { iconw.style.display = "none"; } if (ytcenter.settings.repeatShowText) { t.style.display = ""; } else { t.style.display = "none"; } }); btn.appendChild(t); ytcenter.placementsystem.addElement("ytcenter", "repeatbtn", btn); } function $DownloadButtonStream() { var priority = ['small', 'medium', 'large', 'hd720', 'hd1080', 'hd1440', 'highres']; var stream; var format = (function(){ for (var i = 0; i < ytcenter.video.format.length; i++) { if (ytcenter.settings.downloadFormat == ytcenter.video.format[i].key) { return ytcenter.video.format[i].type; } } return ytcenter.language.getLocale("UNKNOWN"); })(); for (var i = 0; i < ytcenter.video.streams.length; i++) { if ((stream == null || $ArrayIndexOf(priority, ytcenter.video.streams[i].quality) > $ArrayIndexOf(priority, stream.quality)) && $ArrayIndexOf(priority, ytcenter.video.streams[i].quality) <= $ArrayIndexOf(priority, ytcenter.settings.downloadQuality) && ytcenter.video.streams[i].type && ytcenter.video.streams[i].type.indexOf(format) == 0 && ytcenter.video.streams[i].url) { stream = ytcenter.video.streams[i]; } } return stream; } function $CreateDownloadButton() { if (identifier === 8) return; // The Chrome Webstore version of YouTube Center has the download feature disabled. var g = document.createElement("span"); g.style.margin = "0 2px 0 0"; ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.enableDownload) { ytcenter.utils.removeClass(g, "hid"); g.style.display = ""; } else { ytcenter.utils.addClass(g, "hid"); g.style.display = "none"; } }); g.className = "yt-uix-button-group" + (ytcenter.settings.enableDownload ? "" : " hid"); if (!ytcenter.settings.enableDownload) { g.style.display = "none"; } var stream = $DownloadButtonStream(); var btn1a = document.createElement("a"); if (stream) { btn1a.setAttribute("href", ytcenter.video.downloadLink(stream)); btn1a.setAttribute("download", ytcenter.video.getFilename(stream) + ytcenter.video.getFilenameExtension(stream)); } btn1a.setAttribute("target", "_blank"); ytcenter.events.addEvent("ui-refresh", function(){ stream = $DownloadButtonStream(); if (stream) { btn1a.setAttribute("href", ytcenter.video.downloadLink(stream)); btn1a.setAttribute("download", ytcenter.video.getFilename(stream) + ytcenter.video.getFilenameExtension(stream)); } }); var btn1 = document.createElement("button"); btn1.className = "start yt-uix-button yt-uix-tooltip" + (!ytcenter.watch7 ? " yt-uix-button-default" : " yt-uix-button-text"); //btn1.setAttribute("onclick", ";return false;"); btn1.setAttribute("type", "button"); btn1.setAttribute("role", "button"); ytcenter.utils.addEventListener(btn1, "click", function(e){ if (!ytcenter.settings.downloadAsLinks) { stream = $DownloadButtonStream(); if (stream) { ytcenter.video.download(stream.itag); } e.preventDefault(); } }, false); if (stream != null) { var stream_name = { highres: ytcenter.language.getLocale("HIGHRES"), hd1440: ytcenter.language.getLocale("HD1440"), hd1080: ytcenter.language.getLocale("HD1080"), hd720: ytcenter.language.getLocale("HD720"), large: ytcenter.language.getLocale("LARGE"), medium: ytcenter.language.getLocale("MEDIUM"), small: ytcenter.language.getLocale("SMALL") }[stream.quality]; btn1.title = ytcenter.utils.replaceTextAsString(ytcenter.language.getLocale("BUTTON_DOWNLOAD_TOOLTIP"), { stream_name: stream_name, stream_resolution: stream.dimension.split("x")[1] + "p", stream_dimension: stream.dimension, stream_3d: (stream.stereo3d && stream.stereo3d == 1 ? " 3D" : ""), stream_type: (function(stream){ for (var i = 0; i < ytcenter.video.format.length; i++) { if (stream.type.indexOf(ytcenter.video.format[i].type) == 0) { return ytcenter.language.getLocale(ytcenter.video.format[i].name); } } return ytcenter.language.getLocale("UNKNOWN"); })(stream) }); } else { btn1.title = ytcenter.utils.replaceTextAsString(ytcenter.language.getLocale("BUTTON_DOWNLOAD_TOOLTIP_NONE"), { type: (function(){ for (var i = 0; i < ytcenter.video.format.length; i++) { if (ytcenter.settings.downloadFormat == ytcenter.video.format[i].key) { return ytcenter.language.getLocale(ytcenter.video.format[i].name); } } return ytcenter.language.getLocale("UNKNOWN"); })() }); } ytcenter.events.addEvent("ui-refresh", function(){ var stream = $DownloadButtonStream(); if (stream != null) { var stream_name = { highres: ytcenter.language.getLocale("HIGHRES"), hd1440: ytcenter.language.getLocale("HD1440"), hd1080: ytcenter.language.getLocale("HD1080"), hd720: ytcenter.language.getLocale("HD720"), large: ytcenter.language.getLocale("LARGE"), medium: ytcenter.language.getLocale("MEDIUM"), small: ytcenter.language.getLocale("SMALL") }[stream.quality]; btn1.title = ytcenter.utils.replaceTextAsString(ytcenter.language.getLocale("BUTTON_DOWNLOAD_TOOLTIP"), { stream_name: stream_name, stream_resolution: stream.dimension.split("x")[1] + "p", stream_dimension: stream.dimension, stream_3d: (stream.stereo3d && stream.stereo3d == 1 ? " 3D" : ""), stream_type: (function(stream){ for (var i = 0; i < ytcenter.video.format.length; i++) { if (stream.type.indexOf(ytcenter.video.format[i].type) == 0) { return ytcenter.language.getLocale(ytcenter.video.format[i].name); } } return ytcenter.language.getLocale("UNKNOWN"); })(stream) }); } else { btn1.title = ytcenter.utils.replaceTextAsString(ytcenter.language.getLocale("BUTTON_DOWNLOAD_TOOLTIP_NONE"), { type: (function(){ for (var i = 0; i < ytcenter.video.format.length; i++) { if (ytcenter.settings.downloadFormat == ytcenter.video.format[i].key) { return ytcenter.language.getLocale(ytcenter.video.format[i].name); } } return ytcenter.language.getLocale("UNKNOWN"); })() }); } }); btn1a.appendChild(btn1); var btn1_text = document.createElement("span"); btn1_text.className = "yt-uix-button-content"; btn1_text.textContent = ytcenter.language.getLocale("BUTTON_DOWNLOAD_TEXT"); ytcenter.language.addLocaleElement(btn1_text, "BUTTON_DOWNLOAD_TEXT", "@textContent"); btn1.appendChild(btn1_text); g.appendChild(btn1a); var btn2 = document.createElement("button"); btn2.className = "end yt-uix-button yt-uix-tooltip" + (!ytcenter.watch7 ? " yt-uix-button-default" : " yt-uix-button-text"); btn2.setAttribute("onclick", ";return false;"); btn2.setAttribute("type", "button"); btn2.setAttribute("role", "button"); btn2.title = ytcenter.language.getLocale("BUTTON_DOWNlOAD2_TOOLTIP"); ytcenter.language.addLocaleElement(btn2, "BUTTON_DOWNlOAD2_TOOLTIP", "title"); var img = document.createElement("img"); img.className = "yt-uix-button-arrow"; img.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; img.setAttribute("alt", ""); img.style.marginLeft = "0px"; img.style.marginRight = "0px"; btn2.appendChild(img); var stream_groups = (function(){ var groups = (function(){ var obj = {}; for (var i = 0; i < ytcenter.video.format.length; i++) { obj[ytcenter.video.format[i].type] = { label: ytcenter.video.format[i].name, key: ytcenter.video.format[i].key, help: ytcenter.video.format[i].help }; } return obj; })(); var sorted = {}; for (var i = 0; i < ytcenter.video.streams.length; i++) { if (ytcenter.video.streams[i].type.indexOf("audio/mp4") !== 0 && (ytcenter.video.streams[i].size || ytcenter.video.streams[i].bitrate)) continue; if (ytcenter.video.streams[i].type) { var f = ytcenter.video.streams[i].type.split(";")[0]; if (groups.hasOwnProperty(f)) { if (!sorted[groups[f].label]) sorted[groups[f].label] = {streams: [], key: groups[f].key, help: groups[f].help}; sorted[groups[f].label].streams.push(ytcenter.video.streams[i]); } else { if (!sorted['UNKNOWN']) sorted['UNKNOWN'] = {streams: [], key: "unknown"}; sorted['UNKNOWN'].streams.push(ytcenter.video.streams[i]); } } else { if (!sorted['UNKNOWN']) sorted['UNKNOWN'] = {streams: [], key: "unknown"}; sorted['UNKNOWN'].streams.push(ytcenter.video.streams[i]); } } return sorted; })(); var menu = document.createElement("ul"); menu.className = "yt-uix-button-menu yt-uix-button-menu-default yt-uix-button-menu-external hid" + (ytcenter.settings.show3DInDownloadMenu ? "" : " ytcenter-menu-3d-hide"); menu.setAttribute("role", "menu"); menu.setAttribute("aria-haspopup", "true"); ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.show3DInDownloadMenu) { ytcenter.utils.removeClass(menu, "ytcenter-menu-3d-hide"); } else { ytcenter.utils.addClass(menu, "ytcenter-menu-3d-hide"); } }); for (var key in stream_groups) { if (stream_groups.hasOwnProperty(key)) { var title = document.createElement("li"); title.setAttribute("role", "menuitem"); title.style.color = "#666"; title.style.fontSize = "0.9166em"; title.style.paddingLeft = "9px"; if (key !== "UNKNOWN") { var __t = document.createTextNode(ytcenter.language.getLocale(key)); title.appendChild(__t); ytcenter.language.addLocaleElement(__t, key, "@textContent"); title.className = "ytcenter-downloadmenu-" + stream_groups[key].key; if (stream_groups[key].help) { var help = document.createElement("a"); help.setAttribute("href", stream_groups[key].help); help.setAttribute("target", "_blank"); help.setAttribute("style", "vertical-align: super; font-size: 10px"); help.appendChild(document.createTextNode('?')); var replace = { option: { toString: function() { return ytcenter.language.getLocale(key); } } }; help.setAttribute("title", ytcenter.utils.replaceTextAsString(ytcenter.language.getLocale("SETTINGS_HELP_ABOUT"), replace)); ytcenter.language.addLocaleElement(help, "SETTINGS_HELP_ABOUT", "title", replace); title.appendChild(help); } } else { title.className = "ytcenter-downloadmenu-unknown"; title.textContent = ytcenter.language.getLocale("UNKNOWN"); ytcenter.language.addLocaleElement(title, "UNKNOWN", "@textContent"); } //stream_groups[key] = stream_groups[key].streams; // Just lazy... menu.appendChild(title); for (var i = 0; i < stream_groups[key].streams.length; i++) { var is3D = (stream_groups[key].streams[i].stereo3d && stream_groups[key].streams[i].stereo3d == 1 ? true : false); var item = document.createElement("a"); if (!stream_groups[key].streams[i].url) { item.style.color = "#A7A7A7"; item.style.display = "block"; item.style.margin = "0"; item.style.padding = "6px 20px"; item.style.textDecoration = "none"; item.style.whiteSpace = "nowrap"; item.style.wordWrap = "normal"; } else { item.className = "yt-uix-button-menu-item"; item.setAttribute("target", "_blank"); item.setAttribute("download", ytcenter.video.getFilename(stream_groups[key].streams[i]) + ytcenter.video.getFilenameExtension(stream_groups[key].streams[i])); item.href = ytcenter.video.downloadLink(stream_groups[key].streams[i]); var downloadStreamListener = (function(_stream){ return function(e){ if (!ytcenter.settings.downloadAsLinks) { ytcenter.video.download(_stream.itag); e.preventDefault(); } }; })(stream_groups[key].streams[i]); ytcenter.utils.addEventListener(item, "click", downloadStreamListener, false); ytcenter.events.addEvent("ui-refresh", (function(__stream, item, _downloadStreamListener){ return function(){ item.href = ytcenter.video.downloadLink(__stream); item.setAttribute("download", ytcenter.video.getFilename(__stream) + ytcenter.video.getFilenameExtension(__stream)); }; })(stream_groups[key].streams[i], item, downloadStreamListener)); } var stream_name = { highres: ytcenter.language.getLocale("HIGHRES"), hd1440: ytcenter.language.getLocale("HD1440"), hd1080: ytcenter.language.getLocale("HD1080"), hd720: ytcenter.language.getLocale("HD720"), large: ytcenter.language.getLocale("LARGE"), medium: ytcenter.language.getLocale("MEDIUM"), small: ytcenter.language.getLocale("SMALL") }[stream_groups[key].streams[i].quality]; var _t = document.createElement("table"), _tb = document.createElement("tbody"), _tr = document.createElement("tr"), _td = document.createElement("td"), _td2 = document.createElement("td"); _t.style.width = "100%"; _t.style.border = "0"; _t.style.margin = "0"; _t.style.padding = "0"; if (stream_groups[key].streams[i].bitrate) { _td.textContent = Math.round(parseInt(stream_groups[key].streams[i].bitrate)/1000) + " Kbps"; } else { _td.textContent = stream_name + ", " + (stream_groups[key].streams[i].dimension ? stream_groups[key].streams[i].dimension.split("x")[1] : "") + "p (" + (stream_groups[key].streams[i].dimension ? stream_groups[key].streams[i].dimension : "") + ")"; _td2.textContent = (is3D ? " 3D" : ""); } _tr.appendChild(_td); _tr.appendChild(_td2); _tb.appendChild(_tr); _t.appendChild(_tb); item.appendChild(_t); ytcenter.events.addEvent("ui-refresh", (function(stream, _is3D, _td, _td2){ return function(){ var stream_name = { highres: ytcenter.language.getLocale("HIGHRES"), hd1440: ytcenter.language.getLocale("HD1440"), hd1080: ytcenter.language.getLocale("HD1080"), hd720: ytcenter.language.getLocale("HD720"), large: ytcenter.language.getLocale("LARGE"), medium: ytcenter.language.getLocale("MEDIUM"), small: ytcenter.language.getLocale("SMALL") }[stream.quality]; if (stream.bitrate) { _td.textContent = Math.round(parseInt(stream.bitrate)/1000) + " Kbps"; } else { _td.textContent = stream_name + ", " + (stream.dimension ? stream.dimension.split("x")[1] : "") + "p (" + (stream.dimension ? stream.dimension : "") + ")"; _td2.textContent = (_is3D ? " 3D" : ""); } }; })(stream_groups[key].streams[i], is3D, _td, _td2)); var li = document.createElement("li"); li.className = "ytcenter-downloadmenu-" + (stream_groups[key].key === "UNKNOWN" ? "unknown" : stream_groups[key].key) + (is3D ? " ytcenter-menu-item-3d" : ""); li.setAttribute("role", "menuitem"); li.appendChild(item); menu.appendChild(li); } } } var mp3title = document.createElement("li"); mp3title.className = (ytcenter.settings.mp3Services == '' ? "hid" : ""); if (ytcenter.settings.mp3Services === '') { mp3title.style.display = "none"; } mp3title.style.color = "#666"; mp3title.style.fontSize = "0.9166em"; mp3title.style.paddingLeft = "9px"; mp3title.textContent = ytcenter.language.getLocale("BUTTON_DOWNLOAD_MENU_MP3SERVICES"); ytcenter.language.addLocaleElement(mp3title, "BUTTON_DOWNLOAD_MENU_MP3SERVICES", "@textContent"); ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.mp3Services === '') { ytcenter.utils.addClass(mp3title, 'hid'); mp3title.style.display = "none"; } else { ytcenter.utils.removeClass(mp3title, 'hid'); mp3title.style.display = ""; } }); menu.appendChild(mp3title); var hasMP3Service = function(value){ var a = ytcenter.settings.mp3Services.split("&"); for (var i = 0; i < a.length; i++) { if (decodeURIComponent(a[i]) === value) { return true; } } return false; }; var removeNonExistentMP3Services = function(){ var newArr = []; var a = ytcenter.settings.mp3Services.split("&"); for (var i = 0; i < a.length; i++) { for (var j = 0; j < ytcenter.mp3services.length; j++) { if (ytcenter.mp3services[j].value === decodeURIComponent(a[i])) { newArr.push(a[i]); break; } } } ytcenter.settings.mp3Services = newArr.join("&"); }; removeNonExistentMP3Services(); for (var i = 0; i < ytcenter.mp3services.length; i++) { var li = document.createElement("li"); var item = document.createElement("a"); item.className = "yt-uix-button-menu-item"; li.setAttribute("role", "menuitem"); li.className = "ytcenter-downloadmenu-MP3" + (hasMP3Service(ytcenter.mp3services[i].value) ? "" : " hid"); if (!hasMP3Service(ytcenter.mp3services[i].value)) { li.style.display = "none"; } item.setAttribute("href", ytcenter.utils.replaceTextAsString(ytcenter.mp3services[i].value, { title: ytcenter.video.title, videoid: ytcenter.video.id, author: ytcenter.video.author, url: loc.href })); item.setAttribute("target", "_blank"); var mp3RedirectListener = (function(mp3){ return function(e){ if (!ytcenter.settings.downloadAsLinks) { ytcenter.redirect(mp3.value, true); e.preventDefault(); return false; } }; })(ytcenter.mp3services[i]); ytcenter.utils.addEventListener(item, "click", mp3RedirectListener, false); ytcenter.events.addEvent("ui-refresh", (function(mp3, li){ return function(){ var a = ytcenter.settings.mp3Services.split("&"); var f = false; for (var i = 0; i < a.length; i++) { if (decodeURIComponent(a[i]) === mp3.value) { f = true; break; } } if (f) { ytcenter.utils.removeClass(li, 'hid'); li.style.display = ""; } else { ytcenter.utils.addClass(li, 'hid'); li.style.display = "none"; } }; })(ytcenter.mp3services[i], li)); item.textContent = ytcenter.language.getLocale(ytcenter.mp3services[i].label); ytcenter.language.addLocaleElement(item, ytcenter.mp3services[i].label, "@textContent"); li.appendChild(item); menu.appendChild(li); } btn2.appendChild(menu); g.appendChild(btn2); ytcenter.placementsystem.addElement("ytcenter", "downloadgroup", g); } function $CreateSettingsUI() { var appbar = document.getElementById("appbar-settings-menu"), appSecondaryContainer = document.getElementById("appbar-secondary-container"), liSettings = document.createElement("li"), spanText = document.createElement("span"), textIconContainer = document.createElement("span"), textIcon = document.createElement("img"), text = null; if (ytcenter.feather) { var wrapper = document.getElementById("us"), aLink = document.createElement("a"), gearicon = document.createElement("img"); gearicon.src = ytcenter.icon.gear; gearicon.setAttribute("alt", ""); aLink.appendChild(gearicon); aLink.className = "ml"; aLink.setAttribute("href", "javascript:void(0);"); ytcenter.utils.addEventListener(aLink, "click", function(e){ if (!ytcenter.settingsPanelDialog) ytcenter.settingsPanelDialog = ytcenter.settingsPanel.createDialog(); ytcenter.settingsPanelDialog.setVisibility(true); e && e.preventDefault && e.preventDefault(); return false; }, false); aLink.title = ytcenter.language.getLocale("BUTTON_SETTINGS_TITLE"); ytcenter.language.addLocaleElement(aLink, "BUTTON_SETTINGS_TITLE", "title"); wrapper.appendChild(aLink); } else if (appbar) { liSettings.setAttribute("id", "ytcenter-settings-toggler"); liSettings.setAttribute("role", "menuitem"); liSettings.className = "yt-uix-button-menu-new-section-separator"; spanText.className = "yt-uix-button-menu-item upload-menu-item"; ytcenter.utils.addEventListener(spanText, "click", function(){ if (!ytcenter.settingsPanelDialog) ytcenter.settingsPanelDialog = ytcenter.settingsPanel.createDialog(); ytcenter.settingsPanelDialog.setVisibility(true); }, false); textIconContainer.className = "yt-valign icon-container"; textIcon.className = "upload-menu-account-settings-icon yt-valign-container"; textIcon.setAttribute("src", "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"); textIconContainer.appendChild(textIcon); text = document.createTextNode(ytcenter.language.getLocale("BUTTON_SETTINGS_LABEL")); ytcenter.language.addLocaleElement(text, "BUTTON_SETTINGS_LABEL", "@textContent"); spanText.appendChild(textIconContainer); spanText.appendChild(text); liSettings.appendChild(spanText); appbar.appendChild(liSettings); } else if (appSecondaryContainer) { var btn = document.createElement("button"), iconWrapper = document.createElement("span"), icon = document.createElement("img"); btn.className = "appbar-action-button flip yt-uix-button yt-uix-button-default yt-uix-button-size-default yt-uix-button-has-icon yt-uix-button-empty yt-uix-tooltip"; btn.title = ytcenter.language.getLocale("BUTTON_SETTINGS_TITLE"); ytcenter.language.addLocaleElement(btn, "BUTTON_SETTINGS_TITLE", "title"); btn.setAttribute("type", "button"); btn.setAttribute("role", "button"); btn.setAttribute("onclick", ";return false;"); ytcenter.utils.addEventListener(btn, "click", function(){ if (!ytcenter.settingsPanelDialog) ytcenter.settingsPanelDialog = ytcenter.settingsPanel.createDialog(); ytcenter.settingsPanelDialog.setVisibility(true); }, false); iconWrapper.className = "yt-uix-button-icon-wrapper"; icon.className = "yt-uix-button-icon yt-uix-button-icon-appbar-settings"; icon.src = "https://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; icon.setAttribute("alt", ""); icon.setAttribute("title", ""); iconWrapper.appendChild(icon); btn.appendChild(iconWrapper); appSecondaryContainer.appendChild(btn); } else { var btn = document.createElement("button"); btn.id = "masthead-user-button"; if (document.getElementById("masthead-gaia-photo-expander")) { btn.style.marginTop = "3px"; } else if (document.getElementById("masthead-user-expander")) { btn.style.verticalAlign = "middle"; } btn.title = ytcenter.language.getLocale("BUTTON_SETTINGS_TITLE"); ytcenter.language.addLocaleElement(btn, "BUTTON_SETTINGS_TITLE", "title"); btn.setAttribute("type", "button"); btn.setAttribute("role", "button"); btn.setAttribute("onclick", ";return false;"); btn.className = "yt-uix-tooltip-reverse yt-uix-button " + (ytcenter.watch7 ? "yt-uix-button-text" : "yt-uix-button-text") + " yt-uix-tooltip"; var btnt = document.createElement("span"); btnt.className = "yt-uix-button-icon-wrapper"; btnt.style.margin = "0"; var gearicon = document.createElement("img"); gearicon.src = ytcenter.icon.gear; gearicon.setAttribute("alt", ""); var ytvt = document.createElement("span"); ytvt.className = "yt-valign-trick"; btnt.appendChild(gearicon); btnt.appendChild(ytvt); btn.appendChild(btnt); var ytuixbc = document.createElement("span"); ytuixbc.className = "yt-uix-button-content"; ytuixbc.textContent = " "; btn.appendChild(ytuixbc); ytcenter.utils.addEventListener(btn, "click", function(){ if (!ytcenter.settingsPanelDialog) ytcenter.settingsPanelDialog = ytcenter.settingsPanel.createDialog(); ytcenter.settingsPanelDialog.setVisibility(true); }, false); if (document.getElementById("masthead-user")) { document.getElementById("masthead-user").appendChild(btn); } else if (document.getElementById("yt-masthead-user")) { document.getElementById("yt-masthead-user").appendChild(btn); } else if (document.getElementById("yt-masthead-signin")) { btn.style.margin = "0 10px"; document.getElementById("yt-masthead-signin").appendChild(btn); } else { con.error("Settings UI - Couldn't add settings button"); } } } function $CloneArray(arr) { var copy = []; for (var i = 0; i < arr.length; i++) { copy[i] = arr[i]; } return copy; } function $Clone(obj) { var copy; if (null == obj || typeof obj != "object") { return obj; } if (obj instanceof Date) { copy = new Date(); copy.setTime(obj.getTime()); return copy; } if (obj instanceof Array) { copy = []; for (var i = 0; i < obj.length; i++) { copy[i] = $Clone(obj[i]); } return copy; } if (obj instanceof Object) { copy = {}; for (var key in obj) { if (obj.hasOwnProperty(key)) { copy[key] = $Clone(obj[key]); } } return copy; } return null; } function $ArrayIndexOf(arr, obj) { for (var i = 0; i < arr.length; i++) { if (arr[i] === obj) return i; } return -1; } function $SlideRange(elm, handle, min, max, defaultValue) { function mousemove(e){ if (range.mouse.down) { e.preventDefault(); if (e && e.type.indexOf("touch") !== -1 && e.changedTouches && e.changedTouches.length > 0 && e.changedTouches[0]) { e = e.changedTouches[0]; } var pos = e.clientX - $AbsoluteOffset(range.elm)[0] - range.handle.offsetWidth/2; var max = range.elm.clientWidth - range.handle.offsetWidth; if (pos > max) { pos = max; } else if (pos < 0) { pos = 0; } range.handle.style.left = pos + "px"; for (var i = 0; i < range.listeners.length; i++) { if (range.listeners[i].e === 'valuechange') { var max = range.elm.clientWidth - range.handle.offsetWidth; var a = range.max - range.min; range.listeners[i].c(parseFloat(range.handle.style.left)/max*a+range.min); } } } } function mousedownListener(e){ range.mouse.down = true; throttleFunc = ytcenter.utils.throttle(mousemove, 50); ytcenter.utils.addEventListener(document, "mousemove", throttleFunc, false); ytcenter.utils.addEventListener(document, "touchmove", throttleFunc, false); e.preventDefault(); } function mouseupListener(e){ if (range.mouse.down) { range.mouse.down = false; e.stopPropagation(); for (var i = 0; i < range.listeners.length; i++) { if (range.listeners[i].e === 'change') { var max = range.elm.clientWidth - range.handle.offsetWidth; var a = range.max - range.min; range.listeners[i].c(parseFloat(range.handle.style.left)/max*a+range.min); } } if (throttleFunc) ytcenter.utils.removeEventListener(document, "mousemove", throttleFunc, false); if (throttleFunc) ytcenter.utils.removeEventListener(document, "touchmove", throttleFunc, false); e.preventDefault(); } } function clickListener(e) { var a; var pos = e.clientX - $AbsoluteOffset(range.elm)[0] - range.handle.offsetWidth/2; var max = range.elm.clientWidth - range.handle.offsetWidth; if (pos > max) { pos = max; } else if (pos < 0) { pos = 0; } range.handle.style.left = pos + "px"; for (var i = 0; i < range.listeners.length; i++) { if (range.listeners[i].e === 'valuechange') { max = range.elm.clientWidth - range.handle.offsetWidth; a = range.max - range.min; range.listeners[i].c(parseFloat(range.handle.style.left)/max*a+range.min); } else if (range.listeners[i].e === 'change') { max = range.elm.clientWidth - range.handle.offsetWidth; a = range.max - range.min; range.listeners[i].c(parseFloat(range.handle.style.left)/max*a+range.min); } } e.preventDefault(); } var range = { elm: elm, handle: handle, min: (min ? min : 0), max: (max ? max : 100), defaultValue: (defaultValue ? defaultValue : min), mouse: { down: false }, listeners: [], width: 240, height: 15 }, throttleFunc = null; range.elm.style.marginTop = "-4px"; range.elm.style.width = range.width + "px"; range.elm.style.height = range.height + "px"; range.handle.style.width = range.height + "px"; range.handle.style.height = range.height + "px"; var returnKit = { addEventListener: (function(range){ return function(event, callback){ range.listeners.push({ e: event, c: callback }); }; })(range), getValue: (function(range){ return function(){ var max = parseInt(range.elm.style.width) - (range.height + 2); var a = range.max - range.min; return parseFloat(range.handle.style.left)/max*a+range.min || range.defaultValue; }; })(range), setValue: (function(range){ return function(val){ var max = parseInt(range.elm.style.width) - (range.height + 2); var pos = (val - range.min)/(range.max - range.min)*max; if (pos > max) { pos = max; } else if (pos < 0) { pos = 0; } range.handle.style.left = pos + "px"; if (val == 0) { return 0; } else { return returnKit.getValue(); } }; })(range) }; returnKit.setValue(range.defaultValue); ytcenter.utils.addEventListener(elm, "click", clickListener, false); /* Mouse */ ytcenter.utils.addEventListener(elm, "mousedown", mousedownListener, false); ytcenter.utils.addEventListener(document, "mouseup", mouseupListener, false); /* Touch */ ytcenter.utils.addEventListener(elm, "touchstart", mousedownListener, false); ytcenter.utils.addEventListener(document, "touchend", mouseupListener, false); return returnKit; } function $AbsoluteOffset(elm) { var pos = [elm.offsetLeft || 0, elm.offsetTop || 0]; if (elm.offsetParent) { var ao = $AbsoluteOffset(elm.offsetParent); pos[0] += ao[0]; pos[1] += ao[1]; } return pos; } /* END UTILS */ /* Classes */ function defineLockedProperty(obj, key, setter, getter) { if (typeof obj !== "object") obj = {}; if (ytcenter.utils.ie || typeof Object.defineProperty === "function") { Object.defineProperty(obj, key, { get: getter, set: setter }); return obj; } else { obj.__defineGetter__(key, getter); obj.__defineSetter__(key, setter); return obj; } } function freeze(parent, freezeObject) { function wait(_parent, _freezeObject) { var args = _freezeObject.split("."); var _object = undefined; defineLockedProperty(_parent, args[0], function(val){ args.splice(0, 1); freeze(val, args.join(".")); _object = val; }, function(){ return _object; }); } var args = freezeObject.split("."); var at = parent; for (var i = 0, len = args.length - 1; i < len; i++) { if (typeof at[args[i]] === "object") { at = at[args[i]]; } else { args.splice(0, i); wait(at, args.join(".")); return; } } var defObject = undefined; var frozen = false; if (typeof at[args[args.length - 1]] !== "undefined") { defObject = at[args[args.length - 1]]; frozen = true; } defineLockedProperty(at, args[args.length - 1], function(val){ if (!frozen) { frozen = true; defObject = val; } }, function(){ return defObject; }); } function PlayerConfig(configSetter, configGetter) { defineLockedProperty(this, "config", function(value){ configSetter(value); }, function(){ return configGetter(); }); } var console_debug = devbuild; // Disable this to stop YouTube Center from writing in the console log. var _console = []; var uw = null, loc = null, con = null, ytcenter = {}, yt = {}; uw = _unsafeWindow || (function(){ var a; try { a = unsafeWindow === window ? false : unsafeWindow; } catch (e) { } finally { return a || (function(){ try { var e = document.createElement('p'); e.setAttribute('onclick', 'return window;'); return e.onclick(); } catch (e) { return window; } }()); } })(); if (uw && typeof uw.ytcenter !== "undefined") { return; } ytcenter.unsafe = {}; uw.ytcenter = ytcenter.unsafe; ytcenter.ltr = true; ytcenter.utils = {}; ytcenter.utils.ie = (function(){ for (var v = 3, el = document.createElement('b'), all = el.all || []; el.innerHTML = '<!--[if gt IE ' + (++v) + ']><i><![endif]-->', all[0];); return v > 4 ? v : !!document.documentMode; }()); ytcenter.updateLogoLink_ = null; ytcenter.updateLogoLink = function(){ var logoContainer = document.getElementById("logo-container"), url = ytcenter.settings.logoLink; if (logoContainer && logoContainer.tagName === "A") { if (ytcenter.updateLogoLink_ === null) { ytcenter.updateLogoLink_ = document.getElementById("logo-container").getAttribute("href"); } if (ytcenter.updateLogoLink_ !== "/" && (url.indexOf("http://") === 0 || url.indexOf("https://") === 0)) { url = ytcenter.updateLogoLink_.substring(0, ytcenter.updateLogoLink_.indexOf("http")) + url; } else if (ytcenter.updateLogoLink_ !== "/") { if (url.indexOf("/") === 0) url = url.substring(1); url = ytcenter.updateLogoLink_ + url; } document.getElementById("logo-container").setAttribute("href", url); } else if (logoContainer) { var map = logoContainer.getElementsByTagName("map"); if (map && map.length > 0 && map[0] && map[0].children && map[0].children.length > 0) { if (ytcenter.updateLogoLink_ === null) ytcenter.updateLogoLink_ = map[0].children[0].getAttribute("href"); if (ytcenter.updateLogoLink_ !== "/" && (url.indexOf("http://") === 0 || url.indexOf("https://") === 0)) { url = ytcenter.updateLogoLink_.substring(0, ytcenter.updateLogoLink_.indexOf("http")) + url; } else if (ytcenter.updateLogoLink_ !== "/") { if (url.indexOf("/") === 0) url = url.substring(1); url = ytcenter.updateLogoLink_ + url; } map[0].children[0].setAttribute("href", url); } } }; ytcenter.spfPackages = function(originalPackages){ function parse(data) { if (ytcenter.utils.isArray(data)) { var i, type; for (i = 0; i < data.length; i++) { type = parseType(data[i]); addType(type, data[i]); } } else { if (data.type && !multipart) { multipart = true; parse(data.parts); } else { addType(parseType(data), data); } } } function addType(type, data) { var _types = type.split(","), i, index = packages.push(ytcenter.spfData(data)) - 1; for (i = 0; i < _types.length; i++) { if (!hasType(_types[i])) { types.push(_types[i]); } if (!pointer[_types[i]]) pointer[_types[i]] = []; pointer[_types[i]].push(index); } } function parseType(data) { var type = []; if ((data.swfcfg) || (data.html && data.html.content && data.html.content.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) || (data.html && data.html.player && data.html.player && data.html.player.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) || (data.html && data.html.content && data.html.content.indexOf("data-swf-config=\"") !== -1)) type.push("player"); if (data.attr && data.html && data.js) type.push("page"); if (data.css && data.js) type.push("header"); if (type.length === 0) { con.log("[SPF] Received unknown package!", type, data); return "unknown"; } return type.join(","); } function getPackage(type) { if (!pointer[type] || !packages[pointer[type][0]]) return null; return packages[pointer[type][0]].getData(); } function getData(type) { if (!pointer[type] || !packages[pointer[type][0]]) return null; return packages[pointer[type][0]]; } function getAvailableTypes() { return types; } function getOriginalPackages() { return originalPackages; } function getPackages(type) { var i, arr = []; if (type) { if (!pointer[type]) return null; for (i = 0; i < pointer[type].length; i++) { arr.push(packages[pointer[type][i]].getData()); } if (multipart) { var _o = ytcenter.utils.clone(originalPackages); _o.parts = arr; return _o; } else { return arr; } } else { for (i = 0; i < packages.length; i++) { arr.push(packages[i].getData()); } if (multipart) { var _o = ytcenter.utils.clone(originalPackages); _o.parts = arr; return _o; } else { if (arr.length === 1) return arr[0]; return arr; } } } function getTitle() { var i, title = null; for (i = 0; i < packages.length; i++) { title = packages[i].getTitle(); if (title) return title; } return title; } function setTitle(title) { var i; for (i = 0; i < packages.length; i++) { if (packages[i].getTitle()) packages[i].setTitle(title); } } function hasType(type) { var i; for (i = 0; i < types.length; i++) { if (types[i] === type) return true; } return false; } var types = [], pointer = {} /* { player: [2, 3], page: [3] } */, packages = [], multipart = false; parse(originalPackages); return { getData: getData, getAvailableTypes: getAvailableTypes, hasType: hasType, getPackages: getPackages, getOriginalPackages: getOriginalPackages, getTitle: getTitle, setTitle: setTitle }; }; ytcenter.spfData = function(originalPackage){ function parse(rawData) { parsePlayerConfig(rawData); } function parsePlayerConfigType(content) { content = content.split("<script>var ytplayer = ytplayer || {};ytplayer.config = ")[1]; content = content.split(";</script>")[0]; return JSON.parse(content); } function parsePlayerConfig(d) { if (!d) return; if (d.swfcfg) { playerConfig = d.swfcfg; } else if (d.html && d.html.content && d.html.content.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) { playerConfig = parsePlayerConfigType(d.html.content); } else if (d.html && d.html.player && d.html.player && d.html.player.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) { playerConfig = parsePlayerConfigType(d.html.player); } else if (d.html && d.html.content && d.html.content.indexOf("data-swf-config=\"") !== -1) { var a = d.html.content.split("data-swf-config=\""), i1, i2; if (a && a.length > 1) { a = a[1]; if (a.indexOf("\">") !== -1) { a = a.split("\">"); if (a && a.length > 1) { a = a[0]; } else { a = null; } } else { a = null; } } else { a = null; } if (a !== null) { playerConfig = JSON.parse(ytcenter.utils.decodeRawTag(a).replace(/&/g, "&").replace(/"/g, "\"")); } } } function injectPlayerConfig(content, config) { return ytcenter.utils.replaceContent(content, config, "<script>var ytplayer = ytplayer || {};ytplayer.config = ", ";</script>"); } function injectDataPlayerConfig(d, config) { if (d.swfcfg) { d.swfcfg = config; } else if (d.html && d.html.content && d.html.content.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) { d.html.content = injectPlayerConfig(d.html.content, config); } else if (d.html && d.html.player && d.html.player && d.html.player.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) { d.html.player = injectPlayerConfig(d.html.player, config); } else if (d.html && d.html.content && d.html.content.indexOf("data-swf-config=\"") !== -1) { var i1, i2; i1 = d.html.content.indexOf("data-swf-config=\"") + "data-swf-config=\"".length; i2 = d.html.content.indexOf("data-swf-config=\"") + d.html.content.split("data-swf-config=\"")[1].indexOf("\">") + "data-swf-config=\"".length; d.html.content = d.html.content.substring(0, i1) + ytcenter.utils.encodeRawTag(JSON.stringify(config).replace(/&/g, "&").replace(/"/g, """)) + d.html.content.substring(i2); } else { con.log("[SPF] Tried to set the player configuration for a package with no player config!"); } } function setHTML(id, value) { if (!data.html) data.html = {}; data.html[id] = value; } function getHTML(id) { if (!data.html) return null; return data.html[id]; } function setAttribute(id, attr, value) { try { if (!data.attr) data.attr = {}; if (typeof data.attr[id] === "undefined") data.attr[id] = {}; } catch (e) { con.error(e); var _tmp = {}; _tmp[id] = {}; data.attr = _tmp; } try { data.attr[id][attr] = value; } catch (e) { con.error(e); } } function getAttribute(id, attr) { if (!data) return null; if (!data.attr || !data.attr[id]) return null; return data.attr[id][attr]; } function setCSS(value) { data.css = value; } function getCSS() { return data.css; } function setJS(value) { data.js = value; } function getJS() { return data.js; } function getPlayerConfig() { return playerConfig; } function setPlayerConfig(config) { playerConfig = config; injectDataPlayerConfig(data, config); } function hasPlayerConfig() { return !!playerConfig; } function getTitle() { return data.title; } function setTitle(title) { data.title = title; } function getData() { return data; } function getOriginalPackage() { return originalPackage; } var data = ytcenter.utils.clone(originalPackage), playerConfig = null; parse(data); return { setHTML: setHTML, getHTML: getHTML, setAttribute: setAttribute, getAttribute: getAttribute, setCSS: setCSS, getCSS: getCSS, setJS: setJS, getJS: getJS, getPlayerConfig: getPlayerConfig, setPlayerConfig: setPlayerConfig, hasPlayerConfig: hasPlayerConfig, getData: getData, getOriginalPackage: getOriginalPackage, getTitle: getTitle, setTitle: setTitle }; }; /** * A wrapper for spfjs on YouTube. * @URL https://github.com/youtube/spfjs/ */ ytcenter.spf = (function(){ function bind(scope, func) { var args = Array.prototype.slice.call(arguments, 2); return function(){ return func.apply(scope, args.concat(Array.prototype.slice.call(arguments))) }; } function setEnabled(enabled) { if (enabled) { !isEnabled() && uw && uw.spf && uw.spf.init && uw.spf.init(); } else { isEnabled() && uw && uw.spf && uw.spf.dispose && uw.spf.dispose(); } } function isEnabled() { return (uw && uw._spf_state && uw._spf_state["history-init"]); } function addEventListener(event, callback) { if (!attachedEvents[event]) attachedEvents[event] = []; attachedEvents[event].push(callback); } function removeEventListener(event, callback) { if (!attachedEvents[event]) return; for (var i = 0, len = attachedEvents[event].length; i < len; i++) { if (attachedEvents[event][i] === callback) { attachedEvents[event].splice(i, 1); i--; len--; } } } function listener(event) { var args = Array.prototype.slice.call(arguments, 1); var detail = null; if (args.length > 0 && args[0] && args[0].detail) { detail = args[0].detail; } con.log("[SPF] " + event, detail); var listeners = attachedEvents[event]; if (listeners) { for (var i = 0, len = listeners.length; i < len; i++) { listeners[i].apply(this, args); } } } function init() { for (var i = 0, len = spfEvents.length; i < len; i++) { var boundListener = bind(null, listener, spfEvents[i]); events.push(boundListener); document.addEventListener(customEventPrefix + spfEvents[i], boundListener, false); } } function dispose() { if (events.length === spfEvents.length) { for (var i = 0, len = spfEvents.length; i < len; i++) { document.removeEventListener(customEventPrefix + spfEvents[i], events[i], false); } events = []; } } var customEventPrefix = "spf"; var spfEvents = [ "click", "cssbeforeunload", "cssunload", "done", "error", "history", "jsbeforeunload", "jsunload", "partdone", "partprocess", "process", "ready", "reload", "request" ]; var attachedEvents = { }; var events = [ ]; init(); return { addEventListener: addEventListener, removeEventListener: removeEventListener, setEnabled: setEnabled, isEnabled: isEnabled, init: init, dispose: dispose }; })(); loc = (function(){ try { if (typeof location !== "undefined") return location; if (typeof window !== "undefined" && typeof window.location !== "undefined") return window.location; if (typeof uw !== "undefined" && typeof uw.location !== "undefined") return uw.location; } catch (e) {} })(); if (loc.href.indexOf("http://apiblog.youtube.com/") === 0 || loc.href.indexOf("https://apiblog.youtube.com/") === 0) return; if (typeof console !== "undefined" && typeof console.log !== "undefined") { con = {}; for (var key in console) { if (typeof console[key] === "function") { con[key] = (function(key){ return function(){ try { var args = []; var _args = []; for (var i = 0; i < arguments.length; i++) { args.push(arguments[i]); } if (key === "error" && args[0]) { var tmp = {args: args.length === 1 ? args[0] : args, type: "error"}; if (args[0].message) { tmp['message'] = args[0].message; } if (args[0].stack) { tmp['stack'] = args[0].stack; } if (!(ytcenter && ytcenter.settings && !ytcenter.settings.debugConsole)) { _console.push(tmp); } if (tmp['stack']) { _args = [args[0].stack]; } else if (tmp['message']) { _args = [args[0].message]; } else { _args = args; } } else { _args = args; if (!(ytcenter && ytcenter.settings && !ytcenter.settings.debugConsole)) { _console.push({args: _args.length === 1 ? _args[0] : _args, type: key}); } } if (console_debug && console[key].apply) { return console[key].apply(console, args) } else if (console_debug) { return console[key](_args[0]); } } catch (e) { console.error(e); } }; })(key); } } } else if (typeof uw.console !== "undefined" && typeof uw.console.log !== "undefined") { con = {}; for (var key in uw.console) { if (typeof uw.console[key] === "function") { con[key] = (function(key){ return function(){ try { var args = []; var _args = []; for (var i = 0; i < arguments.length; i++) { args.push(arguments[i]); } if (key === "error" && args[0]) { var tmp = {args: args.length === 1 ? args[0] : args, type: "error"}; if (args[0].message) { tmp['message'] = args[0].message; } if (args[0].stack) { tmp['stack'] = args[0].stack; } if (!(ytcenter && ytcenter.settings && !ytcenter.settings.debugConsole)) { _console.push(tmp); } if (tmp['stack']) { _args = [args[0].stack]; } else if (tmp['message']) { _args = [args[0].message]; } else { _args = args; } } else { _args = args; if (!(ytcenter && ytcenter.settings && !ytcenter.settings.debugConsole)) { _console.push({args: _args.length === 1 ? _args[0] : _args, type: key}); } } if (console_debug && uw.console[key].apply) { return uw.console[key].apply(uw.console, _args); } else if (console_debug) { return uw.console[key](_args[0]); } } catch (e) { console.error(e); } }; })(key); } } } else { con = {}; for (var key in console) { if (typeof console[key] === "function") { con[key] = (function(key){ return function(msg){ try { var args = []; var _args = []; for (var i = 0; i < arguments.length; i++) { args.push(arguments[i]); } if (key === "error" && args[0]) { var tmp = {args: args.length === 1 ? args[0] : args, type: "error"}; if (args[0].message) { tmp['message'] = args[0].message; } if (args[0].stack) { tmp['stack'] = args[0].stack; } if (!(ytcenter && ytcenter.settings && !ytcenter.settings.debugConsole)) { _console.push(tmp); } if (tmp['stack']) { _args = [args[0].stack]; } else if (tmp['message']) { _args = [args[0].message]; } else { _args = args; } } else { _args = args; if (!(ytcenter && ytcenter.settings && !ytcenter.settings.debugConsole)) { _console.push({args: _args.length === 1 ? _args[0] : _args, type: key}); } } if (console_debug && GM_log.apply) { return GM_log.apply(this, _args); } else { return GM_log(_args[0]); } } catch (e) { console.error(e); } }; })(key); } } } ytcenter.actionPanel = (function(){ function getEventListener(options) { if (ytcenter.feather) return null; if (typeof uw.yt === "undefined" || typeof uw.yt.events === "undefined" || typeof uw.yt.events.listeners_ === "undefined") return null; var key, item = null; var listeners = uw.yt.events.listeners_; for (key in listeners) { item = listeners[key]; if (item && item.length > 1 && options.element === item[0] && options.event === item[1]) { return item; } } item = null; return null; } function likeButtonListener(e) { function switchToPreferredTab() { setPanelEnabled("share", true); uw.setTimeout(function(){ switchTo(ytcenter.settings.likeSwitchToTab); }, 7); } if (ytcenter.feather) return; try { var isLiked = ytcenter.utils.hasClass(document.getElementById("watch-like-dislike-buttons"), "liked"); setPanelEnabled("share", false); originalEventListener(e); if (ytcenter.settings.likeSwitchToTab !== "none" && !isLiked) { uw.setTimeout(switchToPreferredTab, 7); } } catch (e) { con.error(e); } } function setPanelEnabled(panel, enabled) { if (enabled) { var el = document.getElementById("action-panel-" + panel + "-disabled"); if (el) { el.setAttribute("id", "action-panel-" + panel); } } else { var el = document.getElementById("action-panel-" + panel); if (el) { el.setAttribute("id", "action-panel-" + panel + "-disabled"); } } } function switchTo(panel) { if (!panel || panel === "none") return; var btn = document.createElement("button"); btn.className = "action-panel-trigger"; btn.setAttribute("data-trigger-for", "action-panel-" + panel); var parent = document.getElementById("watch8-action-buttons"); parent.appendChild(btn); btn.click(); parent.removeChild(btn); } function getLikeButton() { return document.getElementById("watch-like"); } function setup() { if (ytcenter.feather) return; if (maxSetupCalls < setupCalls) return; setupCalls++; try { if (likeButton && likeButtonListener && likeButtonEvent) { likeButton.removeEventListener("click", likeButtonListener, likeButtonEvent[4]); } if (ytcenter.getPage() !== "watch") return; con.log("[ActionPanel] Loading..."); likeButton = getLikeButton(); likeButtonEvent = getEventListener({ event: "click", element: likeButton }); if (likeButton === null || likeButtonEvent === null || typeof likeButtonEvent[3] !== "function") { uw.setTimeout(function(){ setup(); }, 2500); return; } con.log("[ActionPanel] Setup has begun!"); originalEventListener = likeButtonEvent[3]; con.log("[ActionPanel] Adding/Removing listeners"); likeButton.removeEventListener("click", originalEventListener, likeButtonEvent[4]); ytcenter.utils.addEventListener(likeButton, "click", likeButtonListener, likeButtonEvent[4]); } catch (e) { con.error(e); } } var enabled = true; var switchToElm = null; var observer = null; var originalEventListener = null; var likeButton = null; var likeButtonEvent = null; var delayedSwitchTabTimer = null; var maxSetupCalls = 10; var setupCalls = 0; return { switchTo: switchTo, setup: setup }; })(); ytcenter.mutation = (function(){ var exports = {}, M = null, setup = false, disconnects = [], disconnected = false; exports.fallbackObserve = function(target, options, callback){ function MutationRecord(record) { this.addedNodes = record.addedNodes || null; this.attributeName = record.attributeName || null; this.attributeNamespace = record.attributeNamespace || null; this.nextSibling = record.nextSibling || null; this.oldValue = record.oldValue || null; this.previousSibling = record.previousSibling || null; this.removedNodes = record.removedNodes || null; this.target = record.target || null; this.type = record.type || null; this.event = record.event || null; } function c() { if (insertedNodes.length > 0 || removedNodes.length > 0) { mutationRecords.push(new MutationRecord({ addedNodes: insertedNodes, removedNodes: removedNodes, type: "childList", target: target })); } if (attributes.length > 0) { for (i = 0; i < attributes.length; i++) { mutationRecords.push(new MutationRecord({ attributeName: attributes[i].attributeName, attributeNamespace: attributes[i].attributeNamespace, oldValue: attributes[i].oldValue, type: "attributes", target: target })); } } if (attributes.length > 0) { for (i = 0; i < attributes.length; i++) { mutationRecords.push(new MutationRecord({ attributeName: attributes[i].attributeName, attributeNamespace: attributes[i].attributeNamespace, oldValue: attributes[i].oldValue, type: "attributes", target: target })); } } if (characterDataModified) { mutationRecords.push(new MutationRecord({ oldValue: characterDataModified.oldValue, type: "characterData", target: target })); } if (characterDataModified) { mutationRecords.push(new MutationRecord({ oldValue: characterDataModified.oldValue, type: "characterData", target: target })); } if (subtreeModified) { mutationRecords.push(new MutationRecord({ type: "subtree", target: target })); } callback(mutationRecords); // Cleaning up insertedNodes = []; removedNodes = []; mutationRecords = []; attributes = []; characterDataModified = null; subtreeModified = false; if (failsafe && !disconnected) { addListeners(); } } function DOMNodeInserted(e) { insertedNodes.push(e.target); wrapperFunction(); } function DOMNodeRemoved(e) { removedNodes.push(e.target); wrapperFunction(); } function DOMAttrModified(e) { attributes.push({ attributeName: e.attrName, attributeNamespace: e.attrName, oldValue: e.prevValue }); wrapperFunction(); } function DOMCharacterDataModified(e) { characterDataModified = { newValue: e.newValue, oldValue: e.prevValue }; wrapperFunction(); } function DOMSubtreeModified(e) { subtreeModified = true; wrapperFunction(); } function addListeners() { if (options.childList) { ytcenter.utils.addEventListener(target, "DOMNodeInserted", DOMNodeInserted, false); ytcenter.utils.addEventListener(target, "DOMNodeRemoved", DOMNodeRemoved, false); } if (options.attributes) { ytcenter.utils.addEventListener(target, "DOMAttrModified", DOMAttrModified, false); } if (options.characterData) { ytcenter.utils.addEventListener(target, "DOMCharacterDataModified", DOMCharacterDataModified, false); } if (options.subtree) { ytcenter.utils.addEventListener(target, "DOMSubtreeModified", DOMSubtreeModified, false); } } function removeListeners() { disconnected = true; if (options.childList) { ytcenter.utils.removeEventListener(target, "DOMNodeInserted", DOMNodeInserted, false); ytcenter.utils.removeEventListener(target, "DOMNodeRemoved", DOMNodeRemoved, false); } if (options.attributes) { ytcenter.utils.removeEventListener(target, "DOMAttrModified", DOMAttrModified, false); } if (options.characterData) { ytcenter.utils.removeEventListener(target, "DOMCharacterDataModified", DOMCharacterDataModified, false); } if (options.subtree) { ytcenter.utils.removeEventListener(target, "DOMSubtreeModified", DOMSubtreeModified, false); } } function wrapperFunction(){ if (failsafe) { removeListeners(); } throttleFunc(); } var buffer = null, i, insertedNodes = [], removedNodes = [], mutationRecords = [], attributes = [], characterDataModified = null, subtreeModified = false, throttleFunc = ytcenter.utils.throttle(c, 500), failsafe = true; if (typeof options.failsafe === "boolean") { failsafe = options.failsafe; } addListeners(); return disconnects[disconnects.push({ DOMNodeInserted: DOMNodeInserted, DOMNodeRemoved: DOMNodeRemoved, DOMAttrModified: DOMAttrModified, DOMCharacterDataModified: DOMCharacterDataModified, DOMSubtreeModified: DOMSubtreeModified, target: target, options: options, callback: callback, disconnect: removeListeners }) - 1]; }; exports.observe = function(target, options, callback){ function mutationCallback(mutations) { // Disconnecting observer to prevent an infinite loop if (failsafe) { observer.disconnect(); } callback(mutations); if (failsafe && !disconnected) { observer.observe(target, options); } } function finishedCalling() { calling = false; } var calling = false, failsafe = true; if (!target || !options || !callback) return; if (typeof options.failsafe === "boolean") { failsafe = options.failsafe; } if (!setup) exports.setup(); //if (!M) return exports.fallbackObserve(target, options, callback); // fallback if MutationObserver isn't supported //if (!M) throw "MutationObserver not supported."; var observer = null; if (M) observer = new M(mutationCallback); var disconnected = false; if (observer) observer.observe(target, options); return disconnects[disconnects.push({ target: target, options: options, callback: callback, disconnect: function(){ disconnected = true; if (observer) observer.disconnect(); } }) - 1]; }; exports.disconnect = function(target, callback){ var i; for (i = 0; i < disconnects.length; i++) { if (target === disconnects[i].target && callback === disconnects[i].callback) { disconnects[i].disconnect(); } } }; exports.setup = function(){ setup = true; M = ytcenter.getMutationObserver(); ytcenter.unload(function(){ var i; for (i = 0; i < disconnects.length; i++) { if (disconnects[i] && disconnects[i].disconnect) disconnects[i].disconnect(); } }); }; return exports; })(); try { ytcenter.embed = {}; ytcenter.embed.isYouTubeReady = false; ytcenter.embed.isYouTubeCenterReady = false; ytcenter.embed.failsafe = false; ytcenter.embed._writeEmbed = uw.writeEmbed; defineLockedProperty(uw, "writeEmbed", function(func){ con.log("[Embed] writeEmbed has been leaked to YouTube Center."); ytcenter.embed._writeEmbed = func; }, function(){ if (ytcenter.embed.failsafe) return ytcenter.embed._writeEmbed; return function(){ con.log("[Embed] YouTube has called writeEmbed."); ytcenter.embed.isYouTubeReady = true; if (ytcenter.embed.writePlayer) ytcenter.embed.writePlayer(); }; }); ytcenter.embed.callWriteEmbed = function(){ var reload = false; try { if (ytcenter.settings.embedWriteEmbedMethod === "standard") { // Async ytcenter.embed._writeEmbed(); } else if (ytcenter.settings.embedWriteEmbedMethod === "test1") { // Async uw.yt.player.embed("player", ytcenter.player.getConfig()); } else if (ytcenter.settings.embedWriteEmbedMethod === "test2") { // Sync var data = new uw.yt.player.Application("player", ytcenter.player.getConfig()); con.log("[callWriteEmbed]", data); } else if (ytcenter.settings.embedWriteEmbedMethod === "test3") { // Sync uw.yt.player.Application.create("player", ytcenter.player.getConfig()); } else if (ytcenter.settings.embedWriteEmbedMethod === "standard+reload") { // Async ytcenter.embed._writeEmbed(); reload = true; } else if (ytcenter.settings.embedWriteEmbedMethod === "test1+reload") { // Async uw.yt.player.embed("player", ytcenter.player.getConfig()); reload = true; } else if (ytcenter.settings.embedWriteEmbedMethod === "test2+reload") { // Sync var data = new uw.yt.player.Application("player", ytcenter.player.getConfig()); con.log("[callWriteEmbed]", data); reload = true; } else if (ytcenter.settings.embedWriteEmbedMethod === "test3+reload") { // Sync uw.yt.player.Application.create("player", ytcenter.player.getConfig()); reload = true; } else if (ytcenter.settings.embedWriteEmbedMethod === "test4") { // Sync uw.ytcenter_writeEmbed = ytcenter.embed._writeEmbed; ytcenter.inject(function(){ var c = JSON.parse(JSON.stringify(ytplayer.config)); yt.config_.PLAYER_CONFIG = c; ytcenter_writeEmbed(); }); } else if (ytcenter.settings.embedWriteEmbedMethod === "test5") { // Sync try { uw.yt.config_.PLAYER_CONFIG = ytcenter.utils.jsonClone(ytcenter.player.getConfig()); } catch (e) { con.error(e); } ytcenter.embed._writeEmbed(); } } catch (e) { con.error(e); } if (reload) { // Reload the embedded video if there is no children of the player element after 1.0 seconds. uw.setTimeout(function(){ var p = document.getElementById("player"); if (!p) return; if (p.children.length === 0) { loc.reload(); } }, ytcenter.settings.embedWriteEmbedMethodReloadDelay); } }; ytcenter.embed.writePlayer = function(){ try { if (typeof ytcenter.embed._writeEmbed !== "function") { con.log("[Embed] writeEmbed is not yet ready!"); return; } con.log("[Embed] Checking if YouTube and YouTube Center are ready..."); if (!ytcenter.embed.isYouTubeReady || !ytcenter.embed.isYouTubeCenterReady) { con.log("[Embed] They're both not ready yet!"); return; } /* Settings the player config according to YouTube Center */ var cfg = ytcenter.player.getConfig(); if (cfg) uw.yt.config_.PLAYER_CONFIG = cfg; /* Writing the embedded player */ con.log("[Embed] Writing the embedded player."); ytcenter.embed.callWriteEmbed(); } catch (e) { con.error(e); ytcenter.embed.failsafe = true; /* Trying to write the player when an error was thrown */ try { con.log("[Embed] Writing the embedded player."); ytcenter.embed.callWriteEmbed(); } catch (e) { con.error(e); } } }; ytcenter.embed.load = function(){ try { var url = ytcenter.player.getVideoDataRequest(); con.log("[Embed] Downloading data from " + url); ytcenter.utils.xhr({ method: "GET", url: url, headers: { "Content-Type": "text/plain" }, onload: function(response){ try { if (response.responseText) { con.log("[Embed] Download complete."); var object = {}, tokens = response.responseText.split("&"); for (var i = 0; i < tokens.length; i++) { var ss = tokens[i].split("="); object[ss[0]] = decodeURIComponent(ss[1]); } if (object.errorcode) { con.error("[Embed] Error: " + object.errorcode + ": " + object.reason); } else { if (object.dash) ytcenter.player.config.args.dash = object.dash; if (object.dashmpd) ytcenter.player.config.args.dashmpd = object.dashmpd; if (object.adaptive_fmts) ytcenter.player.config.args.adaptive_fmts = object.adaptive_fmts; if (object.fmt_list) ytcenter.player.config.args.fmt_list = object.fmt_list; if (object.url_encoded_fmt_stream_map) ytcenter.player.config.args.url_encoded_fmt_stream_map = object.url_encoded_fmt_stream_map; if (object.url_encoded_fmt_stream_map || object.adaptive_fmts) { ytcenter.video.streams = ytcenter.parseStreams(object); } ytcenter.player.setConfig(ytcenter.player.modifyConfig("embed", ytcenter.player.config)); } ytcenter.embed.isYouTubeCenterReady = true; ytcenter.embed.writePlayer(); } else { con.error("[Embed] Didn't receive any data!"); ytcenter.embed.failsafe = true; /* Going to set YouTube Center as ready to make it possible for the user to watch the embedded video if possible. */ ytcenter.embed.isYouTubeCenterReady = true; ytcenter.embed.writePlayer(); } } catch (e) { con.error(e); ytcenter.embed.failsafe = true; /* Just to make people happy. */ ytcenter.embed.isYouTubeCenterReady = true; ytcenter.embed.writePlayer(); } }, onerror: function(){ con.error("[Embed] Connection failed!"); ytcenter.embed.failsafe = true; /* Going to set YouTube Center as ready to make it possible for the user to watch the embedded video if possible. */ ytcenter.embed.isYouTubeCenterReady = true; ytcenter.embed.writePlayer(); } }); } catch (e) { con.error(e); ytcenter.embed.failsafe = true; ytcenter.embed.isYouTubeCenterReady = true; ytcenter.embed.writePlayer(); } }; } catch (e) { con.error(e); } ytcenter.io = {}; ytcenter.unsafe.io = ytcenter.io; ytcenter.title = {}; ytcenter.title.originalTitle = ""; ytcenter.title.previousTitle = ""; ytcenter.title.liveTitle = ""; ytcenter.title.processOriginalTitle = function(a){ if (ytcenter.player && ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.title) { // Doesn't have a prefix or suffix. a = ytcenter.player.config.args.title; } else { // Can have prefix and suffix. a = a.replace(/^\u25b6 /, ""); // Removes the prefix. // The suffix is handled in the update process. } return a; }; ytcenter.title.modified = function(){ var a = document.getElementsByTagName("title")[0].textContent; if (a !== ytcenter.title.previousTitle) { if (ytcenter.title.originalTitle === "") { ytcenter.title.originalTitle = ytcenter.title.processOriginalTitle(a); } con.log("[Title Listener] \"" + ytcenter.title.previousTitle + "\" => \"" + a + "\""); ytcenter.title.previousTitle = a; ytcenter.title.update(); } }; ytcenter.title._init_count = 0; ytcenter.title.init = function(){ var a = document.getElementsByTagName("title")[0]; if ((a && a.textContent && a.textContent !== "") || (document && document.title && document.title !== "")) { ytcenter.title._init_count = 0; if (a && a.textContent && a.textContent !== "") { ytcenter.title.originalTitle = ytcenter.title.processOriginalTitle(a.textContent); } else { ytcenter.title.originalTitle = ytcenter.title.processOriginalTitle(document.title); } ytcenter.mutation.observe(document.head, { attributes: true, childList: true, characterData: true, subtree: true, failsafe: false }, ytcenter.title.modified); ytcenter.title.update(); } else { if (ytcenter.title._init_count > 5) { ytcenter.title._init_count = 0; return; } con.log("[Title Listener] Waiting for title head..."); ytcenter.title._init_count++; uw.setTimeout(ytcenter.title.init, 500); } }; ytcenter.title.update = function(){ if (ytcenter.title.originalTitle === "") return; //var a = document.getElementsByTagName("title")[0]; if (ytcenter.settings.playerPlayingTitleIndicator && ytcenter.getPage() === "watch") { if (ytcenter.player.getAPI && ytcenter.player.getAPI() && ytcenter.player.getAPI().getPlayerState && ytcenter.player.getAPI().getPlayerState() === 1) { ytcenter.title.addPlayIcon(); } else { ytcenter.title.removePlayIcon(); } } else { ytcenter.title.removePlayIcon(); } if (ytcenter.settings.removeYouTubeTitleSuffix) { ytcenter.title.removeSuffix(); } else { ytcenter.title.addSuffix(); } try { document.title = ytcenter.title.liveTitle; } catch (e) { con.error(e); } }; ytcenter.title.hasSuffix = function(){ return / - YouTube$/.test(ytcenter.title.liveTitle); }; ytcenter.title.removeSuffix = function(){ ytcenter.title.liveTitle = ytcenter.title.liveTitle.replace(/ - YouTube$/, ""); }; ytcenter.title.addSuffix = function(){ if (ytcenter.title.hasSuffix()) return; ytcenter.title.liveTitle += " - YouTube"; }; ytcenter.title.hasPlayIcon = function(){ return ytcenter.title.liveTitle.indexOf("\u25b6 ") === 0; }; ytcenter.title.removePlayIcon = function(){ ytcenter.title.liveTitle = ytcenter.title.originalTitle; }; ytcenter.title.addPlayIcon = function(){ ytcenter.title.liveTitle = "\u25b6 " + ytcenter.title.originalTitle; }; ytcenter.inject = function(func){ try { var script = document.createElement("script"), p = (document.body || document.head || document.documentElement); if (!p) { con.error("[Script Inject] document.body, document.head and document.documentElement doesn't exist!"); return; } if (typeof func === "string") { func = "function(){" + func + "}"; } script.setAttribute("type", "text/javascript"); script.appendChild(document.createTextNode("(" + func + ")();\n//# sourceURL=YouTubeCenter.js")); p.appendChild(script); p.removeChild(script); } catch (e) { con.error(e); } }; ytcenter.unload = (function(){ var unloads = []; window.addEventListener("unload", function(){ var i; for (i = 0; i < unloads.length; i++) { if (typeof unloads[i] === "function") unloads[i](); else con.error("[Unload] Couldn't unload!", unloads[i]); } }, false); return function(unload){ unloads.push(unload); }; })(); ytcenter.version = "2.1.7"; ytcenter.revision = 156; ytcenter.icon = {}; ytcenter.page = "none"; ytcenter.feather = false; ytcenter.icon.gear = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAFM0aXcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgt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niP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAANRJREFUeNqU0rFKBDEUheFvdSpRVmx8EF9EJJXWlj6KCoKCouD2F3wMm+220E6xs1YEZXVsgsTRzLCnSe495+cmJKO2bZVKKTU4wD428YxLnETEvMw2/mqC3aLewCG2sFcGR+XklNI2btS1ExE//lLX1K9ffhceD8DjPng6AE/74AleKuArrqtwRDzhvAJfZL86Ga7w1em1+a31whFxj1mnPYuIu0E46zav805t6IfBMdby8ZdxtAj8jlV8ZvhjEbjBOt6wUsvV7vyI07w/w8N/oe8BAO3xNxGbpir1AAAAAElFTkSuQmCC"; ytcenter.icon.smallThumbsUpWhite = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKB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kb3dzKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmNoYW5nZWQ+Lzwvc3RFdnQ6Y2hhbmdlZD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT42NTUzNTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MjA8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjA8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PoePDakAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAMJJREFUeNrM1KFqQmEUwPGfbFyGYcNkFlaMc2+w6ANYlgeyN/EFTGMPYLPPYhAsvoCwZNiCC8LA9lnu4EPUe9UPXPjH8yuHc4QQpMzFQdxjjurZIKqYIuDpLBANTHIs4PEkEBW8YhVhX8iOBlHHKIL+ejl6KXjAYgf2gXohuDV0heUOLO4T72iXAe8KsLjv1OAgNficElzjNiU4LLvlsmAnJfiDm0NgLSpDD2P87gH7p97yNVro4g2z/K6b//PBFrUZAG6qNPPXY3CAAAAAAElFTkSuQmCC"; ytcenter.icon.dislikebuttonicon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAA5z2lUWHRYTUw6Y29tLmFkb2JlLnhtcA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vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+NjU1MzU8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjIwPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjIwPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4CZeJbAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADJSURBVHjavNQhbkJBFAXQQ9JAiqCpohJTUQnsoAtAYioRTbqSbgDXdAF1aBAoBIINIDAIQkKTEkTdx0Ay4vczkCk3uWLMMS93ZFkmZf0bGOQJP5jhA69o4kZOYsA+spzuMMY7yrg/tgisYPMHGPYufBeB3QjsLHCQEqzhNyX4EolFg1+pwXVqsINPLE5g37iNvfIxDxjmYEu0zl0K9HKwEeqXTK+MVQBt8YbSpVtuB9gEDQWJAZ8P2BRVJxIDVjHHo4hc74NN1f0AUfF7oEeDZDQAAAAASUVORK5CYII="; ytcenter.css = { general: ".watch8 #watch7-views-info{bottom:initial!important;top:-6px!important}#watch-description .ypc-offer-thumbnail{position:relative}.appbar-flexwatch .watch-stage-mode #player,.appbar-flexwatch-mini .watch-stage-mode #player{margin-top:10px!important}.hide-lang-alert #alerts #yt-lang-alert-container{display:none!important}.static-header #masthead-positioner{position:relative!important}.static-header #masthead-positioner-height-offset{display:none!important}a .ytcenter-video-thumb-show-hover{display:none}a:hover .ytcenter-video-thumb-show-hover{display:block}a .ytcenter-video-thumb-hide-hover{display:block}a:hover .ytcenter-video-thumb-hide-hover{display:none}.ytcenter-hue{position:absolute!important;top:0!important;background:-moz-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:-ms-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:-o-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:-webkit-gradient(linear,left top,left bottom,from(#f00),color-stop(0.17,#ff0),color-stop(0.33,#0f0),color-stop(0.5,#0ff),color-stop(0.67,#00f),color-stop(0.83,#f0f),to(#f00))!important;background:-webkit-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important}.ytcenter-hue .ie-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000',endColorstr='#ffff00')}.ytcenter-hue .ie-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00',endColorstr='#00ff00')}.ytcenter-hue .ie-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00',endColorstr='#00ffff')}.ytcenter-hue .ie-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff',endColorstr='#0000ff')}.ytcenter-hue .ie-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff',endColorstr='#ff00ff')}.ytcenter-hue .ie-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff',endColorstr='#ff0000')}.ytcenter-range{position:relative;display:inline-block;overflow:hidden;border:1px solid #eee;outline:0;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.ytcenter-range .ytcenter-range-handle{border-width:1px;border-style:solid;outline:0;font-weight:bold;font-size:11px;white-space:nowrap;word-wrap:normal;vertical-align:middle;border-top:0;border-bottom:0}.ytcenter-hue.ytcenter-range{border-color:#000}.ytcenter-hue.ytcenter-range .ytcenter-range-handle{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.ytcenter-range.ytcenter-hue .ytcenter-range-handle{border:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.ytcenter-range.ytcenter-hue{border:0!important;outline:0;overflow:visible;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.ytcenter-range-handle{position:absolute;top:0;cursor:default!important;margin:0;padding:0;text-shadow:0 1px 0 rgba(255,255,255,.5);border-color:#d3d3d3;background-color:#f8f8f8;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fffcfcfc,EndColorStr=#fff8f8f8);background-image:-moz-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-ms-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fcfcfc),color-stop(100%,#f8f8f8));background-image:-webkit-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fcfcfc 0,#f8f8f8 100%)}.ltr .ytcenter-range-handle{left:0}.rtl .ytcenter-range-handle{right:0}.ytcenter-range-handle .ytcenter-range-handle-left{position:absolute;top:-7px;width:0;height:0;border:solid transparent;border-width:7px}.ltr .ytcenter-range-handle .ytcenter-range-handle-left{left:-7px;border-left-color:#fff}.rtl .ytcenter-range-handle .ytcenter-range-handle-left{right:-7px;border-right-color:#fff}.ytcenter-range-handle .ytcenter-range-handle-right{position:absolute;top:-7px;left:7px;width:0;height:0;border:solid transparent;border-width:7px;border-right-color:#fff}.ltr .ytcenter-range-handle .ytcenter-range-handle-right{left:7px;border-right-color:#fff}.rtl .ytcenter-range-handle .ytcenter-range-handle-right{right:7px;border-left-color:#fff}.ytcenter-range.ytcenter-hue .ytcenter-range-handle .ytcenter-range-handle-right{border-top:7px solid transparent!important;border-bottom:7px solid transparent!important}.ltr .ytcenter-range.ytcenter-hue .ytcenter-range-handle .ytcenter-range-handle-right{border-right:7px solid #000!important}.rtl .ytcenter-range.ytcenter-hue .ytcenter-range-handle .ytcenter-range-handle-right{border-left:7px solid #000!important}.ytcenter-colorpicker{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;width:16px;height:16px;cursor:pointer;border:1px solid #eee}.ytcenter-colorpicker-saturation{position:absolute;width:100%;height:100%;top:0;background-image:-webkit-gradient(linear,0 0,100% 0,from(#FFF),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#FFF,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF, endColorstr=#00CC9A81');filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF',endColorstr='#00CC9A81')}.ltr .ytcenter-colorpicker-saturation,.lrt .ytcenter-colorpicker-value,.lrt .ytcenter-colorpicker-handler{left:0}.rtl .ytcenter-colorpicker-saturation,.rtl .ytcenter-colorpicker-value,.rtl .ytcenter-colorpicker-handler{right:0}.ytcenter-colorpicker-value{position:absolute;width:100%;height:100%;top:0;background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81, endColorstr=#FF000000');filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81',endColorstr='#FF000000')}.ytcenter-colorpicker-handler{position:absolute;top:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;width:5px;height:5px;border:1px solid #fff;background:#000}.force-hid{display:none!important}.ytcenter-placement-section{border:1px solid #e6e6e6;border-top-width:0;border-bottom-width:0;padding:0 18px}body.ytcenter-branding-remove-banner #page.watch #guide-container.branded{top:0!important}body.ytcenter-branding-remove-background #guide-container.branded{background:none repeat scroll 0 0 transparent!important}.ytcenter-settings-content{color:#555}.ltr #sb-wrapper #sb-container{right:28px!important}.rtl #sb-wrapper #sb-container{left:28px!important}.ytcenter-embed{display:inline-block;vertical-align:top}.ytcenter-settings-header .yt-uix-button-epic-nav-item{border:0;padding:0 3px 3px 3px;cursor:pointer}.ytcenter-settings-header a.yt-uix-button.yt-uix-button-epic-nav-item,.ytcenter-settings-header button.yt-uix-button-epic-nav-item,.ytcenter-settings-header .epic-nav-item,.ytcenter-settings-header .epic-nav-item-heading{border:0;padding:0 3px 3px 3px;cursor:pointer;background:0;color:#9c9c9c;font-size:11px;font-weight:bold;height:29px;line-height:29px;-moz-box-sizing:content-box;-ms-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ytcenter-settings-header .yt-uix-button-epic-nav-item.selected{border-bottom:3px solid;border-color:#b00;padding-bottom:0;color:#333}.ytcenter-settings-header a.yt-uix-button-epic-nav-item:hover,.ytcenter-settings-header a.yt-uix-button-epic-nav-item.selected,.ytcenter-settings-header button.yt-uix-button-epic-nav-item:hover,.ytcenter-settings-header button.yt-uix-button-epic-nav-item.selected,.ytcenter-settings-header .epic-nav-item:hover,.ytcenter-settings-header .epic-nav-item.selected,.ytcenter-settings-header .epic-nav-item-heading{height:29px;line-height:29px;vertical-align:bottom;color:#333;border-bottom:3px solid;border-color:#b00;padding-bottom:0;display:inline-block}.ytcenter-lights-off #watch7-video,.ytcenter-lights-off #p,.ytcenter-lights-off #player-api,.ytcenter-lights-off #player-api-legacy,.ytcenter-lights-off #movie_player{position:relative;z-index:70!important}.ytcenter-lights-off #page-container{z-index:auto!important}.ytcenter-lights-off #guide{z-index:0!important}.ytcenter-lights-off #masthead-positioner{transform:none!important}.ytcenter-lights-off .ytcenter-lights-off-overlay{position:fixed;top:0;width:100%;height:100%;z-index:49}.ltr.ytcenter-lights-off .ytcenter-lights-off-overlay{left:0}.rtl.ytcenter-lights-off .ytcenter-lights-off-overlay{right:0}.ytcenter-lights-off.ytcenter-lights-off-click-through .ytcenter-lights-off-overlay{pointer-events:none}.ytcenter-branding-remove-banner #watch7-branded-banner,.ytcenter-branding-remove-banner #player-branded-banner,.ytcenter-branding-remove-banner #player-branded-banner-legacy{display:none!important}.ytcenter-repeat-icon{background:no-repeat url(//s.ytimg.com/yts/imgbin/www-hitchhiker-vflMCg1ne.png) -19px -25px;width:30px;height:18px}#watch7-action-buttons .yt-uix-button-content{color:#555;text-shadow:0 1px 0 #fff}.ytcenter-uix-button-toggled{border-color:#c6c6c6!important;background-color:#e9e9e9!important;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.20)!important;-ms-box-shadow:inset 0 1px 1px rgba(0,0,0,.20)!important;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.20)!important;box-shadow:inset 0 1px 1px rgba(0,0,0,.20)!important;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fff8f8f8,EndColorStr=#ffeeeeee)!important;background-image:-moz-linear-gradient(top,#f8f8f8 0,#eee 100%)!important;background-image:-ms-linear-gradient(top,#f8f8f8 0,#eee 100%)!important;background-image:-o-linear-gradient(top,#f8f8f8 0,#eee 100%)!important;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#f8f8f8),color-stop(100%,#eee))!important;background-image:-webkit-linear-gradient(top,#f8f8f8 0,#eee 100%)!important;background-image:linear-gradient(to bottom,#f8f8f8 0,#eee 100%)!important}.ytcenter-align{padding:0!important};.ytcenter-align>#watch7-video{margin:0 auto!important}.ytcenter-fill,.ytcenter-fill #player-api,.ytcenter-fill #player-api-legacy{width:100%!important;height:100%!important}ul.ytcenter-menu-3d-hide li.ytcenter-menu-item-3d{display:none}.ytcenter-range{display:inline-block;cursor:default;position:relative;border:1px solid;outline:0;white-space:nowrap;word-wrap:normal;vertical-align:middle;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border-color:#CCC #CCC #AAA;background:white;padding:0;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ytcenter-range a.ytcenter-range-handle{position:absolute;top:-1px;outline:0;cursor:default;padding:0;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ltr .ytcenter-range a.ytcenter-range-handle{left:0;margin-left:-.5em}.rtl .ytcenter-range a.ytcenter-range-handle{right:0;margin-right:-.5em}.ytcenter-remove-ads-page .ad-div,.ytcenter-remove-ads-page .mastad,.ytcenter-remove-ads-page .lohp-pyv-shelf-container,.ytcenter-remove-ads-page .masthead-ad-control,.ytcenter-remove-ads-page .masthead-ad-control-lihp,.ytcenter-remove-ads-page .watch-pyv-vid,.ytcenter-remove-ads-page .branded-page-v2-top-row,.ytcenter-remove-ads-page .pyv-afc-ads-container,.ytcenter-remove-ads-page #feed-pyv-container,.ytcenter-remove-ads-page #premium-yva,.ytcenter-remove-ads-page #ad_creative_1,.ytcenter-remove-ads-page #watch-channel-brand-div,.ytcenter-remove-ads-page.ytcenter-site-search .branded-page-v2-secondary-col{display:none!important}.ytcenter-remove-ads-page #content .branded-page-v2-has-top-row.branded-page-v2-container .branded-page-v2-top-row{display:block!important}.ytcenter-remove-ads-page .branded-page-v2-masthead-ad-header.masthead-ad-expanded .branded-page-v2-primary-col{border-top:0!important}.ltr .watch-sidebar{margin-right:0!important}.rtl .watch-sidebar{margin-left:0!important}#movie_player{overflow:hidden!important}#player,#player-api,#player-api-legacy,#movie_player,#movie_player *:focus{outline:0!important}.watch-playlist-collapsed #watch7-playlist-tray-container{height:0!important;top:0!important}.ltr .watch-playlist-collapsed #watch7-playlist-tray-container{left:auto!important}.rtl .watch-playlist-collapsed #watch7-playlist-tray-container{right:auto!important}.ytcenter-site-center #page,.ytcenter-site-center #yt-masthead,.ytcenter-site-center #ad_creative_1,.ytcenter-site-center #footer,.ytcenter-site-center #masthead_child_div,.ytcenter-site-center #masthead-expanded-lists-container,.ytcenter-site-center #baseDiv,.ytcenter-site-center.no-sidebar #alerts,.ytcenter-site-center.no-sidebar #ticker .ytg-wide,.ytcenter-site-center.no-sidebar #masthead-subnav,#watch7-sidebar,.watch7-sidebar,.ytcenter-site-watch.ytcenter-resize-disaligned #player,.ytcenter-site-watch.ytcenter-resize-aligned #player{-moz-transition:none!important;-ms-transition:none!important;-o-transition:none!important;-webkit-transition:none!important;transition:none!important}.flex-width-enabled>* #page,.flex-width-enabled #guide+#content{max-width:1422px!important;min-width:1003px!important;width:auto!important}.flex-width-enabled #yt-admin.hh{width:100%!important}.ltr.ytcenter-site-center.flex-width-enabled #header{padding-left:0!important}.rtl.ytcenter-site-center.flex-width-enabled #header{padding-right:0!important}.flex-width-enabled #header #masthead-subnav,.flex-width-enabled #header #masthead-subnav ul{width:100%!important}.ltr.ytcenter-site-watch.ytcenter-site-center #page,.ltr.ytcenter-site-watch.ytcenter-site-center #player,.ltr.ytcenter-site-watch.ytcenter-site-center #player-legacy,.ltr.ytcenter-site-watch.ytcenter-site-center #content,.ltr.ytcenter-site-watch.site-center-aligned #page,.ltr.ytcenter-site-watch.site-center-aligned #player,.ltr.ytcenter-site-watch.site-center-aligned #player-legacy,.ltr.ytcenter-site-watch.site-center-aligned #content,.ltr.ytcenter-site-watch.ytcenter-resize-disaligned.ytcenter-site-center #player,.ltr.ytcenter-site-watch.ytcenter-resize-disaligned.ytcenter-site-center #player-legacy,.ltr.ytcenter-site-watch.ytcenter-resize-algined.ytcenter-site-center #player,.ltr.ytcenter-site-watch.ytcenter-resize-algined.ytcenter-site-center #player-legacy{left:auto!important;margin-left:auto!important;margin-right:auto!important}.rtl.ytcenter-site-watch.ytcenter-site-center #page,.rtl.ytcenter-site-watch.ytcenter-site-center #player,.rtl.ytcenter-site-watch.ytcenter-site-center #player-legacy,.rtl.ytcenter-site-watch.ytcenter-site-center #content,.rtl.ytcenter-site-watch.site-center-aligned #page,.rtl.ytcenter-site-watch.site-center-aligned #player,.rtl.ytcenter-site-watch.site-center-aligned #player-legacy,.rtl.ytcenter-site-watch.site-center-aligned #content,.rtl.ytcenter-site-watch.ytcenter-resize-disaligned.ytcenter-site-center #player,.rtl.ytcenter-site-watch.ytcenter-resize-disaligned.ytcenter-site-center #player-legacy,.rtl.ytcenter-site-watch.ytcenter-resize-algined.ytcenter-site-center #player,.rtl.ytcenter-site-watch.ytcenter-resize-algined.ytcenter-site-center #player-legacy{right:auto!important;margin-left:auto!important;margin-right:auto!important}body>#page{max-width:100%!important;width:auto!important}#watch7-creator-bar{position:relative;z-index:3}.video-list .video-response:first-child a{position:static!important}.video-list .video-response a{position:absolute}.watch7-playlist-bar{width:100%!important}.watch7-playlist-bar-right{width:auto!important}.ytcenter-intelligentfeed .shelf-wrapper,.ytcenter-intelligentfeed .feed-item-collapsed-container .feed-item-collapsed-items{display:none}.ytcenter-intelligentfeed .shelf-wrapper:first-child{display:block}.ytcenter-intelligentfeed.ytcenter-intelligentfeed-minimized .shelf-wrapper:first-child{max-height:378px}.ytcenter-intelligentfeed .feed-item-main-content .yt-uix-shelfslider-item{margin-bottom:10px;height:179px}.ltr .ytcenter-intelligentfeed .feed-item-main-content .yt-uix-shelfslider-item{float:left}.rtl .ytcenter-intelligentfeed .feed-item-main-content .yt-uix-shelfslider-item{float:right}.ytcenter-intelligentfeed .feed-item-main-content .shelf-wrapper{margin-bottom:0!important;overflow:hidden}.ytcenter-thumbnail-quality{position:absolute;vertical-align:middle;padding:2px 4px;line-height:14px;font-weight:bold;font-size:11px;zoom:1;border-radius:2px}.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-success,.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-loading,.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button,.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-sign-in,.ytcenter-thumbnail-timecode-pos-topleft .video-time,.ytcenter-thumbnail-quality-pos-topleft .ytcenter-thumbnail-quality,.ytcenter-thumbnail-ratingcount-pos-topleft .ytcenter-thumbnail-ratingcount{top:2px!important;left:2px!important;right:auto!important}.ltr .watched.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-success,.ltr .watched.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-loading,.ltr .watched.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button,.ltr .watched.ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-sign-in,.ltr .watched.ytcenter-thumbnail-timecode-pos-topleft .video-time,.ltr .watched.ytcenter-thumbnail-quality-pos-topleft .ytcenter-thumbnail-quality,.ltr .watched.ytcenter-thumbnail-ratingcount-pos-topleft .ytcenter-thumbnail-ratingcount{top:20px!important;left:2px!important;right:auto!important}.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-success,.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-loading,.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button,.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-sign-in,.ytcenter-thumbnail-timecode-pos-topright .video-time,.ytcenter-thumbnail-quality-pos-topright .ytcenter-thumbnail-quality,.ytcenter-thumbnail-ratingcount-pos-topright .ytcenter-thumbnail-ratingcount{top:2px!important;right:2px!important;left:auto!important}.rtl .watched.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-success,.rtl .watched.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-loading,.rtl .watched.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button,.rtl .watched.ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-sign-in,.rtl .watched.ytcenter-thumbnail-timecode-pos-topright .video-time,.rtl .watched.ytcenter-thumbnail-quality-pos-topright .ytcenter-thumbnail-quality,.rtl .watched.ytcenter-thumbnail-ratingcount-pos-topright .ytcenter-thumbnail-ratingcount{top:20px!important;right:2px!important;left:auto!important}.ytcenter-thumbnail-watchlater-pos-bottomleft .addto-watch-later-button-success,.ytcenter-thumbnail-watchlater-pos-bottomleft .addto-watch-later-button-loading,.ytcenter-thumbnail-watchlater-pos-bottomleft .addto-watch-later-button,.ytcenter-thumbnail-watchlater-pos-bottomleft .addto-watch-later-button-sign-in,.ytcenter-thumbnail-timecode-pos-bottomleft .video-time,.ytcenter-thumbnail-quality-pos-bottomleft .ytcenter-thumbnail-quality,.ytcenter-thumbnail-ratingcount-pos-bottomleft .ytcenter-thumbnail-ratingcount{bottom:2px!important;left:2px!important;right:auto!important}.ytcenter-thumbnail-watchlater-pos-bottomright .addto-watch-later-button-success,.ytcenter-thumbnail-watchlater-pos-bottomright .addto-watch-later-button-loading,.ytcenter-thumbnail-watchlater-pos-bottomright .addto-watch-later-button,.ytcenter-thumbnail-watchlater-pos-bottomright .addto-watch-later-button-sign-in,.ytcenter-thumbnail-timecode-pos-bottomright .video-time,.ytcenter-thumbnail-quality-pos-bottomright .ytcenter-thumbnail-quality,.ytcenter-thumbnail-ratingcount-pos-bottomright .ytcenter-thumbnail-ratingcount{bottom:2px!important;right:2px!important;left:auto!important}#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-watchlater-pos-topleft .addto-watch-later-button-sign-in,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-timecode-pos-topleft .video-time,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-quality-pos-topleft .ytcenter-thumbnail-quality,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-ratingcount-pos-topleft .ytcenter-thumbnail-ratingcount{top:30px!important}#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-watchlater-pos-topright .addto-watch-later-button-sign-in,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-timecode-pos-topright .video-time,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-quality-pos-topright .ytcenter-thumbnail-quality,#playlist-bar-lists-content .playlist-bar-item .ytcenter-thumbnail-ratingcount-pos-topright .ytcenter-thumbnail-ratingcount{top:30px!important}.ytcenter-thumbnail-watchlater-visible-always .addto-watch-later-button,.ytcenter-thumbnail-watchlater-visible-hide_hover .addto-watch-later-button,.ytcenter-thumbnail-watchlater-visible-always .addto-watch-later-button-sign-in,.ytcenter-thumbnail-watchlater-visible-hide_hover .addto-watch-later-button-sign-in{display:block!important;opacity:1!important}.ytcenter-thumbnail-timecode-visible-always .video-time,.ytcenter-thumbnail-timecode-visible-hide_hover .video-time{display:block!important;opacity:.75!important;filter:alpha(opacity=75)!important}.ytcenter-thumbnail-watchlater-visible-show_hover .addto-watch-later-button,.ytcenter-thumbnail-watchlater-visible-never .addto-watch-later-button,.ytcenter-thumbnail-watchlater-visible-show_hover .addto-watch-later-button-sign-in,.ytcenter-thumbnail-watchlater-visible-never .addto-watch-later-button-sign-in,.ytcenter-thumbnail-timecode-visible-show_hover .video-time,.ytcenter-thumbnail-timecode-visible-never .video-time,.ytcenter-thumbnail-watchlater-visible-hide_hover a:hover .addto-watch-later-button,.ytcenter-thumbnail-watchlater-visible-hide_hover a:hover .addto-watch-later-button-sign-in,.ytcenter-thumbnail-timecode-visible-hide_hover a:hover .video-time{display:none!important;opacity:0!important;filter:alpha(opacity=0)!important}.ytcenter-thumbnail-watchlater-visible-show_hover a:hover .addto-watch-later-button,.ytcenter-thumbnail-watchlater-visible-show_hover a:hover .addto-watch-later-button-sign-in{display:block!important;opacity:1!important;filter:alpha(opacity=100)!important}.ytcenter-thumbnail-timecode-visible-show_hover a:hover .video-time{display:block!important;opacity:.75!important;filter:alpha(opacity=75)!important}.ytcenter-placementsystem-activated .placementsystem-target{visibility:hidden}.ytcenter-placementsystem-activated .placementsystem-target::before{float:left;display:inline-block;content:' ';border-left:1px solid #ccc;height:28px;visibility:visible;position:absolute}#watch8-ytcenter-buttons{position:relative;margin:0 -10px}.ytcenter-placementsystem-activated #watch8-ytcenter-buttons>*,.ytcenter-placementsystem-activated #watch8-secondary-actions>*,.ytcenter-placementsystem-activated #watch8-sentiment-actions>*{display:inline-block;position:relative}.ytcenter-placementsystem-activated #watch7-sentiment-actions,.ytcenter-placementsystem-activated #watch7-ytcenter-buttons,.ytcenter-placementsystem-activated #watch8-sentiment-actions,.ytcenter-placementsystem-activated #watch8-secondary-actions,.ytcenter-placementsystem-activated #watch8-ytcenter-buttons{min-width:40px;min-height:28px}.ytcenter-guide-hidden #guide{display:none!important}.ytcenter-guide-hidden.ytcenter-site-center #watch7-main-container{padding:0!important}.ltr .ytcenter-intelligentfeed .yt-shelf-grid-item{margin-right:7px!important}.rtl .ytcenter-intelligentfeed .yt-shelf-grid-item{margin-left:7px!important}.ytcenter-ticker-hidden #ticker{display:none!important}.sitewide-ticker-visible.ytcenter-ticker-hidden #masthead-positioner-height-offset{height:90px!important}.appbar-hidden.ytcenter-ticker-hidden #masthead-positioner-height-offset{height:50px!important}.sitewide-ticker-visible.ytcenter-ticker-hidden #appbar-guide-menu{margin-top:50px!important}.watched-badge{display:none;top:2px!important}.ltr .watched-badge{left:2px!important}.rtl .watched-badge{right:2px!important}.watched .watched-badge{display:block}.flex-width-enabled .lohp-large-shelf-container{width:371px!important}.ytcenter-hide-guide-count .guide-count{display:none!important}.ytcenter-hide-feed-item-action-menu #feed .feed-item-action-menu{display:none!important}.ytcenter-hide-recommended-channels .branded-page-v2-secondary-col{display:none!important}.ytcenter-hide-recommended-channels .branded-page-v2-col-container{width:100%!important}.ytcenter-hide-recommended-channels .watch-sidebar-section{margin:0!important}.site-center-aligned.ytcenter-hide-recommended-channels .browse-list-item-container:hover .compact-shelf .yt-uix-shelfslider-prev{left:-25px!important}.site-center-aligned.ytcenter-hide-recommended-channels .browse-list-item-container:hover .compact-shelf .yt-uix-shelfslider-next{right:-25px!important}.site-center-aligned.ytcenter-hide-recommended-channels .browse-list-item-container:hover .compact-shelf .yt-uix-button-shelf-slider-pager{width:25px!important}", resize: ".watch-wide #watch7-sidebar,.watch-wide #watch7-preview{top:0!important}#watch7-sidebar{margin-top:0!important}", topbar: ".ytcenter-exp-topbar-static #masthead-positioner{position:relative!important;top:0!important}.ytcenter-lights-off #masthead-positioner{position:static!important;top:0!important}.ytcenter-lights-off #masthead-positioner-height-offset,.ytcenter-exp-topbar-static #masthead-positioner-height-offset{display:none!important}.ytcenter-exp-topbar-static #appbar-guide-menu{top:0!important;padding-top:90px!important}.site-center-aligned #page{margin:0 auto!important}@media screen and (min-width:1409px){.ltr.show-guide-if-wide.guide-pinned #page,.ltr.show-guide.guide-pinned #page{padding-left:230px!important}.rtl.show-guide-if-wide.guide-pinned #page,.rtl.show-guide.guide-pinned #page{padding-right:230px!important}}.ytcenter-player-darkside-bg #player{width:100%!important;margin-left:0!important;margin-right:0!important;background-color:#1b1b1b}.site-as-giant-card .feed-item-main.legacy-style.ytcenter-intelligentfeed .feed-item-main-content{width:auto!important}.ltr.site-as-giant-card .feed-item-main.legacy-style .feed-item-main-content{width:auto!important;padding-right:40px!important}.rtl.site-as-giant-card .feed-item-main.legacy-style .feed-item-main-content{width:auto!important;padding-left:40px!important}.ytcenter-branding-remove-background.site-as-giant-card #watch7-sidebar{background-color:#fff!important}.ytcenter-branding-remove-background.site-as-giant-card .watch-wide #watch7-sidebar{background-color:transparent!important}.site-center-aligned #content #yt-admin{padding:0!important}", flags: ".ytcenter-flag-button{border:0;width:16px;height:11px;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIa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3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAPJJREFUeNqEks2NhTAMhD874R3gQHuvhfTAEUQHr4HtYLcytEoOiJi9EMSftD4lE3tiz1iGYVgBzIxjOOdwzgGQcybnfHpXVQA8QNu2OwAgIqzreiq4YmbGNE2omaGq+4/OOUSEGCMhBAkhSIwRETnlqCpmhvIQOWfmed7v8zzfRthHuQLLspBSOmliZqSUWJblf4JNsHfXdVKwrusk5/x+6uJGsAmVHrqNV2EfCTbrvvu+DwXbzj/F1mP4G+A9TdOQUvqM4/gL8Hq9PnVd472/ExQ7jn5XVUXbtgBf1/FKbrHfA0zTdNtEVUVEboXXTfwbANITf++HxXWJAAAAAElFTkSuQmCC') no-repeat center}.ytcenter-flag-button:hover{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEA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MkmtqAzEMhGesgFmfcK+QC+UCuUF7tBLjNXrkR3eD9wGtwGCk4bM8Eud5DgCICGxBEiklkMRWc/eTBgBuAFBKQUppVxzFVzl3R60Vt4hASmkHiAi01sD1mYiIaZp2mk23zwx0VQVJkISqwt2vpGeAu6P3joj4ACICvfdLyAlgZjCzWUQoIlgPzWw2s78Ba9TNl8Gf17++sI7vS1XvrTW01qCqd5LfRxM/YxxDRJBzxrIsD3f/WXOPnDNE5AwgeTJHRFBKAYDn0eDxTvK3g1rr5eJsLR+3cNzE9wAtxYKEGkuq9AAAAABJRU5ErkJggg==') no-repeat center}.ytcenter-flag-button-loading{width:13px!important;height:13px!important;background:url('data:image/gif;base64,R0lGODlhDQANAOZXAOzs7P39/eDg4NXV1eHh4fn5+c/Pz/Ly8vPz8/Dw8Pj4+LKyss3NzbOzs3x8fNDQ0IuLi+Pj439/f9TU1MfHx9LS0sjIyLq6uuvr6/z8/Orq6svLy7e3t7W1tfHx8ebm5s7Ozn19feXl5e/v797e3ry8vHt7e9zc3O7u7vv7+6+vr729vdfX1/r6+oaGhrCwsOLi4t3d3ba2tr6+vtjY2I6Ojt/f34CAgHl5edPT062trejo6LGxsYmJibS0tIqKisHBwcnJycbGxrm5udra2tnZ2bi4uLu7u3p6enR0dNbW1n5+fnd3d/7+/vf39+3t7fT09Pb29unp6dHR0eTk5MzMzP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6e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w4DkxZMQJKTGEQUB4ZRgiIdCxdXCFdTgiMXPCwwVQJUVYJQEQoMVVUFAI0aBlKCgQAh+QQFCgBXACwAAAAABwANAAAHR4BXgoIYgwAPUQaCVBA4K1QbVzkhDj1XUFceFjUfggIySi2DDQ08UoMkKkUZg1cIIjROgygMVVNXB5dTVVQCg04ABVWtgqeBADs=') no-repeat center!important}.ytcenter-flag-ad{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIVSURBVHjaYkyvvv7jxz8GBoZ//xh+/GJaMUnz3z/Wf/9+A0X+/GEAkdwMQOk/YARkAAQAMQDO/wT09vxcTxkAAAD9///8/AIAAI8BAf0DA/r///sGBvv+/voDb/r/+/r++vr/+fnto6MCMDTHJgCEQBQFF5EDS7D/vgxNDQT5uuo784GJMTxkrfvZuAeosDTsnvWlDqLMKyFZzi/5BRDLv3///v77D1T95+//33+B1vy6uE+G/eevv39/fPovbOx+/t/Pn/++//j/6yfjr59AJwEEEMufP0At//78/ffnz/9///7///9T5MN74Sufv4V9YbzI+e/fz3+/fvz/DiIZf/76xcAAEEBMP34BVQNd/+/3n3+/fgN1/PjB+guomrvzFdAp/4Do+/d/P78DLQFZxcAAEEBADX+ADgGq/v0bhB5e43/yk5Oj//XHEvbn3zlvnxf8//PHX2A4/voJ9DTQBoAAAmn4A1b96/ffHz//S6s9/PP75xFr1dMnJX///qWkd+/v1x//Qd74DlLEwAAQQCw/vgFd//f3byACijMAnWQVcOrmKfE/v3+omd3++/fnv28gHwNdzPj7NzCUAAKI5dO3H7///OflYQHqZ2MFhrA4A8NPdbNfwID490+GiekXozzQlyDVII8yMAAEEKO+5/5Xr358+fHr25c/fz8xPLwQDIxyYBzD0T9DaEyDkgMDA0CAAQB4zHf3MXqYnwAAAABJRU5ErkJggg==')}.ytcenter-flag-ae{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEqSURBVHjaYvzPgAD/GBiYaxkY/oARkPMLzPiFwgAIwKG80wAAwlAADAnq0MNWGTipvfcpheWmmy9GNGUPey/RkskiWwP6mhDy5BVAYA0M//8/ecrw9y8QPfj8++/fv7//A9UBFYHIX39//fr3C8iQ5ZEF2gAQQCxgs/9DVAOVrXRe+R8HYGRkfKj6ECCAWIBOZQSqBjuB4fef/7gByJP//gEEENhJf0BmE9bAyPjnzx+AAAI76S/I+P+/f+HXwAi2BCCAwE4CGv/rF8hVv37hcQ+QBDoJIIBAGphBxv9m+A0KG2tr61+/fv3+/RtKgll//vz+8+eviorKxYsXAQIIpIHp9x8GSUmQnj9/Zf78hgCgcyEkEPyFAaA9AAHE+BUcp3AkzEAAAAQYAHrGaQbZnz4fAAAAAElFTkSuQmCC')}.ytcenter-flag-af{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHuSURBVHjaYtTU1Pz06RMDGPz69evF69f/WFn//f4N5P4BC1aJMkxMYGD4AZQGcQECiOXdu3dNTU1A1t9/IMjw+zfjn7/Mv3/9//2b7ffvf79+BSj+/63+9dffXz///lw8ezFAALEAAVD1y1ev/vz+/efPH6C6/79+/f/56/+vn/9//vz38+d79v+3JT79/P1DgksSaAlAALH8+/fv79+/QNVA5b9/gQz+z8DwLzHh/98///ce+H/yGFDg++/vv37//PXnJ9BhAAEonHcjAEAQCKKMhdGIVZI7lqXc4Q+DTd9sye+EGUGA38atlb3R7KgeRwDZXI5NGfIEEMuPb9/+gM3+BTTk5w+ge/5xcvwxM2P4/oORg+3/jx9/fvz7/uf7D6Ak2AaAAGL5+uMH0DlA5T/BAOjLv/fvMolL/uPm+XP9BuO3b8AAA2r69ecXSMMvBoAAYmH4D3T27x8/fkD0/Pvx4/+OXT/ERP///sN25ToD0FygM3//BOr5/e83UANAALFAgh8IgHqAGoBu+H/tOuf5C//Amv+C3M/w4+/3X8Bw+QvSABBAIA1AdULCwhBPM/z8xfDrJ+OvX4w/fzL+/g0MEz5xBkVe4d9/fv/59wfoaYAAYmRABQ+BYQqOYzjyAMaSOjimgRwuBoAAAwD7RWlTjl53wAAAAABJRU5ErkJggg==')}.ytcenter-flag-ag{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHhSURBVHjaYrBkIA0ABBDjdgaG69XVbxkY/oEBI8NfHs6/ntZ//v/7s2Hfn5fvfn///ufP79+///zh+/1bYdMmgAAAMQDO/wQuAAAXAP+W5OX4/f3//v2AZ/vW3P0ZDfv+/fsyIfsxSPtbevr3+Pr/+/uBHR36AAACADEAzv8C+gAAHP7/P/39/P3+//77sb79OS36FRf7Fhn7PDD6oLD5//76+vv8Svr6Kvv7EAAAAojlHwMDmwC393e+B/bFP/8zmwou6H8U9ef+P6D+P3//e7hMu6eZzvjzZ8raHBZRAaBigAACafj359//P3+8VrXPdi6e9Sbx948/v/8yATX8+vP/6vM8ll+fC1cWMPL8/vfnzx8GBoAAYgJ6HOg/oLfkuX65HpwtKcAgJcYoJcoARDJiDDLCzH67+zR5vgF9/e/3b6DpAAEEsoHhz5//v//+/vPb6u8jm2/7+CMi/8PAuyVLfv28/uvP73+//zL8/QNUDBBATEAMdM//P7+ABvz99fv3lnU/Ll6EqP5x7erz7u6/QIN/AxX8BoYh0EkAAcTyB+SHv0xi4oy/f4N1/nk9d65UW9t/JqbXU6eJGmj+B/oQqPIfKBCArgEIIMarDAzAkAVpg5EQLgM2koWBASDAAM/8It7659tpAAAAAElFTkSuQmCC')}.ytcenter-flag-ai{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIVSURBVHjaADEAzv8BXWi2tPMD7wMCqfjGBwMAUAI5SisKf+bFN7kQAPn+APj6APz4APn7APb6AP/4AAD6AgAxAM7/BM74AeiBLLX4DUfmBwL3+KcZMFj74J8CYX9E7/r+//v+/v38/vr+AP3///3//5tclgKIZfmXbWznvge+esXw+fP/X78jbl75+Y8p8Oe+cnn3T38ZhLhYgYjtz79nn3+wMjEyMHwHCCCWXjbLUgU9bZHHfy9d+8/FwCIj/enzr2MfGL79BWpnaPNT4/z5mYGR6QsLZ96qawwMPwACADEAzv8CofEOKxsTn/MT4wQM6gIImCA/ChQTqvYO+PwA+v7+BvGtAPGRBQsKCu+e/P4AAAD7AojFT5Kh8/D9TXe+8P//y/z379SVJ/bLC1iLfjv46++vv/+BSljEy3/dK/rHa/P3P1DHd4AAYmTQW9TYavnww4/ff//9+QdE///8/ff7D5D8//P7XwUjeXYWRqDgxx9/fz98sSGrEiCAmBh+/vrz/98viOq//3//Aan+9QcUOP/+/79x4dHT7/+efWe4cfrhv39AG34BBBALw29g0DEAJf9C0F+Q2f/+AHUCw/T/7++/n51/+Bdo4ddffwVZgX4ACCAWoA1A88R52f6CbYA4CRjkv0Hsf3//MoC4QDkB7j8MQBv+AgQQI4NQJ1JEfgeaASOB3L9AN8AYv8EkA0CAAQCRWUgArUB7AwAAAABJRU5ErkJggg==')}.ytcenter-flag-al{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHqSURBVHjaYrzMycDyj4GBiQEIWP4w/PnNwMLA8IOBASL2i4HhDxj9AyOgOEAAsQClJSf0A1X///v3379/LH//znn/NYSTienv37lvvmRyM//984fxz69/v38D0ZXpiwACiIUBDP68fM787+/id99COZl0v/6oe/f1z69fEZyMv9786339qYCbCchlk5AEWggQQCz//oHMBqE/f4yZ/1e++PTj58//v39x/fkz6fPP379+ZnMy//v1+9+vX//+/Aa6DSCAmJh+gTX8/v3/z+8zX75L//vz6/fvrz9/Pf3+4+ePnyJ//xz+9PXfz1//gRp+/Qb6CiCAmBj+AzX8Aer+//uPCsNfht+/S7gZf4JBJS+TwL9f6v+Bxv/8C7L2N9DxAAEECiGgYxh+//n797cW418F9v9r331j+f3rz6+fuz78S2FnZP/zH2g20JFAs4B+AAggoIsYgKqB/D8/f3L++dXx8mMw+/8PP34CURwHY+mzD0BBkGqgk/7++cbAABBAIBv+/QUGGdCJINE2PmbmP7+tmf9/ZvrH8+f3HCHWv79+gXwIcjbQzwwAAQQKVqDrmUXEmMAhzQDU+ftPgYAwUBHIoD9/mEAOBkYRWA8DA0AAMR4Hx8M/pBj9A45gSLxCYwkswgAWAQgwAGX6QkBNdoo9AAAAAElFTkSuQmCC')}.ytcenter-flag-am{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGDSURBVHjaYvytqsrw4QMDBPz79+/Xr39//jD8+sXw9+8/oAAYMcAYQAQQgIQxxgEABIEYUZ/O6lcZnCknxuXSdrhlEcO9k6pMmjAbMgX6C0/7Bc7eVwCxMDAxARX/f/WaAST3j+EfVBqEfv+Gavv9m+H3b0YJiT8MDAABxAJ0z/9//xkgJoERQjWIASZ//2EAMn7/BjoJIIBYRLhmNf0xefHn27+//8AqgeRfoBQyA0j+/v1X6jf3bIafAAHE8uvXH6BX/4KkQeRvFHV//wBNAauGcBkYfgAEEAs4PP7DnQ1xC9g5/8BegBgP8T8ouAACiPH7VAYWm67/X5/+///n/z+g8G8E+e/3PxDjL8M/EJeJW+bFnKUAAcTyDxhIQDmQaqCBcD2/warB3H9/GMDkv///GFgYAAKI5d8nhv+//jIwizAwAAPtDyPjHwZGqApGpr+M/8HhBgwQoOzPP/8+MAAEEOPHXgaGbwz/fjGADIKQwDCEMRgg3D+gSAZxuRgAAgwAGOaHzabOV6YAAAAASUVORK5CYII=')}.ytcenter-flag-an{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF6SURBVHjaYvz48SMDEvj3j4FBkP8fhA1Ez5+DSCQAEEAsQAk+Pj4g+f//f4ie/wWFDH///P/zh+HPn//Cwv/BUhDw7NkzgABigSqCqwYyHj74//s3FCEBRkbGP3/+AAQQC7pqIPnrF9D4/7+AGn4hawA7+B9AAAAxAM7/AQAAeXZ2TuLi8/z8/vz7/gABAfb4/XV0Lv7+/319ywEA//T0+fr6/Pv7/h8fDcHBhgKICagNaBzY/n9A1N5u9vfPv4b607U1p37/+V9fb/Tr199fv/4BEdBEBoY/AAEEdNKfv3//Ah336/dfoA2Zmft8/FSdnST//f23bceTvLwDQLOAesDG/WVg+AEQQIxv377l5+eHuh4CrK2hPgZ65sIFuAeAnr5z5w5AALH8A4U8A4oGoDqIaqRQgoQK0CEAAQTSAFcNjTxZWcbfv4GSDEASKMgIDBgggsoCBBBIw6tXr5Dj8s/WrZCY/gMMkNu3/zExAYPzzz+IGANAgAEAxmlOvh1IY9AAAAAASUVORK5CYII=')}.ytcenter-flag-ao{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAU5JREFUeNpcUbFKA0EQ3T0vdwcWwc5wXHEBgwHtxX9Ipb2kEwURIfgJAf/BfIB+gmUai2CR6hAEEZIujRAuuzu748xuOILDMryZeTPz5k5+9PtOiEiwKUQUgkL0IUhJCfAZSyEXRUzB8XAoKHCOHgIwsBa1Ji8AAmBvzNtsFvMoRLdcIvGITTWnZPEb33zB5NC+J8QL7KjTsVstNLhhGy1i3br/xJ+0dbdg9mYjlGJvDDXEhmUCp8jTM6b1WKmrI8Q6eQBcr1kVVbWmHr625uu87rBBa1dlyfhb7ivR3t7Aknx1gSh7vV5RFBvqJmGIo1E9n0fnZ/b0xI2f9qZT/lChlGXZarWKrDcACKCq5GBg2gfueSJvr6EpgTdjjOx2u7ShrutmUvABXF7gyysDEp6mKW3ghjzPd3mN/ctQDzeUZel/qwipXR9Ag4P9CTAAKtFSoA6PIf4AAAAASUVORK5CYII=')}.ytcenter-flag-aq{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABmJLR0QA/wD/AP+gvaeTAAAA+0lEQVQokWO0qj3HQApgwRTSk+OOsBL78O3PlnNvbzz99u8/Ng1sLEy//vyDsBtDFcT42RgYGPxNRC49+rr40Itjtz7BNTBBKE1pzhhbcQ5WJk1pLohquG1RNuJYbLj48GugmejGUh0eDmY0FwpyszAyMvyHOYwJLrHl7FtM1QwMDAqiHFmu0uhOYmBg4OFg/v8fUz0DAwMDNztCGYJ14NqHU3c/YVPPsP/aB3Q/QEDtygfOOgJMTIxSgmx2mgKywuwMDAwnbn86e/8Ldg1ff/7ddPYtAwMDIyODiTLvv/8MLz78nLDtyT+kuGDEFdNMjAxc7Mxff/5F8xgAEsZOZYTYcgMAAAAASUVORK5CYII=')}.ytcenter-flag-ar{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGMSURBVHjaYow8/v/LHwYI+Mfw7xcQ/2EACvz68+/Pv38//gBFQAjE+POPjYkBIIBYPv1hSFWEqP7//z/jv/9ABsO/f////mf8+4/5LwPT33//wVwQyj32BSCAWH78Yfj9j+H97/8gpf8ZQBJAS/7///MPjEBcKFuYnZHh1z+AAGKpl32jKSYM1PMfaMt/kDYgBBoJAmA+hAkkWRkZRLXfAAQQizrvP2E2BrBisFog/X3v3y+bgYYycXv+53D7DwOMjAxmwgwAAcQE8S5UDEL/2PPv3/3/f+/9/7b9PzIA+e0fQACxIKtmgOhgs2P48QYYTv85nJHVMwId9u8fQACxXPv4T4v3/6+/IB0w57r+53L5B5L+/+8rVPW/fwxsLP+PvvkLEEAsWbeFSpkZXn4HhgMDPED+wkPpHzSUgEEnwcnQeUQQIIBYmP79Y2RgEmWHBuhfYMiCdDICGX9A4Qt0NwM4TkB+APoCIIAYjbd+ffcLGpE/QAio+h9ILSjOwegPGAHjExj/bAwAAQYA9gFw522GQWAAAAAASUVORK5CYII=')}.ytcenter-flag-as{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIZSURBVHjaYlRU/P/hAwME/Pr178cPhr9/gcx/YAQBQMaycoY0F4a/bAwMAAEAMQDO/wTs7ACcnAD/AAD//v/9/QH9/QD9/f/8/AL7+wIG/PMrAMwhAtsCAPoKF6UFJR+qvboCADEAzv8EBAQA//8A1dX//PwA/PsA+vv/APv5MgDAOgLHEADpBhIVCj03+RsT0NHJ+czQ2dbXAoiFAWw2UPXv3wyK/y5asB2W5LjHzMHJZaDH6pTDwM5/bcfcx0vn3b30SD84RNnCEyCAWP78+sf177M3yy5F9musjL85FOTZnXMYxeT+g8GtvcueXz7KIiTPxXyLneHzqw9sAAHEEvF1p+2ne//Yn7Gqq3K6BTJycf+Hga9P2pXsC8VMDP98F359/SIjE6uosCBAAAAxAM7/A9IAlyE7Jvfu/Qvs2/q8sPrW0AEGBQIVGf8AAAQNO/vvvALzwQAMGPsA7iE2W+Xq7QIAMQDO/wEAAPyXlwHKyv/5+fkd+9dEArojCdkC/PIIMC8ISk4EHib133IB++v//foHE0iwwgsCCOjpv79+sfz8CdTAevWn7rmfOr9/fDX+c8jtyTa5nXksnGxctqasoTG/WZjZWf4yMT0ACCCgDT+7ulh+/vr/88f/H2D08ycwBkGM/z+/ejEfMWA/zM98j01aht3BecuLlwABBNTwHRavf2AMZC4kpg8xM8TXMTBIMTAABBgABJb60QzjGyEAAAAASUVORK5CYII=')}.ytcenter-flag-at{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAElSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALAympv81tRhExYFWAI0BqQZZ8geE4Iw/f379+sUmLv5v+3aAAGJ8+fKlqKgo2Jb/DGCIBoBKISQ3N/fbt28BAgjiJKgqOAM7AMsCBBALQhFW85HV/weGyz+AAGL8ra/PWFj4//VrBiQXAwPq/18UbwBlGcXF37S1AQQQy7+LF5mPHft/7x4DNFigYQIlIYw/vxmAYa2iAnQOQACxAEOK6fcfBklJUIACRYFywBAEsf8wQEiw8RAEVAwQQIxfUSMSTxxDAECAAQAPfFda8rBeqAAAAABJRU5ErkJggg==')}.ytcenter-flag-au{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIzSURBVHjaYjxe3nyAQ6Vyx7veD+tY/v3L/+dWKvXIyUTOc9Ybhq8fGBj+AJFnssv2uZsYGN4xMPwCCAAxAM7/AUtNjZ95PPsXHfjPzf/49wEfIhAVELzd+MzU5v38/vf6+1tNLQQEAd7j77fB3KOMjwIAMQDO/wHNCQkZhYYD7Or78vL++fkFDAv5/gH29/qJCD3w/AH6+PodGQ9GOyGJm8UgHRGrko8CiOmQjg+Ttj6HluZfYVEGWQUuM7Pfsop3ZfR+/Pnv56jCwMBw4/5roOrKdBsJYW4Ghm8AAcT0ISSJQVh4wz+F5zziL1gF1gmZMevofuQTcbZTlRXnLUyy+P7jd4SXFisLo6uVIgPDD4AAADEAzv8DLAEa6w0YwN/4+/b43/UCuNbx2/QDEP73rcbkJSIUq7fV6ev07O/3EQ8IqLXU3NDDAgAxAM7/A8veKS1ELvXw9N77Cd76BwT8+ujr9M/o+/3//8bN4+nt9P///1dLK6Cu0QkIBd7RvgKICRRwf/79/vMvyF6pNsX81++/f/7+Y/j39/evP//+/fv/9//Pn3965hz7+Onbv79/gYoBAgio4devP0Dj/psbSMtJ8gW4afz89fvX7z9g9BcYrNISfOWpVj9///379z9QA0AAsQA1AE0S4ufceeSuvprowZMPZCX4fv4Eyv778+f/9x+/ihLNtZTFfv76u2bnNaCnAQKIkYHBFxydP4A6kdAfZK6qY9nt/U0MDP+AoQwQYAAK+BukFnf4xAAAAABJRU5ErkJggg==')}.ytcenter-flag-aw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGeSURBVHjaLMbBCQAgEAPBKId9WLJV2ZAPOZcgiJ9hSh9zpaPF3tgGpzlIIPzNl0RRrwBieffjzwRrSc+jazfaR/xgYP73H6iL4e+/f3///weSIC1//4EZ/3///T9h5jGAAGLh42ADqv794oXn0p6ZQcW/f//++/f/n////gDJfyDy999/v0GMf+I87Az//gEEENOnX3+2Wof8//Nnjl/u799/QCr+/wMaBlQBUvr3L4j8A0JAEaCrAAKIBejqLyxss4OKfgAl//77A7b9D4Tx99+vv1BLwCL/gRoAAojl1y+gi/9///UX5JJ//yFu/QsmwfaAnQRhgH0PEEAsP0F2MfyBqAaK/vv/F+RoZA1g54HNAmoACCDG37cZGIWr/v95xAB0PNj9CBLB/QuUZWSRf3NlF0AAsbBO2tocpPXk00+IQ8Fm/wNb8g8qAnY90Evy/Byra+wBAojx+1UGFokiYDACTWIAhicoSMEMoAjDH7A9/0A2MPwBhunrSwcAAoiRIX8/w6cfoLgERiQoOsGMX7BohjLACBijXCwAAQYAaNKq8wFV9AQAAAAASUVORK5CYII=')}.ytcenter-flag-ax{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIpSURBVHjaYlTP3Pvj1z8GBqZ//xguJRTwxTz6N4lNYMmUrx+YGH79Yvj2h+EHkASjL78Y/v0DCCCWfwz/6qPUGf4z/vv3n0OxlKHyLaM2e0eC3tfvzL////7959+v339//QGifz9//52duxkgAAAxAM7/BPr4AgD/AOvw+v3//f756f/n6v/2B+Xs9vLzBvr/+vr6/fj7/fn7/Pn6/RYRCAAA+gJQOAYpAMAwCFPo/9+681btLOTgIUiq6hICHkbgOmOqU9l250UOu5FwnC+AGH/uVmZWq/r/4xXD/18Mv3/9n/n2fwT7X26gO37+//vz318w+efX378/mDmkHq1aBhBALCwRz/7Xf2R89gbo4P/ff/z/9uvfjI8Mf34y/vzB8OMnI1Dbj++MP38y/fjJIMfEso0BIAAAMQDO/wT6nggFKgb+9wj+/gEB+wD+kvP/Xgf9DAH/+gL+/QL9/QL//AP+/AT+/QUDCwv4DwACiIVr1pS+VOOnb778/vO30WoR69/v/zkYIndk/PnzB+jXH79A5C+Qv//Ki3LvWc4AEIAherkBAASBIAqRk/136g9cFTeZCt5Y7jpC2ix+EwELf1tx0Fshu1MBwuLIgnLXF0AsDB8+AaWF+Fl+/2FgYhNmEP3JwM4hIcD+jZPh1z+233//gqPiDzC8/vz9ycDwAyCAGBmM5zO8+8bwARSX59vKhYoZ/uQzKE9MBxoGlAYGPAz9ASM2gAADAHEdTC2XuptBAAAAAElFTkSuQmCC')}.ytcenter-flag-az{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHfSURBVHjaYmSYeJzhxx8GCPjHwPDnH8O/PwxAgT9/QGwI+QvM+PWHgYUJIIBYGL78qXZVBCn+D0T///7/D1Tw99+/PyDGPyD7918g+e/3v/+///7fNPMYQACxMHBxMTCzPPkKFGcAqv7979/fv0C5v7//M4AU/fv/6++/X0ANf//JcrMxsPEABBDjYUZGpUmTfr14+f/fX4a/QNP+/P/z5x8Y/f/9G8QAkr9/AwXZJCQOzZwJEEAsDExMIPcBTfz7l+H3n78/votFRbFKSX/cf4BVXvbj4cPfrl79/xuo//f/37+YGBgAAogJ6AKQ64HEn79///xhV1RmVVB83NPDZWTILqfAqav3FywOJP8BlTAwAAQQUA8DIyQEfv1h/P3355VrP+/el0xLe79m7Y+7d7+eOMX48w8jUOonSAEwFAECiOUXA9Dlf0Ce/Auy9x/T/2dzZv3/9fvf3z8frl4BeQAi9e8P878/XxgYAAKIxbWWIc3m773Pf3//BSr/++vvn19/f/0GQqC3/v35BTID5KA///6q8P+7+JABIIBYGD4x/P79R5JN5PdfcNCAtP35zfoHbB3Y/SDPAYP679+ffxneMQAEECNDKQNQDyhqf8HQHyTGHxjjH5jkYQAIMACu3GUPfyOdVwAAAABJRU5ErkJggg==')}.ytcenter-flag-ba{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHjSURBVHjaYmRgOK3qLrCiT6ajLmZR2tov3xiE+BiA4N8fhn//wCSYzRu4mYHhD5AJEAAxAM7/BAAAAFZJDuvu/JSaqb7Gt0UxxP8A+gEB/AH+/AP+/AIA+////P/++1NtKvv8/7KXzQIIpIHh///l2z5evfMzzMNtxa53YWabmRl/MjD++v8HqBqIfv3/9+vm/R+ykmxASwACiAloy7//DH//MJy+/G3J5o/2LuFLj7j/+fMXpBqo599PoGog+vX73+/fQNf9AQggoAaGv38Z/vz9B1Rz8uK3Bes/OLpHzz/g9efPn/9/fkFU//8L1PD/9x+QBoAAAtkAVPobiP78B5px9NzX2avfu3onzNzj//Pn3/9APwA1/P/169dfoAlADQABBNLwF2w/0NJff4Dk/0Onv05d/s7TP2X67mCg0RA/AKXANvwDCCCQBqDxv/78A+oB2vDr99+fv//tP/F1wqJ3PkGZvVsiwQ77/ef3v79gGwACCKgB6Np/YKVAc8AkGO0+9qV73tuA8IK2DfFAG4AOBrocaDpAALGAbPjzX1KUFWjjHxBiADJA0n/+3Xvye9HGj9lZFTOXC6rIsf/9B9IAEECMDAw7GUCx+QcSkRgMIBKr7FRqL7/FwPAMGKQAAQYA6stgQLSyr6QAAAAASUVORK5CYII=')}.ytcenter-flag-bb{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHbSURBVHjaYmRgbmSAg7///p4Hc98x/PvD8I+L4R8TA6d1PojP8IeB4RcQAQQQC1C2epInkPz37/+/P0yMMl////7LIPiH8f8fZuY/TCy/Y6r8//z7/fsvCG+aMBkggFjAJv9/8urb37////5i/P/rAcP/v////P7///d/xt//f/6+/ejDr7+/gaplJbiBNgAEEBPYaAag6j9AM/7+A6run/Pr/qPf9x/+bp/y6///n79+//31+8+vP39+//kH1AAQQCwgd4NV//kDRIz////68/v3ur2///79/ef3L6ClIA0gzl+IBoAAAtkANhvEB9r7/99vQ5VfP3+CkKHqLyD316+/YEuAxv0FagAIIKCGP3+Bxv/+9+vP319//gFtcLD8BQSfv/z0sIU7CYTANvwBCCCQBqC5QNVACmzDr//MvwR4fjEBfcwKtgGk9C/QeKC5QBsAAggYSn/+/AE78ff/378ZQBp+/8oK+Q1i/Pr9nwWk4c9/kLP/gDT8AQggoAZgGPyTFOH+DXTlTwYGVhmG/78Z/wK1/mFg+c3A8kdJhhcY4H9BYQPU8A8ggBgZGJIZGFjAEQlEDG83L/z3jeHfB4Z/vxj+8TD8Y2GQjbVkYPjBwPABqBqoACDAAGawZ3sdNcy9AAAAAElFTkSuQmCC')}.ytcenter-flag-bd{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGKSURBVHjaYmRwZkCAfwwMvxgY/oDRLxj6gcT4zQAQgEQxtwEABoFYw7pMwFasd08CwrJcOWarrJ2HZ1m0ZFIncDUhdPYXQCxgk/8/ef/0L0jdX+snv73v/pX+8Pv/n9+P2H+vlP29WeLXr7+/fv/+LSssC1QKEEAsQGcATYYYbPPkd9qlv0y/fv3/84fh12+5L78KX/76of17veSv3/+AVv0GagAIICagc//+/wuy/c9viyd/QKp///4PJMGI6ccvp3u/fv359ev3L4gGgAAC2fDn718g58+/Pxqv/kBVA0kYQ/85SMPvP7+BRgI1AAQQE9D7IC/++wMUvcIDNvg3mPz5E0Ke4QPb8A9qA0AAgTQAWUAhoKv2iv768weo6Nd/mMOA7twkBfIA0Pi/f0E2AAQQCzB0/4CDDGjpVonfPzV/hV//Jf8NpPoO5+85yr9XyIC0gZT/+wvUABBALCAb/vyR5Jf8DRa9pPf7rDYoQIAWgkT+/VH6BxQGA7AGgABiZJBEiUiCACDAAMCmX7rCYWs5AAAAAElFTkSuQmCC')}.ytcenter-flag-be{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFTSURBVHjaYmRABR/fM/D8AjH+/WP4J8Dw7xPDP3GGfwwIBBBALEC56upqsAoQ4OD6y8D3l4HhD+P/P8wMf5h4f/+P+fP/9+//f0Dkl02bAAKIBWzu/ydPnv4Fg3//fjMw/P3//zcU/f39//av/79+AVUzysoCbQAIIBaw2f+BSv8AEdCk/0DVv/7//wPW8AuEfv2GaGD4/RuoASCAQBpAqiHg9x+E2dg0ABUDBBBIw58/f3///o2k4RdCwz+waoiGP3+ANgAEEMQGkOJfv3+haoCRMBsYwU4CCCCQBqDxv379Alnw6xe6Df9/w40HBtQTBgaAAII4CehbKIC6G66aFazhD1DDX5BLGBgAAghiwx9JSUmwN/4yMgJ99htMAmWBHv3DoPQHqBSCgE4CCCBGtJi+fZfhFwsD0Hf//jAIcTD8e8fwQh8kDtTNxsBwh4EBIMAAr1pl7/uLhvQAAAAASUVORK5CYII=')}.ytcenter-flag-bf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGDSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALGCz/6OoBkpDTAWp+wXSA9bA8Ps3UANAALEAMSNQNVDFnz8Mv4Hk7///fn/PB5Hs7b/+//wF0wnSADQdIIBYzjEwyHL+/cUDceWff0Dp9l+8wkC5388X/GKN//3v169/rCB7WLn+XGJgAAggFtNahnz3Pw8+//n179efv39+A3Vc/zXX9Pf//7+Cz/z+lfULKPLrN4hU4vt96gkDQAAKyNwGABgGQi6yY6b1XtE9Vs4dokKcekWv0ogGnFLcZqQKFGEsj2zl6xdALAx/GEAGg9SBFP0C6QGb+g9MAsX/As0CavgLRAy/GAACiAWIf//7I8ktCTbm7x+ITpAKkPOAZgHD4S8Q/P/7F6jhDwNAADEypDMA9UDRH1T2HyTGH3A8MzEABBgAU6to2uOHQr4AAAAASUVORK5CYII=')}.ytcenter-flag-bg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFgSURBVHjaYvz69SsDEvj37x+ERGbAwZ9//wACiAUoysXFBST///8P0QOm//+HU0jgxYsXAAHEAlP0H5nxHxtgZGQEWgIQQCx3Pt2RYZL5+/8vQobh/z8gBIN/MAhErEwst77dAgggRoZmhjKXskefH/359weIfv/7DUJ/f//6CyR//fr7C8j99QdEyvPKH5x0ECAAhWOQAgAMg7D+/8nWNVMQDwmCvWTessZJ9VWHCIns0yWxc/MF4FgMUgCAYRBmpf9/sDqY2yWEQBbEYcK0ZuKxIY0FGZ98Z/8KFlcAsTAcYZDX/M369tefv3/+/AGSIJf8+fMbxPgDYoC4QOP//JER+XPqIANAALH83M7ALPvn3z2gcSBTQK4AOwRKQhh/fjP8+cuo8reOgQEggFiA0cP0+w+DpCRQDijK8AekE+SuP38YICQQ/f0LQUDFAAHECIznf0iIAZWLJgUEAAEGADzQZYYqa4w6AAAAAElFTkSuQmCC')}.ytcenter-flag-bh{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFbSURBVHjaYvz06RMDDPBu3/4vKorh718I9x8Y/YExIAgggBiBGnh5eSEq/v/7y/D6NcO8+f9fvWb4++f/nz8Mf/78+/79/+/fQDaQ/LJpE0AAsUCV/v8Poi5fYZg18//bdwy/foEUgdG/r1//g7mMsrJAGwACiAmhGgh0df83NjGIi0NU/P/1G8SAI6BmBgaAAGL59+8f3A//L19m6O75/+E91Hight8I1QxAxMAAEEBMcCeBgI7O/4kT/ktLwRT9QrEB6B8GBoAAYoGrBjHOnGbo6v7/7h1Y6W+Yw6A2MIKdBBBATEAn/YcBBiPj/xMm/BcX+//zF5pqYHABbQAGMUAAQf0A9fepU/97e/8/e4ZQDSH/ADX8hcQPQAAxvnr1SlBQEOokoNDDh/8bGv5//swAC/t/P36AxMHo9ZUrAAHEAlT648cPiD3/pk37V1nJgBq18JiGAIAAAwB361RtvY8fzAAAAABJRU5ErkJggg==')}.ytcenter-flag-bi{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAI1SURBVHjaYvx/9SrDL64bFir/fv5lERf/9+cPEDH8+vXvx48/////Y2AAoh8MIKCz9fg/lk8AAcSovVzxSsQ9IP/byZNf9uxhFhVl+Pv3z+fPDEBtHBz///79/egRt7sHt6vL////Ods4AQIAMQDO/wMCPPEBDQoSDBgYICwLMznwrqv87OwTXWAILC3ytrX64eEYh44FKSXV+Np8zHnStdICiEWIT4CPTWDqxX5DMeMExXiJzk6gSW/ePfr1+494f/9/MJhwo3/T/U0W4pYMAgwAAcT05x/QkQziPJLX3lzNPJ7x4f93oIp/r98zvnkLZHz5/ytof8Dhp0cUBBT/M/4H+gYggJi+/fvx9//ff///cnFw//rz6/bH6/8//xJW0RFVN/z/6fvdz7c+fv/Mz83/+y8oNIAhABAAMQDO/wLoCPz+//38//zw9e/3/vcjDS/grJzu39bv5t/dopMhCyn9BPrr8Ov8/vv9/v0ADAACiAlIAXU/fP9Qmld6sc0Svv//5eLSBeQ1+CXkFTOLuf7/3+O0X11I7cab67///ALaABAAMQDO/wQA7gDm9OVlLGk3DzP//v/kZmUAAQEScXD//wHrhoX67+4fqK+GMIfBH8aPz4oA6gACiJFhOsPvlN9A/307fuL9siXMwiLAePj98eO/37+ZuLj+//nz89FDofgkbg83YNjwZfMBBBDjwfsHZT6InTPU/MTAwMbA8AcctUDyF5gBYUOk7JavvSb1CiDAAH1oJnSag5rVAAAAAElFTkSuQmCC')}.ytcenter-flag-bj{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF4SURBVHjaYmSYyMDwgwEK/jEw/AHRf6sY/v3DhhgYAAKIheELQ7VrNUjx/39AxMzIDNb6mZHxDzPzHyam3/////n/H0p++bIJIIBYGFiA0v+ffH369//fv//+sjKy/mP4+///R7AiCPoFRr8ZGWWBlgAEEAsDyK7/QKV//v/98+83AyPD//9/0ZRCSAaG30ANAAEEMv8vA1D1nz9///z594eBieH/v79I6lA0ABUDBCB5jG0AgGEQlqGH9KBe3NOAhCIVefDghZWXmmYzdXAm+cCgCZMGvtTW3HoCCKThL1jpr3+/gJb8Y/oHsuH9L7C638gko8BvYCgBBBBIA8iov7+Aen7//QWyAehADNUMf0CuBoY5QACBnfQXqPT373+/geS/////QTRAVEM0/AFqAPr0L9APAAHEAoy13//+SHJLgr3xl4WJ+d+fv4yyPEAjGcAGg9DfvxAEdBJAADEylDIwfAJH8C8wAjK+MbzcDopUNAQBAAEGACQBazxAuCviAAAAAElFTkSuQmCC')}.ytcenter-flag-bm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH1SURBVHjaYjyZXrqHSaF6+rV60UssTAy1L2WyZb9E2Ul9WDqTiYHhDwPDPzD6A0ZAABAAMQDO/wEzG2u0olj7GBz42Nf/9PQBFhcOGBW70e06yacC/Pv++/v+/Pz++/v//Pz/+/vGsrICiGXOv3UM17U4j+9j/vDx//fvLIIC3/8wWn/78vPeXZC6X7///v7179cvht+/2WRlgVYBBBDLBh6TNFUttjePv999xCjKzqko8/bey1t/hdR+Xfn/+5fCypUMzMz/geDnz4cpKUBXAQQQyzOnsF8cPAse8qszijH9+n/1m5qTusjbkw/+/vrN+PvX/18/a56x//n3v038J9BJQA0AAQAxAM7/BHS0cuQVeQHX6w8P9f/8+/jD0d4hFUgL8O37+f36+v/9/cVrSmVbXP5NTf38/PwAAAKI5cHT1xqfH0r8efD3xa9/v//4A3155dfbX7+B7gYaOe35dNcO47t/L/c/vR0AtgEggJiAYQeUABoGVP3/1y8g4+9PkC//gQWdY9ays3OwcXC4B6/6D7YBIIBYQCENDjhQmPwGGQxRDSV///YOWQly6p+///7+BcYDQACBNPz//YdVUhKk+s/f/5CwBwc8lATGwN+/HH//AslfDAwAAcS4lYHhFywi/8Ci9g9YEC2OgSQbAwNAgAEANZtLtF2QDxkAAAAASUVORK5CYII=')}.ytcenter-flag-bn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIRSURBVHjaYvx6k4HhFwMDEwME/PsHxFDGvz8g9r9/UPYfMAMgAMNibAMwDMMw+/83svSgXFEgGTpGEStA4EKqgej7jdJr7/IFVyuz8lBaOCbUms8vgFggBjPxRDOArfn399W/jxN/fnn169MnTsFf/37/ZmAEqv79/98vRlYZoD0AAcTMxcFhZW0N0Qa0jZGRm5HD8d5bo99HfvEoP2Bg/P/v37d/f37/+/eLiYn36/NbAAEAMQDO/wR3eXnt7+/r6+tiaGgXFhYiHR399/cMrZn8+vrv/asOGf8E/////OH763n/AP76+AACiBFocFFR8cOHD/4Awe8/nVYazMwsn7yiVIQFPy2d+u/XT4mi1v9gwMjE9PHDB4AAYvx8nYFRoOLO7fuVHZ+AGn7/Zplqr5y97STXr9+d7vrvgzJZubl1FBSAGpiYmN6/fw8QADEAzv8B8dMACBp1/vvgAQX4+fP75+L/8ewAFNAjAPj0dbPYzfbp+vr6+/v7MzExY2VlNTU1Aojx40UGdskCoAaGfz8YmH//Z/j14+O/399BgfjsPoN37rPfv36B3Prnr4qKysWLFwECiAUYUkA5RmaJf/9//P/z5z/DHw7+30xsfxn+/Va1+n3zDN/PT/+ePPvz5Pmfqo6vQA8DBBDj29OgWARG4Z9fUAaQZGJh+AVkfwPFNBMX0AxwlP9huHeJASDAABJwMQXPwd1pAAAAAElFTkSuQmCC')}.ytcenter-flag-bo{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGGSURBVHjaYvwvyswAA//+/GX4BaQYGH4w/PsPojERQAAO5RwHABCGgWA43o4oEW+lS2wTaEZbbH/j3ImoQhgp0IDsBtRwBYT4+hnrCiCwhv8M/9+8AioCqf7zhwEq/fc/SPUfEPkbyPjNKCYBtAEggFi+RfxlU/31TxzoiD///4HV/fv9/x9Y29/fYPTnH5jBxPftkzwDQACxfEli4JX+8ff31////zD8B6r+8/8/UMNvoF0wxm+wEb+YWHk/tDAABBAL0CMgg0HSfxhAjN//gNJQRX/+MfwCM4CCf5iA3H8MAAHEArT8P8NvsGoQ+Q9mA9RsiCVgzf+BrvzDABBALGv+MNgCHfTn5z+wCiD5F8L4D2aAuUDVwBDgYf4x8wcDQACx5H5iyP/99cGvT7///f7z7w+Q/PXvFyhcIAyI4H8g+VeJ4evRTwwAAcTC8IcBKCTBIgEKP6BJ//78YvgFFIEgSND+/fcXFHwMf4GKAQKIkWEjOAL/ICEI9xcsbiGCDFASIMAArSN8tzlGFIEAAAAASUVORK5CYII=')}.ytcenter-flag-br{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHjSURBVHjaYmRIZkCAfwwMf2DkLzCCMyDoBwNAALEAlTVGN/5nYPj//x8Q/P3/9++/vzZa31gY/mw5z/Tn3x8g98+f37///fn99/eq2lUAAQTS8J/h/7NPz/9C5P79WRj89f9/zv//fztLvPVezPzrz+8/f3//+vtLhl8GaANAAIE1/P8PVA1U6qn7NVTqb1XVpAv/JH7/+a/848XmtpBlj39PO8gM1PP7z2+gqwACiAnoYpC9TF9nB34NVf5z4XpoZJbEjJKfWaEfL7KLlbaURKj8Opj08RfIVb+BNgAEEBPQW1L8P+b6/mb6//s/w+/+nc4F0/9P2cj65xdHc+p/QR39//9/AdHJ9A/60l8YvjIABBAT0JYH75jStv75zwCSMBY8BXTMxXv/21ezfHj9X5/3BESDy5JfBy7/ZuBnAAggkA1//vx594kpaCnLloe/smLaVT9/ff3y/+/P/w+u/+JuW7fhwS/tSayPXrOycrEyfGQACCAWoA1//oOCDIgm72fu4vy6b4LD/9/S/3///s9+S28yy+9/LEAf//kLChVgCAEEEEjD7z9/JHgkQeHwD8gUjV79O9r6CzPLv6lr1OUFwWH9Fxjcv//9BcYoA0AAMTI4ImIROUYRMf2XARkABBgA8kMvQf3q+24AAAAASUVORK5CYII=')}.ytcenter-flag-bs{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGgSURBVHjaYmTw9maoqmJgY2P48YMBCP79Y/jzB8QAkhA2kIQwgIiJCSCAGIFS1fPmMTg6/uPk/Pf799///4HK//779wfIAJIMDL+B5L9/v///B6JNx44BBBALyLC7d57cvfs3JOSvqMTvHyA9v/8x/IaS/379+w9EQG2y7KwM/3gAAogF7Ir/fx8/+jN3brbdCyuDv0A1QNP///sNZvyCMX4z/pP7+GMPQACBNPz9+/cPELx4MX/9H0aG3+Z6YPsh6sBKwYzfDP9/AxUDBBAT2Ht/f4PBy4+/2+f9fvjk13+mX1DVQG1/Yey/f4B+AgggiA0gC379/sXD9Cc15Les5K//v6CmItvA+O83UANAAIFsAJr969evPzy8qUG/7E1//f/zC2wqkh6ge8DB9ucHA0AAsYCd9Oe3mNjvhIQGWYVfX3/9AgYiKGRg5H9QsP7591/lP/tFlmMAAQTS8FtOXtLP9zcv75+fP/+wgULwNzgefsNiAxjQf0Hkd4ZfLwACiIVBWnq+uhrD48cMnz5BoxMSr79+ocQxJO45OAACDABeL3jo/4fUSgAAAABJRU5ErkJggg==')}.ytcenter-flag-bt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIJSURBVHjaNMmxCQAgEMDAKI/7l+7jUIo8QS1Md6TMQSTyEy+SaFhx4X7Xy8DOEUAsQNUsatVAlf+B4v+Byv/+Z/gL1PGfTen/rz8sv67+Z/zzl+E3468//7f//rJ2E0AAsQD1ARX///WU4f9fkOr/vxkY/v7n1PgnlPHjx/9fP74yvS35/OSX6IqbzMqy/1gZAAKICWz2f4RqIMny6/+ncx8+fP71+y/rv1+MIv3vN71gFPj1n/33v98MAAHEBHYgUPUfkOr/f/4z/fr2menVd6l/H/d+/Prr9Prpj968F01q/v/l1/+/QMsZAAKIBaThP8js////MDD++f/j9xPuFQy/vjOz/mdh/q/rm8bAwMQ7N+4/52+G33+AagECiOXfH6AP/vwH2sD4i4H5z1vBsn/ff4izffj74/e775y8v1/92db4/8Ov/9y/Gf/+BmoACCCmf6Cw+f2f+dd3nqC7LJ3v3ohw/v30++0TvqlR8mfXfeWVeefW8f/zb4Y/f/7//fOHgQEggJiAwQw0+D+H5ruPehz3PinNTGXk4Px4cN5/hp//L0wXabGSm+b+X+TX/z+//wO9ysAAEEAsTDwM/5n+/D/+VvJuPwP73/+KMny3trCy/WKUkGdg+s3AB4zUP6Aw/AsKRqCTAAKI8fN8BoYMhn8/Gf6JgiIVGMf/voJDDgNBAECAAQCFISPqD6W+BwAAAABJRU5ErkJggg==')}.ytcenter-flag-bv{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGSSURBVHjaYnzIAAVy//9zRV36skTnATPzPwaGf2BBCOMPEgkQQCxAUcHaaiD5////ngQpRkZG4aLC/3//MPz58x+Efv//DSL/Acnfv+9u2AQQQCxgg/7/e/IUSL18/weo7c+DB0AVDL+BioCqgejXv1+//v/6zSwrC7QBIIDAGv4CVf0F0f9ADvn/5xfI1F8gpSDVQD2/QCTT799AVwEEEIvM379AZ0Cc9Aeo8/9/gbUb/mMDQGUanz4BBBAjc/D5/mTpF+9///0HdvO/f0BtQA6I/AMk//3+CxIHikgJss7OOQ0QQIx///6FGP+f4X/JgmfdcZL/cQAmJqb3798DBBDLPWZmkdysP/fuC2zY9BvspLd21v9+gXzMAPLub6g3fv9hUVa6evocQACxAL35HxxkQKUgZ/3//+8nRMUvkCBIJ4jxD+iQP8DAZgAIILCGP3+YJEEuEeUDBRqzjCzTX1DAM4CDn/nPH5Dqv3//gR0PEECMV2FRqPD+vaDeibcXzK4JC/+BxTEkghlgJBAABBgA9J5akqVspaUAAAAASUVORK5CYII=')}.ytcenter-flag-bw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFNSURBVHjaYlQ9+f/DHwYI+PPv369/QJIBSP7/94/hH5jzB8yAsBkYAAIwLMZWAEBAFLvDJIZVmsswShVO/C7vJSlzW6uGmRrwkNKJer/kIAXcx3kI+lhfALEwAZX+Z3j1G8gHm/IfxACq+ANWByR/g1UD2eLsjEAJgABi/PjxIy8vL8RJQCsgJFbAyMh4//59gABiBKooKyt79OjRHyD4DYIQ8OsXmIBRQFJeXv7gwYMAAcQC8uufv0A+XANEGkU5mAbKAxUDBBBIw9+/IMW/fv+CmQ9SgGw23AigYoAAYnz79i0/Pz9+10NkgX64desWQACxCJ/iaVFnePIDGBQMyGECIUEMSHD9Y5DjZFi9RwgggFhAsfWfSYwNEpQM4DBl+P2PEcIARstfkCAwfv7/A0ctQAAxMmz/yvADKVL/MECj9hdaHIOl2BgAAgwAZ3V9YV7lZU4AAAAASUVORK5CYII=')}.ytcenter-flag-by{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGUSURBVHjaTMJBCgAQEADA+amne4EkbZK0rqaREVlK1prc72GzCCaDTuMJwKQc2wAAgzAQdIZnIWZLg7BxKNN8cfqzH6oQ4W7MQDIF0STIRX+9mU8AsTB8/Miwa9f//HwGIAKqBmoDk1D0C0j++v/rF5DNKCv7j4EBIIBYGPj5/3/5wpCbi1ANlAaaB1EKUv0booHh92+gBoAAYvr3+jXDxo0M3d1goT8QORAJQT9/IdhABQwMAAHEwiAqygD0d1ISVMMfqHlQbXDNQNk/f4A2AAQQE8Pr1//Xrfs/aTLMATDy508ECUYQJwEEEMs/r4D/+7Z/zUiMzfjz+9+vX39///776/ff37/+AeXBjL+//gAF//1R4v9zrI0BIICY/m3Z8K+l+ceMKZ+Zf31m/g0kP0HRz09Mvz4ygdksvz6z/P7K9JeBjQEggFj+iYsyfPnEVFMi6Sf5599fsGEg9OffH6DxQBLorb9A8B+EGH4wAAQQ49fnL79Jij94fNq0ypThFwMI/WFAMBjAjB8MDP8YIAAgwABvN3WWW1RiZQAAAABJRU5ErkJggg==')}.ytcenter-flag-bz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHqSURBVHjaYvzJgAL+gNEPMJsNJvgPhoAAIIAYGeTvdtQLgUX///vL8JOdg/3rN26OX7///Xn/ifULMyfju49//jL8/vP/z59/87svAwQQC4OIxA8utmfv/v/9+//PPwamPwwOdq/FZH78+Pv38Ytfuzdof/zID1QNRDKiTAwMagABBMRAkxn+/P3/G6ia8W9E3BE3dV5jJlmzfxI+siIpeQfZWH/++vMXiH4DLWL4BRBATEAn//n3H8j+++e/kuQLGXYBno+Ml64dPnfx0P9HPyUYeXT07v36zQh0ItASoMMBAgio4d/ff2D3/GWQUXwh8F+QjUfkx5M//x+/kJBXEmAQlVB+/vvvv19AV/0FaQAIICaGX//+Av309/+vv/9ePBH4/P/D9x/fP7GLPmRQffPp7U+Gr++e8v7+9f/3b5CngRoAAoiF4RdI9W+wAWeuyhh7Hvnzg8XWUBmo/+77O5/5Xh/cZw32w78//4Ae/gcQQCzAMAeF2l+GX38Yvv5hmtBn4xVyjo/9/Z8/DB8YGFc0Ozx7CwxTkOq/fxmBIQQQQCwMr14xfhOW5QTaCArsX8wsl5ap8vN/Abrz5Rs2gf//+fm+AD35D+jJL0A/3AMIIMbXSBEJieZvDAxfwAwOMGJAimYgAAgwACh0GTCs4tX1AAAAAElFTkSuQmCC')}.ytcenter-flag-ca{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIGSURBVHjaYvzoHfzvwwcmFqYfr55wnz7NgAT+//8PJH/9+vVMWJgNyGBg+MPAABBALP8ePeEsLwRKMH9+x8XF9R8Mfn38yPiPgVmA7/+/f6wsrKJZWSzsPP/+/r0/qRcggFgYeDiAZv178/bvu1cQ1X/+/f8ybfq/H3+5q0qYGRlB+m/f/scpwCQlAbQEIIBYGIDyf//9//2H4c8foNzPK9d//vvF/OARw68fX0+fYfn7l93MlOH797+MHP9//gI6CSCAWP79+sXw9+//37////wJ1PBlxkwWHi5Gbv7/rBx/Fy7+/PiB2Nq1/77/ZGD8zvjrJ1ADQACxMPz48e/3n3+/f//79RvkS2X5/+fO/WflYfzyg+njM2Z1jX///v35+Z2JhROoAOgkgABi+vPjx/8/v4E2/Pv5A6iBJynpm7AI0NO/f3/5IiTGX14OFPwNVPPz199fICcBBBDLvy9fwKp/gtC/fwwcHPwNDd/37GJk5xAyN2fk4PgLdPDPn39ZfzH8BnqUASCAWP68fQr2wK9/QLf9+wc0j5GNlcHUhImNg4GdHagaKPjvx/d/bD+Z/vwBOgkggFiAmv79/M0oJMD09zsjOBCBccIuJAJk/WNgYGJiAgqyKioxC4iBvMrAABBAjLeBGsBR+ImBgffKlR8/fsAjGML4/fv3I0dHNrAyIAAIMAAWsTLdMXjAtwAAAABJRU5ErkJggg==')}.ytcenter-flag-catalonia{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAATBJREFUeNpUkU1LA0EMhpNViqWtVYrFj4OnulCoFNSbF3+Gtn9UvBSxoHgR9eRBD1Xbgyu0Ckt3MhMzMzvtGsLLSxieTBKkhxMIwczGmKJqrcUsVGJVqtQ5de8NsGbQwMTWKGaFTABqhb1X6uYVJ/295v5Z3kJIWgFZZXKpJDOmTAyUK/O7F0zvu3TYguW3BK883mUmaqxmCLXZYITj3m5j7QgKgTTP2Rac5U2kQ6U6e3zD39tO6aAB/4PNEs/G4qUC0fr7cIKfFzubpXbxdUSp6xDYwWOt/vM0wumwzd1mYbMWbMIAxjexY6gI6slVgh/n21vlOAzsYY7qNpNXSIHRXN1In8f4fR1Hx3FgEwek+72si4Rt78PaACWXU/watPyN/SH9dRfqT+69GHn5J8AAeJhkjAZrdt8AAAAASUVORK5CYII=')}.ytcenter-flag-cc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIDSURBVHjaYmSIZWaAgz9/Gf4BSQaGXzASguQYGK6BGT8YAAKIBahsc0GXj+bHL2/YWi7z/v337w/T37///v75++cPkPz3V4Hze6Lc+/kPOM6+Y9pUNhEggEAafGS+Jqxh1RD/1G55NWy9AivHjz+//n369/v3vz+///2+9ufP/bdfzrxhkhUQB9oAEEBMDAwi/zl++ym9N2L/+v//b1bmX5++/ptq+my20fNff3+HiX/49evX6TdMQLYx/1egqwACADEAzv8EAPICrtsNUhnb/xD8Z8Ec/gH6mDfn5fX+bM8PbSLsMg/0+foGmeEHNw/0Xh0BhCIAAgAxAM7/BAAE58boBcDhGe76/v37/Pv+/AkB+33UDwsA+6ThBRol/ZnfBvr++r7qAhPcCQDVAAKICRgsf///fvz1//sff3/8+/X77++vv3/Xqb/68ev3vfcMSSf5gY759fvPdqvHx1+DwhMggJiAzvr97++vf8Aw+f3x59/vf34nnRSQ4fg20fDZr/+/gfp//QGR9vtFgEEH1AAQQCxADcAQ/A0W/f33z5e/vzkYfgcdEvr2D6j01y+g1N/f1sJf9r5g+wPWABBALGAb/kjyivyGBDxQJ9Av//5w/f7Lz/37z9+/hgLfshSYJ97iOf4GGJcMAAHEyGAOi84fSFELQb9hKUCSgeE5lAkQYADMqym/vMn2nAAAAABJRU5ErkJggg==')}.ytcenter-flag-cd{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbJJREFUeNp0kT9Mk0EYxp/v+tVSghYcTAohTFXjHwI4IAkDiUPDTLGNi8Y/LGpYXY2Eib8rTCyQNMahJH5VUtCEkgoJlgDRxIHJxMkC4le+3t338l7bgYXL3eXNe7978tw9VvA7AbjftVAoPuYCCiCQD+XxklAK0oMvv97sCF33PMBmxrmbfYB3n+9cc34PWjA0aZ98XS3oSfuHe43TSHW4MZH79RMhcoluE13luXy6kPpByT05vHOa2D7JH82Qbqbey/8ROcYVit3Ksjxbcukt0yUaTe7rh7uV4WJ5498skUHLiJwwimYz33RnP/KFTfqmHRZecdMsnPn7voZ6iLiIEFoM+izKzXxpFpNrtq5g8SDuK+l5Vrozij6lC0JBhCDM8583YL6cK72ccoai4QDUge1LlWh1+sMp9AWoICTEJYgAe33RgLny6uGrqWyi+gHmD0DSpoEgkjeQDmogYOg6+uX49cQng6JGM+5bUL69ZaEHf1Ab51BcMEwOItZqDRzW0KX8I+60NaHqgdMQRpt4t4hMxNY6X3qK8ZGxTDFeF1EcrYbkpCuAhmbv7Kd+eCbAAHiZ+RMcNV6aAAAAAElFTkSuQmCC')}.ytcenter-flag-cf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH4SURBVHjaYuTUv8HML7i+VtK/8TkDE8Pvf//+fmH4eEHyLwODgMpjBtZ/DH/+Mvz6x/AXTP76AxAAMQDO/wQDDxDYprAbG33jMqaqyGv9/gD/+QAKwW3//PyKPBX7A//9/f/9/v/7/P/9//6JbtwCiOXfX4Yd55MCOZunbM76x/j/32+Gf3///79////v30/V//35C1L65+8/ICkuyMjwhQEggBifPHkpJSUKtBAIGBn/gyiG//+9vf//+v1/x/b/MPDv339GRsbz588BBBALA8NvoBJmZqCq/wxgCAK/foE0IAGgKUBlnz9/BggglrTDafnW+R9+fgA69e+/v3+Z/v399ycGqOH37zm35/wB8n6BfPHn3x9BdsGSbSUAAcSybfs2VUXVB18e/Pr368/fP7///f7991c00Phfv6adnvbr76/ff38DpYCkEr/Slw1fAAKIheEPw+//v4ESQDOASn/9A7FB7vn9G6oaSLL8/gMMXeY/DGwMAAHEUpLEEKX85+vv38Cg+/fvNyi0/4M1/PrV7/gbGDz//v4CSf3/y8P6tzOHASCAWAI4GHQF//z/L/n/P9D3wBD9DWLI/mb488dJEsj+A0bAQAQhMVsGgABiPHSIgYmJgZOTgZ2dgZsPJP4PGK3KDP8YGP5dA8Xvv39QEgIAAgwAkrFcoANSd7wAAAAASUVORK5CYII=')}.ytcenter-flag-cg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGbSURBVHjaYmQ4zsDwhwEB/sG4f0Ds71Li//78+vfvBwj9+f+vhQEggFiAEtWK1WCV//79//f3/98/DH///v3DyPAnRvgPC+fv/////P8PJrf9/rJ9E0AAsYBN+//k91Og0r///v7+/xtIAlXkS/w24Pj97x9Q6S8QWvmbcaUs0HqAAGICm/0fZDBM9Z//v1JEf1tzQZT+BJHrfv3v+PX/92+gBoAAYgEqB6v+8+f/HyD599/vNLHfbry/wc4Am7359/+mX/9//mb4/RtoOkAAgTT8+Q8yG6Tn35800d/uvL/AqsEadvz+3/Dr/w+Q8QxAeQYGgACC2ABS+uvfrySRP558EIPB5J7f/2t+/f/6+/8vkAZGsJMAAgikAWj8r7+/YkT++PPDlAJJoOqKX/+/QFUzgJ0MDGqAAAIF65+/f0KFfocKILn7GFj1Z6BRYA1/gBr+AkMb6AeAAGJh+MXgxvfHj18SqJqBASj0m+HKb8ZpvxnE/zAIgQwGob9/IQjoJIAAYvS9yrDsGyc0IsHR/M8RFN2YCAIAAgwAqoFmdiZS8coAAAAASUVORK5CYII=')}.ytcenter-flag-ch{width:11px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAIAAAAmzuBxAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEBSURBVHjaYvzPgAD/UNkQBBBALCBedTWQ+P/vHyMjI4jx+zfDjx+Mf/4w//nzZ/ZsgAACq2D4///JU4a/fxkWLfr/H2Tof39/kDpJSaAZAAHEAtb9HyT99y9UGgh+//7/6zfD799AFQABxPAXaFll5b9///4CwZ+/QIN///7969evn0AQHf2egQEggMC2MDL+BwOoATAAcS9AAIFt+fEDLACGyCq+fgWqAAggFiBmBKrw9WX48+f/1q1QSXNzoFMYZWWBsgABBFIB9BXI5UDXwcGvX0AEcSlAAIFUMP3+A/QYSFF8AtAahp8/gLoZwNqAsgABxPgVKfj+oYYmBAEEGACuqcePp4nP0QAAAABJRU5ErkJggg==')}.ytcenter-flag-ci{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFXSURBVHjaYvw/kYHhBwMI/GP494fhU85HIAsIGCDUv3/iJ8SBUgx/wIiJASCAWBi+MDC4VgOl///7x/j/Hz8/7///IN5/GBWjGfPn/+/f///8/v9707FNAAHEwsACFv/6lOHfX4a/f+Hq4OD299u//v/6/e+3LLss0CqAAGIB4v///oNU//v7/+9vNNVA8OvfL5AGoCX/fgNdBRBALEDnMTL8Zfj/5z/QB//+/McAUA3/gK4CaQAIIBaQV8Bm//9LQMMfoII/DAABBNIANBuMfjH8xWsD2EkAAcQCdAjjf6DxYNV/f2HVAHTMn39//v4H2QAQQCANzCClvxlArvqNVcMfkAaQImCQAAQQy78fDExATdySID1//oKjkIGRkZEBBpQ4lIBe/PsPGOR/GX4xAAQQ49dShn+fQHEM1AlEH7ru/vnzBxLTEIb+Dn1QTDOAY5qNASDAABikdpxDoY3+AAAAAElFTkSuQmCC')}.ytcenter-flag-ck{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHcSURBVHjaYtydXr3lg8jESy86v5xhYfhX/EcrnOWdn5lI9NptDAwyDAw/GBh+ISOAAGI0N29c3+P5XUDk741r/37++iMmJSLCs+fetzOXrzOzcv358+/P378gEgT+LewvBggAMQDO/wSc5JgC0hUP8O357u/++fkHEQ/4+/809/qr8hgEBw38+/37/P2tmGVIXpMbGBAAAPgCiGmHmM0/FU0WVdXfQqL/pOTY9A2/S8hd51H6DVT6+8/Kqcm/fv8GqgZqm9MZA3QSQAAxPTBw+snGueAJ/1MWoWcMvIu/yPyWVnjKxPfr1+9fv/96J04Fkr9+//n1609U/jwGhr8AAcT0bt+x5WdeX375bv8Tht2P/x86dWX6pQ+/f/4AKlo/M+3XH5A9INuAXvj97/DhwwABxLL84Ttlxn9AseuMLL8ZGYHij568vfP7Dws7n1vMpN9/QcYDffLnz1+g721tbQECiAnorL9/QQb8BhkGMu8XyEgQCXTMniV5ENVAqdXTUhgYGAACCKQBGF6/gQimCEKCXfLHMqgLSB5fXwq0yi9lOlADQACxADUAzRYX4QVZCjHs7z8QCQ74v/9AkRCcMVtBRuTv339ADQABxMjAYIgalz9g5F8GbAAgwAB2s0hu2PkgEgAAAABJRU5ErkJggg==')}.ytcenter-flag-cl{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFUSURBVHjaYmRIP87w7Q/DHwYGJgaGH/8YuJj+LrBiYGD4hxUwMAAEEAvDlz/VUYrxZsILTr/7+/svHyczAwMjA8N/RkZGZmZmJiam/0jgy5cvAAHExPCPIcVChOE/Q5yJ0KO3P59++AlUDQEYpoOsBQggoDsYll149/f//503P/z+8//PX4b/uAFQA0AAsTBwCHz8w9q47/2f/wx/2Dn+/P2FSzUDGAAEEAvDvTtMnziZP/749/c/079/v/g4/3///p+BAdlYqAYmpn9v3gAEEONfoK78/P8PHvz//YsB6Kbfv4GM/79+///1C8RGIpmUlN6fOgUQQCxAvzCChRj+/EFRhKoaJPvnDzDwAQIIpIH5D8hgBrgiTG1/gBr+MvwFuQYggEAamH7/YZCUBBvzl+EPSCcj2EgGCAlEf/9CEFAxQAAxfgWGLhJiQOWiSQEBQIABAIaNaAY5Pzm9AAAAAElFTkSuQmCC')}.ytcenter-flag-cm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGfSURBVHjaYmSYyMDwgwEKWBgeFjPIgJn/4Ogrw79/MMTAABCAQjk3AgAEgQCIX2BmU1ZFV9aGkQfnkGy0XUx0aw5G1Fjqcl0cBWhAnY8D5CNTs/MFEAvQVAaG/0++Pv37/+9fxr9/Hv9m+Pz3/+/fUMT1+/+/X///A9FvRkZZoCUAATgaYwMAYBAGObT//xujVLuwASf2RXWZySYuJGw0grj6+WVEjvAEEMh8kAuASv79AboDZCpQWwPQ4N//y3/9/4miAagYIICYGP4w/Pn39/ff37///QaSIIMLfv0X+/Vf8tf/ql8g7v9fUARU+I8BIIBAGv7+Axn/6++vX/9+/QM6o/7X/+e//j/9+b/k1//fP+EaGP6DnAQQQCxADSDH/v0F1POb8RfISUBnZIN9DPQMG9w9wFD68+cPA0AAgTT8+fsH5CSgEgawol+/oKohAQXV8BeMGAACiAUYa7///ZHklgT6Aeg6JqnfDDy/GYF6gaYBSZ4/DIx/YKr/Ap0EEECMDKUMDJ+AFoIRA8PJhQxKyNEMRA+h0QwBAAEGABDIZIMH+VDlAAAAAElFTkSuQmCC')}.ytcenter-flag-cn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFqSURBVHjaYrzOwPAPjJgYQEDAleHVbhADIvgHLPgHiQ0QQCxAlkR9NW8sw+cV/1gV/7Gb/hV4+vfzhj8Mv/78//Pn/+/f/8AkhH1t0yaAAAJp4I37zyz2lDfu79uqv/++/WYz+cuq/vvLxt8gdb+A5K9/v34B2SyyskBLAAII5JAva/7/+/z367a/f3/8ZuT9+//Pr78vQUrB6n4CSSj6/RuoASCAWEDO/fD3ddEfhv9/OE3/sKj8/n7k9/fDQNUIs/+DVf8HawAIIJCT/v38C3Hr95N/GDh/f94AVvT7N8RUBpjxQAVADQABBNLw/y/Ifwy/f/399ufTOpDBEPf8g5sN0QBEDAwAAQTWABEChgOSA9BVA00E2wAQQCANQBbEif/AzoCqgLkbbBYwWP/+//sXqBYggFhAkfL7D7OkJFCOCSj65zfUeFjwg8z++/ffX5AGoGKAAGI8jhSRyIw/SJH9D4aAYQoQYAA6rnMw1jU2vQAAAABJRU5ErkJggg==')}.ytcenter-flag-co{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF1SURBVHjaYny/neHfPwYo+Adig7gQxh8MxMAAEEAsQAkh/Wqg4v9A7n8g+vuf4S9Q8v9/kJL/DL//A8l/v4Hc//9/39uyCSCAWMAmA9lPgUoZ/v0FskB6QCp+w8hfYPSbkV0WaAlAALGAzf6PqvoXyLx/YKX/f8EYvxn+/f7ziwEggFgY/gC1/GVg+POf8Q+IBLqBEWwwiAHWAGQwgDUwAPUwAAQQI4Pg8dIOhYcvf/35+//3H6Ah/8EIxPj1G0j++wVh//mrKMF+aNJJgABiYfjB8OcPEAGF/sPIf79+Q7QB9fz/hWQQMPgAAgik4edvhu+/GP78Zvj9h+EXGP0GawAxIFyQiYy/foHCByCAWK7/txS7kfP73v3/v3+BTf79DygDJIFcoD6ws0CCf/+wKSufZzgFEEAsbAwMzH9+MEmKgB30C0SCpIHu+A1hAw3/9/ff/79//v/9wcPAABBAjHcZwOHEwPALFL8g9AeJRENAABBgALCAa8EvfPnLAAAAAElFTkSuQmCC')}.ytcenter-flag-cr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFvSURBVHjaYmTgb2X4xQAF//4x/PrD8P8fA8MfJPQLRgLRP4AAFMS5DQAgDARBBwSIxuiIPgic0Cr3gFejbTF6nukIO2SLhirQLLoUIfzBe+UTQIw///9nZgArBxJgBlgzCoDwGRkZP3z6BBBALAyLFjEYG////u3/P6DEv///YOgvmAQ6D2wRkM3Ixf1r9UqAABTGQREAIAgEQBwL2ICW9KOFX4nBISifnR2HaIlcs4pIRAUKICD9x9O9+u1k3qpPALEAPcgAdC9QFOhGiAawNFwdiPz169/v30xAExkYAAIIpAHsKaDxv0AaQEqBKn4jmw0lgYiBASCAWETaWzkcnf99+QxxKIT8B3M3kAT6AeyXv0x8fDKTJwEEEOP3nz9ZmJlBcgyI0PmHGUoMDMBQevP2LUAAMTIwFLfOiwI6CmjQHzAChT2QC6T/gOIEZMG//0BxoK6l7WUAAQTUkA6LRXh0wrmICAazgSQTQIABABaBedMaHOruAAAAAElFTkSuQmCC')}.ytcenter-flag-cs{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFJSURBVHjaYmRgmMjA8IMBCv4xMPyBkcjoF4xkAQjAoZjbAADCQCwFqzFVJmGNzEZ3T3gky3LhEbEz53vdF6lJSyZfEAb1bUBV6wggFrB5/548+QxUClT3+zeQ/PsbqAKE/v7+9ffX77+/fgFF/srK8jIwfAMIIBZTUx1NTSFRUa5/////BZn9H2w8yAagTjADikRFObZvtwAIIMa/L18yiooCnfT//38GMMQFGBkZP924ARBALBDPQoTgDKyAgZERaBFAALGAPAsVwGs+0Ib/wFD5BxBALP+cnBjLy/+/fs0ADiAYAnoFzIAJgmRFRP50dgIEEMu/69eZjx37f+8eAzCAgOjXLxCCMOAif34z/PnLoKICdDNAALEAA5Xp9x8GSUmgHEgUKPf7NyOI/YcBQoKNhyCgYoAAYvwKiQgYYkDlokkBAUCAAQBzjGcaf+uHXwAAAABJRU5ErkJggg==')}.ytcenter-flag-cu{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHFSURBVHjaYrzNwKDquJyBjYfhxzeGfwwMf/4w/PnH8AuI/sBIMPoBRL8Y2NgAAohFhYHhk831pRr+H7iF/v/7/+/f/z8Q8u8/IOPPn39///37/ef/73//gCLzc/YABBDjZwYG7uqqT8+e8yUl/LawYWD4D9T2/z8DFIOpf2CakZHx/cePAAHEAnTF73//OX///jx9Bs/Xrwyu7v8ZGaAKYYgJTDIyMrAxMQAEEONHBgb29nZmM7Pfs2f//P5jH5/WdvMwoON///kHcgaQ/AslpQQ5lhRuBQggkA0srq4MurrMv/+wTppk9/LMp11f56gF/f4FhH9//fn7+/e/X0ANf/79lOBiYLgHEEAgDX927GD69On31Mk/f//ay6uz2ypa/B8DxFQQ+gOyAehjCREOBgYZgABifMvAwJWV9f/+/e9//vAmxP0PCfuPDTAwAP3A+ObNG4AAAjvpz58Pf/5wZaT/9vL9/+f/f2iogEhg+ILDiwESSt9+/AEIIBYeBoaPf/+3RfT9esvwZ+FNiO3AGPgNYfwFxcPfv////vv/9z/DvuY5AAHEeJqBwVR0JjRSgdH5/w/QUzD0C0z+A5MMYJIJIMAA5qlT7L92ZXAAAAAASUVORK5CYII=')}.ytcenter-flag-cv{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGjSURBVHjaYmRI/M8AB//+MfwBkgwMvxgY/vxj+PUPSgLRDwiDASAAhXJOBAAIQ0GUADJRggJs4JHyHyTNzhZvJjurMG0r6MZkNBXQgHo+5Cp99/sCiAVi9LNPQBVgC0ByIA2/YOp+A9EfEFeanxFoD0AAgTT8/QdSDbTcXOo8kBenv27OWb9ffxn23DUGKv39F46ATv0HEEBMQIVggxmsZM5G6W56+EEkek3zg/diyYarHOSP/QJb9esPCAH1AP0AEECMf//+ZWRk/A/ywGMGRpn/uAEjE9PHDx8AAojlAzMzV3U1o9x75lCeH2n3/v8BGvX7/69fjA6crIn8P2c8/7PlLcgTv38zycm92rULIIAYf//+DbEB6Bk8xgNlgcrevHkDEEAsrAH/StOYH7z7byd/MtFwddWuzMsvFVSF7nW5dfQdjVh/3Q4SUMCgUxRm2F/AABBAzAwK1WbGTFxsDC+/SL/7Li7O873TbcaLL7JnnhmfeGrJx8HAy87Az87IxwkK9Ic7vwIEECOD/VekiAQyGBBRCwy73//AMQ9BIAAQYACLEkIlDYvwWwAAAABJRU5ErkJggg==')}.ytcenter-flag-cx{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHySURBVHjaYmQQj2foWcjAwwAF/8DoD4xEZoARQAAxMjCsr25VYbA78k/q0T+Gf3///f3z/+/f/3/+ANE/IPr9G8T+HSj6Z+mz35t2bAIIIBYGBjaGb1xP5jj8NTr1137Pb+bvQD2////+/Q+Kfv37BURv+IA6ZYE2AAQQC8gV/xj+/v3354Txn2vyfwNW/5J8ADT799/fv/7/+v3vV5/a73//f/3//9uU97dJEANAADEB1QNVt7YqcXMx/3kh+GtacoccY4zEr1ipX92qv37+/ZV29VfSlV///v268uV38xIGgAACaeDjYykquv3p099Jk1V+/+SS5P52+/ev+U9/AQ3+BXZSpsyv0x9/zX36B+gkgAACamBISZEAepOF5V9+/u1fv34+f8qTI/5rhuZPtj//fv37CVT999+vzgdA5/0GagAIADEAzv8DAABT9vYH7Oz7X18YKSkJxsbvr6k98+wI280ie2xs+9ghwxnRwvjz/P78EAUP59LnAggYrMvT0gweP/7+8+e/Hz/+gkLkFzCMWECu+f0NZCzL1z8JM/9YHVThUrm44iJAAAFD6dfv33919XgyMyRLS++AwhwcnH/+MPz+zQmOC/a/Wyv/PvD4G7kE6CSAAALasJSB4RtSZCJH7C8wCZEFghsMjPsBAgwAk1A9QmWywvkAAAAASUVORK5CYII=')}.ytcenter-flag-cy{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE+SURBVHjaYvz48SMDEvj3D0zAKQwAEEAsQMDFxQWU/v//P0QPmP7/H04hgRcvXgAEEAtM0X9kBqqyf0AxIMXIyAi0ASCAmFBV/2P4du3/r+f/H0/4//fL/x93/j9o+n+v8f//P1Ct//4BBBAL3PUgbV9O/n+59P+vN/9/vv7/btt/Dtb/fAH/hSL//2eCGPrnzx+AAGKB+A9iAAOn7n/mX///v/rP9v8/m/R/Hqv/gvFwlzGAnQQQQCANMIH/fxnYDzP56gt/4+PWu/b59fXPbwMEEF5hBDsJIIBYEMaD/fD425czr97I89288uqKMLcIwniYVwECiPH9+/e8vLzIDnv+9fnuxwfcZZyEOYSRNQBD6e7duwABxPj27Vs+Pj5kY7CFLEgAiIEaAAII5Id3795BYvEPGOICkMAECDAAlKhdBC91VK8AAAAASUVORK5CYII=')}.ytcenter-flag-cz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFuSURBVHjaYmSIP9sdIJLlJsIABv/+/YOQyAw4+PPvH0AAsQj++8LGK3vzxV8DRR6Inv//wQScQgIvXrwACCAmIOD+/2f1hS9Hrn+EqIArQzMeYiFAALEAGX///ef6+3PjlX9///2z0xL4jwNANAAEEMsfoLuAhv3/z/3357qLf//8/eegLYBLw58/fwACiOXXH7Bv/v7/+/c/59+fK87+Fd++WkmUDcj/9+cPkGT4C5b7+5dRQIAhLw8ggIA2AA0FCQL1/P77z/fCGplzG37++v3/16+/v0Hk/9+//4FJFiWlDz9/AgQQy98/QKeDlAI12J3faHduI1TR798Mv34xgPUASaBrQIiBASCAWBh+gawAqT630f48SDXEPLg2kMgfoAaQq4A6AAIIqAGk2uvZEdO35xmkpIFyTEDzgEqBHvj9mxFI/vnDDPMG0AaAAGJh+PHnWohxCMP7l8BQAyNQaMDYfyDRD2MwMTAABBgAMxl5E8UTSgsAAAAASUVORK5CYII=')}.ytcenter-flag-de{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYvTxcWb4+53h3z8GZpZff/79+v3n/7/fDAz/GHAAgABi+f37e3FxOZD1Dwz+/v3z9y+E/AMFv3//+Qumfv9et241QACxMDExAVWfOHkJJAEW/gUEP0EQDn78+AHE/gFOQJUAAcQiy8Ag8O+fLFj1n1+/QDp+/gQioK7fP378+vkDqOH39x9A/RJ/gE5lAAhAYhzcAACCQBDkgRXRjP034R0IaDTZTFZn0DItot37S94KLOINerEcI7aKHAHE8v/3r/9//zIA1f36/R+o4tevf1ANYNVA9P07RD9IJQMDQACxADHD3z8Ig4GMHz+AqqHagKp//fwLVA0U//v7LwMDQACx/LZiYFD7/5/53/+///79BqK/EMZ/UPACSYa/v/8DyX9A0oTxx2EGgABi+a/H8F/m339BoCoQ+g8kgRaCQvgPJJiBYmAuw39hxn+uDAABxMLwi+E/0PusRkwMvxhBGoDkH4b/v/+D2EDyz///QB1/QLb8+sP0lQEggFh+vGXYM2/SP6A2Zoaf30Ex/J+PgekHwz9gQDAz/P0FYrAyMfz7wcDAzPDtFwNAgAEAd3SIyRitX1gAAAAASUVORK5CYII=')}.ytcenter-flag-dj{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHOSURBVHjaYjx8/f+MPQwv3jFwsDEwMPz79Yfh3z+GP38Yfv359+fPvx9/gCL/fv0CM379Y2NhAAggxv///3/5wXD1McPjt/8ZwACo4d+//3/////7j+EvkPH3P4gLZuTO/AIQQCxAFTwcDGYq//m4GE7dZvj84z8TAwNI9d//f8CK/vyFqhbkYQSaBBBAIA1AS4CkhhSDCO//ozcY7r78DxIDm/rnLxT9A2r7y8Dw6x9AADH9A7oAqGHnzv9fvwpzM3gb/rfV+M/J+J/h138mGGL+9Z8RjBi+MAAEEMgGhrNn/2/f/v/TJ4bgYEbG/4YK/79x3tl04euff//+/P0LJkHoJxcng8AOgAACO8nI6P+LF//t7cEO+bfpw6a5n2c+l3/9+//vX/9+/f4HJv//VmJXYvA6BRBALEAnMQKN9fQE6nz089H0V9MPfDwAlEao/g8igYH8l+kP0EkAAQTSwMzMDPT33k97p7ya8vLHy1+Mv5DMBuoExgRQw98//4G+ZgAIIJCGD/8+rPmw9vDHQ5xMXDKcMkB1ICP//4GQILOBIfQPGLB/GX4xAAQQy7QX04qvFTN8YGAAhv8fMPoHJn+BGf9gggxgkoMBIMAAfNNeI2mv5cQAAAAASUVORK5CYII=')}.ytcenter-flag-dk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGBSURBVHjaYvzIwPCPAQqADIG/f/+9evVBUvIfmIuM/oDVAAQQC5DFUV0NVv4PiBgZGZl4eblLiv99/fb/z5//v38zgEkg+9/v3y83bQIIIBawtv//njxl+Pv3PxABwd+/f+8//PflM0jdr9//f//6/+sXUDWTrCzQdIAALM1BDgBADAFA/f+PSahm9+YwuAc4X3ev7cSiHz0ts0EjEVgBOBpzGwAAEAQS99/WDkgU7e95IWi+NuQ7VE03KHz7KiRykwKvAGIE2g90938wgBj//x/QRob/GICRienjhw8AAcTCAJdjAEOwvv/YACPIqH8AAcTyipmZNyvr7/37IFf9+sW1a9f/jx+/+Pr9+/wJ4h6IB4CyLEpKT86dAwggsA2QgAO6FUhCLPv1k+HnT6ggUMMfYOD+BXoV6AeAAAJ5+v/vP0ySkmBj/oICmZkZGIIMX74wQoL/zx+mv2DVf0GyAAHE+BQchZCIBCKxt2//PHr0xtAQLghJB5BoZmJgAAgwAAauWfWiVmegAAAAAElFTkSuQmCC')}.ytcenter-flag-dm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH+SURBVHjaYmToZECAfwwMf0Dk3ygGZlWGnz9/slewg0R+MUDJXwwAAcQCVNbs0gwk/zL8/f/v/5//f/79+88gwlpc/I6ZmTkrIOv3v99//v3+/e/Pn39/VsxYARBALBCjn3579u/fX6AQUEPMlV+/D/wp/c34qz3NjenxJO2/QD2///yW5pEG2gAQQEwgBzD8/Yuk2uDDl3bXP1FWU7Ksfpq/+5R57vuvP79+/fv15+8foAaAAAAxAM7/Af3hAAERhwD85v///QD//Pyd7Z5C80kvBlzbB/rOkUAVWH25+gJxC///+gEDHPLXqQIAMQDO/wEAAAB8e3bj4+L7/Pz8+/uSGwQMA+1kK535MVyZnPcF+/vx8AlO1/L6+vofHyC5usACiPHv379APf+BgAEE/3SmLzK7HbX3B0vW/4T732Q//63dKcvUvh4oz8TE9P79e4AAYmSoZij2Ln74+eHvv6DQSDn/w/Td57XOvxJ2/m50/5u97schbuYmo/9ADyjyKR5qPwQQQEzAAAZyfv39BdTw6+/vidr/jnIxJe1mev+So367NEQ1UAoYrH+BnvzDABBALECP//7/W4JTAhhEQJ3AsFpj/dvPgDMv/cXyrvXLdvrLA5UCwX9QSAI1AAQQI0MuSkRC2C+LGMQdGZ4+fSodIg2VhSQCBgaAAAMATZ0sjL04zIMAAAAASUVORK5CYII=')}.ytcenter-flag-do{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGOSURBVHjaYmTWXMwAA3///GP49Y/h37+31xL4/ny4Jyj8j4EBiP4gkQABxAJUN6nG9D8Dw///DP/+/v/37/+ff/+42BgYWbhEU1P///79/88fIPkPTN7dtAkggEAagEpfvfvxF6L67z8g4+///yz//v6+e/f/r9//f//69+sXUDWzrCzQBoAAFI6xDQAwDMKkKP8/TCE1TAw2Yp0KhXJ2nllEJLly0KJEGolXXwCxMPz59+cfTPUfqAYWxv//mZhB6sBKwTp//wNrAAggxr9//zIyMv4HA7DzcAJGJqaPHz4ABBDjXQYG4fz8Pw8eAG3///sPyLzfvwR37vzLxBJTegRo2+8/f8HkPxlx7qV9CwACiAnoj/9QS/+APAdEP4Hoxy+w24Cqf4NV//kDdAoobAECiAWkARJwILN/Q9wN9jIwhKBmAxX/AYUKSANAAIE1/P7DJCnJCApyoMd/AxmMTMxMjIySYlx/QaEMCol//0AkMOoAAojxKmpEQki1qxc/cImpK9YgCUMYDAABBgDEsnffT0k7VwAAAABJRU5ErkJggg==')}.ytcenter-flag-dz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHYSURBVHjaYlSs9P3w4wsDGPz68+fHr19/f3xhZuO6W7eGjZkVKPj///9/YPDnzx8gCRBALG++fegIyP3PwPDv/7+///7++fsXJMHCLCopyc7ABFT+7z8CPHr0CCCAWFiYWP4z/H/56R1I6d8/v/79+f37l/LHX3+kbv6TlPzHygo0FaKai4sLSAIEEAsDWACo+vffP0Ak+/lb4J3XnL9+fvu9ncfdl0FUlIGZGW4DUC1AADH9+PMLZDBQ9Z/fv/7/cX3wluvXzwZNMWZP3y9b1zIyMUG8B9EAdC1AADEBfQky/s+vn39///z1S+Tr90t/fr3gYPneWv3zzMmXyWFMTEzMzMyMjIwQrwMEENP/Xz+ALvn55/fP3yA9L//9Vnvxge39B/bCKjZldan5ayCqmcEOA2oACCAmhh/fgO759Rus4eeP5eIc31kZOo/c+r10AX9A+P9fv4CKgE4C6gGSf//+BQggkAag638CnfT7149fPy9wMmRoC0yV5uFy9fkvK/uPgwPZx0A9AAHEwvDj068/v0V4BH79/Q2yB+h19p+PxNn+WVv9/w82Fmw8RDWQBAggRgZvQYZX7xl+MDB8Y4CSwHhnY9i357AQJy9EEdAlEAaQBAgwADDnTcmcsDekAAAAAElFTkSuQmCC')}.ytcenter-flag-ec{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGGSURBVHjaYvx5U53h3ycGCPgHBL8Y/v35x/ALyPj35/+/f0BBoDBQDEQCAUAAsTD8e8cs1gJW/pfh/3+m/0Dy3///fyGI4f+f////gMh/QME/H250AwQQCwMDEP1n+PMapgIkAUL/wEqBJMPv//+A6A8jqzjQeoAAAtoAcgpW1SB1ION/g7m/gZqBbgUIIBYWrk+MzD8Z/v+AOwCGoOogxgMZjCzfOLgYAAKIRaSkri3R+tX7L3/+/v/77++fv//A6O/vPyD2779/gRTQ5N9//0kI80zJfQwQQCzvb0k9/cD3+A3Lb5A0yNbff/79AqsA6vn95z9M8O/nv1wMDEoAAcTC8OMf2CSQut9/4Iy/EMavP///QKz68+/vX1AYAwQQ43kGBqmiol8PHvz//fvf799Q8tcvIAk2GSTy/w8Q/WVVUjp78CBAALEoMDBwfP3AIMgNEgUZC1LBAGL/AYn8BVkBVM3w9+//L291GBgAAojxIQPDH1BsoqA/SAwGJAYTAwNAgAEA/GyBI0uDlLwAAAAASUVORK5CYII=')}.ytcenter-flag-ee{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE/SURBVHjaYmRw3s8AB/8YGH79Y/gDRr/+gNhA9OMPmP2H4cc/ht9/AAJQKMcEAIAwDMB2YAV5U4ArNOCqa8v25MrqdnJPVsim3JlS0cU2MAoy6JvvCyAWiNFP3gPFQaqB1N+/IBIo/fsPiPz1598vIPf3P1lhdgaGPwABxAJ0xj+QkUCDQaYCVf8CGQlSDVIHJP+A9Pz+B9QMdPEfgABiYdjv+Ne07M+jR3+A4DcIQsCvX2ACRoGE5OUZGA4CBBDISX/+/AVy4Rqg0sjKwTRQHqgYIIBAGv7+BSn+9fsXzHyQAmSz4UYAFQMEEOPTp0/FxcX///8P5PzHDUBKGRkvXLgAEEAs/4BeBislqAEc9P8AAgikAa4aHoFAwxhQAJD7H6IBIIBAGh48eACyBwyBnvkHBhAGxKP/YADIBggwANQufux425lWAAAAAElFTkSuQmCC')}.ytcenter-flag-eg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFjSURBVHjaYnzLwPCPAQr+oZJw9AdJECAAx2FuAwAIA7EUlGycrRiKJe4jorBlr2F3z8QuO1KoiCGLDDDh7wLuOU8AsYCUMvz/++QpA1Dp379AUZAeIPn7N0jdLyDj179fv4DiTLKyQKsAAoiFzdSUSVOLQVQMajxQz9+/v3/+Zrb9xrSf9d/vX0Czmf6ALGQUFWXbvh0ggBj//v3LyMgIsuf/fwYw/Pfv74/X8xh+P2GVqGD4z/IfBoDKPn36BBBATBDvQsXA9K+XXX9+fvr39+evZy3/kQHQ0//+AQQQE5pqMPjz+8//H7/5//3/jaL+P9DyfwABxKivr19YWPj69Wug2/6Awe/ff1ICXwG1TVrKD+QCXQgkgbLi4uJtbW0AAQRyfVpa2r17936DwS8wgDBAJJgFNASoRUVF5eLFiwABBApWoJGSkpJAKaAoyAIwAFv1G2LnXxgAKgYIIJIRQIABAP7XTmNIudjEAAAAAElFTkSuQmCC')}.ytcenter-flag-eh{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGOSURBVHjaYmAgBWxkYAAIIBYgVV9fDyT//fv3FwyAjD9/fv/5A2L//v37DxgChVq+f+fduBEggFjAOv8/ffoMKP0HDn7/+QXUAiTA4N+vX3O/fZOUkfnEwAAQQCz3798XEhICSoL0oQKgVf+Bgr9/f/H2lv31C8j4x8AAEEAsIlIi3KzcENUMYPj/zJn/J0/+//Dhf3k5UNFDS0vZnz+BDAYgYmAACCCmfwz/EGYD6StX/s+a9d/N7f/370ABqGqg8UD05w9QKUAAMYHshasGAi2t/0lJ/9eu/8/IBOTJ7t77HqL61y8GsJMAAojx7vu7QhxCf/7+ATn6/z+ITqApIJtB8P//37+YdSwF/vxhVFJ6c+4cQACxKDcopwWk3ft47zcwDP/9/gUMkb/AEPoNIv/+Bvn0/6//Tb/Plv4V/vsX6HiAAGIBGvL7/x9JHkmg9J9/f/+AtQHRn39/QCQwqP//+fvvb9CMvxs7/wKdBBBAjAzZDAzfGBh+gdEfGAOZ/QeMgGo5GHZeZgAIMAC5IE8NnTqEdQAAAABJRU5ErkJggg==')}.ytcenter-flag-england{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGCSURBVHjaYvz48SMDEvj3j+Hfty/npKX/MTAY3L7NwMf3DxUABBALUBEfHx+Q/P//P1QPJ7t6UdG/P3+EpKQY2Nj+I4Fnz54BBBALRBFcNUj4378fDx78+/3739+/QBvhqhkZGf/8+QMQQCxoqiEkUPX/X7+BShiQjAc7+B9AALE8SEmRi4//++ED0Dyg2Qx///77+fPfr1//f/9+PWMGUBVQHCT15w+LkNCF3FyAAGJ5t3q1oJLSr8eP///+8//Pb5BLgMYDyV+/3q1Z8w/MAPrn/69f7AoKzxgYAAKIhcventvIiE1e/t+/vwx/QIYBbfi4dStQKa+LC9QGoIa/f1lFRAT27QMIIMa3b9/y8/PDXQ/ywI8ft1xdgQar7tsHDyWgLNDTd+7cAQggFqA/kL0LkQQ5A4j+/mVE8jEQAEMJIIBAGuCqIaKMDAxsMjJAJzEyMQFNhYlBZQECCKTh1atXyHH56927Q1u2/GJgcLh0iUFICOSEf//+gB0CBAABBgAC4UQezUonUAAAAABJRU5ErkJggg==')}.ytcenter-flag-er{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIfSURBVHjaYjzMyTBHh2GNGcNXOQYGDgaGXzD0B4zQGAwMAAHE+J6Bgae67jszwzPuPzfF/90U+/uM/89f5j9//oLRv9+//4HJv39+//u9adYmgABi+cHAwMbwj+nlMyWJP8qX/9qx/rn94fdZ+T97NX69Y/31m+H3rz+/gOj339+y3LJASwACiAVki+g/1oA//1l////4l5v7t8HLP9qT/voe/HNF8s9J2d8nZH8/4vv1m/H37/+/gRoAAgAxAM7/BP4AAAVH/Pq5+wER/AIn/PaN/Ah0+voY/Qjc+zvu+znP/OsF/M4a/cQh++cw+wD2AAIAMQDO/wQCAAAABv382/0HV/z//vv97fz/9PsAGPv81/z7/foA/foP9fhK6vpHy/vi2gurwQACCGTD/99/WAx//Qfa+e83W/gfBtGff5/9Yfz5gw3o4V+/3jNzHZMwPy9s+V7HjmFbPUAAADEAzv8E/AAA+bf+BTz6/OT8Ahr6Ahz6/qD6A9L78wAI2hQyzhQ20RI15Qob9/8FJQj7AADaAghkw7/rf77v+82m8YuR4fenU0z3/2pdVDc7LWr1lEPqKwMb44+fDL9+sf758Y8PGEJ/AAIAMQDO/wQGAAAE+/n4Eh7e7xvZDivSSzTvBA/7/gEE/P0c/f7+/fj8DAD9/gP9/QL9/v8AAPwCiHEjA8MSBsc1DDH/eS0YfnAw/AZGzA9Y9P7DQAwAAQYAUN0czDhQ58AAAAAASUVORK5CYII=')}.ytcenter-flag-es{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFnSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALAx/Gf4zAt31F4i+ffj3/cN/XrFfzOx//v///f//LzACM/79ZmD8/e8TA0AAMYHdDVT958vXP38nMDB0s3x94/Tj5y+YahhiAKLfQKUAAcQEdtJfoDHMF2L+vPzDmFXLelf551tGFOOhev4A/QgQQExgHwAd8IdFT/Wz6j+GhlpmXSOW/2z///8Eq/sJ18Dw/zdQA0AAMQExxJjjdy9x2/76EfLz4MXdP/i+wsyGkkA3Aw3984cBIIAYfzIwMKel/bt3jwEaLNAwgZIQxp/fDH/+MqqovL14ESCAWICeZvr9h0FSEhSgwBgAygFDEMT+wwAhgQgc4kAEVAwQQIxfUSMSTxxDAECAAQAJWke8v4u1tAAAAABJRU5ErkJggg==')}.ytcenter-flag-et{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHiSURBVHjaYmSIVGT48okBAv79Yfj1h+HfL4Zfvxn+MIDQDwaGX2AEYXAwAAQQC8Ond9WpbSDF//7/+//3779/f/79/fvnF5D88+//n79/fwN5f//8/gdk/N6UOwEggFgYfrAx/GZ88v71338g1b///frL+IeRRer3339fv975/eP3L5Ctv4FAVkQCaC5AALEwKL0WEfj5m+kb0Eig6T9/M/CJFTEzswE5X378eP6o5v//H0CzgZZI8HMziDIABAAxAM7/Af39AAEBdgAA4v///AD//JPMhOz2Ez4dq+DwINTrMhAG53g6YP//+v//+wEBH/LywQKICezZv0A+CDH8/vqLDaxa8c+/f07yS998FwCrBiMGoBgDQACBNADNBiEGkCgj04/t90L+/f8lxXNjy+1ITtb3cA0M/38DNQAEADEAzv8B+wAAAYRq/+XfAPz8//z6+vkAg1GY8QcM+/7/CPPvhJ9UBP/0//v7APz8AR0i7KvOAojlHwMD86M//+/9Zvj9GyjB8utXXXPUdQltYFhq3DnF9Pvb/1+//v8BavjL8P0v0DkAAQTSwPT7D4OkJNiYvwx/fjP9/q39+xXQxf/lpf7/+QM0mwEYMmAEVAwQQIxfgVGGhBhQuWhSQAAQYAAhCj2m2q78nwAAAABJRU5ErkJggg==')}.ytcenter-flag-europeanunion{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYFJREFUeNosUT1LA0EQ3YvHGTEaBSsh+IUpJJjKX2AlCFrZWyQiCJLKIqUIFhaCoETxJwgWdv4DkQQRNERjZSFRwSQGktzOjG/2HO52797Om3lv1lvbKHkmJsJiiDUsMwkTiyWyIuQQSxHI5BuR8emFYDBgcAQoQEtWaWEPBKVZGwLvdlrNzyefhYJ48NNoG8M4M4aIwsxUY2v97fQqVanGiXvgos5QYkKMxJwMrY2GBu1ETnbvHupj20fZSi1xUXwxCNHX8/Q8pjJUKMEDmmRmvneOl1ySeGJyB3PZdEccQyFjYuoGDsVGdnOrz64EuxIWxvLLN1EyAkTfeddsBVlK17P4dgrJJfH57QqOogTjPISwSTbUh/qV15HTwj2H6h5NLov1cjWulQxDMlYQMBUdn7BbyeYPM9l0s7T3uDjf2txPaReUh54BSBIf3bud30Ry1LA6Y2wktY9k4WwSYoeT+CWdoOV+tw2GD/bXezly9W/NSXd3L+7K3ZWqIAbwJ8AAqIB6+GR9QGYAAAAASUVORK5CYII=')}.ytcenter-flag-fam{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGmSURBVHjaYmQ4/J8BDpi+/LW2YWD4xcDw5x/Dr38MP4Dkms/v/wEFWEBCfxgYAAKIBaisUZkBqOk/w/9fTNyMVWX///5j+PuX8fc/5j9/mf78NWX/yMD2599/IPp78EsTQACK5RgJAAgGAuCJwgv8/28KldEZJgmHfveHp6tyA0vA0jAmJdI31Wk+TyfthRSyKq4AAm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AAAElFTkSuQmCC')}.ytcenter-flag-fj{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH0SURBVHjaYjyaW73nl1T9zGv1whe42JjKn8ukS34KCDDx/FTDIPWP4c8/hh9g8t8/hm9ABgNAADEayuZvXRT+R1zqx9Ur/799Y5SQ4hcT2Hb1+0MRQxYOhl8M///8A6O/IHLStC8AAcQy788qxqtqnMf2Mr9//+/7dzZBwe9/GCz//D9ibMDA+/8vWN3vvyAkwc3I8OsfQACxbOEySFTW5Hr/7Puf/4xCohzKCu/uP7/6mR2oAqi6eEsh6/fPIhF/Xsz/zSCjMO1XMUAAMT0zcmPk4Fh5l+Xeb+4H31iXfZRmkld89x+k4f+f//9+/xGN/PP/zy+x2D9ANtAPAAEAMQDO/wQUKii06A3FAib4GRsB/v2+3gPhJSouNfz77//+/f8Ag5AFDv/oV1EVp60AMgIAVfACiJGh8W+3M8OzzxCfMUBcDPTi73//v/3/n72zSvbF1b+fv/xnYX6tZ+dyJBMggFiA/vj7nxEcCAx/wJ77DQ4TkJMY/vPXt4jy/38e6Cm2btuPT4wMh94ABBAL0Mw/f5nBRsI0wEIGGKbVB/97Kf13/v17wcX/Z18yAIMZIIBYgPHym4FJkJfhL8RJ/4HagGxGsPNA3LMvGE7m7fn38v/ffwzA6AMIIEaGzK8gmV9gBIpXBgT3HxIDFNkMQAAQYAAAOEaMu5EPsgAAAABJRU5ErkJggg==')}.ytcenter-flag-fk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIaSURBVHjaYrxfWL2CQ6dyyZvFTBt+MTAlP7FoVLvnYyVlPPcLA8MnBoY/DAw/GBh+gRlAkg0gAAAxAM7/ATszg7WMQfYZHgPW1P7z8/sYGQ0aFrDa+8zN4/r9/fz8/fv7/v79/fr8/vr8/7KdhwIAMQDO/wTC4JL/1BEOwbkA8vMA9vf/EA78/gNR9viz8jHw+QEWPDUABAT0+f359/kE1tEAAPwCiGWFlI2vqhYPD8ffOw//C4sxy0h8evb+Ihvn97f/f/3485edJ9ue9c8/hs4dX37/BLkKIAAAMQDO/wTOSl5JDg2m3h0zDvz9/v/HDTdNK+Lo0e/2+vr6/P34+/26z9MLA/v16QcG/P4AAPoCiIVt17ZFIkGH7/9+x87y+9efnZcunVXmt2b99/fnt98/GdlZmKyU5F9fOcHMJAOUBWoACCCW9vMM+X5Mf35+3/6V58/vf7///rx88dnZP8AQYfr94yfXn/ePju9/9fIF52+eD79BNgAEEAvQH7//AkPgH5D6/efvr9//fv3//xvI+/03L5Th188De78p/2FT0Pu0j81I/NTOPwABBNIADjsw+vPn12+gHhD718+/nav+xds+02d49PvXr69/f209Kwi0ASCAgBq+/f7zX1KMB2g8UCfYVSCrQBb+/bf3Nvf/v7+ARvz5z/L371+gBoAAYmRgiATH6C9U9AMctX9gcQxhAP3AAxBgAL6/P4woX6oKAAAAAElFTkSuQmCC')}.ytcenter-flag-fm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG6SURBVHjaNMbRDQAQFMXQZzSjmcxa0tQNPvTjpK2PWb+kTDAaIrwHF+I1G48AYgGqy/dUBan+z/D///9//////ftfkIf1/z+GFx+/AwX//v0HBH//gcRzJx8BCCAWiNnvv/4GKv0HFP3378fvvyEW0kDNvZtuMjAy/PkLVP0PqE2Qh53h1x+AAGJh+AdyCUjpf5Axv//+Y2RgWHnsMVAEaOXv3yD6D0gHSA9QA0AAsfz5xwCUAKn++19Dmu/f/39XHn548vYbUAFQh74CP9CUU7fegrX8Z/j1CyCAgBqg7gOabashDHTJj59/Lzx4BzTPVlPUXEUQKHLk2iuwPX+BNgAEEAvQ+yBPgXzwf9+VV0Dq6qMPf0Ce+b//yst3X378/gMy8T/IwcBA/AMQQCANf/9DfXb+/vtfQN6//+L87EBFj15/OXztNcgr//5BHAIMdYAAYvr1hwHioT8Qb/37DzQzzk4uwV4OGPwMDKBwA6sGuYLh1z+AAGL5AXLTfz5uVqA3wMH3n+cv84bTz4COEBPg+A8yASQItBek4d8fgABilExeixyRDBD0B4xA7H9QNtCyf0DMABBgAElFl3TcfMhyAAAAAElFTkSuQmCC')}.ytcenter-flag-fo{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFsSURBVHjaYvz8+TMDDPDKvbj9XlWV/eb7F2L//v0DivzDAAABxAIU5eHhAZL///8v7xAVeVlSICTKx8cH5EIEkcGzZ88AAogFYjZE+tHLP3+ePnj48/d/bICRkRFoA0AAscBV/waiv//+/fn76w8DVg0QFwIEADEAzv8EDRzodokU4ur9/Pz+/P3/APv6+/3/RnXr+vv/+/z++vz/+/v++vv++/z/HxgEwZPcAojxJgODaGPxnycP/v8FSv75/weo8BdI1W8Q4x+I8QvCYJVTvLzxKEAAsagzX88XEnvw88+vvyDFCx9FhoovBRoJMvsP1GwIqSTGcorhMkAAsbx/I8HLywtxomvxq/+/fv389e/wJBFMDwA9fS9HASCAWCDhDRECuhvogF+/sfsYCP78+QMQQCAN8CCXEmFm/iEjK8oMNIwBBQC5UD0AAcT48uVLeCzKyj7Yz2DryLD35k0Z5NgFBucfsEOAACDAAHgwX+bAaYh7AAAAAElFTkSuQmCC')}.ytcenter-flag-fr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYiyeepkBBv79+Zfnx/f379+fP38CyT9//jAyMiq5GP77wvDnJ8MfoAIGBoAAYgGqC7STApL///3/9++/pCTv////Qdz/QO4/IMna0vf/z+9/v379//37bUUTQACBNDD8Z/j87fffvyAVX79+/Q8GQDbQeKA9fM+e/Pv18/+vnwzCIkBLAAKQOAY5AIAwCEv4/4PddNUm3ji0QJyxW3rgzE0iLfqDGr2oYuu0l54AYvnz5x9Q6d+/QPQfyAQqAin9B3EOyG1A1UDj//36zfjr1y8GBoAAFI9BDgAwCMIw+P8Ho3GDO6XQ0l4MN8b2kUwYaLszqgKM/KHcDXwBxAJUD3TJ779A8h9Q5D8SAHoARP36+Rfo41+/mcA2AAQQy49ff0Cu//MPpAeI/0FdA1QNYYNVA/3wmwEYVgwMAAHE8uPHH5BqoD1//gJJLADoJKDS378Z//wFhhJAALF8A3rizz8uTmYg788fJkj4QOKREQyYxSWBhjEC/fcXZANAALF8+/anbcHlHz9+ffvx58uPX9KckkCn/gby/wLd8uvHjx96k+cD1UGiGQgAAgwA7q17ZpsMdUQAAAAASUVORK5CYII=')}.ytcenter-flag-ga{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF7SURBVHjaYmRoZkCAfwwMf2AkHP2CITAXIACH8lIDAAgDQfSCN0RVB0Zqb38Uksk7zZqtdr05nhTRksmQowF9TQh9+gogFpB5//8/+foUqPTvv7+///2GkCD0F4R+/f31698vIEOWR5bhBwNAABLHIAUAEIZhbZ3D/3+3ylR2ySmQBBZmVI5vb1o87nwZ6hU/Ek4ZiSuAWP6WMDAy/gWq+P8fqOjPf4bf///D0S8wgjB+MzL+/mTCABBALGDP/gWL/gFr+w1T9BtJNYjBwPjn3z8GgAACaQAqBSGg7f//oKpDIRn//wZqAAggRgb75RNyDJ+//QYKl79/f4MCCIz+gtDvv3/BbKDUP2kRrjmVqwECiIXhlcDn7+wfvjL8hoTi3/9ABjBof4PYYBGg+D+QBh5ODgYGKYAAYmH4BTT3n5gA858/TGBT/0PM/gOJEaDSf8B4AQU5MJYYGH4ABBAjg+x6hm+/GH79A+oEkf//oMYzPNoZwEHMBBBgAJwjaF+mcK9sAAAAAElFTkSuQmCC')}.ytcenter-flag-gb{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAflJREFUeNpinDRzn5qN3uFDt16+YWBg+Pv339+KGN0rbVP+//2rW5tf0Hfy/2+mr99+yKpyOl3Ydt8njEWIn8f9zj639NC7j78eP//8739GVUUhNUNuhl8//ysKeZrJ/v7z10Zb2PTQTIY1XZO2Xmfad+f7XgkXxuUrVB6cjPVXef78JyMjA8PFuwyX7gAZj97+T2e9o3d4BWNp84K1NzubTjAB3fH0+fv6N3qP/ir9bW6ozNQCijB8/8zw/TuQ7r4/ndvN5mZgkpPXiis3Pv34+ZPh5t23//79Rwehof/9/NDEgMrOXHvJcrllgpoRN8PFOwy/fzP8+gUlgZI/f/5xcPj/69e/37//AUX+/mXRkN555gsOG2xt/5hZQMwF4r9///75++f3nz8nr75gSms82jfvQnT6zqvXPjC8e/srJQHo9P9fvwNtAHmG4f8zZ6dDc3bIyM2LTNlsbtfM9OPHH3FhtqUz3eXX9H+cOy9ZMB2o6t/Pn0DHMPz/b+2wXGTvPlPGFxdcD+mZyjP8+8MUE6sa7a/xo6Pykn1s4zdzIZ6///8zMGpKM2pKAB0jqy4UE7/msKat6Jw5mafrsxNtWZ6/fjvNLW29qv25pQd///n+5+/fxDDVbcc//P/zx/36m5Ub9zL8+7t66yEROcHK7q5bldMBAgwADcRBCuVLfoEAAAAASUVORK5CYII=')}.ytcenter-flag-gd{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIPSURBVHjaYvzPgAD/OhkYXjEw9DIwlDP8+8Pwr5fhXyzDPyGGfxMZ/jFAEUAAMf5lYFi0qzpeC6SegfEfw9+//xmAYn/+A3X8/fOf4fd/IPvv73/v/rTd+J2TsAkggFiACl9x/W96/zSU568m29//zL8Z/v39/+83SCnz7///f///++vij18Tv/9m4JEF2gAQQCxMDAz///2/8/Zv28u/jjy/ffn/CrP8+s/4B6T09683P34tefN7xZtfXxl+GzH8BpoOEEAsIJf9/Vsj96fm7p8tb/8c/vg7QPC35zImht+MGyN+LXj569H337/+/frN+vv3P5AGgABiArv9rzTD7+7zjEAzn//8Lb2R4W/k5z8xn6XWMjz88fvX/19ADb/+/vrz9w/QdIAAAvnh978/M+79uaMJFP3Dzfj7mucvndlMDL8Yb8R/5nvx6/kvkJ7fjL///PsN1AAQQCAn/fnzex/Drz8Mf5x4foUJ/pZm/fW/COj131G/ftlw/J758tfy17//AMH/P38YGAACiAWIfzP8keb/Hc/z24wDGDi/gMECDqVf/9l+y7D9buL55Sz2u/nN319v/gJNBwggkA0in/80ikgysf1m+P+X4S/IbMb/QDYw5n6D4o/xjz3nX1uZvwV3/v5iYAAIIMavDIhY/BfPwPCA4d9Bhn+O4Jg+zPBPmeGfBMO/oyBZCAAIMABCwS8h7YoAaQAAAABJRU5ErkJggg==')}.ytcenter-flag-ge{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHkSURBVHjaYnz9+jUDDPz79w9CsslIMvxl+Pb48T8w+PPnD1wKIIBYgJSIiMj/9+/+XjjPpG/AKCj0/z/Dr46O/39+80tK/geC9+//7N/LaGrGICl1584dgABigpj9+/LFd2eO/b54DqiAgeH/32dP/z6BGv/z3OmX+7b/PH4YqAxoE0AAgWwAKmK1dRDg5WHRN4Zwgcb///37Pxiw2DsJsbOxmFkB2UDXAQQQ49fcdNaA4P8fPzEwMf7/9ev/37//v3//c/woUAOTkfF/NnagCAMz079vP5kE+F7U1wAEEMuPyTOZhESADvj/58//338YgAb/+/ufi+v/3z9/Nm/8/+M7UPDfb5CFzHJyXx6/BAggFpboUCYTMwYVVQZGxn8/f4Jt+Pbn1EmgfiY7RwY2tv///jAzMv398ZNJUIht+y6AAAAxAM7/AOXl5fz8/Pv7+/O7t/r6+vn5+fj4+O5ZVO1STfX19fT09PPz8+eTi/Ly8vPz88PDwwKICRLAPzatfb9r27e1KyAe/f8b4enP0ya82bf7U3cT2NP/AAKIBYiBLHYjM/43b9jNrCChzCguwfDrJyMjI5DN4x/K8v07q6cfJOIAAojx/v370IgEQwibTV8faO+XkyeBXIg6CACyAQIMANK2TnMREZBLAAAAAElFTkSuQmCC')}.ytcenter-flag-gf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYiyeepkBBv79+Zfnx/f379+fP38CyT9//jAyMiq5GP77wvDnJ8MfoAIGBoAAYgGqC7STApL///3/9++/pCTv////Qdz/QO4/IMna0vf/z+9/v379//37bUUTQACBNDD8Z/j87fffvyAVX79+/Q8GQDbQeKA9fM+e/Pv18/+vnwzCIkBLAAKQOAY5AIAwCEv4/4PddNUm3ji0QJyxW3rgzE0iLfqDGr2oYuu0l54AYvnz5x9Q6d+/QPQfyAQqAin9B3EOyG1A1UDj//36zfjr1y8GBoAAFI9BDgAwCMIw+P8Ho3GDO6XQ0l4MN8b2kUwYaLszqgKM/KHcDXwBxAJUD3TJ779A8h9Q5D8SAHoARP36+Rfo41+/mcA2AAQQy49ff0Cu//MPpAeI/0FdA1QNYYNVA/3wmwEYVgwMAAHE8uPHH5BqoD1//gJJLADoJKDS378Z//wFhhJAALF8A3rizz8uTmYg788fJkj4QOKREQyYxSWBhjEC/fcXZANAALF8+/anbcHlHz9+ffvx58uPX9KckkCn/gby/wLd8uvHjx96k+cD1UGiGQgAAgwA7q17ZpsMdUQAAAAASUVORK5CYII=')}.ytcenter-flag-gh{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF8SURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALGCz/6OoBkoDzYMoBan+DdHA8Ps3UANAAAri4AQAEIYBYAo+BDfsgjqfCEJTjXiPK/fA7AApJZQC1+boDNI9Wg2J0h9GTDwBBHHSX7DoH7C23xvX/dq08ffPH78Z//9KToKohmj4A/QjQAAxgX0AMv4/A0TiV0TwLznpX7LSP+OjgdyfMA2/GP7/BmoACCAW5jKGrIDf9z/++vPvz++/v379/f3r36/fjr9///1ttPkXkPz1F0QCZZX5/5xtZAAIIBaGPwx//gKVAn30GyINUvHvN4wECgLNAmr4C0QMvxgAAogFiH//+yPJLQk25u8fiE6Qij8g8i8wvP78BYL/f/8CNfxjAAggRoZkBqAeoD0gEo7+IIn8gSFwQgAIMAAY2GJyqiifEgAAAABJRU5ErkJggg==')}.ytcenter-flag-gi{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFhSURBVHjaYnz//j0DDPz79w9CIjPg4M+fP0ASIIBYgBICAgJA8v///xBtYPr/fziFBB48eAAQQEwwRTDV//79/fb1X3v975cv0GyA2AkQQEyoZv//8/zZv6qCr9ev/qvM//vsCZoNQFcBBBATRCtU23+GLx8/AtFePpHP379/+fwJTQNQMUAAQTVABRj+cy2ezfb+rev9axzv3rJVFwPNRCgHOwkggJiQVQPBt9CY979/H//6692vX59qWv8zMSHUg20ACCCWfxAzIPYwMHCpqTPNWqqxP07Adt5fdna4UyDhAVQMEECMP0VZmes7/r14ygDUCUTfv///+uWj+3PuzayM/3j+s7D8//MbKM7w7y+jhPTbaQsAAojl3+vfTNevMvz9/f/3b4Y/fxn+/P4ewMHMKsn47S3jrw9AUxh+g1SDpJ49B1oEEECMX4FeQUJA8IeB4Q0DgxCq+D9YagAIMACTvVKMKze5rAAAAABJRU5ErkJggg==')}.ytcenter-flag-gl{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFoSURBVHjaYvz48SMDEvj3D0zAKQwAEEAsQAk+Pj4g+f//f5CO9+////jBICT0n5UVIogMnj17BhBALBCDQaq/fGFYuPD/6dMM37//B2qIjv5vYYGsmpGR8c+fPwABxARVDUQLFvw/eJDh8+f/3779f/Dgf0vr/6tX0WwAOgkggJigbn/27P+hQwy///z/9ev/798g8uvX/8uWYWoACCDGv6mpjCEh/z98+P/nD9Cb//8C0Z//f/+ioz9/GAUFP1ZWAgQQC8Ps2f+5uIB6//f3MfxH9eX+/f/z8qAW/v7NqKT07/17gABiAoYfSOjePYYjR1FUAwUXLYKrZvjzB2jJHwYGgABiAWpgBnJ+/mSYOBFkj7Hxf2bm/y9e/J806f+xY1ANf4Aa/jL8/Qv0LEAAgTQw/f7DICkJMmbadAYxUQY2NsZHjxg+fGCQlwcaDEJ//0IQUDFAADF+BcYoEmJA5aJJAQFAgAEAGIpbSsjEg+QAAAAASUVORK5CYII=')}.ytcenter-flag-gm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF/SURBVHjaYjzOwPCHAQH+wbh/YOx/MAZEHCAAh+J2AgAIw0A/XMQ5u1WHcKk8ahDCHQfZ0an6X08mLcrikCYXEBpIDnC7nwBiAWv7/+vJU5DSv3+Bcv/+/gXKgRQByV9Axq//v34BuWyyskDTAQKIReP5c2FRUYb///4DAUgvBMAZ/yBMoDQjI+PPK1cBAohRPP1vUyjjq48MfyHO+ff/z18oAtn0B8T4DeaKCzBOrPgEEEAsL28xvH/H8OYdRIIBpPQPSAVQ6W8Y4w+YzfCTkeH1P4AAYuGUYuDh+c/7G2Iq2IY/UCOBDCD3N4Tx9z8/338G5n8AAcR4/+l9aXHpf8DwgbkaBfwDQYb/IMjExHTm/BmAAGJkyGdIC0i79+ne77+/gejX319ABGGASaDgL2C4/vn3V0VA5WLrRYAAYgHGB9A5ktySQGmg6J+/4BAFqfgDIv+CnQMEwCD495fhFwNAADEypDMw/GAAskAx+QsJ/YGJ/IEhYIQzMQAEGADd/mwRRbEhzAAAAABJRU5ErkJggg==')}.ytcenter-flag-gn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFySURBVHjaYvzPgAD/gPg1A4MQmP0PhN58Y5AuY2D4BUZ/QAgggFhAktXVQOL/v3+MQCVcf/8z/AXKMDL+YWb+w8vxOybsz59/v3//+/P77+9NUzcBBBBYA8P//0+eMvz9C0T///5mYPj7//9vCPr77/ftD79+/fsFVC3LIwu0ByCAWMBm/4eq/g1R/ev//z9gDUDGr19/f//6C9IAREANAAHEAnQ3I1D1nz////xh+P0HbjZEw79/SBr+gTQABBDYSX9AZiNp+AXXACSBqiEa/vz9A9QAEEBgJ/0FGQ+UAmn4B9cAJaE2/APb8IcBIIDATgIa/+sXyFW/fqHZ8O8/1D1//v35++8PUANAAIE0MIOM/80A1PYb6lFkbUANwGD98+8vEAGdBBBAIA1Mv/8wSEqC9Pz5C+QwMPxmZPwNjqffzEx/lPj//P0LCu+/QA3/GAACiPErOILhiOEqwz8xaDQD0bNvDKYB0DgGSTMxAAQYADMZZ4UhPZkQAAAAAElFTkSuQmCC')}.ytcenter-flag-gp{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF6SURBVHjaYpR9y/CBAQr+/GP4xcDw9x+Y8w+G/iCx/zEABOBQjFEAAIEYVjhHf66u/tNV2quHEEKGtNtjxqrBcCITUtmkKYuWqvExx9lPADF+vX+eS8Hg////EEsgjP/YACMj47MTmwACiPE/P8P/liaGD88YPv35zwg06DfYdCD6/f83kP0LwvjH8IdRQvrDlA0AAcT0h43hvxITQxrHX2GQS/6CvPAXyAAhoKf+//33D0j+/vcbqBMowgAQQEwMXxgYLVj+C/5n9GP7/wNiAwz9hjL+/YawQRoAAojlHxMD493vDJK//t//zvD35///f6DqIO4BOgbMZvgL1snAABBALExfGRj2/Pj/5D3D/98g5/z+ywB0F5QEcv8xAgX//P/37zfjn7/AEAYIIJYPN48KKpsDBXAFDjSIgNKMjO9ClwIEECPDR4YW9orfIO/+Boc9NIz+wKLiHygG/gL9DmSsfLYTIIAYGR6ixyVK7P6BxTqEwcQAEGAA+TdZT+lFveAAAAAASUVORK5CYII=')}.ytcenter-flag-gq{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVHjaYhTuvP+WQZEBAv4xMPyBkcjoF4xkYQAIIBYmBpl+x5dvGCb9+/8PiP7+//vn39+///78+f/nD5D89/v3XzD578/vv783zdwEEEAsQF3czHwXPjz5CwT//v7+/xtIA0mgNAT9+vsLiIAMWV5Zhm8MAAHE8ucfAyMDu5PwvAidPwz/QRAImL4d/A+0jdMeSP6HCP3/z8jI+Nb8LUAAMf1h+PfvH8Oj94w/frGwMELR9MuXJ104z8zAzMzAAiahiIOJAyCAmH79Yfjxl+Hv///TT8PN+q/LaKzPYPIfDTCAzAYIIKY/fxi+//7/5+//RDOo+JMXLzhYuNmYOB8+fYaiHui+f/8AAogFGCjsTIwCfP8EGf7++w0SlRISYv737++/f2LCwsDgAQUeMMSBqpmYfn35BBBALAxM/5h+/vKYkvbk86e/f/7++/ULqIgBaO+fP/d//gSFJ1DPn99AA9gVFY8dOgQQQCwMX/7wPr/LIib2T1iYGagBqOIvSDWQwfT3739wfIAsAZJ//zIxMAAEEAvDuxf60QY3MaIYHunIDGCsAQQYAKWpQyaRNWG5AAAAAElFTkSuQmCC')}.ytcenter-flag-gr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF5SURBVHjaYuS1P8rAwHBimgCQNMl4x/CP8fuvvwy//oHRHyj5A4jAIv//AAQQC1Cdk4mAlpbW////XUyvM/z/v6ZT4/9/hv9ACRAFwSDw7z/Dg0fPAAKI8dGjR7KysiBxMAAyjp5/D5T7B1TxD6zuH5TNycF0eNcTgABigSiCqwaSF25///vv35+////+BZF//vz/A+T//S8kwFI/5QpAADGyWx92Mxfa2KMJVO2UdQVo0rYJWlBXMECdArGJiYnp1q1HAAHE8ucXzI0QN/z775Zz5R/EJf/+QxFI+D8PJ8uFQ3cBAojxxYs3IiICSAYiM/7BMdC9QBvu3XsIEEAs6w99sdBl/vbz33+YSf8hZsMcA1QMYXBxMB/Z9QUggFgOnnmhJMP74cuvv0Bf/gN5FM74B+ECPfwPJCLEy9q56SZAADHevP9RVIgd5A5I8IGdwwD1KMKFDCC/MJw6ewsggBgZxDdDI/LnPwaGPxjoHxj9AQc7iAQIMADrG2tQp2zGfgAAAABJRU5ErkJggg==')}.ytcenter-flag-gs{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIISURBVHjaYv5ZWcjvWb17H8N0QcYoScV1H5zymf8fm5HdtIWZgYGPgUGIgYGfgYGLgYGDgQEowggQQIwMDLX/T7n/MrV+uGUfw4f3gtrqQvoqVcuefDlx8tevv39+//39B0L++/3776ZNuQABADEAzv8B/xsA5WJ+DfLp+fb4/fT6CREJ8/j/GQfvVOA98vn/+/r6+/0A+/r8+fn4HR0Vt7dxAgAxAM7/BGDyP4lNUg3y3PS+zQIoEw08LOi3za7+E/jb8/r6+kpKL2JiOAsLCNfX5rS00be3AAKIia2qQ0yUseYwxzsh2Y/fGWrfWihHOf76y/z99x+ghrg4C2aW/6XlS8XF+by89BgYGAACADEAzv8EMqiId+tQ3uH8uBH3//z8zMKMVCEzeSoF+/j4+/sDDw8IqMXE8STFtLUBVFNUAAAAAgAxAM7/BGnR6m9ACfz87L7mBfz7Avv7AvXU1G3O/vr6APv79+vs8jgW6hr9JRUOBdzc6QAAAAKIiYEB5H1wgPz5/QvoSaD/GH79AgoCnfR75oxDAiKOlpbZ3/+Zrl59GqgBIIBYGBh+/QEHGVAFWBFQM4QBJBkWLjq6ePFpIPfbt68qKpJADQABBNTwDciXlOQHkn+AQf7nL1gzhAEU+Qdk/P377+9fXiAJ1AAQQMCI02Zg+AC0h4HhBxj9ZsALAAIMAOL4JCkHTxzeAAAAAElFTkSuQmCC')}.ytcenter-flag-gt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF/SURBVHjaYmRO///3BwMI/GNg+Pbv8ZQPHCz/gAAk8O/fp2//1CMEGP78A6Ef/xg4GAACiOXvF4b2GJD6v//+//7DKC4iyMwE5P0HAiDF9/t/Rt7/f//+//n7/8+//4sqvwAEEAsDC0j1849AIYYffxj+/f/PDFEOBkBFd1+BNPz++19akBFoD0AAsQBdAjLgH9AGBqAxQHP/o4Jff8A2gCxhALoKIIBYgJr+/mMEcv6ChdBU///3/xfQFLB7fgM1/GIACCCgBoa//xn+/v3/G+QHDA3/gYJQPwB9CDQVIIDAGqAGgMxAt+AfyEn/IU76BwyGfwABBHLSn/+MINV/GICGYbUB5Pu/IHMZGP4ABBALw69/f/4wA0WBGkDORQMMIBsYQMHFAPI0AwNAALEAI+v3PyYxPgagJT9+MTAygkQZIRQDAzMjg7wIMJgZgW4DWcDwDyCAGBlcvzK8+we0B6gTiE5ve8XDwfDnz59/YPDm0x9XezFwKvgHMQIgwADVAHPN4MLU2gAAAABJRU5ErkJggg==')}.ytcenter-flag-gu{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGPSURBVHjaYvzLyYAA/xj+/WL49x/ChJL/UNkAAcQCZE2fD1Ly79//v0AN/xjA5P8/f0Dcv3/+//n7/zdQCsyoreAECCAWiNEv34Kl/wJV///791/gu6WsTP/ns0T++sv4+8//30A9f/5LCDP+YWAACCAmkNl/oar/AA3+y2D9reWe43uecMvEh70g1UD0G0QCbQA6CSCAmICO/vufAagOyP/7hwHoErM3n/7/+/Xw/TkZtse/fv8DqQYjoBRQA0AAsTD8BbsEaADI3UBt/5gZ/9hJ+v7/95/p364/f/7+/sMEddVfRqAGgABi+Qd2EpAPtAGs4f+Xz/97JgtryB/w+PL/NzvDL6BZv6H+BioGCCAmIP79D6Ya5FyGr19/Sgke8LWcefqTzK/fjL/BqoGyf4FqGBgAAgjkaZB3wZ4DGfbnf7vMBM8H25hXMa6UKoJ6GiwO1ABUDBBAICcBjRcRBOkBex3oH6YFgtOBisT/MACdCg5rRqBqoHqgYoAAYvyMEal/kNgQqT8MiLgHCDAA45ZI5qLSc2QAAAAASUVORK5CYII=')}.ytcenter-flag-gw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGWSURBVHjaYvzPgAD/GBi+nWRgYGL494fh3z+wCJgBIsGMP38YAAKIBSRcXQ0k/v/7x/jvH7fO3/8cfxkY/vz//wdM/gYy4OSLbZsAAgisgeH//ydPGf7+BaL/f38zMPwFq4CjX2D0m5FRFmgPQACxgM3+///vX0ag6t+/Gf7/BUv/QVYKIRkYfgM1AAQQE9Cp3//+Lfrz597v3/9///nP8AtJKRr6DfQDQACBbJjx5++b37+7/vyZ+vvPmvu/v3H8+vv7999/QPTrz7/f//79+vsfxBBk/1P5jgEggEAaMv/+yf/zJ+/3L4bff5bc+P2B7devP79//fv1++/vX39h5L/fSny/389jAA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F9C/UmP4HJnkYAAIMAO8HNiEGagofAAAAAElFTkSuQmCC')}.ytcenter-flag-hk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGhSURBVHjaYnzLwPCPAQr+wUhk9Acs+AfMZmJgAAggFiCLp7oarPDffyD6+5fhz9//f/8w/P37//dvEPrzB04+3rQJIIBYmEBq//978hSoFKQaKPf3L4+V9X9urk9r1vz7BdTz6/+vX0DVTLKyQKUAAQRW/+8/VPXfv0xAwMz8Pznpv7o6h7AwIxPDv1+/IAioB+gcgABiAboMpPrPH4Y/fxgZGTlrav6/f////oP/HJzMkyZxP3/+NSvr15cvEOcBFQMEEAvIQX9AzgVq+Pf77/+bN/87Of3ftPk/J+f/f3//797979s3oPEMYG8ANQAEEMQGkPEgt/7+83HaNF6giJERKAC4OD+vW/f782eoH8BOAgggJlBQAnWDhP4ATWLj5/+vpwfiHjwAtISVhweiGmQ82AaAAALZADb+9z+wK3++fMlYUfHj4cNfnz/zHTny5fFjoAaGP7///fnL9PcvUDFAAIHi4d/vP4ySkkwgY4C+//0DqFlUlFlQ8MurVyxyciC//QWpBoYNUDFAADE+ZGD4hRqvyIw/qHHPxsAAEGAA8os95q2GYrQAAAAASUVORK5CYII=')}.ytcenter-flag-hm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIzSURBVHjaYjxe3nyAQ6Vyx7veD+tY/v3L/+dWKvXIyUTOc9Ybhq8fGBj+AJFnssv2uZsYGN4xMPwCCAAxAM7/AUtNjZ95PPsXHfjPzf/49wEfIhAVELzd+MzU5v38/vf6+1tNLQQEAd7j77fB3KOMjwIAMQDO/wHNCQkZhYYD7Or78vL++fkFDAv5/gH29/qJCD3w/AH6+PodGQ9GOyGJm8UgHRGrko8CiOmQjg+Ttj6HluZfYVEGWQUuM7Pfsop3ZfR+/Pnv56jCwMBw4/5roOrKdBsJYW4Ghm8AAcT0ISSJQVh4wz+F5zziL1gF1gmZMevofuQTcbZTlRXnLUyy+P7jd4SXFisLo6uVIgPDD4AAADEAzv8DLAEa6w0YwN/4+/b43/UCuNbx2/QDEP73rcbkJSIUq7fV6ev07O/3EQ8IqLXU3NDDAgAxAM7/A8veKS1ELvXw9N77Cd76BwT8+ujr9M/o+/3//8bN4+nt9P///1dLK6Cu0QkIBd7RvgKICRRwf/79/vMvyF6pNsX81++/f/7+Y/j39/evP//+/fv/9//Pn3965hz7+Onbv79/gYoBAgio4devP0Dj/psbSMtJ8gW4afz89fvX7z9g9BcYrNISfOWpVj9///379z9QA0AAsQA1AE0S4ufceeSuvprowZMPZCX4fv4Eyv778+f/9x+/ihLNtZTFfv76u2bnNaCnAQKIkYHBFxydP4A6kdAfZK6qY9nt/U0MDP+AoQwQYAAK+BukFnf4xAAAAABJRU5ErkJggg==')}.ytcenter-flag-hn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVHjaYmSQX8rw6Q8DBPz5x/DrD4j8+w/IwYYYAAKIheHdr8YuWyDr3z+Gf////f0LVPzv75//f/7+/wMi/4HQn3+//wAZ/1f2LgYIIBaGX/9+/f735OXPv39BqmHS/3+DFQHRL6CCP39///onK8nJwPADIIBY2icYeDpKfPvx9////3//AfH/fwz///8DsUHo9/+/QLuBVv/7x83J8ueLHUAAMTx//vwfGPz9+/fzl9/TV9z//fv3z5+/fvz8+ePHj/bZN1+9/fz169cvX74AyePHjwMEEBPEt//BgJ2NIdBZHMhYu+fFqu0vgIwYLwlONkaI7H+QP/8BBBATyD4o///PX//mrH0MZAY5i4W6iwEZ8zY8/fHzL0weGAx/AAKIsXnySS9n9a/f/oBc9Q8oBAxQkOvBrgSFElAl2Mn/ublY2iftAgggRgaG3rR6t3tPvv7+DQyTv7/+/P/16+/v3yAGUARM/gEH3X8VOe6LG/oBAogFGB3MLAyKMpygkAah/xAGOOBBYf8XbA9QHBh0QN8CBBDQhmoGBg5YRP7CxoDEOoTkAAgwANm9dMMXfgHiAAAAAElFTkSuQmCC')}.ytcenter-flag-hr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGeSURBVHjaYvzPgAD/UNlYEUAAsYAkq6uBxP9//xiBFBPT/3////398//vP6bfv5h+//7/589/GPll5UqAAAJrYPj//8lThr9/gQgoWhra80f+/587//8o/Jtckfj/96//v34BxRllZYE2AAQQE9js/3DVv//+7VqU3cvxccLclMkcH37//glS/QuqB6gBIICAyv7+AwMg4++fv9+/f/994cIvR8efZ878MDP79OnTt2/fvn79+uXLFyD5/PlzgACCagApBgOg9C8HB4jq7ydOfPj4EaL68+fPQB1Pnz4FCCCQBojq33+ADvoNlAapNjUFqv6mpfX+/XuIaqBVQMbjx48BAoiRIfxwe7zS0w8/f//9/+fvv99//31+fGPZ+jqgi3286tkkNYAif/79+/P3v6wg+4qsAwABxMLw6w+Q/xukFKqBWUw1KmUZkMEK5v7+8+/Pf6AUMJyBcfYPIICAGoAG/BfhYQWqBnoHGBBAEiQNYoPIv2DV/4AkWANAADEyuO5k+POP4ccfoFVAzSDyB4wBRH/A7L/wiGYACDAAOJ12JTMlJgUAAAAASUVORK5CYII=')}.ytcenter-flag-ht{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAA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6W3AOIIBYGH4AA/APSMUfqKJff35BVYNIoOCvPyANf//8/wt0DkAAsTD8YgAGsiSPJDBQ/gDN+QfSBmb/AYYLUAAYHX//gAPxL0gDQAAxMlgzAPWA0A8MBhD9Z0ADAAEGACLkbQYCfrxnAAAAAElFTkSuQmCC')}.ytcenter-flag-id{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFASURBVHjaYrwvyMzw6S8DGPwD0//ACAj+wNj/kNgAAcTC8P6vUF87UPr/v38M//79//v3/18g+Yfh35//v//++/vn/x8g+v3/N4hxe9YigABiYWAGG/biOQNI6V+wNBj9/f0PqOj3738g1b////rFLCUNtAEggFgY/jIAjYSo/gdWygBU8ec3iP37z7/fv0DsXyARxj9AOQaAAGIBOe7b179fPv3/85cBah5Q6a9/v8HafoOM//frF1CckYf3FwMDQACxCOSmctjY//34EeSef2AEchiY8QfsB4jlf/8yCwiKnT8LEECMf/+CguY/EDCAIW7AxMT0/v17gABi+ffvHyMjI0g9Az7VEFmgLwACiAmoAb9SNG0AAQSyAWgXRA8DDADtZEABQC5IFqgYIIBAGn78+PEPAhjAEAeAaAUIMAD/YnbumkL3sQAAAABJRU5ErkJggg==')}.ytcenter-flag-ie{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVHjaYmSYyMDwgwEE/jEw/GF4mvKUiYEJxIOAPz9EnFT//WP49wuMOBgAAoiF4QtDtWs1VMX/f+Ki4oyMQA3/gQAo+P/fn/8VMf///wYx/v7+krsJIIBYGFhA4k++Pv377y8QfPnzhZeV9z8cfP/8/+Xt//9//f/9m1FYFugIgABiAboEaDJQ9R8g+vv7Pyb48+v/319ASxj+/gZqAAggkPl/Gf7++f/nzz8QwlD+7//vX///ARFIA1AxQACxAD0KNPv3399//mLVALYB6KQ/vxmA8gwMAAEE0vAXbPavf7+AejAs+AdyD9hJjGAnAQQQSMNvoK1/Qap///0FDCh0PUAnMfwGuRroBAYGgAACOwmk9DcEYfHDH7CGf39BiIEBIIBYgLH2+98fSW5JkDf+/GUCRQIDIyMjAwQwsTCIKYHDBaQB6CSAAGJkKGVg+ASKY1B8/2DYXrJdiksKFMVAfwHJNw9kvMP/gZMBBAAEGABKw3KpDBKvGgAAAABJRU5ErkJggg==')}.ytcenter-flag-il{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFBSURBVHjaYnz58iUDEvgHBnAGEPz58wfIBZIQLkAAMbK7v5yUJwYU+vsfCBj+/gMqBZL///79D2T/+fv/D5D9B8j+/+fP/+70GwABxAi0QUxMDKQWDCCM/9gAIyPjtWvXAAKIBa4IWXXfkv///v8vjELRAHEnQACxQFwMVf2fYf7W/zce/+dn/S/B9D9v4n81mf+ZAQgNQJ8ABBATXDVY7H+A9f8/v//nhP338/v/+/f/GGcUK4CmAwQQExDDVQPByv3/f//5v2HD/96l/3///T93G5L6/0B//wEIIBa4Bog9KX4gduec/1ys/2cUg8IKWRaoGCCAoH5AC5zSJHjIIDRAPA0QQCzyLv9aGoGBzQAMbCAJjKU/fxn+/mUEkiDBv6CYAXKB8fDvP8OKmn8AAcR4+/Zt5IjEZCADoEqAAAMAKQh5Em/pfi4AAAAASUVORK5CYII=')}.ytcenter-flag-in{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGJSURBVHjaYvy/nwEO/kEwGP37w/DvHxj9gSEwGyAAhXJwAAAEQzG0xSqmtJUZjOTW+sEll5f2xz5eMDkyDnaeOFmVxQIlCkiIveYVQGANDED2U6BShn9/gSyQHpCK3zDyFxj9ZmSXBdoAEEAs/8RMGTm1GFjE/v//9x+o5//fO6+FztyR+/vvr5HCbVWRpyCz//359/8PI4voP6ntAAHE+PvvXyZGxv//gbb8h9i2bPu9n5++6msIn7vzOcFPCWgM0CggCVT2/uMngABiYgI7nwGsA4K+fv2pLM21a//tz19//ger/g+RAgXJP4AAYoKYCkKMYH3//+spCx6/+vEPG5ehigDYWmT0DyCAGBmKGToCOp5+fPrn358/f3///vvn97/ff4Dk399AERD59w8I/fsjwy+zvHE5QACxMPxhgAjB1SGU/vsD1/nn319gMDD8YgAIIBYgBvJFuEUgxkBJMAKqAII///+AqP9gDf8YAAKIkSGZAagHaA+IhKM/SCJ/YAiUEBgAAgwA+jxNFkS1oCwAAAAASUVORK5CYII=')}.ytcenter-flag-io{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIkSURBVHjaYrxe27vjh1zhlGcLFY6wMf2LvKrXbP5hzwepgzd/MDD8YWD4wsDwi0FzEcP1GDD3F0AAADEAzv8BW0eZmpdJAhQV++Tl9+DiBSUkBxALqLfmHx4OGBUK5ezl4PqvEQod8fD7JhBD6Ob1AgAxAM7/BJoYxgPWGwb28wT19Qn5+gHu4/n9/wbhEavMC/z8/vz9/Rs+5Nz84Pz5Aer32XtV5wKIZcs7ER9VTQYuln937v1+8IhTXx8o9/7ZW2cHSVlp3u0Pqn///wZ0DAsDOz+78MLF0QABADEAzv8E8EJQ+Pv+w8jtIvz5BAgV0+MNMQ3v8ff9zLfg+/z+/f5SGT2rPNH3wS76z7ounZOAAohJ5sOdd/+5NEyV2dRVHv/kEOZn/SOjyMXD7uosm5mso+Cy1Fw0/f/PX8oMmXK2W2bOrQIIIEYGhs7OPuenzz+DXPzn/58/f3///vcbTILZf1s4FimWfr1RyjxJJmf5gokAAQAxAM7/BGdvMk1KIN7g8QgIAyAdDsvO6BQVCRwXCsbL5yAeDeHi8w8rLN92yCSRCF7mKDo3fAKIZebEI1KSvE+efgYaBrLhN8hUoOvBXJBVIjGvbNq/v//CPHvelXXLuwECADEAzv8BXWWzdm836Ov1CAcDGxoM0dPrExMJGBUIzdHqHBoM5ujzCggF/b1+7S93FxYL29vjAgjoh1JIFMJIIPqHwf0DRkAGA0CAAQBqCxJTXIqE2wAAAABJRU5ErkJggg==')}.ytcenter-flag-iq{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABCAojm4AQAEgSB4D1sg1qB/aqc2ETgl2e9kB1S5NmSCYDiymMEk43aN48/pByJl9gQAMQDO/wD9/f3+/v75/vy04bf8/P34/Pz2+/rB5cTD5sX1+Pjt9/Lu9vGc057y9PT19fXn5+cCCOIkhl2Pdtz4cPPLz09iXNJiHEInXhxnYWJmZ+T4/PPzpbeX7ny6/f/f/0iVCKDRAAHEAvbBf08Zj19/f1lJWgIt5GXjMREz+v+fQYFPFihlJKK/7PbycMVQoDqgBoAADMUxEQAwCAPAiwpkoA0TmG13hhBaln+4e0Tcc/FAstXraLg31VoxKJaZZeYXQCwXL148duzYvXv3foPBLzCAMEAkmPXnz2+g91RUVIDOAQggkJOARklKSoKMB5r/B6IRyP4DIYHgLwwAFQMEEMkIIMAACzQ/i2EkNPcAAAAASUVORK5CYII=')}.ytcenter-flag-ir{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGSSURBVHjaYmSYyMDwgwEK/jEw/IGRyOgXjGRhAAggFoYvDNWu1SDFQMDw7++/v3/+/f37/8+ffxD0+/ffP3/+g8jff39vmrEJIIBYgJoYGRiffH367/9fuKI////++vv7z9/fv/79Aqr79RdI/pLllWNgYgAIADEAzv8Et1q3EgYSEAYQ5PXkGgoa4fPhHAsd3/PfHAob4PXiHQkb3vLeHgse2/HbKhEq9Fb0Aojx79+/jIyMQCf9//+fAQz/f//5//Ch///+/7e2/s/B9h8GgMo+ffoEEEBMEN9CxSD0imX/37z+z8byf9GC/8gA7E+AAGJCVw0EMTH/nz79f+LE/8REFPX//wM1AAQQcy07O4OKyv8zZxh+/vp/8eL/nz9BpJ7+fxYWoDxIG1DkxAmG798Zrlz5smsHQAAx/mRgYM7M/HfvHsOvX8DQAyE4A4nNAPSqsvLbc+cAAogFGEtMP34yiImBRP/8Zfjzm+H3b0YQ+w8DhASiv39B6NcvoGKAAGL8Co5ZOGJA5aJJAQFAgAEA8eJIJDc4COoAAAAASUVORK5CYII=')}.ytcenter-flag-is{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGmSURBVHjaYmTQn8kAA3/PpdxjZlb6+5dZYRLDrz8g9ANM/v3DwPCLgQFEAgRgUI5tAICgIID6iRFsIzEXolHaQmFLd/dpXvXif6vlr+RmlnoLwcYshEMOCHSKF7rUrucJIBaw0f+fv/3x998/IOvPo0dA7uOXX3//+Q9U8efP318gpX+BOqWEOYHyAAHEAjT5318GoOq/f/+DwJ/fQAKo6A9IA9hgsJ6/QD1//wOdBBBAjEAW0CUgW/7/Z/jP8CY8RGjFqv/YAFDZp0+fAAKI8TYDg0hF+Z/Hj/+DzPz97/dvht+/wYxf/3+BuP9+/foPtOjPL1Z5hUt79wEEEMgGiPEg84E2+HoLbdyM1QYmJqb3798DBBALs8yEqmaHx6+Avvy7qML63y+QH3yq9gG5YA+AENALQE/Li3Pv7J0GEEAswJD+8/cfRBqoFOSA///BHoVoALr0L0TDH5BT/gAEEAvDL6DUPzFBzj9gARYpKSApJcIFNgUUdKDwAYUhw9//wHD/BxBAjAzM9fCIfPu+5oqgsNbr16KiRWCRf7AI/gcjGQACDABaQWaUFWPKrAAAAABJRU5ErkJggg==')}.ytcenter-flag-it{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYmSYyMDwgwEE/jEw/GF4mvT0HyqQUlX9B5aEIIAAYmH4wlDtWg1SDwT//0lKSv7/D+T9/w+nYmL+//79/88fIPll0yaAAGJhYAGJP/n69O+/v0CAUAcHt2////ULqJpRVhZoA0AAsQCtAZoMVP0HiP7+RlcNBEDVYA0Mv38DNQAEEMj8vwx//wCt/AdC/zEBkgagYoAAYgF6FGj277+///wlpAEoz8AAEEAgDX/BZv/69wuoB48GRrCTAAKICajh9//fv/6CVP/++wu7BrDxQFf/YWAACCCwk0BKf0MQdg1/gBqAPv0L9ANAALEAY+33vz+S3JIgb/z5C45CBkZGRgY4UFICKQUjoJMAAoiRoZSB4RMojkHx/YPhbNVZoM3AOISQQPUK9vaQOIYAgAADAC5Wd4RRwnKfAAAAAElFTkSuQmCC')}.ytcenter-flag-jm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIPSURBVHjaYvx/nuHZF4agGwwnXzGAwD8w+oOEfjEw/GBgEGO4qMcgw8UAEAAxAM7/AVU7AKKkewgLAMnv/rrw/vL8/fwA/f3+/Pz//Pz+/Pz7+wkC/E0P+0ET/Pbw+yUxsgIAMQDO/wSrxQA9rv9EMuU2J/0eAv2f6PvM8/37//v7/vv7+/suCvtrFPocDfrNyPukvB3tAAACADEAzv8DAAAAMDM8ucPw+vf9NCD7PRP9A/760/X8/v77WxP6cBz6Dfv7m6f6gpr7+f0N3t7eAogFqOHv378/fv5ZvfvP2at/Yr1/Byr+1mT9/ffvbw2uX1eu/upb/Pv0lV9A24R+/wYqBgggJiD+8+fvbzC4eud37dTf9x/9UuP9pcH36/7DX7ntINUQ8OcPMAQYAAKICWwDkP3n1+9f0mK/KhJ+yUv+uvPh1633P+WlfrXm/FSRhmr4DbYBIIBATgKygOp9rP/Eev1i5/299umvac9///r3O1XkV6TR78VKv/oW/Z6xFhh8IBsAAgAxAM7/AwAAAEZCMWJL7U1H++77+4Xf+qLq+vT9+/T9+r/v+9Ty+zMP+kk6+y4f/NvmEdrd6QKIUZOf4eiRJB6B38fe/F7+6u9LoM3gMAVGAoj8/UeQ+U+iyF93sb/vX/2Vd7oCEECMX/cyPPvEYHSO4fMd1Nj9BWP/AJMKDNstGNT4GAACDAC8xj4Wc3ch8QAAAABJRU5ErkJggg==')}.ytcenter-flag-jo{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFrSURBVHjaYpjNQBoACCDG/wwMb6qrdzIwXP0HAn///v3zB0xAwO/fv2EkkNi0aRNAALEANYkw/I968nTf37/L//79+Ps3UPlvOPgFgkAAZMrKygIVAwQQSMP/f/8Z/v51+vtX8fdvBQ/v/wmx/7EBRkbGhw8fAgQQ0z+gjr9/GYyM/v/7p/D7z/+d2/4vWvQfBwC6GSCAmEAeUVH5n5//39Ly/+/f/z9+BGno68einIEB6B2AAAI76erV/xMm/D94kOH3r///Wf77Bf7PSsfiJJAWBoAAAjkJZPCePQzfvz/k+fXfywOrapC5YCcBBBALUAPznz9APbtVf0/wYPv9d/2vLSt/A8Pp7+9ff3/9/vfnzz8Q+8+/v8r8SkdbjgIEEEjDe7Y/a8IlzymzSgKD/98fkOp/QBXA+Pjz9/8foB5gQP/9//fvv78MfxgAAoixk4GhPJCBQYiB4RcM/UFi/IEx/oFJBgaAAAMAuIZbuTVBebcAAAAASUVORK5CYII=')}.ytcenter-flag-jp{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYvz69SsDEvj37x+ERGbAwZ9//wACiAUoysXFBST///8P0QOm//+HU0jgxYsXAAHEAlP0H8HYt+//4SP/f//6b2b238sLrpqRkRFoCUAAsaCrXrv2/8KF///8+f/r9//Dh/8/ffI/OQWiAeJCgABigrseJPT27f/Vq////v3/1y8oWrzk/+PHcEv+/PkDEEBMEM/B3fj/40eo0t9g8suX/w8f/odZAVQMEEAsQAzj/2cQFf3PxARWCrYEaBXQLCkpqB/+/wcqBgggJrjxQPX/hYX/+/v///kLqhpIBgf/l5ODhxiQBAggFriToDoTEv5zcf3ftQuk2s7uf0wM3MdAAPQDQAAxvn37lo+PDy4KZUDcycj4/z9CBojv3r0LEEAgG969eweLSBDEBSCWAAQYACaTbJ/kuok9AAAAAElFTkSuQmCC')}.ytcenter-flag-ke{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHLSURBVHjaYmAgEQAEoDkMTAAAYRiGd/erXefYMi2CgQSyrCR3PkBVtYEDO7PfOxFxBRATWNv/J0+ePH78+BEQPH8eFR0t9vGj+Lv3iUlJdx8/vn379s1bt27evAnUAFQKEECMV0+eVNLV/f/v338Y+Pbq1b8lSxj+/PkXFcUlJgaV+PePiYX5yKbNAAHE+JKBgbe2/u+TZ////Pn/5zdQXf2Pr/mMLKx//9Z9fNf689+/Hz////oFdBuLvNytvTsAAlAsBzkAQDAQADdC4v/PlDiRYtuqmPtkAapsH/MHarrWdXmpod5kOSMOLzWM2IfAE4DhOUYCAASBGHhBx8r/v9NaBKRLt5O5JDMEiQooTjs1LGJH4i/9yp+6I/vhCyDGq9f3KymYAEMG6tT//z68eMQweR7Tn78/s+MFJOVAYiAv/GdhZjlwZCVAAAAxAM7/AQB5AGxKbdjz2fv9+/v++vr+/wf+CTPb+wH6+70i++397Pr+9vz9+/z+/SsPKcqIyQKIheEH0J+/FTjkfoNE//z+B9T2+742iCHx94/oP57//xl+//vz9z9Qyz+gYoAAYmTIZwBSDH8YGH7B0B8kxh8Y4x+Y5GEACDAAW2I9KwmKYGkAAAAASUVORK5CYII=')}.ytcenter-flag-kg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGQSURBVHjaYvzIgAD/YCQyA47+gAUBAnAYBikAwCAM8zDYo/2Vz9oX2uqKkIQcezPd6Q4jDRXicAHcAHr/VX0BxALW9v/fk6cgpUD0+zcD619G2d8MjL//Xfz978vv/79//fv1CyjOJCsLtAQggFj+gZT/R6hm/Mvi84vJ6A/D39+Mmr9+Lvj17+vv/2ANQARUDBBATCALQM6A2s6k8YtR+fefk7/+HP/FqPSLWfMXSPUvqCVADQABxATy35+/EAP+//rNKPr7P/Ov/y9+/X3+6x/jr/8yMCcB0R+gbxgAAghkw3+IF38Dzfj19+Evhq+//vP/YhD6+f/Lr39PfkJVAy0BOpiBASCAwH74/RtiAMOvX3/O/WbU/sVk8Pv/399/r/76vf/3/59gxwBd++cPUDFAAIE1QDwAddWvH7N+Men//v/j15+zv/99BIn8+/Mb5Oy/f4FOAgggiA1/GCUlGUGe/guUAzHugwNA8Dcj7x+Q2ZAw/PsX6CSAAGJ8Do7CfzASM3YhsQ6JZqCPAQIMAPbnVIL0Z19UAAAAAElFTkSuQmCC')}.ytcenter-flag-kh{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG3SURBVHjaYmTg3c/w6x8DBPxhYPgLZEPQHxiJzGAACCAWhl8MDX1qQNb/f0DF/4Hq//79B2T8+fPv91+Gv3/+/fkDYf///fvf6olHAAKIhYHhC8f/X89e/QQqAir88/c/RMUvIPs3SDVQHRD9+vNXWpyDgeENQACxHP7pq/i08tfjx//+ggwBWvH31082CQmg5u93bjP8+fv354//v34Bpdjk5GwZ9gAEEBPI6X9BxjL+/g10AbeBHpsAv0R1lWRdLSsvN4+5KVAQpOHXLwagAgYGgABiAvnoz1+grX+AxjMyCaVncHt4MnBwMnBw8AWFiBSX/Gdh/fPrFwj9+fODgQEggFjANvxhADn2FzMnHxMfH5+rC5OAINBIPk9PJgEBJjZWqPFgGwACiAkYYCB/AYX+/pXq7QMKMbKy/gcCFhZGdvb/DAxyS5YwAn32BxReQOcABBAjA8PCshaTh0++AXX9YWD6/fsvOFj+/gKSf0AIGG6/v/8Gel5Blnvf6lUAAQR0Et+n3+y8IqxgOVAI/oYGPChMQcEBYfz7/+kv0D4RgAAC2rCWARh50IhEQ8gxDUFMAAEGAIw0M61VmortAAAAAElFTkSuQmCC')}.ytcenter-flag-ki{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIiSURBVHjaYrzLwPCPAQSYYIw/DFDwA0z+A6M/MHGAAGIBqhPprAEx//////ff/39//jL9Z4vg+s/w5/v898xff/3/++ffnz//f//8//v37QUbAQKIBazt/5/nTxn+//v/5+//P38Y/vz5PokJSDE9+/L77+9/v3////3r388fzFKyQKsAAogJpPzvf4Z/UNVA9Pfvb6YQNtYg1r9/f/379QtoNpD8ByT//Aa6CiAAQ3NuBAAIAgHQJ7IGujOz/xnxEDmJN9iWRauFSAP9EqhzUDzE+xpUDdjTHcdyzuELADEAzv8B142LHf3wB0VN/vTz9Z2UCneE/hcK//h4/f37/fluBfIN8XBgDY+e/wcG94d4xe7+AgAxAM7/AX97pXFqRJu/+E05Dxb+7aDC++/6A2pQBv39/XuY8gQA+oFSCH6v+uzy/ZRlEVFbjwKIsXfmbhYeVVcLwbtPvu099T7BVxIYUlNXPvn39196sNTlO1+2H31TGCML5K7d9/bpzV0AAcTIoDzx3oGkuRueRXqI3Xv6fd/Jt79//0sKlAKGwpQVj/78/ZcdKnPtPkhbRZKSXUA/QAAxBmeudLA101XjOX3lE1DaSIP3379/xy9+BLLD3MTuP/1+8Ox7KwO+//8YDp59N62mCSAAADEAzv8BAAd3RVQou6XgNU0W/v4AzbXeAAD6Y3Es+Pj6pZfMAAD8U18yrsDm/+HeR1c0zNwKAgwAtRQ4pxH7HeUAAAAASUVORK5CYII=')}.ytcenter-flag-km{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHTSURBVHjaYvRfzjBDn4GblQEI/v9nQAZALkQEwoCwAQKIZeMBBnvFajclBi2RfwwMQPT3//+/DAx//v//AyZ/Axlw8svdTQABxMLAwfD2y/8ZZz4aSn4M05LlYuFnYPgOlkZGIA2MjKJASwACiIXhFciiGrvaLz+/NB6YHq3nqSuq+x8LAFrO+FekCCAAADEAzv8AAFkA6/Tr7vfuXLBdzufOT6dRm82e7Pjy+fn5+Pj49/f39vb29fX19PT09fX15+fnAogF4r/Tz05///lNhkfm+5+vSy8venrjSIlZ0f9/YK/++8fwDwSYWNm/nD0CEEBQDUbiRn8Z/j74+OD3v19OD38FXr38YUH031+///759f/373+/f/3/+5tFVunG1lMAAcTMoMvwmf+jvbyDuZR594bCtMu/g2/94vj9+w/TbwbGXwyMvxmYfjEA2Ux/WIT431x/DhBAUBsq9pXLvhK1+1h2W17klhzIAQwgfwLdBHIUyMf/GJg5OR9JPwAIIBaGXwy/f3Hz/Qj/w2FzR5rhx9//wIj485fhz18g+f/vPzD5n+HvX5BfNk8WAwggRoZQcYYnaxi+6TF8+sfw6x/DD2B0AUkw+z8kKuEIBAACDABa5TTASy747QAAAABJRU5ErkJggg==')}.ytcenter-flag-kn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHuSURBVHjaYmSYyMDwgwEK/jEw/IGRQPQLRDLqMMzjYUiMhCoBCCBGhlaGatdqkOL//4Do7/+/f/79/fvvDxBwcPwJl/y9b+GfJ09/v3z75/fv35s2bQIIIBYGFqDi/0++PgUq/fvv7+9/v//+/fv7728tid8h7L+nV/2ra12QmJjB8v+JopLs8VwGgABiAToAaDJQ6R+Q2UCVf5nYfuWp/Nk15Xf3/V9GloHc3Dw+HsbOZvfUmX9/tGcACCCQ+X8ZgKr//PkLcoay6O8w3t+zW35fvwN0wq8vexazMr6Jsl7D1/f7/7vfQMUAAcQC9BbQ0b9//WZg/ZOl8Yfn+e+Jtb8ePgeq/i3C/6sg57cVxxqGtF//P/5mUPwDDA6AAGIBBgXQaCmhPzFCv67vd9y2ZdvT179+/fotIfJrWs1voWO//k/5/f/Xr/+/fzP+/g3UABBALAxMDCEKv1me/bpywNXHL+r1O4Yf+1ZxcPyel/ebsfDX/5dQ1Qx/QK4GBjVAALHMdWA4vODP5UtA7YdtHXyOHVrTWvRL+ebv/6kgdSAE1PAHqAHo079APwAEECMQZ6Yn/fnzm4PtNwvT38b436xHfjPs+A00D6QabDAwwBnA6PWVKwABxAiLZAZffYYFPAwMR0ERjRVBAECAAQAWUy0gXAgwfgAAAABJRU5ErkJggg==')}.ytcenter-flag-kp{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHDSURBVHjaYjSs/f/lBwME/Pn379cfIMnw6xfDrz9A9r/fIA4SYmMACCDGgzf/q4iBlf///5+B4d9/KPMfCIMY/xn+//sH4f4/duMLQAAxfmRgZO/v+/fiFcNfkJkMLEz/v3wB6fn95//fPyDy9+9/f37///WbSUry+ZzZAAHEApRifPWKiYmBOSiEUV6e8efPX6tX/9m9m+HXb4bfv0Do129GoBN//2b49YOJgQEggJj+AZ3x9y+zv/+/W7f+P7j/a8cO5qCg/2xs/379AqK/P3/9/QVCf4Dc30DdDAABBNLA8Ocvg6gIk77+z1Wrmays/vPwMIiI/P8N0gB0z3+wTiD5/8+fPwwMAAHEBHIu0K0vXv7evIklIODP9u0M37//e/7838+fIEU/f0JVg20AKgYIIKAfGBiBdi1ZwpaY+F9SgkVN7Wdt7f83bxjBZgOdDvEA0HgmIGJgAAggFqAt/3h4/j169K29AxRQwOD78pWBi+s/K+s/sDpwKAFj588/QUFghAEEEMups9+1pFlAgQ0Nc0iog6MCLAQR/weSY9hx6jVAADEyx3/9+wEWkcB4BRryC4kLj+l/QDYDAx8DQIABAA2EWORnICKSAAAAAElFTkSuQmCC')}.ytcenter-flag-kr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHiSURBVHjaYvz4/SsDEvj37x+YhLCgGAb+ADFAADEBpfk4uIDo2YNHV89fZP3PyMfBLcDFxc/NLcjNy8nMfPnM2cd374ry84sJCAE1AAQQC8Tg169fb9269cP7DyJiYsqKiv/v3v3/589/FZVnL16uXbtGQFBQWEhIRlYWaAVAAIFs+P///4cPH37//m1oYqwsJfm/t/d/QcH/vJz/ddUKYqJuXl5v3rx5/uIFUBnQBoAAYgT6gZedE6jt1atXXLy8jHsOcEyd+P/37y9/mH7+/CWQEPEpIvLj6zdS0lKMjIwPnj0BCCAWiC+BukVERICMnW/4jP8w/2bibDLMf/aTvfrxOX12dm5pKaACBkZGoJMAAgioAaQaCN6+fcvDzfVVXTdXvZKZjfURu9iHHz/vGrupf//85u1HSUlJRqCef/8AAogJiIGqb968OW3aNKC/PQw4VS1UnjALMXz/4azD5uokvW/f/vr6+pMnT0L8ABBALP/AocTFxQXkHzx0WFNLszZM7ZIJ+5+//3UV2O/du7l6zXphYWEBAQGgAqCTAAII5AcgS1pa2t3d/eXLl2JikkD9ekpcEHeKi0t5eHgANairq4PjlQEggBifv32LHJFwiuEPmMEAYf/5A1YNxAABBgCFMRk3L8TWJAAAAABJRU5ErkJggg==')}.ytcenter-flag-kw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF4SURBVHjaYmQAgk4GBg4Ghh9g9AeG/sEYv2AIzAUIwKEcEwEAAjEQpKBCDvZeB0awl+SAodlq+/tFtdkYIHJiEuxjP5HyxYr22lcAgTQwfPn/ZNnTvw5//wr/BYr+/ff3N0gFUCkI/fr769e/X0CGLI8s0AkAAQTS8O/f/7+f//7Z9jcsP5RPlA+o4d8/kFX//oPov///QUS4WbnZMtgAAgik4e9foK1//vz4YyJkIiUp9R8HYGRkNOExAQggkIY/f4B2/wZq+cfw7z9uwMDICLQHIICYwDaALPgFdO1/fIDhP8iJAAEEsgFo/K9fv/4DbTp69J+QENCFYPcDyb8QX4B8+e8fEw/Pl+nTAQII4qQ/LAy/K779lp827RtQJxD9/g0kgeEEZfz5zfDnL7OKyoeLFwECCBxKjH+miEhK/P79489fpj9gRUD05w8TmARGBhPQEpC1f4EeAAggRqCG2wwMYgwM78CRC4lfBhgDIsIAEwQCgAADAJ1oZSmm+IU7AAAAAElFTkSuQmCC')}.ytcenter-flag-ky{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIVSURBVHjaYtxaWH+DT6l43pVygVscTAyNt0QKTf71Hz7CwCDFwPCLgeEHA8M/MPkDwgUIADEAzv8BJzNzuI9XAxcY+Nzc/vT1AhYXChQSiajE/gEM+vv8/P0BDAb5akXzfaoL+vv7spxwAgAxAM7/BJwAxgfdMQTQyQLu8fz39wgTEfb8/9/jAAYD9vD3//8EBDYoxZzC+9riNRsUCgAA+AIAMQDO/wKyCij8IiQHISH8Dg8AHB0JLCr1ERX7+/z2+//6+vyQ5qRXEg9ZIhqd56D7+/0AAP0CADEAzv8C8jI6AggJq+QA4AIO4/sGpvQVBh4e+vv89/n9+vr//3J/9NMC9ML4AHqH+/v/AAAAAgAxAM7/AyQCGO4NF8DW8Pb4+d3v+7zM5tXz/+nn6f39A/j1++8Du+ciVt0VJ8HUmerpG+PaugKIZeXxJxJuf/78+XXqDcOf34y///++fvXJr188vxj//WP6FxbY+O/f/39AYNFV0bIJaANAALEwMABd+//Xn7/AEAGGyq/ff3/9Z/jN+O/3j39tEZ9Y706ZeeI2UC7BQKbaX8pvEwNAAAE1/AEr/Qv0KNBbIA1ABlDnn78Nq9it9P+H6Ct+/c0w9xjjvRfsQBsAAgio4QdQnaQY7+/f//6AwD8g9/e/v39+g4w4f5Ph4gOgCf9+fmL8ywwMJQaAAGJkYNCFxSgyCZLDCgACDAADryXOV47YFgAAAABJRU5ErkJggg==')}.ytcenter-flag-kz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH6SURBVHjaYmTe//8OA6MWy38uBoY/DP8+/gFRDP+A5D+Gf2AEZDCBSSD6xQAQQIxADe9V+54xyO1hCP77n+Hff4a/QPX//rH8//HzH/MPBpa///4D0Z///3///z/h2BeAAGJhYGB4xiC76Hcw03+wcf9BcjL/bhr83//2n+De/z5f/rGDNPz7L87OyPDrH0AAMTGAwP+Q/zP//mP4+f//3////v/7bfJ/l82/9fb/1pr/2/b93//f/0DGA/UAjQQIIKa/DP8k/t9b/i8daDDj/99M/35w/3+r9f/If4affAxPjP/v4P73AaThL8hmoB8AAogJ6D+guaH/J//6/5//30uuf2/V/5268Nf0/59f7/8IXPujo/v36G+wJX/+gkICIIBYgGHy9L/c4v9R//79//SPW+L/Xd3/B9b8S7r9T/H1P6EP//ic/y/Z9c/9D9gbQA0AAcQExEAbIv/1AX389j/vx3/c9/8qe/6fa/N/rcL/S7n/89/+EwKrZvgLdNK/PwABBAylf1L/bpf/awCGKDBY7/5Tuf5PmeffK8//CwT+PZn5t+rwfwdGqAZQ/AAEENBJQLf8zmCds/Z/Mihy/jP8BkWR2PH/acDYeP+fXwFkEONfsHFACYAAYmRY+7X9D18l0zt4XAIDG8r+gxTTQMN/MDAwMQAEGAC/aVpzH3H22AAAAABJRU5ErkJggg==')}.ytcenter-flag-la{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHFSURBVHjaYvzLgAL+gREDEvkPlQ0QgMc4tgEABmEgCCJbsxWzpTM2oYr0Ov3Z88x1JJOcjKaxo3s24GvArXoCiKWA2T9Y1OzTy/f///77B0J/f/38++f3379//v7/+4fh77+/f/4A0Z/ff/glhOoZNgEEADEAzv8EkyJwHRIj5/35/P7//f0A+fr9Ew8EWUYV////n7Ln3eb4AQAA+vz9+/z+GxQH3QCRAoiJ4c+/338Zfv1j/P2X8ceff4xMjOXxMtrKXEBUmSjHxsb05df/n38YQegfSC9AADEB1f79z/DvD8gNv3/+FeBh4uVi/g8GgnzM4gLMv77/BroHhIAOYPgDEEAgG/7+/ffrH8Ovv/9//2N48fb3p69/IBrefPz98MXPPwwMP//8/wUMgt//gRoAAogF6ECg937/BtoBCqf33/9UTnuY4icGDLfJq5+9/PCHiRGoBOh1oENAAQsQQIy+DPYp9Znvnrz+Cw4ZoNW/fkDc8Pfv739M/0GCYIl/wnKiBRtqAAKIZQXDQdZHygxA+0CB/RdoMcO/3//+/f7/H+gwcPADEdDRQA/c+evJwAAQQIyfMSL1DxIbIvUHKe4BAgwAnbhCepZmuD8AAAAASUVORK5CYII=')}.ytcenter-flag-lb{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGXSURBVHjaYrzPgAD/YCSE8QfG/gdjA0mAAGIBSkh0VAPJ///+Mfz79//vXxD68+f/3z8MQPLPbyD7H5hk+PP7ysJNAAEE0sDAwvL3+TOGf0BpoOo//2HqQOSv3/9+A9m/gAwmKRmgJQABxML2+DG7lBRI238QYGBgfPX11bxT8378/J5onizFJwW0GSzzn5GRgS3lPEAAMTEwMTEAmYyMIAFGpv+MDDvv7rn04vKZF+d33Nn5+/8/oBkwxPjn3z+AAGL69+8fzHSg+f+BSndd3/Hu+7tfv39uvrzpxour/+EA6O9//wACCKQBrhrImnJkMtAf//8x/P77+9ff3+37Ov7A1f8H+usPQACxwDVAvDHRb+LTz8/TVqcAtaWaJJjKmf3995uRgRniCiAJEECM1xkYpKty/j56AAwKUID8/v3v109g+Pz59ZPxDzjEfoOD6+8fFnmlE9tPAQQQCzAu/n/7xiggCAxmJmCw/vnNCArH30y/QcHPAAllUMz8/f/1G9AGgABivIgakf+QIhjOZYCRQAAQYAAQU0TmhP8+fAAAAABJRU5ErkJggg==')}.ytcenter-flag-lc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAapJREFUeNo0UT1rVEEUvTNvN1k3RjAhBAtNQAjGoI3YhNQbUIidpBAsop2lv8ImlaBioWgqmxSJaxFIkSqgNoJ/QEEILL59u2/fe3Nn7vHegMPAfJ17Pu64xy+aYuyyjHQIkKJtiokLCZ22RKYmSgKioGF022jlI/fwHgxNAEgfh0O6edvr6fs36c4gRqSEJJQEHw9GramWUQ4KkUg2gbPKrYd8ivArvzg7AqtCNKK5eUcEj3NuheqtSpelW+350/33/Q8v1x5kk8LQUacqMFTWK6U6MbRAhMaVrHTo82G/f3S82kZRuxRVBIHVlTomzwo1i9DKukbnmvv7k4chVBzyH830EtU1cQIHaAPMkrJaJYymmWD5jv/y7tPuk/DmWbO3+/b6htPmqBkRS28Fqqj0pshUeZx95RsXXt3aCiv3eX3x9eAkjqOhmc2zhvUs/wkS5Y1b64ad7Qp/An43Tx+FuwtFEYnPO6sY9dQqK+0ALl+iirE8S72lHUyuOiWkSDO8Obd9dOXQs8sASZbB9Z6Xg1IzCJu04koi/TVNZs9WRs5WpzeOMvknwAA1gFW4KEKxHwAAAABJRU5ErkJggg==')}.ytcenter-flag-li{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVHjaYmSQXc7wj4GBiQGE/zAw/PnD8AuC/jH8BUr8AaNfMMYfgABiAZKNrcZyQq+UhZ8ZyN4581Dx2nPFB2+E/vz5/+ff/z9//v35+w9I/gYzVrZsBAggFrDZ/73UNrKz/GD688ta9rYSH2/J5djfv//9/gtU9/c3WPXv33+lxTiBNgAEEEj5v/8MO67qcrN9Y2f+8efvn/XnjUGqQUr//vrz79fvvyD0B2QP0G0AAcTC8I/p9z/GPTd1d19TA1r68y/rb6D7//79/Zfhz2+QX37/ZQSRfxh+/gX5EyCAWDQ/7VD9xifw9SPQ0X///P375/ffP39ATv/99zeICdQK5IIYYlyCuxhmAQQQy4Gv83nf8TG8fPD/76//v//8//37/+9fmCTQAGYmpSiGrwABxPKNgYET7FqQ6j+/gL4DkX+A5O9/f8CqgSSI+4f57583DAwAAcQCCqM/IINBSiGGgU39BzUbbAlQ89+/TH9B8QIQQCz/wBoYxSSZgH4E+vr3b8a/IM1MYH8wgKLjz79/INUMYA0AAcR4GxyB/2AkAyoXDQEBQIABAH37YQEdozCyAAAAAElFTkSuQmCC')}.ytcenter-flag-lk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIFSURBVHjaRMaxDQAgEMPAMCWzMwpSEqOvcHHyumfrl8Kg0ogQFzMT6sRPAAAxAM7/BAAAAHbOEQEAAI76/gAB/vs9DvLh9dq8EPPp//77/P38+/37/P/8/AgR+Rot8AsI3AIIpOHn7//ff/9g+PsXiP7/Z7m2lYud98ufr4w/v/0BmsrM8vPnlz9cIt8enGKX12QCCCCghv//gOj/X4Z/QEt/A13y5cXf1zeYLVPuPb3IISjz8e+vv59f/Xt8juvre5bfCn8AAogJqPjv37+///35//c3w1+gc0Fu+PfvFzvPN53gJ0KKH65u4+UW+yYo++Hv79///v4BCCAmoO+Aqv/8+Q3U8B9I/gNq+P3//y8uia83t3Iz/P/tkH9LzuYlr/gXoDjQaIAAYgFaAFQNsuHPL5ANYA1/vv+/v49T1eEFA8MvkPSnP1e28IN9/xcggFiAYff7H1AJWPWfX////fr7ixVIP7vC/umFAL/056cX2ZWsX/35+RcYaEDXAwQQ2Ia/f379AbvnN8hJnII/+eV+PjzFwcLO8P8Px5+ffx6dlpQx/fr6NhMj4x+AAGICRg3j/99cLEz/GBn/szIzMDDr+L358ZGNlZvx/3/Wv/9Y/zOx/v7J8foWD7/ke27hnwABxPjpnCNSRIKCFYj+gbwEjBNQHAOdAZJl+AeMfWCkAQQYAJhUc1JTX8GfAAAAAElFTkSuQmCC')}.ytcenter-flag-lr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFkSURBVHjaYmRgiGZAgH/nGZaDKAaGP2DyHxIbQgIEEFA2evPWy9+//9q85XJr+45///79/QtEf/+Awe/fv3/9+vXz588fP358//799c3rAAHEAtTh4qTOzs5iY620Y+fV59XF///8AaJ/QPL37/9/gezf/4CM379ZJCQvTJwFEEAgDXv23LSxUdq46dLvP38lWnr+4wCMjIxmKdkAAQTU8OfilSfbd14BGvr3z99nxdkgs0Gmwsz+CzT+z7/fv1glZU7PWgQQQIy/375mFhSGmAG07T9uwMjE9PbGDYAAYrkkLCrT1/b72TOQeSB3A10PcjHQbDADaC+Y++cPq7TMyYWrAQKI8fvrl6xgG/AbD5QF+uHFjWsAAcRySVRcvq3+59MnYGMglvz6B3I02AaIf0DkX3Y5uWPLNwIEEOPX50/ZRMTQ/IBhG0gAiJ9fvQwQQCznJKX/oEbnH9SoRWYAAUCAAQBu0mcNl6fCkgAAAABJRU5ErkJggg==')}.ytcenter-flag-ls{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIGSURBVHjaYnz79i0DDPz79w+ZhIA/f/5AGI/efXKuOAAQQCxAuS/PTonJG//7+/vVozOyul6MjMwMDP+BgAFCgcHUow9PPPjNcOAGQACBNEioWN04POf3z2/CsvqMjExIykDgy8/fUcsuPXv/RUaAk4GJBSCAWIB23zq29P3ze//+//364ZWsticDIyNc9cUn74q23Hr/5cfvfwy/f/1iUJkOEEAs3z69+v//n6i8wbfPr35///Ln9w9mVg6g0u+/fpdtvnbqyddfQIU///zmX/pb4j2DDANAAAAxAM7/AgYMFCY6Xezj0vLq3yc8XgMEB////9fn8E+gzsng8Pn6+vr4+fobgPoOx/wE8gD4AAII5IeXd44JSmkwMDA+v76Py0apasv14w8/fAea+o/x17e7vxWm/mJ+8/vvbyBg+MUAEAAxAM7/BP7+/honQBkoQAH//u30+V2iyuDw+/v/Avv6+foTnPsY1PoC9Pv6+/z+/P3+/AD8AAIIpIGRmfX/v3/br73oPvz4+48/v4D++3rvl/yU3yxvfv37DfTCn39ADX+BCKgBIIBAGl5/+Tbx4P0HH/+I83L+4fj7m2f1b46bfxgFfv/l/vP3z5//f/4Cwf+/f4EafjEABBBLz64LE6dcYHjxCRTVv74xqE1l4GNgAHrtGwPQPBD6BSb/gUk+BoAAAwAdbVDiIWomQAAAAABJRU5ErkJggg==')}.ytcenter-flag-lt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGOSURBVHjaYvx9lYHhDwMc/PvD8A9EgRCEDSShbCBiYgAIIBagaiapZqCa////Mvz/x8zwl/n/P4b/f/7DEVDh/99ABsO/358urwQIIBYWJgYGRqCCZ4wgDSAVDP//QqSB6sDo1/9/v4GIkVUaaC5AALFc+sIg9evP719AM/5CjPz37zfYYJCif/9//YMw/v1iZf91/hUDQACx6O9hKHP9/ujLlz9///z59+f3v98g9Pf3LxD569ffXyA2mJTn4z+4gAEggFgYfjD8+fcXyAeqBmkAKQVJA7X9AmlAaAOayPCFASCAWIDO+vv/z5//f4DqgEJgG34BjYdoA5EQ9v/fQARUDBBALGtbGXT///7+EKgGpAto1r8/EGVglRDyL1DxH075P5suMgAEEIsZAwP/mz9/X4KMAEr///XrP8gCMAMu8uf3/z9/WTj/ejAwAAQQyy+gk4BmS0oCpRn+/AXJARkg9h8gyQgkge79+5fx798/f//+YGAACCDG2+CI/gcj/6FyGZDEgQgYZwABBgAlIndD8dLdmQAAAABJRU5ErkJggg==')}.ytcenter-flag-lu{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVHjaYvxvrsvw6QMDGPz794/h1x+GPz+A5L9fv/79+v3vF8O/3wz/GBAIIIBYGD68YahsAqr+/+8f4/9/DH/+/geSf/8y/v3H/Pcv05/f///+BSEw40tTJ0AAsTD8+MXw+9f/168Y/v1l+Pvv/58/DH//gFWAFf3+AyJBjN+M4hJAGwACiIXBL+S/kiqDiBhI9X+wHpCREBKs8x9QJ4jBwM//T14cIIAY3759KygoCHLS//8MYIgLMDIyvn79GiCAWCDehQjBGVgBAyMjMFQAAogFoQi/+UAbgKHx7x9AALGUnOAL0/j/4TvQ2QzAAAI5HuhzIAljQ7wDDHBBzv8VO5kBAohl/pl/ygLMTz7///2XAaju918QAobQ73/gcIIwQIhBjpfh4y4GgAACOukfEwOTNDfDn/9AaQaQPf8Yfv9jhDD+/IOIMIJiBxSo/wACiJGx9ev/L2CZX2D0hwFMgtn//kHZ/yAkAwMHA0CAAQDhxHlrsArfvwAAAABJRU5ErkJggg==')}.ytcenter-flag-lv{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFjSURBVHjaYpzIwPCDAQr+MTD8gZHI6BeMZGJgAAggli8MDK7V1UDV///9A6G/f//9+fvv75//f/78A6Lfv/+CSSD77+/fMzdtAgggFhaQ0f+/PnkKUgpEQDkwCZQGkb+AjF//fv0CcrllZYGWAwQQC9A9f/79/42sGigNNBWsFISADLAGtt+/PzEwAAQQ48uTJ3nk5IBC////ZwA6CegHiNv+/4cy/kE5LGxsD44fBwggxr9//zIyMv4HA5DjcANGJqaPHz4ABBDLm3PnuGVkgDYwQM38/x9uA4wNsYqFnf3RyZMAAcRYzsDglZX18f59UDj8+gX2KMjFf+EMsCBQll9Jqf3cOYAAYgF6HMj5Dw4TEPoFChMg4z/QV0ASwvjz+/+fv8BgBLoZIIBYgNHx//cfLklJsDF///6B6YRFAjBCgP6EBDow+gACiLGUgeETLCJ/IUXqL9RohkQ/DwMDQIABAHwogUlFi1BaAAAAAElFTkSuQm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H0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAJpJREFUeNpifMErz0AKYPzPIEaSBpbVDD8wRf8w/GFgYGBhYCHFKH5erMLMmEJScnI+/n6/vnxlZWf/y8Dw5+dPAhoS4+O/ff5ycP/+fXv2sDEznzx5koCGD2/fq6qofvv6beeOHWdOn/n0+RNh93MysIqwC2APVqkSEwzB/9+//2BkZODg4MQSrHzOspiifHjige3NP5IiDjAAaPot3hbdLBUAAAAASUVORK5CYII=')}.ytcenter-flag-ma{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFCSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALGCz/6Oo/vXrH9g8BpC6XyA9YA0Mv38DNQAEEAsQMwJVA1X8+cPwG0j+/v7/91m93//+/DY+9Yvt5y+wPVANQNMBAogJ5KI/SG74/fuu1K+vHL++cPy6IQtTDUF//gBNBwggsJP+/gH76RfIht+/1W7++vD/998/vzSv/v6PZAMj2EkAAQR2ElgI5CqwBNPvX+ZnQFb9+43kHrCb/zAwAAQQSAMzxIvQYIGGCcgIuMgfoAZQqACdAxBAIA1Mv/8wSEqCjQH6HqSTEWwkA4QEInAYAhFQMUAAMX5FjUg8cQwBAAEGAIxxV83FJtxtAAAAAElFTkSuQmCC')}.ytcenter-flag-mc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEOSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALGCz/6OoBkoDzYMoBan+DdHA8Ps3UANAALEAMSNQNVDFnz8Mv4EkFrPhGoCmAwQQCwMrK4Os7H8Wlv9/gR74g3AxktMhJIOU1L+DBwECiPH169dCQkL/gYABDHEDJiam69evAwQQy79//yB8sN9xAogsUDFAAIE0QDgENQDBnz9/AAIIagNcDwQwMjIyoAAgFyoLEEAgDS9evPgDBv/AAGIShA1iMIAgkAH0A1AKIMAA5a1fe6Xb4q0AAAAASUVORK5CYII=')}.ytcenter-flag-md{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHISURBVHjaYmTg3M0AB38Y/t5yZWBhYPjA8O8fwz8uEHlBneEfSAZKAgQQUJKhpV8dSP79B5JmFK7+//8/A+9vxv9/mf9/ZvrPKl/w5/+f3////vn3+8/1OcsBAgikgeE/w9PXv//+/Q9E//88ZmD9vGUd97+/v719vv3///vng9//f4MQi5T0LwYGgABiAtoENBui+s/f/wz//756+ldB9tuvH7+fPPv6//+v/79//YOiP0BXAQQQE9Bd//4z/AGpBokAjTywh1Nw9i+Lfd8O7Gb7/+/Xv1+///369ffXL6DDgH4ACCAWoPl//oBUg0iwhr9/GXncf/0Han/JBNIANAbsJIgGgAAC+gGoGCjyD2TJ739AFX/+MAbv7wSKRGsWAPVDVYNUgJwEEEBADSDG7z//gQb9BWr4/ysi8vevn8V///yKi/8CtOf/L1AogbT9+Qu0ASCAQDb8/ssAthakE6SC5V1U8O9//379Z/z9/x8HyDBQsP799xdkA0AAgTQA1UkIswL98BsYXsxSDP9Emfl+M/378///RwZmdja5v2DVf4FBCdQAEECMDAwrwTEIRW+Pp/8DBvUPcEyD0SFXUBxDEBAABBgAcLpkVVnkSs0AAAAASUVORK5CYII=')}.ytcenter-flag-me{width:16px;height:12px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAIAAADkharWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWJJREFUeNpUUr0vQ1EUP6/39iNtY+guISQidOli62Ag/gCbxd9gNHVg6iJIbBa7ldjEIJUwVCIWxWIggqZUe885zrn3veZ5OXnvfPx+5/NF/LQE6YcAmIEBkFQnZmJE9Tkih2yh/IurfUGyx2PCSgl7ourFzYHVr9jnbfQc8pzUm5FjPVevolYgxbn/6MHBLBSsW7thYzBxGoE5zkixYDsvZnuGxgumkh9Kv9NlszvnkpBiiCxwjA7pI4Jof37qeIMjuN9pDjvfLhlGog7BgtMKCYHppZ+pjVUWriaLb45hcNsdtaTTk7SEgcBDYEH87D1+rbQuJy6OKncf/XyjvejC6CqCFYIj9FAVX6p0WuudvaKNsifPjfUWBajfCmpLqItzqW2+L1+r0nwQaO/QXzIZQ85n2c+QrVcNxLGQjMO9RtcPNAL72c3mtljakpVJAjlNxGpS+EHEKbumOD1C6U+AAQBBagoVSc9+ugAAAABJRU5ErkJggg==')}.ytcenter-flag-mg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFXSURBVHjaYnz//j0DDPz7909AWBjKxoEAAogFKCcgIAAk////D1LY2vr/9RuGv38Y//xh/vOH6ffv/3/+/IeRXzZtAgggFoh5UNVAxtOnDM+fg1RA0C8g+ev/r19ANqOsLNAGgABiQVENZABNAkqDSLBSkOrfEA0Mv38DNQAEEAvQ3QjVQPjrD6bZcA1AZQABBNXwHwyAjNfsv7/w/Pr3B6Tn3+9f/8AkUOffP7/Z+f8cY2AACCAWuGqw+Qx5Ib+ffQYZ+Iv51++/QB1g8u8voD4l3t+nfjIABBDIBrjxQPLvn18/f4OkUVT//f3n35+/zH8YXjEABBDCSRASbh6MBOr89ecfUMNfIGL4wwAQQFAb4HrEOcX//f0H9AHQSKCGP3+B4fXnLxD8//sXqOEXA0AAMT5+/PgfGPz58wdIqreoMzwBRykTA9A8EPoFJv+BSR4GgAADACSwYx/dm6x4AAAAAElFTkSuQmCC')}.ytcenter-flag-mh{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIGSURBVHjaYmTgrGaAg39/GH79Y/j/h4EBjn4hkf+sGTYCBAAxAM7/BAAAAISSTTInFQ0JBcLQ5vP3+/39//z+/v39/vz8/vv8/fn9APr7ACYE5FQMxRl2AAIIpEFCiMvDRvH/f4Yrd95cvvf2759/f/4ClYLQt9/MnH8/xfAcCOA4xSoi/ymWASCAgBr+sbMxA7UxMjKwsTFDTAVa8u03I9BgM9Yrifw7lHk//ldx/m+b8i90DkAAADEAzv8EAPr83OXyq7jYEA0GyNTo+/z9+vz/+PsDE//qWwu9SBLc/yc5/zZe/xYo+f8BhJC8AgAxAM7/BAD9/vb4+6/D3vv8//z8/ff5Afz9/kMExV4TyhUrKv86l/8SKeLr+bOq0tLc7KSGdAII6CSggn+/f//7/fff9+9Mkv8fxwqesDXg/W9W913Q5Pi1d9sXHzlw6tGL11+UFISAwQUQQGANQEt+M7H8+hrAeyHG8C+7UfQ9Jr1dJ1/vOrzj2v03P7///s/MyMzGzMQI9OkfgAACavj1/cd/NaZHCSZv1AzMT/3S3rTjzeFTe96///r7P1DFfyYWpt+gIP777+8/oAaAAAJp8FF8r2anfO275aJDX+8/uvH75y8xAU5hfvbf4Oj4/Y8BrBoY2kAD/gAEEKO7c/aJZxwfr/9gYHgAjlE09A+JAYxsBoAAAwDl5x/24Nr3SwAAAABJRU5ErkJggg==')}.ytcenter-flag-mk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIqSURBVHjaPMLBCYAwFAWwrORUHfyfS5EiUkSeeGmIRJr4v3t5yuLmYnIyDn34BAAxAM7/BAB4AACQewByAP+v/gHv/gD9/f/8/QD6/AEB/ANm/AL6+//8/P8M+/9f/P8o+/ROsgKIhaGTgUHi/3/TpwxRfxmW/f1/5jdIz93f/1l+/7/z+z9Qg8Gv/xm//t/6zThP9t9hBoAAADEAzv8EAAAA/+r/AJj9ACP9/0D7AA/9/7r6/8/8/wD7/wD6/0j6/yr7/4n6/8n7AB77/gAAAgAxAM7/BP41AAEe/QD4/P/d/ADa/P8r+/8y+/81+//++//t+v/u+v+K+//2+v8a+wAo+wC8AAKIheEE0I6//7/9/v/lD8PDP//PgQ22/v3//+//l3/9//r7f92v/0q//vP9ZuD786+SASCAWBhsGP4n/Pl/48//l78YvoN89p/51//jQA2//j8Am70SzBb9zaj7+98kBoAAYvl3nIHR8Pf/+78YZP/8D/31/97v/xt//f8NtmHfr/8+v/8X/Pq/+DcD0Fcf//xhYAAIIBagP5j5/vxP+82g8/v/vN//d//6/+vXf4Pf/1l//V/x+/+C3/8dQd5gOPWXYTMwhhgAAojlny8DU8UfhseS/6f8Znj6l0HmN8Pv34xqvxmY/jAoANl/GG7/YWj8y1D8l8H/7z9ZBoAAYvz6leFfBMO/zQxAq4CIAUwC3fnvH8M/a6ggVIqZgeEWA0CAAQDvj0SHVpI7MAAAAABJRU5ErkJggg==')}.ytcenter-flag-ml{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFsSURBVHjaYmSYyMDwgwEE/jEw/GF4XMAgxQXm/QOjMwz/rEEycAQQQCwMXxiqXavBKv79+/9PgP0vAwMQ/WFk/MPM/IdJ/vf/mD//f//+/wdEftm0CSCAWBhYgIr/P/n69O+/vyDw7zcD89///39D0a/f/2//+v/rF1A1o6ws0AaAAGJhAFn9H6j6DxD9/Q1k/v//6///P2ANv/7/+wXSA9bA8Ps3UANAAIHM/8vw9w/Qyn8ghDAbmwagYoAAYgF6FGj277+///yFa/iF0PAfrBqiASjPwAAQQCANf8Fm//r3C6gHSQOYRLKBEewkgAACafj9//evvyDVv//++odmw7/fcOOBrv7DwAAQQGAngZT+hiCwamQbwBr+ADUAfQoMbgaAAGIBxtrvf38kuSVB3vjzl4kR6LPfjCASaNxvBtY/DEp/QErBCOgkgABiZChlYPgElv0BQqd7GBR4YNEMRPsY/sVC4xgCAAIMAGM0cjL4DOlaAAAAAElFTkSuQmCC')}.ytcenter-flag-mm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF1SURBVHjaYmRgOM7A8IcBBNgYGH4xMPxjYGBhYPj0m8HzH5iDhgACCCj3p7ZWUVyCTVeH48eP/wcOfPr+nZHx72/GP5nMf/4w/f79/8+f/zDyy6ZNAAEE1MDAysqkpsouK8v27x/D9+/cCxe+Z/j96//veyB1v37/B7J/Abm/GWVlgTYABGBZDm4AgGEQBpL9R6bCJWp/SPgWJEjAQGffzMlPt/YDsguuAAJqYPr+k+H4ye+/fjN8/fZ3zdqPv38zMfz+B1YENRuuAWg6QACB/Pf/588793++fvT506c/397/ZfzF8O/3bxTVEA1//gBtAAgglrcMnpx/S/5+f/TvE9gMkNLfTL++///1E2421A9gJwEEEAsfAwPj72//f30GGoAsjaYaJPvnDzD4AQKIBaiJGRxkDHBFmNr+ADX8Zfj7F+gHgAACaWD6/YdBUhJszF+GPyCdjGAjGSAkEP39C0FAxQABxPgVNSIZsMUuXAoIAAIMADPsVhJb7/VZAAAAAElFTkSuQmCC')}.ytcenter-flag-mn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF+SURBVHjaYvzPgAD/GBiYGV4yMIjAeED07SuD4D8YB4gAAogFJFVdzWDF8P/UP8Yf/2r/8Xz+zfj37/8/fxj//GFm+M3B+ifm/+/fQD6Q/LJpE0AAgTUw/P8v+ZThzV+Gd38f//n7ESQFRf9//fv3+/b/X7+AHEZZWaANAAHEBFLu+59B4C9DxF+g6O8/DGDZ/79/QZT9A1G/YBwGBoAAYgFixv1/GVT//L/+h4Hpz58fULMh2v7/+g/XygBEDAwAAQSygSH073+G3/+Df/8X+f0bYRxcD0zozx+g6QABBPLDf8Y//1X+/Gf5xfD7D9BaiFKIagYkGxjBTgIIILCT/gED4RcDwx+gBFDq50+EqxggNgAdAwylP3/+MDAABBBIA/PfP/+f/WZgB2r7jeYeqIY/QA1/Gf7+BToHIIBAGphm/mH4IvmfBeinv1LSTFwg7wEjAeRJxj9MjH+UQErBCKgYIIAYvyLFIhAJM1xmYJBAEvjykEEdwoIAgAADAJ4ZThKIqVtZAAAAAElFTkSuQmCC')}.ytcenter-flag-mo{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHeSURBVHjaYmSYyMDwgwEK/jEw/IGRv2AMCBtCsjAABBALwxeGatdqkOL//4Do7/+/f/78ZWQCKfzy88+f/79///vz5x+I/P3396aZmwACiAWoiYHh/5OvT4FKgeDf/9/cLH///v8dL844+eHXL39+f/r569f/X0DVsjyyQDsBAogJiIEm//33988/kOokKaavv39xs8gd/Gr4698fhv8/C2QZfv35BURAPUBXAQQQE9D8vwx///wHOuT3//9/Fj//+v7nHxdp1xK9sl9/uf/8+zXp8ReQhr+/fv8DaQAIICagb4BmA3UD+THiDFoCtqkaKVoCmgz//xfr5aVrVr3/wVAuzwTU8OcvUCkDQAAAMQDO/wMAPgA2Ijbu+e76/vrJ7/prLGo7FzsGAgbm9eYvEjANBgwRBhCC1bz7//sPBg/lxOUCiAWoCcgBGQAKh18lx0o4WTh//vn5/c93FkaWdz/evf7+Gmg5UPbvP5ANAAEE0gC0C+IkIPn9949QxVApbildQd1tj7adf31h7b01wMD9Aw4VoGKAAGIBxhowjCW5JYGqQaJ/fm98uPHfv39AI3/8/QEklQSUQOENDHSghl8MAAHEyFDKwPAJFpG/YJH6AymmfyFFPw8DQIABAL9BPtF3kUG5AAAAAElFTkSuQmCC')}.ytcenter-flag-mp{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHnSURBVHjaYmTQbWSAg39/GH79A5Ngxo9fDD/+MPz5xfD3DwPDLwgCCCAWoLIJVZ5A8v//f//+MYjw/ZaX+m0s84uT4c/DL+zbT/179Jrxz9//f/78/fP377TKSQABxAI2+f/Ld1///v0vKfBLR+nzn6fXPn+WZGQQlFV+6KzydcELmQfPmH7/+SshwgO0ASCAmIDu+P/vP1D1n7//5KT+GUj+uvpHbdZtpQNsChWLFPj+fc8P/P/rz9/ff4DgL1ADQAAxMfz59+c/SDUQmEm8vfz444qtwv//srEwSBy58m7GTSVOhke/f/359fvvnz//gBoAAogJ6L9/f4E2/ANa+pfz738WVRNtXiF+NgdjMT8nuVOn+FlZ///6C7ThH1CegeEPQACBbfgL8hDQgM+fhLRl3lx+/Oztx89X7j44+5DZyfLa74/sv0HGQ20ACCAWYNgBbQAZ8Ofv5rMc0kz354QxHH5vePfZ8yK354ZS3/t2MgAdDA4lkAaAAAI5CeimPyBv/b1091PtOV4+cW6gj4CONBR9fuauxNZTAhDj/4I0/AEIIBaGX7+AxosIcv0FG/P7JUf+/P9+9pzAkMvZovb97TdZ8X+gIPkLdAdQwz+AAGJkYE5Ejkgw+oNEQhgQBNTAABBgADDPQBngvq0dAAAAAElFTkSuQmCC')}.ytcenter-flag-mq{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIhSURBVHjaADEAzv8BACWHAPj8gXhCJiASkKDMybzaAP7+/e6C/v7+BQV2AAD0WW9KMi4WdWOkAADqAAD+AoiZgdOhq9GNj5vNwUzW20lZQl7Q3knZ3lSWgYHhJx+nmZOWkCBnqLt6cJQpo5jUhSNHAAKIhYGJgeE/w9NXX+48fq+rIvr+448Pn3/+B4OHzz7++PmHjY35wbNPkiJc//79Z2D4AxBALAy//vz+8y/YVVVanJeFmYGZmfH7z98QDd++//79529FqhkfN+vnb78YGYG2fgMIIMbZq8+b6Uo/ffmJlYXp/38GXm5WoAYbIxmghv0nHwF98vLdVzYWpj9//0mL8c5fdwoggBj//v3LyMgIlP756y/QCBYWxv+oAKjnx8+/zMwMrKwsHz98AAgglnlrLpnqSwnwsrOxMj558eXrt19AFdZG0hAb/v77pyTNz8LKeOv+ezZWpkXrzwIEADEAzv8BAAV1eopM7/L4Z1Yu8vP5h5zI//7/r5NQ////QmKp+/r9HBgMdGE0o7HV3OLxvqJ7AoiJ4c8/oF8+f/157PxTbi5WEQFOBpij/v799+ffvxevv568+MzHQRkYRsBQAgggFob/P/78/ZsTbSQvwfPr718NJSGm+wyM4BAB+vLf33+lyaYSwtxff/xiYgQFK0AAASWyGRg+gTQzsDEw/GJg+ACM3ZcvVwB9IinpBQxHBgYusBTQIY+AJECAAQC87QvkuTqraAAAAABJRU5ErkJggg==')}.ytcenter-flag-mr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHLSURBVHjaYmSYysDwhYGBiQEE/sHQHzD6BWNA2D8YGDgYAAJQKO82AIAwEENTZDWmYhD2YDJadL7wkVw9OWNFb/3Pp14+BntDQUJID0oqZM0xrwBiYWADKv7/5OtToNK/QLH/QAV/g1R/////e8HV30Durz+/fjH+AsrI8sgysDAABBDIKUCT//4DGczF/huo7deXX+FKvyOUfv/6/OvX3588HL9A4A9ID9BhAAHEBHTfX4a/f/7/+fP1t5fsn1//fv1m+e2+/Zfjll+/WH79/PsrSvkXSCdQ/B9IA0AAMQG9+OffXyAHaPvZ17+XOP3+9e7Xr6e/fj/79evlr7Xuv8+9Ban+9ffXn79/gKYDBBALyAag//7++cX+6/TNP4+Vf++M/zX92u8//35laf5+/O3XltO/fwmA3AOxASCAQBpAPgMaAAwH3l8Z63976P/K1f3N8P9316Vf8w+CVf//DTQRaC5QA0AAgTQAORADQDr5f6258Gv5KZARQJFfwkBxoGOAFv4FIqD7AQKIBRhrwDCW5Jb8DREF6uT6/fvPb5CFjCAaGB5/gQAY6EANXxgAAoiRoZKB4R04dn/BYhSZARf/B45pIQaAAAMA6XpoXQ+yMwUAAAAASUVORK5CYII=')}.ytcenter-flag-ms{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH4SURBVHjaYjycXXuASa121ad6pk18LH+KnzmkK9zyspLwX/yJgeEPA8MvBoZ/YBKKAAIAMQDO/wEvJYOwlEAAGhv519gA9PP/GBsLFRC72fza2+z9+/70+//8+/4A+ff8/v/3/QOpnI0CADEAzv8EnvCUB9oRBMi7BfHz/vb2BhIP+PsCOff5xvU28PsDJjg4/P3+/Pz//Pz+8dfQAAD4AohpC4/Fb3k1Flm5P5y8/6Rl2dQ1P3MLX+VU/v6b4fevX7///JMUeqMg8uw3UNvvv0AnAQQQ0xuPGCYBgY2fZB9ySj9jFFrHacaio/OBU/jzr/+/f/0Bmv3jNxsz2wagDaz/QH4ACCCWf6eObVTkO/7onwELB8OfP4dv3Lwqx63J+p/x149fQJf8/ffzzweg6b9ADgPZABAAMQDO/wPL5zUrPC3v7/fh9wfg9gf7/P3n6vbP5f/z+wH9+gBRLKI0CLPz7P4dBL7S4Cjd2boCiAkYdkBjfv8Gor+/gOgXkPwHYXz+9ad3peXNd8L/OT91LLH59QcYvn8AAogFaMvfP/+BBgM1QPSAGH+gDJa//zqX2QA9ABT58RfopD8AAQTU8AcoISHGDSSBEn9AOv/9+Qcm/4BEGH7///f/LxPD3y+//gMVAwQQIwNDJCxGsaJ/SAygMgaAAAMA5XdGLTXRCtsAAAAASUVORK5CYII=')}.ytcenter-flag-mt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYvz48SPDv38MTEwMSODfmzc8ysr/gAwMBBBALEDAysJy8+ZNbW0tBkaQtv//GRhYWP4XFTF//sz0+/f/P3/+w8gvmzYBBBDLvz9/7ty/9+rZsz+/f+sbGv4HKWf4//fv/wcP/n/48P/X7/+/f/3/9QuomlFWFmgDQACxMLGwaGhofv7yFaEaCP79AykCqfsF0gPWwPD7N1ADQACx/AN7wNTMDKQaDKHg92+YHoQGoHEAAQTWwABVBWeAALJqiIY/f4BKAQIIpAGqAsV8mAYkGxjBTgIIIBbsxv/7D1cHNx4YUH8YGAACCOEkFA3//6EY/weo4S/D379ANQABxIKsGh5xjMzMDDIyDLy8QINB6O9fCAKaDRBAIBvevHnzDwaA1oKoV6/4tmxBi2MIAAgwAE21W+t5kcN2AAAAAElFTkSuQmCC')}.ytcenter-flag-mu{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGCSURBVHjaYjzOwPCHAQH+wbh/YOx/MAZEHCCAWNgYGJSqq/+D1P4Dov9///7/8/f/3z///vz5D0S/fwPJf2ASyD6/aRNAALHsYmBwYuD9+uQFUOk/oLrfINV/f4MU/QWiX0D273+/QGweWal5DAwAAcRSydBcye/4+NvXP3///QFpAaoBGgdW/PvfbyAXyPgFNOGvnDDvHoYnAAE4jJMUAEAYBoBpUBD//9qmiwvMYQaw0kZcrKgWKJRg/pLeVPOfsgnsI4BYGCQPSAmpMv95DzQVhP7+/Q2kwTb8/vMHKvjnD9AGKTGhgwzbAQKI8e9foH/z//9/8J/hF8P/P/////7//xdWkolJ6f37UwABxAIMG0ZGkBAw3FAVoagGywJtYgAIIJa0fQwR6n/e//z97x8oaP7++wVC/0GMfyDubxj3rxDH39J9DAABxDJ/FQNDBDCoJcFB8hcanCD2HwgJDDOgahD4//djDwNAADEyxDMAHQ9Ff7Ax/sAYwAhnYgAIMADE32WgD1cXGgAAAABJRU5ErkJggg==')}.ytcenter-flag-mv{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGwSURBVHjaYnzNwPAPjCAAzv6Hgf6AxQECcCjGNgDAIAzL0LkP8xUn9Y0kUIRkSx58xhuxSw1ttwyrpZJAYoL09sv8AogFrO3/3ydPf7L9/wfU8PvP/79AFb+AGkDs37//A9k/f7F/+M4kKwu0BCCAWIB2/f/3/w/Dv2ktaj9Ygaw/P/7/UGRR0GHTWft53c9/P38x/WX8/qvZ7wTH799AxQABxARyMcgZf/7++/3v7++ff39IM0m5c7oKMgqYsZkARf7+BTro979fv4EOA9oAEEAgJ4Ec/ef3X5BT/v78+12VXRnorN7XPawMrGDBPwx/f///BXIk0HSAAALZABQEuvX3/z+/Gf7+Y2S49vsGw3+GPKECSy6rn////GT884sB5CsGsA0AAQT2w2+wdUDbGf4y/fl3++eNzb/+6nDqHfi479+/X//+/gXZAFQDtgEggCBO+sP8/Vdx6nlQ4IDc+uvfrxPAIGoGhdLPf2C7Wb79AoY4UDFAALH8Adnwh1FSkgsU5H//Ad31G2ref0gkABl///4S+wsEQMUAAcR4FxaLf5Bi9B8SFxkxMTAABBgAab1LMOd7kuIAAAAASUVORK5CYII=')}.ytcenter-flag-mw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGjSURBVHjaYmTAAOwMDBkMDP8YGCYzYAEAARiIYyKAYRgIghM+aoNOrIQgjSGYTP70tordZ2TmbPvY0f3SX3MgYEsLfkkwVdUVQCxgbf+fPHn69+9f179/dX7/nv73b93v3wy/f7f+/h386/eJ379u/gJpkZWVBSoFCCAmIOb/91/o71+7v3+Nf/9e+Pdv1K9fD3//vv8LqPrXod8/0379EgEjIaApDAwAASgcgxuAYRCIHVIH6pqRMkznO0MIffpj+ykpqpT/Q5MrGduBNoFfe1Kf3QyypSuAwE768xfIB2pg+P2H8c9vNrA0CEEYQBLMABoKDAmAAAJp+P8XYjzQsD9gpUAVSKphJNAGoAaAAGJhjmao9/j96MOvP3///P77C0gAyd8g8vcfIOMviPsH6MS/f+QE/2y+yAAQQCwMUgzPuf88BkmA0K9/v36B1YHIf0AuVMMfoD/5/zKoMAAEEAvDD6BD/khySIKM/Pf3z1+wl4Eq/v0BkX9BoQEM8b///wLlgIoBAoiRoZSB4RPQ3wwMv2DoDxLjD4zxD0xyMQAEGACOo13bLsfWhAAAAABJRU5ErkJggg==')}.ytcenter-flag-mx{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHQSURBVHjaYmSI52ZgYmGAgD9/XvbdY2Jg+vfvH5AHJP/8+PFKUREkA+SCEUAAAZUyNUZ3MjAw/vv399ff30KCwkyMTAwM/4EAqO7/79+sOQUM//7/+/sHyL41bxZAAIHN/s/w7NOrv//+fv/9C6SO8T8C/Pv/694DEPX7N7OUJNAGgABiAdkM1A+0HWjIvz//wWbfu3IA6B5ZDWtmoNrfv8CO+8P05zfQYQABxMTw78/f/0CFf//8/fsbaO///49vnnhz/8Lqia13zu8EOuv/r1//fv/+9+v3v99/gDYABBALw69fIOP//gGqBuoBamATEPvCxMclpy0grf4faP2fP2AH/AEygDYABBATA5DxD2Q2EAGNAmrYd/boUw4hQQP9XacO/gM6CWzD/z8gBPQvQAABNTAAnQ6x4RfQ0wz/nUyd/315C7TN2coDqP/vr9//wU76D1TEwAAQQEAnMQCdD7bh9y+gH/79FxIQjfSMhQbSr1//QUHHAAyX/3//ATUABBBIw+9/f8R5hIEavv3+ycjICLQXQoIYTEyscrKgkAcG5Z/fQE8DBBAjgy04Gn+Ao/EDw8VtF9mY2IDe+wcGv758eWZrywRWAvYAA0CAAQD6o1TwTGkEKQAAAABJRU5ErkJggg==')}.ytcenter-flag-my{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHNSURBVHjaYmRgOCnIeWHTkh4GBgavqKLPP/UYGP4B0UkGewEIi4HhDxIJEECMgpwzH95nBqref1RdR/0RG9vP9VsNb98T6mgSYWf++5+B4f+/f/9h4MuzZwABADEAzv8Edm6yAABQxskPNS7GDAr2AP79SkHncL1W7GJjCAD5//v8//v6/vv7//r6Axwb3KipAoiFAQT+vXjJo6bExMPx59t35v////7+zSAwexoH85///8HGgwlGZmaV/AKAAGLkZp7+6vm//3+fd0z2Sgjbz/D/z7QFNucvSc1lK+dk+Pnvzx+w8b////nNLCNzfcMGgABiZGA4OmUit6fDdqDB+VWRQCf8Ajth8ypRTuZfYOPB5jMwAG34eO8eQAAxnmRgkMsv//ngEcPv3//+gEwCmvfv12+O358YOdj/AwWBusEkq7z81T17AAKI8ffzp4y8fP///mX4zwB1LMTRQIMhZoNJoBwjC8ubu3cBAojlnqS0aH7+nwcPQCb9+QMyDOImcMiAuBDBv3/ZFBUvHT0KEECM3+/fZxEUhBoDC3UGIAmPATCDASz7+uZNgABi+fXi2Y8nT/4BATBAgAjG+ANmM0D4fyCMf0wMDAABBgDcZ1sWFOFmVAAAAABJRU5ErkJggg==')}.ytcenter-flag-mz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHaSURBVHjaYuzVZygOY2DgYWD4wcDwj4HhD4xERr9gJAsDQAAO4pgIABCGAWBxgBMEIoIZG1XEiAaapHD88CXN1ujebFfpiEmIFJDAWxH8C8Hw6VcAsTAwMCi8+R+/8ul8y7+nFP/+Bir49xco9/sfGP39/evfr19/fwEZstyyQBsAAgik4f+//3yMf7N2/g2tL2SVlP8PBv+AEEqBGP/+/WNhYbkudR0ggFi+MTDc4Pqr6PPn+9I/knXdl36zzP79+9nvP0Crfv/69QtIApkg6resnOymXZsAAogJ6BNJN8a6tWK88Vz/Gb/pfH0b9OXN6y+vgegVBH169fLTSyB6+/Ut0DkAAcQCDJvVW/92xH57t4OD493fE39ZZ/5h+PUbhH6DGIwg8g+QZP79hw2oASCAGH8yMDBXZf2/cJ+B+8+/htqPArx//v1jALsa5PD//xhA5F8gm5mV8+al7QABBPI0w5s//5l/M3j+ZmCr4Pv86/8/IPoNI8GM/78Z/v9lZFdReXYRIIBYgLHEJPqHIU7yv+xvhh9/GUByvxmBJCiqfjMw/gEhBqD4X4aff/+9YQAIIMavogz/ehj+iTH8+8DwDxyvQBcBGf9+gRkQ9h9Q7INMYGMACDAAn2ZJkkC65DMAAAAASUVORK5CYII=')}.ytcenter-flag-na{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIZSURBVHjaYmRgmMjA8IOBgQWMgIxfDAz/GBj+gBGQLTJxqo+b2i8pV+N/YAmAAAAxAM7/AQAAh359Qw4L9wgH+OnsDPf5Avz8/v39/vz8/TI2GE9LHAnm3waRjP/y9P/7+/SysgIIaCobG+vvBK9VHOzfO+a4PHoo9vvPb05O5ugETTN1Dr6+hv/7D//79ev/7z+MtXXnKuMBAgiogYGR4R8jw29mxt9AEqhaRU04P1eD9/1Tjvz0/8/f/P/1+7+00uf6wjvijO6V1gABBNTw69MX1qYZHlxsX+8/FwoKV/e0F+RbOuP/+k3/f//6DzQ7LOJFjO+8l+sOn9zD8IQBIICAGv78/vPvyUteERGJzm4dwd/vOcrS/997CnTxf26hr13Ft5V5Ks7l3n55Q1FAERgQAAEEsuHv3782TtJxIdI829YyLl74/+cvkDOcXF9nRG75drJ/X+eXX19+A1377zcw2AACCKiBq7BIX4j5O2d71f/zV0AGM3N+rS1+Yqzccr3z1IPDvxh+AZX++fcHGHJAGwACiOXu9QTJBxcYu5r/f/kFUq1j/Koo/iTr4/aDSW9+vPkFNPjvrz8gDX+BCKgBIIBYpMwUmEKi/wtJ/Bdg+hXu/8pCb/Wzjfuu7RTgEOBm4/7z98+f/3+Abv77Hxg3f4FOAgggxq/g+AOiWysnb1P4Vj+nHBgUIP4vpOj+A4t9HgaAAAMAQO8VmfiJ/b4AAAAASUVORK5CYII=')}.ytcenter-flag-nc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHhSURBVHjaYmTwPs0AB3/+MfwBk7/+gBhA8heY/QNCghgAAcTCz/CjIUMNpPr7Ty6W5///M378LvWLjeXPv/9//4LQHxD6B0b/p2edBQgglo8MHAwM/41l1soI3xbmf8XN/evDJ/bN53wP3zD78wek6Peff7///gOSkoJsQNsBAoil8NKmYFlFYdUznJw/li37fenS37a2D1G2C9Tf3Lt3UvXvn39///yFIL6vvAcZJgAEADEAzv8EjOOKAO58/gT3///80tL8KCj7///7AQH7MR6+Mo7T//r6//v8//r7//v7AR8bQQDLAlAcxzYAgDAMwALqNyw8zNSD+gtsTUUQm90B09zd6M4iI7hWStnGUUKE/vRduMATQCzAsGA4zfbP4U90zK/fv4F2/05MBMr//nuBlRFo8K8/YBtAJCPQHwwMAAHEwmz+e7v0P5l7jCeO/Nmx/RdQ08+fv1JSfje+5lsX/Ato6a8/f37//fPn7x9l0b9nTzEABBAL0IL1l7idFJkPHv799RvQA78OH/n9Qlxw7RXu338hqoH2/oF4Hhj4AAHEwvCDAWjA1ptaf4x/83z+9uf3n+/cTGdf/pUXAioFBxLQ9H9/IQioASCAGBmUGYB6gPaASCD6zYAfAAQYAIwbQcePyNUkAAAAAElFTkSuQmCC')}.ytcenter-flag-ne{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVHjaYvwfycDwiYGBiQEI/v1jYPgFpEDkvz9g9IPh3y8wAjK+MfzjYQAIQKEcGgAAwjAA24BX8Xi+4rY51pZhojIszOauLdJFI0TUdWRHNlwhVfIb6zwBxMLwjYHh9///758ygNT9BYoy/AHq+Q1S9AeM/v76/+fX/9+/GUVkgUoAAojx682TnJKKDEB1QEuANvyHAAj97///vyDiHwgzMrM+PX8IIIBYGGR0GDg5waqBqkDw/42D/++d/P/n5395k/9aLv9hgIGR8Y+SFUAAsfwD+RRqLpTx8vb/U1v///z9n5n9v6YzsgagYoAAAmmAu4IB4hIh+f+6tv9///wvrvYfCTCCnPYPIIBYrry7osys/Ovvr39AxwKDCgjl1f7JqYGM+ffn3+cHYK8AVf5jZ2E/9+UcQAAxMuQzpPml3ft47/ff30AE1AlEv/+BGL//AMnfv//9+vPv95+/f1UEVC42XQQIIBZglP1m/CPJJwlU/eff3z8gFSD0598fEPn3z5//QMV/geH9FxioHAwAAcTIUMrA8AEau1D0B4nxB8aAKOBjAAgwANEEZRxBlgmBAAAAAElFTkSuQmCC')}.ytcenter-flag-nf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHsSURBVHjaYmBwZoCj2Xtnv37/+vPnzx8/fnz99vX79++fvnzavbWbQZiBgZeBgZUBCAACiAWIq3OrgeS/f/9stGwEeAWYGJm//Pz8/c93KV4pzr8cTppOEa3hv//9+f3396bcTQABBNLAwPD/yfunf//9/f7z+////xkY//du6/3+63trSOu/f/8///h88+Wt379/ywrLApUCBGBgjJEAgEEQVr3+/5funRGxjOFC7pHba5sareIEh/UKhJMZ6RGNVht9+AKIieEPw9//f4GK/vz5DXQVAyPDsdvHnr97/uzdswk7JjD8ZwCaBdQM0gPWABBAIBv+/P0L5Pz59+c/Awjuvrz7++/vP3/9BNoDdCHQFJBtf34DjQRqAAggJoZfQDP+AFUDRYGGLTu2DOjoP2Avvv/6ftbeWVAb/kFtAAggkAYgCygEdBXIsN+/Hr97/OnLp6/fv955defb729ArwE9ADT+71+QDQABxMLwgwFiHtBSoP/8jPyMlY37tvQB2VkuWaK8ojdf3PwNMg4UKkANAAHEArLhzx9JfkmgBjZWdh4OHk1OTRVxFaARhvKGQPLx+8fKoip/gQCsASCAGBkkGYB6QOgHQ+WSyjiDGDYWjndf3v349UOER+TLjy+TDk1anL+YAQYAAgwAPutUIEdI5O0AAAAASUVORK5CYII=')}.ytcenter-flag-ng{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF0SURBVHjaYmSYyMDwgwEE/jEw/GG4n3ZfgE3g379/IIF//979eKfepg4UB8n+YmBgYQAIIBaGLwzVrtUQ6X///4kLibMzcTAw/AcCoCD7b/aYgJg/DL9///vz++/vTTM3AQQQC1ATUPrJ16d///0FApDZTP/hACh4++PtX/9+/f73W5ZHFmgPQACxADHQZKDEHyD6+/s/Bvj19xdIw9/fQAR0FUAAgcz/y/D3z/8/f/6BEJpqoIUgDX9BNgARUANAALEAPQQ0G6j7z1+wBgYMG/78gjgJqACoGCCAQBr+gs0GigKFcDrpP9QGgAACaQBygKJA1b///vr/7/9/JE8Dww3knv+/gSYCzQUqBgggsJNASn9DEFYb/gA1/AeFClAxQACxAGMNGMaS3JIgb/z5y8jICAwGCAkEzEzMSvxKf///BSGghl8MAAHEyFDKwPAJFMeg+P7BcLzhuBCbECSm//z58+rLK+cMZ1A0M4DV8DAABBgA03x2IFD9ts4AAAAASUVORK5CYII=')}.ytcenter-flag-ni{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGOSURBVHjaYmQo/M/wiwEK/v1j+MMAQ/9A6BcqYmAACCAWoOr6ELDi/////Wf8+4/h73+gyv9//zL++cf8+y8TkP3n7//fQPLf/zVNXwACiAVk2H+Gp5/+g5SCDAVKMwClf/+Fqvv95/+vvyCuDD8jw7d/AAHEYmrCoCryX5ATaANQA0QbkPz+99+f3/+4gHogNgBJUS6GjQ7/AAKI8S/QbkZGoJP+///PAIb/v8z9/eXTv3+/Wbg4/3Nn/IcBoLJPnz4BBBATxLdQMQj999f2+2q31n/8//f3f2QACpR/AAHEgqyaAaqD0VH+wl9Zjv8MKOoZgaHy7x9AADHqT/9daMH4+ut/mI+Bzv3H+PvD3///vv/jBwkCRYC2/mUQ52FsW/gGIIBYLu76d1qa+f47YDgwgEIDFCbAUOIHMkBsSJiCQoxBRZiBYSUDQAABg/XfbwYmCX4GsAQoroDkb2AkgLQx/AOSwGj5ywiMpT+gePsHEECMDP5fGb7AIhIo9oMBPXYhUf4bpJyBlQEgwAAvMWK745hsrQAAAABJRU5ErkJggg==')}.ytcenter-flag-nl{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFXSURBVHjaYvzPgAD/UNlYEUAAkuTgCAAIBgJggq5VoAs1qM0vdzmMz362vezjokxPGimkEQ5WoAQEKuK71zwCCKyB4c//J8+BShn+/vv/+w/D399AEox+//8FJH/9/wUU+cUoKw20ASCAWBhEDf/LyDOw84BU//kDtgGI/oARmAHRDJQSFwVqAAggxo8fP/Ly8oKc9P8/AxjiAoyMjA8ePAAIIJZ///5BVIM0MOBWDpRlZPzz5w9AALH8gyvCbz7QBrCJAAHEyKDYX15r/+j1199//v35++/Xn7+///77DST/wMl/f4Dk378K4jx7O2cABBALw7NP77/+ev3xB0gOpOHfr99AdX9/gTVASKCGP//+8XCyMjC8AwggFoZfIHWSwpwQk4CW/AYjsKlA8u+ff////v33998/YPgBnQQQQIzAaGNg+AVGf5AYf5BE/oCjGEIyAQQYAGvKZ4C6+xXRAAAAAElFTkSuQmCC')}.ytcenter-flag-no{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGSSURBVHjaYnzIAAVy//9zRV36skTnATPzPwaGf2BBCOMPEgkQQCxAUcHaaiD5////ngQpRkZG4aLC/3//MPz58x+Efv//DSL/Acnfv+9u2AQQQCxgg/7/e/IUSL18/weo7c+DB0AVDL+BioCqgejXv1+//v/6zSwrC7QBIIDAGv4CVf0F0f9ADvn/5xfI1F8gpSDVQD2/QCTT799AVwEEEIvM379AZ0Cc9Aeo8/9/gbUb/mMDQGUanz4BBBAjc/D5/mTpF+9///0HdvO/f0BtQA6I/AMk//3+CxIHikgJss7OOQ0QQIx///6FGP+f4X/JgmfdcZL/cQAmJqb3798DBBDLPWZmkdysP/fuC2zY9BvspLd21v9+gXzMAPLub6g3fv9hUVa6evocQACxAL35HxxkQKUgZ/3//+8nRMUvkCBIJ4jxD+iQP8DAZgAIILCGP3+YJEEuEeUDBRqzjCzTX1DAM4CDn/nPH5Dqv3//gR0PEECMV2FRqPD+vaDeibcXzK4JC/+BxTEkghlgJBAABBgA9J5akqVspaUAAAAASUVORK5CYII=')}.ytcenter-flag-np{width:9px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAALCAYAAACtWacbAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFNSURBVHjaYjTSPPnvLTsvAxD8f3Bek5kBCwAIIAZjzWP/PwAVPGdk/Cere/Lz////GdAxQAAx/f33meEPULXw48eMN5dxcctq7/iGbhBAADH9+/eJQeDDB4b/P38yMHNwMN7bo88prTrvD7IigABi+vP3HcO3ffsYmPj4GJj4+RkeS0kxbLuTzCwp3/AfpggggBjV5Zv/b39Yy/APyAlw2cLw8eUjhm8fXgLd8pPh/79fDO+e9jICBBDL778vGX4BFYh0dDDs+3WOQX3mZ4Z3T7oYka0DCCAGOYnQ/69qa///fPDg/8/79//f9/b+zycW+x/ZdwABBHTTS4a/QIcz/PkDxqxCQgxLXy1m4BH0gLsJIIAYxITM/h8HhtOT8PD/j4OC/h8Csg8C8Wog5uC1ApsIEECM3IKeQPo3UOgX0Oh/YMwApkFxALEOIMAA8JGo784JaZMAAAAASUVORK5CYII=')}.ytcenter-flag-nr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGhSURBVHjaYmSQjGf4wwAF//4x/PrD8OcPiPz7iwEk8QsJ/QCKAAQQC1CwriMGpPjvv3//Gf4Cwb9/f/6CeH/+ABl/fwPJP39/gxh/17VXAgQQC8jg//+fvv70999/oGKgUrD0P6A0HP36/QdIyojxA+0BCCAWhn9AUxn+/P0PMhWk+t8vMPn7zz+YajAJZP/+C9QAEEAsDFx/mJn+MDP8/s/49z/Qrv8g14AdBrLvD8SBIN6ff/+BXvoGEEAs92ccEtKw//3z1Z+/f4D+YGT4+//fHzD6/Q/M+PfvN5j8w8IhcVPoL0AAsSgGmBT3Sz5+wWGpI3v08sNPX3+C3PD7z6+/IDcAXfLnz5/fYFcpSAoemcUAEEBMDEAP/f5nq6+UE2zTnuHz9x/j9x9/vv/+/+Pnvx+//v34+ff7z3/ff4HQL3DoAwQQMJR+AV16/ubTl28/333y6sePn79hgQg0+w/YH2BPAAHQ0wwAAQTU8AMYIP8ZGSatOfr+83cJYd4/oDD9B1MKZkCU/wVpAAggRgYGS9TohMQonP2fARUABBgABC1yvgwYOZYAAAAASUVORK5CYII=')}.ytcenter-flag-nu{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHOSURBVHjaYiwuvt7FMqONp+APB1fdiZgilVk/fv2YdCfH9knezhVL2DnZ/v39C0H//wHBX4AAYnnDJXUntbfm2+1nnGKM+ebpN4XVP18+wLLFetc/ZrFlzOxMTP+AKhn+/2P4+5fh97OfAAEAMQDO/wO+Ie8YMyUBFa0Nxu0AAdcTwuL/MscUzvQyyZoKRvn9//z9/Pr7+/r8/PsCAQH68foCMDjGKACAMBBT8f/PdLCIoIKF2qu3JySl9pbpwpNI6E1jhmnsU205LPCcM2zwigzwBRBTms68m/waDDfsHliHMGh8OmWcwHDLa51IUL181def3/7+/fP/P9ADf/7/A5FAlwEEEMv/h/c1j16b9NzyEydzcf2vHaYMe76KxdzPvMgdy8nCCjEbrPofExPQHX8BAojx8+1oTnkOoBOBVgMNACoAOgMUHv/+gHkQ1X+BTFYWph9PfgIEEAsDw3+IMXDVEEeDAhHZ9SBVDL9//wYIIJa//4AuY4MJQVRDQx1oLSREQSQDyBAgARBAQBsYQNHBzAzyEzMw6IAO/c/MyAD0JxMrC9hJQGVgd4BY/wACiAVo3M9nP0BGggwHuRjiaAaYY/6CohmqCUgCBBgA5aZ4oR98IZwAAAAASUVORK5CYII=')}.ytcenter-flag-nz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIRSURBVHjaYjxc2Ljjk0jr3Ev1olfYmJiqX0qkyv/zclALXPiMgeEbA8MfMPrBwPALjFgAAgAxAM7/AS0Xa7epXfwUF/jW1QD39gAZGw4VErTN7NDe8vv7/vz8/kMK6bzzE/P3/Pv8/7KfgQIAMQDO/wSiAq4D1CoH8e0F7/D/9/gFERD4+/499/qx7TH3+/9NCeQk9erw9xCY5RQdGxAAAPwCADEAzv8CsAow+yQpBiMk+w4S/hwfCDAv9BIZ0QUe+fz/+vv9qO0VwPAPmOYWXRHk//39AAD6AojpjV0AIw/fsvucDxkFH/7mWvRBlkVT8wMb349ff6sEr4lwMix+LRbC9UD1/1tP9idADQABADEAzv8DKPMR6AkVxNLu9/f53uz7vcnl0+j9FQj90On8TQnjKv/rt+8RzfMKE/71tv8j49i7Aohl8V2WfGaBP3wMJ/7w/vn99zf/n5uvf19+9vfX7//pD7R+/f7z+/cfoNtmf5dW4gQ5CSCAmID+AIbGr7//QKp///3169/P30DX/4OoA0n9/hvDcx8o+/fPP6AGgABiAWr48+fv719/fwNJsCKQul9gEsj+82eC+EXBf19/8v48+NcQqAEggIAavgEDWFKcBygN1AkMeJBOIAOo4Q8wHv7OZrXzZn9y8J/437//GRj+AgQQIwNDMAPDF6S4/AWO2l+oCBLfQCdxAQQYAPiQOqzN4uIGAAAAAElFTkSuQmCC')}.ytcenter-flag-om{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFwSURBVHjaYtzPgAIM3n9kYPgHBAwQCgMABBALUML2w4dv585xWVo+b2jg5+f9/x8o9v8/nEICz549AwggkIa/Hz/y2Nj8vHv316NHWNVBACMj458/fwACiAkozSwm9mHbNjYlpX+/f+NSDQFAJwEEECPQDyplZT+BZv/58//3n79/fv///Ruo898vIOPXv1+/gOz/YJJdXv7AwYMAAcQC9N3/P3+BioAa/v3+w/DnN8OvXwxAq8Dq/kNICOPPH6D9AAHEAiT+//0DVg005g/Tb5DBDL9+M/76xfgbSv6HsH//BnoAIIDAGkAO+PUP6KRfv5JKfv/6++v3X5CzIAygs4BsoFuV+f6cbWcACCBQKP0DGQ9yN1AnUBFCHZAE6fwFcuu/v3/+/mX4xwAQQBAb/rBKSoLs+fNXhgus9S9QxR+QwSB7gSr//v0HVP6X4Q8DQAAxrmUAkiD0D0wmhjIw/AKzvoGF/sG4EGkGBoAAAwC87Hl4OQQUvQAAAABJRU5ErkJggg==')}.ytcenter-flag-pa{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZT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RqaQECUMgAioGCCDGr0ixCIrh8+ehEQz0IgTY2kKlwAAgwAACPWGEO27OJwAAAABJRU5ErkJggg==')}.ytcenter-flag-pf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGESURBVHjaYrzOwPCHAQH+oSKI1B8kNkAADsXYBgAYhGEMPaK/8hW39BsMKUKKbA85o+u+39asSpQVDQadKdBy+kV8AcQC1MrI8P/3k6dApQxA1UC5v39B6iDo1+9/v3/9+/ULyGaRlf3FwAAQQIyvX74UFhUF2fAfBIDa/zNc/nRjNSMfO5e42///Bv8h4N8/RkbGj58+AQQQ0z+Y6/+DCKDqV58/Lvg65ezPnec/fZjz//9zqAaoAgaAAGKCqoaK/v/+ffOft5/eMkpe/Wb49+vXH99X/4cDkDf/AQQQC7JqIPzJFLHluuov2dt/P/65ejEz2EGLFaaeEeSufwABxIKkH6STl4XdyFD/ECv/33//rDTl+Vk5kGX//PkDEEAs9yUk/qel/bx3DxgOoMD59Yvz1y9XMAPIvQ9h/AEG6192FZWjFy8CBBAoWP/+/sMkKcnw+zfjn79AOcbfv5mBmmGRAGSAIucvCAAVAwQQ43EGhl+wiPyDxPiDGt8QBtDHAAEGAMIBQ2IEyDEvAAAAAElFTkSuQmCC')}.ytcenter-flag-pg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHjSURBVHjaTMJBCgAQEADA+aD/P8FJkjZJopxMI5E57/4uJoOg06gUrgAMxzERACAMA8CwIgQRWEASGjDTAWXdmjZw98s3AGfvBYwqfJliIikSnZqhS3n8KsLNngBiAWp4x/C/48lTu79/Q//+5fr9G6Tn9+///3//t/79X+33f/5f/9f++n/4N6Os7D8GBoAAYgJq+PcPaOjfvaysbczMV4Gqf/0CabD7/d/l13+On//lfv13/PX/P0gQqAEggEAa/v79++fPn8SYGCVHx8pfv+b//v3996//D379n/Lr/9Zf/x/9+n/m1/80kAagYoAAAmlgYWHJzMycMX36hrXr0tLSVrOy5v38de3sr/+Xfv2f/fv/iV//HX793/gL6A2gDQABOJyjEwBAEICCzdtKfbVLjuCHgwT6DIwa4OAeAMzM3fOkiLC3Qo+YkBE1qEUp7ZeuAAJp+Pbt2/r1638C5f7/V1NT+/LlC9CIj79/9/z6lfz7902gl2b9ZvgJCrc/DAwAAQQKJSDj9+/fOTk5d+7cmTFjBlA1kAshj/z+HfLrV9mf35F//jL9BUYPA0AAgTT8/v1HUlLywYMH169fl5GR+Q0GEFP+gMHsv3+v/P2b+/cvKwMDQAAxkATyGRgAAgwAFBNAveVnNNkAAAAASUVORK5CYII=')}.ytcenter-flag-ph{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGsSURBVHjaYly7dnpw8DcGhi8MIPAPjP6AEZDxC8z4hcwACMBhvNMAAMJQAAwTkhDKiorKqQgQ0PchsFyu2WPvFdEzj2TSgEgBLygV+FUVI+YVQIzfv7/k4BADqtu27cmaNbe/ffv19y/D79//f/8Gqfj96++v339//QKxZWW5t2+fABBATAwMfP//f2Niuufjw1pSoiUry/vr13+w0j+/oKqBCMj+AzQC6CSAAGL69w9IPWZgmP7//3RtLeb6ehMdHaCevz9//QORPyEaQAiiASCAWBgYPjMwPPz//8H//1wMDPe5uQ2am1esmax9buX7P7+Arv8DdNWfX3+ADLE/ogcZTgMEEFAD9///Mv//q/xnEGP4r/z/+8//i5WCVswPBLvsPxLJ9Fspj4EBIIBYgC4Ca4hhYBD4f+3+/ymz/58/9x/sa2TVDOBQAwYtQAABNXxlYBD5/1+dYcPm/7Nm/P/wHlkdlPEHqOEvAzD4GBgAAgiowej/u+UMSy/8P3mcQUCAgYcbGKiMYCMZICQQ/f0LQUBfAwQQC9sa/R+p9v9gkQyPbUwEAQABBgA3IVX7XymN1wAAAABJRU5ErkJggg==')}.ytcenter-flag-pk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHLSURBVHjaYvz48yMDGHz59UV6mjTDFwaGfwwMf8AIyPgFZvyCMVgYAAKIBaiUj40PSLIxs9Xb13/9/fUPw9+///78+fvnDwOQ/P37H5j8++f3v9+bZmwCCCAWiPH/////9+/f46+PP/389Pff3/8M/6W5ZR6+v/v97/dfv3/9+vcLqFqWRxZoD0AAMUFUQ8g///4AVf/68ytbO9tG3Pr7z+8sjCylBqWSnJJAQaAeoKsAAoiJAQaApgI1ACWsJK3UBNR2PN75899PGW4ZTSHNGPUYkIa/v4E2AAQQC9AlEOOBACgEBLysvJzMnM++PP3199fZV+faz7Q/+vzo1/9ff/7/AWoACCAmoPr/MADUAJR49e0lMADi1OJ+/fz16+fPw08OP/j8AOgekA1/GAACiIXh3z8kDSD/7Xiw00DY0EfRBxjin399VuBV2HBnw54ne4BBB9QAEEAs/xgQTvr17zfQGUBL6k/WPfn8xEHKgYeNZ+L5iTfe3fjx98efv3+BTgIIIJAfIKHEyMgoyS3Jzcz9+z/I9k13N62/vx4YaD9//2RmZVYRUPn7/y/QBoAAYnz+/vk/MPjx54dqiSrDG4wIRo54LgaAAAMAh8pAjKSRbocAAAAASUVORK5CYII=')}.ytcenter-flag-pl{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAA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rn+/f/8Fol8Q8heU8fvPvwOnVJ7ckEt0ufDquu7FG7JAxQABxAK0BSghLsL158/fP3///fn97/dfkNI/f/8Cg//UFXcB7p9TFujw8zHtPgI0/R9AADEyMKQjRySMAUH/kBh/wCQDQIABAJPTL1o6B4FZAAAAAElFTkSuQmCC')}.ytcenter-flag-pr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG+SURBVHjaYmRguLmYwUCH4fsPBoZfDAz/kNAfMGKAMYCIiYEBIIBYGBjUHlW/EWE4rMN0gpXx5++ff///+ff/z+9/f4GMPxD07/dvIAIyTqxbBxBAjAwM/2urGR49+a/A86qwmotXhP3/v///gaJA4j8MMDGBuP/+vb91CyCAmEA2/vvPy8lw851YbhX3o6csf5lYGJiZgeg/HAH1A9UxM/9jYQEIIKCT/omJMUZGMOzf8//cBYacnP/xsuuUPh3m/f3q/++fUMeASTYZmWMrVgAEEFADg5kJg6bWf26u/4ePMPz7/X/ajYCYvzeNfp5h/vX9B1Dpr18g9Ps3x///zxgYAAIIpGHn9v9AH27b8v/bV4bvv/6nyK804fnA/Ecf6HV2oAaIv//+ZZWQkDt6FCCAgJ7+XZDFePM+UJCBg/N/d/d/Wbn/TAj/QgHQXEZGxmfXrgEEEMgPP/4wA92pwvussYeHX5obJP/vP8hgEOMfSC1YD1ADw7dvAAEE0sD6+3uC5HZTht3fGr6+/wYOdaBquGNA5N9///4y/P2748IFgAACargnNl9blIHhEgPDN6QI/oUtvtkYGAACDACeLSsxVcvF+QAAAABJRU5ErkJggg==')}.ytcenter-flag-ps{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFqSURBVHjaYpjNQBoACCDG/wwMb6qrdzIwXP0HAn///v3zB0xAwO/fv2EkkNi0aRNAALEANYkw/I968nTf37/L//79+Ps3UPlvOPgFgkAAZMrKygIVAwQQSMP/f/8Z/v51+vtX8fdvBQ/v/wmx/7EBRkbGhw8fAgQQyz+gjm/fGEHa/in8/vN/57b/TP//x8RgagAqBLoZIICYEN758fP/79//P378v2jR/77+/9h0AL0DEEAsEMX/P3/59/8fw+9f//+z/PcL/J+VjsVJYEsAAogJ6CSgwf9+/WT4/v0hz6//Xh5YVYMM/Q909T+AAAL5gfnPH6Ce3aq/J3iw/f67/teWlb+B4fT396+/v37/+/PnH4j9599fZX6loy1HAQIIpOE925814ZLnlFklgcH/7w9I9T+gCmB8/Pn7/w9QDzCg//7/+/ffX4Y/DAABxNjJwFAeyMAgxMDwC4b+IDH+wBj/wCQDA0CAAQDkoFQxcPY0cQAAAABJRU5ErkJggg==')}.ytcenter-flag-pt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG8SURBVHjaYmSIZGD4wgAF/xgYWBj+boQysSKAAGJh+MRQnVoNUgEE///9ZfzLoPiX4e8fxj9/mP/8Yfr9+/+fP/9h5JdNmwACiIWBCaj4/5P3T7mY/xoJ/9UR/v0n8O+f17/Zlv/+//73/1+////+9f/XL6BqRllZoA0AAcQCNvv/339/C03+8v/8w7bk7+/vv/+7/P4S95ur+xdY9W+IBobfv4EaAAKICeiuv////vnz58PX3xxb/7BlN3/K7Ph1WoSR/fcfhl//f4KN/wW1BGg6QAAxMfxi+PP37++/v1kYfn//+usnE+cHCbWfTKz/mH7+ZgUpQmj48wdoA0AAsQA1/P0HZP458/qXqvNfjdnVItxy3wNvApUIvwPb8BvqJEawkwACiIXhDwPQ+F9/f+2890dY6/cnrycCb++z3frNfOwX01eEagZgKAHdzcAAEEAgG4DGA/W8+fO79+Rvdt5f2+b++sP+m+kdWDVEwx+gBmBY/wX6ASCAWBi+Mfz+80eSX/L3n99AzwBDm0H2NwtQHS/QapDBIPT3LwQBnQQQQIwMxgwM7xgYfjAArQKRTAyvP2OPYwgACDAAjtdGduN8tIgAAAAASUVORK5CYII=')}.ytcenter-flag-pw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG4SURBVHjaYmSY/J/hGwMM/GP4BSIY/gDRPwT6BSNZGAACcCgnRQCAMAwAKeAMWUjBBdr6a9JwzOxze/Eyx79SyoiXKQEGa8gaFFJxUXv5EUAsDEwg1U++/v/7nwGo2kj0pJ3UHsb/f3Y/sdv7yPb3//+//oEQULUsDyPDv38AAcQCMvvf/79AO/8w+CvODldqZWR49p9BzFBo6/9/dZvvuf1i+P/rL0jD778MQFcBBBATUPlfsIMZmH57y01kZHgE5AH1MDE+ilReyMD869cfkAaQnn//gT4ECCAmoJOBqoEGMDL85GG5Dfc+E+NbEY7HrIyf4Rr+gA0GCCCgDQx//4G89fU365ffinANf//xv/rG//4HJ8gPf8HeANnwDyCAmIAY4rPvv1jW3Mv491+MgYH57z+hP3/5596I+fKdDeJjoPFAc4EeBQggFqAf/vxlBvnpH8Ocq9l3P6p4yqwH+nPjA4+VdwKBPoYEKyQ+gO4HCCAWhh//fv9jkuRmAEswXH3rduGNKyjgfzPI84HVAYP7LyMwZoAhCXQOQAAxMpR/ZfiEFJc/QKJQ7j+kaAaxGRj4GAACDACoBTqv9JtaWQAAAABJRU5ErkJggg==')}.ytcenter-flag-py{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFrSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALAxfv/5nY2P49w+s7z8IQwEDgvPvH4jPxPTvzRuAAGL58I+Nn5mZgZkZqgTotEePfm5Z9+/3bzafIAY5OYQBjIxvfrEBBBATxKdwQ0Hgy6fl2u/qvzj///z+PzJgYPjz5x9AADH9A1v3H8k1DJwcAYf/V/1YycDBiaIeiP79Awggxrcfv3Oxsf4FaQPp+AdzPtBpf//DBP4BIQMLM9OT5y8BAoiRQfBic4fU45e/gdb9/sMAJv+DSTjj/59///7++S8nwbZmwmmAABSRQQoAIAzD5vADgv9/qDSb3TmFULLjleh7EqWmQXoESzjDIChVWKeeu18AMTIwnwVGEzgSkUkI4w9SFP+BpACAAAMAApVT/l2szdAAAAAASUVORK5CYII=')}.ytcenter-flag-qa{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFUSURBVHjaYvz59es/Bij4x/AvSULo3OfffxgYfjEw/ICRvxkQACCAGIEa2Li4gKz///9DhBZXl//9+/vf379//wDp33///PkDJv/9+V22fC1AALFAjIerXtFU9/rRA7AiIPoF1PAHhH4BSSFpGaACgABiQlb979+/8NpGkFqQCpCi32DG718gBLQBqAYggFjgjoNoW1xVBjL11y+wDVCzwdzff0FeYwAIICagqRDVEA3RLR0Q6T+/f/4BGQxV/RtMAhUABBALUMN/qPL////9n19SAHLGL4TTwTb8/gfyN0gDQAAx/YMbD9LxP6G7H2zkLxD5C6wTauFvYKgBNQAEEAsDzEkQn8zMzQAbD3E62Pg/IOP/AMP4D0glQAAxfnz/louHD+4HINkXG/EX7GVw2P8FkaAY+QuMmQknzgMEEMgPH969+wcGQHkTWfmXDPgAQIABAGt9W+VUXtJZAAAAAElFTkSuQmCC')}.ytcenter-flag-re{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGzSURBVHjaYiyeepkBBv79+Zfnx/f379+fP38CyT9//jAyMiq5GP77wvDnJ8MfoAIGBoAAYgGqC7STApL///3/9++/pCTv////Qdz/QO4/IMna0vf/z+9/v379//37bUUTQACBNDD8Z/j87fffvyAVX79+/Q8GQDbQeKA9fM+e/Pv18/+vnwzCIkBLAAKQOAY5AIAwCEv4/4PddNUm3ji0QJyxW3rgzE0iLfqDGr2oYuu0l54AYvnz5x9Q6d+/QPQfyAQqAin9B3EOyG1A1UDj//36zfjr1y8GBoAAFI9BDgAwCMIw+P8Ho3GDO6XQ0l4MN8b2kUwYaLszqgKM/KHcDXwBxAJUD3TJ779A8h9Q5D8SAHoARP36+Rfo41+/mcA2AAQQy49ff0Cu//MPpAeI/0FdA1QNYYNVA/3wmwEYVgwMAAHE8uPHH5BqoD1//gJJLADoJKDS378Z//wFhhJAALF8A3rizz8uTmYg788fJkj4QOKREQyYxSWBhjEC/fcXZANAALF8+/anbcHlHz9+ffvx58uPX9KckkCn/gby/wLd8uvHjx96k+cD1UGiGQgAAgwA7q17ZpsMdUQAAAAASUVORK5CYII=')}.ytcenter-flag-ro{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGBSURBVHjaYmTQPs7w6Q8DCDAxMLC8P2DOwcbA8I/hHxix/GD4pw3kIRBAALEwvPtT3aQIVP7vH+O//0yc0hWsrD8ZGP78//8HRH75/T/mz//fv///AZFfNm0CCCAWBhYGhv8MT17//vvv/99/TP/+PWJg+P7//28o+vP7/+1f/3/9AqpmlJUF2gAQQCwgs/8zAFX/+QtCQIP///8FJn+DGP+Aqn9DNDD8/g3UABBALAx//oFV//vzhwGs4RfCeBAbRQPQdIAAYmH49Q+o7vef/zANv5H0gBm/oE5i+PMHaANAAIE0/AUZ//8XUM9fBiQNYBLJSYxgJwEEEEjD778Mv/6A9Pz+wwB1BpoNYOOBbgAGHEAAsTD8BNL/gJqBrvr9lxFJA8QGsIY/QA1/Gf7+BfoBIICAofQHqFRShBXkjb/MTEzSDAzfGBmB/gMa95uB5Q+D0h+QUjACOgkggBgZGLYyMPwCS4Nc+HxvMAsLw78/4HgFkh8Y/oVD4xgCAAIMACetb51Fz+5FAAAAAElFTkSuQmCC')}.ytcenter-flag-rs{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAUlJREFUeNp0UE1Lw0AQnW02AcVcRPyoWqnYnHvy6FVRf4GIR/+BHoI3wb9RRKFXERSP1aMgCIWCVARRlKKhlTQimp1xNpuEgvjYHWZm572ZHfEMgMlRmTMYwp+8eAQY294AIj5IpAiUdgCTENNkmnmtn8iYRZA+mw/M7qAcXysqpLfLDzfq6j6kYbQdb5at1B0J4yRrjQy7O/MA1GncmExaPeBLr+Qvzi1df3eBVLAM7dUaq5b93dHai9blUYGn1d+pzri3xZLkgBQCKnbkxGTl/BTi+KfVAjLroIwDkFyZNORqTXhvXEXHdW7tFKcAykY4JWQQURTlQXNlvXKwzwJ3/l714owy6L0gOo7T6/VEv98XQhjCV/v+6fAIFU5vbQ55C6bUVLO1LCsMQ8Ek27ZhAHobiHlo/EKhwFYTgiDABOYtn+E//AowAFh4/jzczTSYAAAAAElFTkSuQmCC')}.ytcenter-flag-ru{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE2SURBVHjaYvz69T8DAvz79w9CQVj/0MCffwwAAcQClObiAin6/x+okxHMgPCAbOb//5n+I4EXL74ABBALxGSwagTjPzbAyMgItAQggBg9Pf9nZPx//x7kjL9////9C2QAyf9//qCQQCQkxFhY+BEggFi2b/+nq8v46BEDSPQ3w+8//3//BqFfv9BJeXmQEwACCOSkP38YgHy4Bog0RN0vIOMXVOTPH6Cv/gEEEEgDxFKgHEgDXCmGDUAE1AAQQCybGZg1f/d8//XsH0jTn3+///z79RtE/v4NZfz68xfI/vOX+4/0ZoZFAAHE4gYMvD+3/v2+h91wCANo9Z+/jH9VxBkYAAKIBRg9TL//MEhKAuWAogxgZzGC2CCfgUggAoYdGAEVAwQQ41egu5AQAyoXTQoIAAIMAD+JZR7YOGEWAAAAAElFTkSuQmCC')}.ytcenter-flag-rw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGnSURBVHjaJInBDQAgEINwAMd2aVPRU/sgkLY+9pS/6ApU5gZKfXn8IkcAsQAZfe4g1f/////7n/Hff5Cyv/9A7L//mH//Y/r/70+oyCTG/7+WPc9pm/wPIIBYIGa/+gpUAVL6B6j0L8Of/////P0PZP/4/T9Vsonn102mf99CRX61MeQBBBAT0P7/QEUgU0Gq//xl+P3//++/IA2/wXqWv8j4/ofp5S/R3W8DgQ4DCCCW37/+/fnP+Osv2BkQG0CW/P8B0/P0l2j17flAcREeZoZPnwACiPHzTwZW5sr//x79BzkEaDqQ/AVkMIDYv/+B2L8g4oxM8i9e7wUIIBYukC++/Wf68p/hF8N/iJ5fWEkmJiE+NgaAAGIBepSRESTEwPAHVRGKarDsnz9/GAACiIW1jqHE68+DT79///v9+y8Q/fr17xeEAST//Acx/gC5//4q8f890M4AEIAhOUgBGISBABiTWOgT+v/PiehVCrsrOtdJ6zZ/vvnlRi2i47ntoBMBigxq6xpL1uwIIEaGZAaGHwxA9yPQHyTyFzjiIVwgg4UBIMAA+Llowbi/5UcAAAAASUVORK5CYII=')}.ytcenter-flag-sa{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG5SURBVHjaYmTwZkCAfwwMf8DoF4wEoh9IjB8MAAEYFJMbAEAYhvXBsLAFrAMj5iiR/LAsj2xn7q7qMkVZtmnGKdEAkRgg3PW+AAJpAKp+9vEZUB0TAxOQ9+3nt19/frGysP3+8+v7rx//Gf5//fnly4/PMkKyQMUAAcQCdMb///9//vlhpWijLKz6+cen0/fPGMjpszGxMTMyHb171E7V/vKzSwuOzwVaBdQAEEAgDWAH/AXyP33/wMHKKSMgzcnMee/1vZ9/fn74/uHtlzfMDMy//gJdBtIAEEBMQN8A3ffn728RbhEFEYXXX958+fXl2otrHGzs155f42Dmuvv67o5rO/6CvAQMBwaAACTN0Q0AEAwFQO3+i4hhLOJXQvvahxjgcm+IBFlar0K5m4WZG4CFraJjDsCZ/OAIIBagDX/A1v36/TPJOomLhRvoJXhY8bHzAaWyV2T9/PsTyAVqAAggmAYg/Pdn8r7Jf/6BFAMtAYoAyQKngsO3DgP1QAIaqAEggFiAcfH73x8JPglwkANFf4OkgUb8A5Erzi4H+k9OSB6oAWgnUANAADEyKKNEJMNPBvwAIMAAMHo3F4Y5Tq0AAAAASUVORK5CYII=')}.ytcenter-flag-sb{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAICSURBVHjaYmRmPtvSIlVZeaO6Wq2j48Xfv58YGP4xgMAfMANCcjEwPJkYnmjkwgAQADEAzv8Enp4eVlYSBQUAbm4WLi4IzMz1+/sA/f3+/Pz//Pz+/PsB+/wESjvGPjLQ/wljhJmdAgAxAM7/AQAAw56eJzQ0C6Ki7ujo+vj4/v39//v7/vv7//v7BQMA93dfpSwrx+D0BYHMBbd0twKIhYGB5ePHf4KCzH/+/uPnZ/r69c+vX0CzGX//YvOzOxTiupeB6832+wztJx/JicoBHQoQQCzW1gIZGSKJSffnz1NYs+bDihVvfv9mY/j3ozRmpaH+0euf/uRue/Hzz6/fYFuBGgACADEAzv8ExcXsvr4Z+/oAqqrvsbHy+/sJSDjGVUa79QbfuuQDiMno+/76+v76+/z7/Pz8AAAAAgjopF+7dn0AenHFys/6qvd8bI6rKp69/+1n79FvV998+fX/1++/v38BbQB66i/IBoAAAmoAMhl+/WJL9N+prXD5n8C5gy95W48DDf4NMRiiGmj8378gGwACCORpF4urgnaXVeWPv2b4s/AK274Hz4Eu/vUXYvbv339+/QFqACr/9xeoASCAWCJNGyQFgqWUrt76KDnt3Ns//1llRbiBSv/8/QNy9z9QZPyFALAGgABiPD6Z4QUbw5RzDHsXMTB8ZyAIAAIMACDfK+Co9zmnAAAAAElFTkSuQmCC')}.ytcenter-flag-sc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHySURBVHjaYmRgmMjA8IMBBJgYGL6dPFlvYgLi/PvH8O8Twz8phn8/Gf4xIBBAALEwMHyprnYFq2A2MLhjalry//9fBoY/jH/+MK/8wxT5+/+fP/9/Q8kvmzYBBBBQAxD9f/LkOxPTH3Pzg///v2Jg+AtS0ff7/97f/3/9/v/71/9fv4AijLKyQBsAAogFZPQ/hr9/mYyM7srKglX/+fV/8p//e8BKQap/QzQw/P4N1AAQQEB3A1X/Z2D46eV1nuH/n/9/gap//98GNhWIfsIYOjr/8/IYzp8HCCCgDX/+/GEy0L+jqPj8P1DD1N//t4DMAyGgOqBhlpb/g4P/W1oxsLL8+/ABIIAgTvrl4XPhP8Mvhll//m/8DXUGK+t/e/v/vr7/jYz+gwHj//9ApQABBPK0uuYTdZVHDLP//F8FNpuP77+zy39v7//ychClv//+fvrl6YOvD3xX+QIEADEAzv8EAAD0P0LU/6T7AKj7/xQY/0hI/0tO/xAJ9v/94/Ha0uzS0OvQy+vL2e/ZGgwaAJ4AAgAxAM7/BAUBtiXXOP/eQf94MvIwKOAH9N3tv9vi19jw2Of25/f49/z+/P0A/RoMGv3+/QAGAAKIsdWX/x/XnxV2UlcZbjNcYmAABuwHYECAY5UJzPgF4wJJHgaAAAMAUu89tr5e2cIAAAAASUVORK5CYII=')}.ytcenter-flag-scotland{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIbSURBVHjaYnz06BEDA0Pmzu9bp1xikOJgEOFi+PGH4c8/hl9g8h8Dw713DHc/ydYaHUiQ+vr9O0AAMdbufNzkJgPU8+3P36atj/++/fFHkO0vA0jxHyB4/v23ANukMEUuZsb///+7TTsHEEDMhy5bCOsImcnysDIxuqgLPPnz7/TxF29//Xv74cebOx9sbSSaPWVYGBmAqgs3PVyXthIggJgZPLINRDgXHnymIc8jws1iIMXtbCK65uDz39/+LinVs1PkBSo99+SLZ8u5f9/+3jv7BSCAWIB2/+Vn/fP9d/2cG/qWYpUOUoIczJvL9f/DQOHmh3u3PfwtzvFbmI3hxzeAAGICu/T/b1am39JcJ9bf8+q79B8JGDee2bvoxi8F3l9szH9+/2P4/QcggJhANjD8//P1z6/7n9TdZLcU6CBrOF1rZBCk9Ov6u1+ff/8GBdkfgAACOen3ux+/3n6rTtAwk+UCKvr8669z89nff/7tqzPiYWGcF6q4R18osfvcX1ZgWDIBBBATw7EX/KKcG8sNIKpnHH/hVH7iFxPjT2ZGs9wjPYeeAgWdVHgfzrQXkeMBRgpAADGGzr+8LEYDKPrr3/+EZXf+PP78W5TzN+P/P3///f7178+jz3+kuLana7IxAo1n4MvfDRBAjMCY/vfvn+vix7drjzCwcjBI8TB8+QGKZhD6B1L1/w0DwweGUIcr9fpAHkCAAQAGHylL06NptQAAAABJRU5ErkJggg==')}.ytcenter-flag-sd{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF+SURBVHjaTMJBCgAQEADA+YbX+f9BkjZJ4uJgGik73v1dTAZBp1EpXAHE8tyAYWJCV86+j0x//jH++8fw9+//P38Z/v5h/POH+c8fpt+////58x9Gftm0CSCAWBj+MLwW+FBj+r1lzWum33+BoiA9QBUQ9AtI/vr/6xeQzSgr+4+BASCAQBr+/fr/ROB1SSB/t0Mz03/G/////UeAf3CCgZn53/37AAHExAB08f+/f379ecL7Mvdg1WO2r//5+JAQPwjxgxEv7wsODoAAYgLa8Off399/fwPBY5bHNVsr/qLYgAQYGP79+wcQQCANf//9+fPvz69/v8T/ijd5NjH+Z8CuHui0f/8AAgjkB4i/uN9wt3u1M/1k+vD9A1DiP1gaWQMzM/OnT58AAoiF4R/Dn/9/uF5yvV7+OnBm4C8wADoPSoJZf/78/vPnr4qKysWLFwECiIXhCwPHK06uQ1ySQpJ/+P4C5SDgD5j1Bwz+wgAwhAACiIHBloEkABBgAEotTjqTEtNjAAAAAElFTkSuQmCC')}.ytcenter-flag-se{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGwSURBVHjaYmRwbmSAgb919Qz/GICIuayU4dc/hl+/GH79YfjxC8H4/QsggFiA6qpzPYHkv3//GZW/Mfz7+5/hb26J35+////8/QdEv//+BZH/QIxNuZMBAogFbPT/J++//f33n+Hno///fzP8/3v/9effQEV//gIV/frz9xeQ/fuvrDA3A8MvgABiAZr87x8DUPWfn6wQ1f///WJh/PHtD9MvsJ5fYPT7H1Az0Lm/AAKI8e9BBkalMoZfQLP/MPz/8//fbxD6Dyb//QIjMOP/b0Z2+U97DwIEEAvDHwaQqSAVMA3/f0G1IVSDGAz//gCVAAQQ0EkM/0Hq/gBFgUJIGpBIsAgj0Od/GAACiJFBvzirLOD+m4/AoNjq3gu26pf52pLff/6A/PCD6dcfYPj8+/Pnr7IY39nWSQABxMLw488fkIf+/v7zD2bYr19A1aAg+gcM/98Mf/8w/vvDBETsDAxPAAKIBRgpQKWS/NzAAGFgk2YABtS/37JCPKCwB7r531+gOX///gOhf6BIBQggRgbJZHhEvp2zFhgGQIeKptsygELjFwz9A3OBJANAgAEA3Ll5iCfmAhAAAAAASUVORK5CYII=')}.ytcenter-flag-sg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFmSURBVHjaYnzJwPCPgYGFk5Ph168/f//+A3MZwCQa+gMWBwggFiBL5NQpZh2dXwcO/Lt8mUlb+9/Hj39OnPj/5w8QMfz+/Q/I+P37P5h8smkTQACxADUxa2v/Pn78z549LB4ePxYsYJKTY5SW+b1/H0jdr9//f//69+sXkM0sKwu0BCCAQBr+//3LLC//4/nzfzt2cBQXAw37VlcHVPrvN1DdL5AesIZ/QMTAABBAICf9PniQxdqa1dPz1/Yd39va/n7+DDEbpAGsFEgCVTP+/v2LgQEggFiAVvy9cuXX/v3/GRgZeHgY/rAzcXH9A7ueCagUbDDDnz+Mv/8wSkoCFQMEEOPvjx+ZeHj+AwEDGOIGTExMb+/fBwggkJMYwXyQZ3ADiCzQ0wABxPLv3z9mMIegBhD48wcggEAa4KoZYICRkZEBBQC5/yGxCRBALAz//v149+4fFPwBQjTAABIFkZAUABBgAKq8T1ajWRp9AAAAAElFTkSuQmCC')}.ytcenter-flag-sh{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIXSURBVHjaYnyqazktomvbsTcb9qQ9+MlQ4j3DQ4fDZUGd/csABoZvDAx/GBh+MTD8A5NAxAIQADEAzv8BS1evrlL81Ck+Ksey+vv+3DVJJeXRrv8mzdLq/f3/+/39+/r//Pz+/f79/Pz9q5edAgAxAM7/Af8HA/+EiADu6gDw8wD+/f8KCv/19+z7BGcBS/j8//v7/QD++vv8/vX3AB4bCrCbngIAMQDO/wTK/hwvFRgG8vH+BPj/AwcCFRXwBPfg9QX58/32+AKFV6YQCO39/fzr8QqMvGoAAPoCADEAzv8CiFyU+AQHtD9j9A4S5QUTsDNa/xERxyA99/n/+vn9/f77AQD6AgD6Egvt/Pr9AAD6AgAxAM7/AlCkfMkdONnh9NLwBtrvAL3E568gSCnaxf77+f4A/t/ZD7npivsjqrjqj/7++wAA/AKIJf53WOHhp0+eftz3ywToLcb7by5de/HzjzYj0Ku/f339ycd0e8GEb5c4/2n//esOtAEggJiA+D8wKP78Z/r7m/Hv79+///3//5/x359fv//++v17xzPXS+KXGP5x3jrq8ecvKIgBAogFaAsw1ICh8esPUDkQAQMFxACT/67eeP37SjrQ5j9/XinL8wMjBCCAgBp+/P77T0KUCygKDD4w+vsHSgLt/gdS/RfI4ACygYoBAoiRgaGSgeELLCJ/waL2D4z7D8b9ByZ5AAIMAEc5SdmraF94AAAAAElFTkSuQmCC')}.ytcenter-flag-si{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGQSURBVHjaYvz69SsDEvj37x+ERGbAwZ9//wACiAUoysXF9f8/w48ffxkY/3NxMIM1/gcCKIUEvnz5AhBALBCD+6c8fvHqPfO/v62NugxMTP+xAUZGRqAlAAHEyCx4eEKH0ufPf6JChOcsfvXly99//xn+/Pn35/e/33/+Axm/gej3PyBDQpx95sRDAAHE8vf9l8dPftSZ3vnLZ1uucz1iocRvBmagol9ADb/A5O9/v34Byb8fPv1mYHgDEEBAJ/37859h0fJXIpuW//n99/d/6V///wPNBqJfYARi/AWSDH/+gkIBIICAGlj+/mPayWzy6wPYGUDVQCP/MP36y/D7L8Ovv4xQ8h/D739MQMUAAcTSyhDj/LX+06cXQGf+/QVyMpQEOuLXn79AtwO5QKnff/kEJSczTAcIIJYShtfM3y/9+3aP4fdvoOH/f/0CIQgDLvLnN9BBjD9UjBkYAAKIBRg9TEAHSkoC5UDOBMr9/s0IYv9hgJBA9PcvBAEVAwQQIzCe/yEhBlQumhQQAAQYAF6IXDEgUHAsAAAAAElFTkSuQmCC')}.ytcenter-flag-sj{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGSSURBVHjaYnzIAAVy//9zRV36skTnATPzPwaGf2BBCOMPEgkQQCxAUcHaaiD5////ngQpRkZG4aLC/3//MPz58x+Efv//DSL/Acnfv+9u2AQQQCxgg/7/e/IUSL18/weo7c+DB0AVDL+BioCqgejXv1+//v/6zSwrC7QBIIDAGv4CVf0F0f9ADvn/5xfI1F8gpSDVQD2/QCTT799AVwEEEIvM379AZ0Cc9Aeo8/9/gbUb/mMDQGUanz4BBBAjc/D5/mTpF+9///0HdvO/f0BtQA6I/AMk//3+CxIHikgJss7OOQ0QQIx///6FGP+f4X/JgmfdcZL/cQAmJqb3798DBBDLPWZmkdysP/fuC2zY9BvspLd21v9+gXzMAPLub6g3fv9hUVa6evocQACxAL35HxxkQKUgZ/3//+8nRMUvkCBIJ4jxD+iQP8DAZgAIILCGP3+YJEEuEeUDBRqzjCzTX1DAM4CDn/nPH5Dqv3//gR0PEECMV2FRqPD+vaDeibcXzK4JC/+BxTEkghlgJBAABBgA9J5akqVspaUAAAAASUVORK5CYII=')}.ytcenter-flag-sk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHESURBVHjaYvz79TsDwz8GOPj3D8T5B6L/QTj/4OAPkAsQQCxAWSYuLiD5//9/iBYmEP2f8f9/ZrAgMvjy6g1AALFAjP8+fzHDpy/////7/+cvUISjMPc/BmBkZPzz5w9AAAAxAM7/BEJk5G1eFUfW2gvv5f97fQCnpv3V15Se5fj+A/38/v39/vz9//z8/vz9/hMQBHds1gIAMQDO/wTEyvBFQhNF+Pj/amsADw7/XV39dnrt5PHZ8AgA/Pz7/P77/f/8+/76/P4cFwYA/egCiOnvHwagQ/79/fd/xpT/Hz/9X76Uien/519Mf/79//2XAejAP7////4DYvwFBw1AAAH9wAZ0+uOI7C1bnj2d/p3hp0dppO3LA5y//4IM+f2P8fd/pj//gQHE+BMUCmwAAcS4n4FBqbyLlZ/ru71L80bWcp8/XHu3fjx4+h/INb/BCOym33/YFWT2710KEEAsVgwMzO/v/Dt7j+HdvQmWjow7z7BtXi/6+/f/X7/+A0kI489voJsYeT4IMjAABBAL0GFMQDdKSv5/8oxz+SKg3H9ZWcbfQBV/GCAkEP39C0FAxQABxPgVHBFwxIDKRZMCAoAAAwBcKj0T0E2bvQAAAABJRU5ErkJggg==')}.ytcenter-flag-sl{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFGSURBVHjaYmQ4zIAC/jEw/AEz/sDY/2AMMAIIQJEYnAAAAjHsHm7iqLeMmzhU26sVQghkZfXuWCXbHE6Zhqx0QIED+Pe55wkgFoi5T38/+wdRwfDn77+/f/7/+Q1UBFL3+9e/XxC2NLs00AaAAGKxFbNVYVcRZBYEGgm05N+/f0DVUOPBpv4FaQaxRVlE1kqtBQggxq9ff3NyMgMtAbqHAQxxAUZGxkeP3gEEEMu/fwwQ1SANDLiVA2UZGYH2AwQQExDDBP7jB0B5oGKAAGLU1b1YXCz5+vWfv39hrv4D9sFfEBssCBb5+19cnK2t7QxAALFcvnzv2DGee/e+gwPl369fIARhAMMIFEC/IHr+qahwMjBcAQggYLD+AUpLSrJCgxoc5r9/QxkQO4H2/AUHIjAKAQKIkYFhJSIa0dE/JAYEMQAEGACBUnH2830a6gAAAABJRU5ErkJggg==')}.ytcenter-flag-sm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGISURBVHjaYvz48z/DPwYY+PfvH4SCMP8hgz9gSYAAYgGq5uMAKfr//z8DAyOYAeEB2cz//zP9RwLP3nwBCCAWiMlg1QjGv3+/wRoYkVUzMjICLQEIIBZM1X///n5/pYLh/z8BnW5kDRAXAwQQEwPMByCh/wwTd7e8uLbs24vXH59+fHJ+Tu2qXGQ9//4wAAQQI0P13z5vxhef///5B0QMpuLXpO5PuyLm8/X3f82HGx/yeO7/6fH77/8/f/9L8TEtaP0AEEBMDH8Y/v77/xuC/v6/dGMKCx8T948DPF/2vfnKevTJbKAgCIGM+8/w5x9AALEA8d//jEADgMYDya8cOXt/8bv8q//758cy7urP35j+/v8Pkf0L0vAHIIBAGv78Zf4DMgOk4ctfNS3h/61r7X/++u8VrPjg7v/fv6Gu/Qv07C8GgABiYfgFjBEmEW4GmCUMN94wKNpGAM27/ua/FA/Dn//AcGME2vMXHJsAAcTIkPwVqAdoD4gEIQYoFy7yB4bAwQkQYAC2RE+h3d1hoAAAAABJRU5ErkJggg==')}.ytcenter-flag-sn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGmSURBVHjaYmRoZECAfwy/ExiYmECMfxD0h+GfJpCHQAABxAJUVu1ZDVL8/x8QMcr9ZWAAoj+M3/8w//vDxPH7f8yf/79///8DIr9s2gQQQCxgk/8/+fr07/+/f//9Zfj/m4Hx7///v/+z/waR/37/v/3r/69fQNWMsrJAGwACkDQGOQCAMAhzif9/sLBUpjcSWtjvnaCmnTrzHHCjmhBaX1hShCuAQBr+MgBV//nz98+ff3+Apn75/Xv9vd8///4OUPolwIyiAegYgAACafjz7+/vv7+BqoEI6KQr735tf/T78+/fUry/XMXBqiEagPIMDAABxMLwh+EvWOmvf7+AlgBtMBP9ZS7x+9uvX3YSQD8gbGAEOwkggEAafv///evvL6Ce339//Wf4DfRDtibIx3+BHvj3G2480NV/GBgAAgikAWgw0Em///0GkkBfgj0NYjD+BwcUUMMfoAagT4HBzQAQQCwMvxh+//sjyS0J9gY4WBl+MzICSaBxwCD+w6D0B6QUjIBOAgggRoZkBqAekOwvEHo9ARzj8Jj+xfBPHxrHEAAQYAD+LFuRr4ubWAAAAABJRU5ErkJggg==')}.ytcenter-flag-so{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGhSURBVHjaYlSc+P/TDwYI+PPv358/DL/+Mfz+A+Ig0C8YycIAEIBCOTcCAISBGGie1miNmJQmiciwT0CmnVFd23r7NxAkYZKF8NcqruzBpzjBmPsKIBYWFpDqV1+BqkFKgRJ//zL8/Q+SBrKBqoGM32CGOA8jUAVAADEBFf0HKgKZygA2huHDz/92cv+dFP6/+/b/xx+whj8gBNQDdBVAALH8Yfj3l4ERyP779/+vvwxm0v+FOP/L8/9nZPgfq/f/2ef/O+/8/we2AegLhl8MAAHE9OsPyOy/EAf8+3/80X9O5v9SPP8luP7zsP7ffx/mKqCCv6CQAAgglj8gDWBXgh327ff/88//KwoAg+D/uWf/33/7z8IE888/kJMAAojl759/wMCB2AgkgbbL8f+ff+7/z7//FQVB2sBmg2SB5jL8+QMQQCxAW/78ZQbZC9Ow7PL/X39Adp55CvLJL6jxIJcz/GEACCAWhh//gIEtws0AswQSV4wQFcAg/gMKD2CogBwMdBJAADEylH5l+ASLSBBiQLCRoxkURwwMPAwAAQYAt2147biAyK4AAAAASUVORK5CYII=')}.ytcenter-flag-sr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGTSURBVHjaYmToZ2D4wQAF/2DoDwPDLzD5B4kNJFkYAAJQKMZGAIAwELJwNMfSSVwi+z35GAsOCmZrr/PnSjcD3IEqMSSUlMjCihtPADG+/fmRj5X7PxAwgCADw38wmwEsAAX/wCQjE+PDd48AAogRJNfVw/D8OcPfv0BDgRb8ByKvD////v6/muM/0Kbfv///+g1kMEpJfVyyGCCAWIAOZnzziuH5U6A6ht9/QCqafv/n/v3//+//sr/+Z/4CawCRDEDjGBgAAogJ5Nc/f0GiEATUsPXXf6lf/2V+gRh/waohCOg7BgaAAAJpALoE5Izfv0Do56//br/+H/31/9BPEOP7T7gGht+/gRoAAgjsJF6+//wCYNcDzfvzv/M3TP/v/8IQ9m8GoJSwKNBNAAHE8uHra142vn+QkGCABsrvP79ANCyY/gGj5j8DMyPzq1cPAQKIkaGUIdU77fc/cEjDQh0Y5L///gbFA9C5IO4fYAz9/ff3Qsd5gABiZChmYPgEi8hfSJH6CxzlcBFI9PMwAAQYAPONaQwVH2jCAAAAAElFTkSuQmCC')}.ytcenter-flag-st{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHaSURBVHjaYtzNwOA6mYHhGwMI/GNg+AMjkdEvGMnCABBALFYMDO8+Vfd6MDD+/QcEfxn+/v3398+/P3///wGSf/7+/v0fTP778/vf73XTNwEEEAsXA8P/v/9zFz4tD/oLBH/+/f4D0gBU8fv3XzD579evv79+/fktwyPLwMQAEEAsQIdwff/PyP530rW//xN+/wPq/g9ywX+G3//+/QKygQwg+e/vb2am31tFGAACiAnoYKArOJ/84Xn1m3fuHz72X3zsv5l//zq0/RcfGwgx//y1d+MvfvZfvGy/5fgYAAIIZAMD0MG/fv9/+4fh6Z///3//+fNr5crfK1eBGF6+vxcu+LVoya9fv36HRf3584cBIIBAGv7//QNCXL8Y5EEamJh+BQX9Zmf75eMPckxU9G9Ozl8h4b8Z/v8GOgcggFiAmPH37x/Cv/4I/vmX8evfT5AiRo7f3sG/P/4AeYCB81dg1O8PP/6wMP958I4BIIBAGp7z/rnF+rtb5/fv3dAwAYYPhPwNdCGYAQw6Zf6/p3oYAAKI5Q0DwxuOP4s9JcV//f7D+hckBw7NP3+BDgaTwNj4B4wjoNRfhi8MAAHEuJaBIbiYgeEDOCJ/IUXqL9RohkQ/DwNAgAEAXm1JlTnRn1wAAAAASUVORK5CYII=')}.ytcenter-flag-sv{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGHSURBVHjaYmTQv87wiwEK/v1j+PWP4c8/kAiQ8esPiPz9DyjBwPAHQgIEEAtQrr9aDKIYjP79+cvw99//v//+/f3L8OfP/z9////58w/CmFF3HSCAWIBK/v5jePHmzz+gor9g6b8gxu8/IHVAEoz+/f79T1KUFWgvQAAx7j/9VVmW7devf///M/z///8fBAF1/wNyGUA0EIEF2NmYDp18BRBAjH///mVkZAQ66T9IBwNY1/93t+u+/mOXUqn4jwSAyj59+gQQQCwQ30KEIIyz17+fvPsa6AqT719MtbngGhgYGYEWAQQQC1w13HxDdbZPv23//vtrqs2JYgPYqQABxLj7+EdVOfYfv0CuBPkB7Og/oEACmgTyA8QHQJqDnXn30WcAAcTIwH66qkv20YtfsDD59+sPOJR+A0PmLySU/vwFhvV/BUm27TNPAQQQC9gQBklRFqDE3z//wKH+/zdIBTDsmf/+hYY1KND/gWILIIAYGZiPMvxlgEckjPwDY/9DYoB0AAQYAKRYbE3/GAjBAAAAAElFTkSuQmCC')}.ytcenter-flag-sy{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE4SURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f0NIKPoFJH/9//ULyGaUlQXaABBALJ8+fuTl5WWA6vsPIbECBkbGdw8fAgQQE9zRQKHv/36uurfm+//fEBW//v+df3vRpz9f4Hr+/fsHEEBMQAw3df399fuf7Ft1ewWEu+rOyt2Pdk2/Oh1mBcOfP38AAojlH9wNDP+DFAM+/fwYohwIEYhUCn/x7XmMWjSEywh2MEAAMb59+5afnx+/6yGyjIyMd+7cAQggRiArLS3t3r17v8HgFxhAGCASzPrz5/efP39VVFQuXrwIEECgYP39+4+kpCRQCigKlIOAP2DWHzD4CwNAxQABRDICCDAAz55KKgzD0rYAAAAASUVORK5CYII=')}.ytcenter-flag-sz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIVSURBVHjaHMbBCQAgDATBKD5s0LoszH4kHMuhZB/DtrXPTaKyjUNfjCwQzq9qxBz9CSCWfyyfMjxUQcr/M/z7/x+IgODv339///z9BzTiP8Pff//+/vsPJv8VLzoCEEAsi9jc2Fgn/v/+6v+/fwz///7/B0R/QOT/Pwz/fv//C2QDyd9AW5k4xV1ZpgIEADEAzv8Ekmf9RXnl8+Pj//39BP/74Pn9tv8A+/z6o6Ge9NXT0pSQ8d/l/fv6+Pn7ER4enLwAAogJaO/vv38ZGP+oOnEJOXBvARrFyPTz569rt+9wqGsq19SrR0mZLpx749ev379/f2BgAAggJqB/GRn+ynlIfhcQbdr8xtfXy8/TBSj39evXkoraDXv2cZtm395U5Z5pxML97xcDA0AAsYADiOnID+dfzIIuv86tWL7qz9+/P378YGFhqa2veXLu4tmS2uu2sd94VfU+tAIVAwQQCxMDAzBAhNdP+/Ofgf3XT4/fv3f/+vXh92/Wv/8Yr1151tX27skz8cUtf5iYGaWlgWYDBBDjx04GNqemf5+fAIPi///fDMAQ/Qf01G8GYED9/cXwDxQroLD6+4+FX/bJ5LUAAcTi9m113i/df6z//zD/A0UcMygugAygJ/8xg2IGHAkgsf+//tf+UAEIIEbD4p1vPv2ARCQQ/fr17/+fPwy/wOgfkATFPANQBBhLwFTAwwIQYAAk7mFO2zo6eQAAAABJRU5ErkJggg==')}.ytcenter-flag-tc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAICSURBVHjaYtyfX7uDQ61zx6fiT5sEWP7U/nCJFbgWYCQWvPADA8MfMPqFhP4ABBCjrHnzgWYHBinpnzduMHz+/E9Kmk+Yf8uDv5fvvfnz99+fP/9+//kLIv/9/f3n36buToAAADEAzv8EsOKWCdoSBsm++fDx/fX3BxQQ9/0BP/b6ugA08voEHRLyGAvw/gX+4OwI+/8YAAD6Aohlk4xToqo299snX27eZRQSZVdWePXo9TVOzu8vGX79+lNnv0lYkO/7h2sXn0v3nIgHagAIIKYHdn5MXFzLPoreYRN79J9nMYcek4rqaxae77/+sTKzsUsEssnl//n85//fH0C3ATUABAAxAM7/BPzMyKghEMnm/uj+CgH8+8a82c8ZCy8BAPz6+fL4A+7goOft+vwFBwUE+Pz6/wAA+gKIZenBHyIBbH9+fzj1hx/suV83H3y//Ofvr7+Mv3/9/PiZ6QCvEK/Ad8UXv37/BobYD4AAYgKGFND7v/7+//MXKPLr1++/P3///fULzGH4PuWElev7FxYvX80+bvaX4QcDwz+AAGIBavjzFygNDDUQ+QtoNpgNIv/+vfOaM2O5z7+/f3/++c/BA3ISQAABNfz6/ee/pAgX0J4/IAQKb6BSCOPPX16gcX///mP8+//vP6Cn/wEEECMDQyhqXKLEK1JM/4MggAADADIlPsLT1SX8AAAAAElFTkSuQmCC')}.ytcenter-flag-td{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHMSURBVHjaYhR13vnhyy8GBoZ//5j+/mC6PSdLTODVnz9/GP79+sf0/88zhh+uDH+AsgwgACQBAojlzYdffUVaIM5/ht+/GUXka9nZvrH9/8/w/89/xv//eH5x5jz79/fP/z+/Gf78eTZ/PkAAiubYBgAQBAJgJGzB/msZWy2sLBSQFwe4HDN/2udxh1pxHUELEcCN4tjHakMCUxLJ6glA0RwbAQDDIAwkOe+/MAZCGpWvsVFOyjpUPwr218qRzZDlLd4WeAJQOAYpAMAwCNth///vWk1XwUNAArkW+wvsI2+ZJvPE7PArSBKtFb4AHE5JEgAABBrG/z8sUi4d2kt1gz9pMqyxyaW6Qzvy9SMSDpwAAmkASv75CxT5/+sP0HlwG/4A3QbS9vsX0DwGIAKFHQNAALEw/PgDdAnQNpANQA1AFSAbgGb/AXoa6K9/v35DjPgHtgEggFgYfgE1gowH6gHaAHISUM+/f/8gTgIHKEgDMFj+/gVqAAggFoYvf4AMUUE2oJ6fPxmYWYUZmdmBfmdi/v2f4R8j2y8WOYiFUA0AAcTIILmY4dU3kBNB8ch0cHW2lBADKKKBbmZi+POA4UcmSAKCmBgYAAIMADoiepJbB7BWAAAAAElFTkSuQmCC')}.ytcenter-flag-tf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGhSURBVHjaYmTgLGcAg//fOv79+wdiMTMDCSCLlSGRgeEPA8MvGPrBwMAGEEAsQLnefv//QA3//zMyMoJ0FhQy/P3D+OdPvpjfvz9A8P/P3z+/fwOZf5dMnQAQQCAN/xn+v3j9FWrP//8MDx/8//0biB78fP/3959fv4HE39+//kpL8gHtAQjAwhjbAACAMOj/j02bqpi4MAEE3eGYt6E0bGWbcyANe59TK4BYGH79+/f/39+//0CqwRBiPFDDr99//gBt+AXUA3QYyElAGwACiAVk+N9/f/7+hxoPBEAbwHp+/wJLAXX9BhkI1vAHIICAToKI/k0t3QQ0BmjvH5U0kKN//2X789fCXDY7wQxo+7dvv+avurCN4QdAAAE1/Pr79z9IHVA1xH9/oE4HMo6eeczAwGhvKdc28RDQFUAPAwQQExADLfwNUv0HYjDY0SB3A0lBfvbUaMP////N7fMzN5QGmg4QQCAbgGaLCXP9AVnyH6gZyP37B+rLX7//rd9+I9BTY+qCU0fPPAK6HyCAgDEVjhSXmOgPONLhbAGAAAMA5dtcF+ULRmcAAAAASUVORK5CYII=')}.ytcenter-flag-tg{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHESURBVHjaYvzPgAD/YAzmdgaGDwwMf2DoF4xkYQAIIBaQfHU1kPjPzMz48ycDC8v/f//znT7//vnnzz8g+v3n75/f/37/BrL//t4wcxNAAIE1cHD8l5BgMDVlWLjo//PnDH//1gl+ZPn7+/+/3///A8lfQPTv328mdtlWLwaAAGICmf3rF4O9PYOe3v/cHKDq/79/83H+5mQEol+cjD/B5C8uEPlbiI0BIIBYgO4GueTu3f9cXAxXr/3/8OE/G1vl7V+/f/z+8+/Xn79ABGH8Fuf53beFASCAwE4SFPy/fPn/RYsY/vwBGg8MhuOff/3++vvX31+//v7+DSJ//f77W/HvH4Z7DAABBNIAMhWo7s9vht9//rOyAtlS/3/xcIFM/Q02G6gH6Hsprt9HxRgAAojx91EGRvms/z/vM/z/A/If0Jd/fv2H+Bjk3d8QQYZ/fxjZld7sPwcQQCw33jBIiP/5/f03MBwY/v3+9x8aJv/+gtT9A2sAk3/ZGP+e/8AAEEAsugcYUnmBIS0JDOw///6CnfEbTII8BIwEcGz8/fcPGHx/L6xhAAggRoZiBoZPsIj8hRSpv8AxDxf5ByZ5GAACDABxbkMxG/PbxAAAAABJRU5ErkJggg==')}.ytcenter-flag-th{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFWSURBVHjaYvzPgAD/UNlYEUAAisQgBwAQhGGi/pzP8EBvG+BImqbL7pzuUlda9SJ7DMs85NYEBgX5Ir4AYvz/H2QHhIQz/mMDjIyMnz59AgggRkfXjTmZOu/e/fz7D2jH/7///v398+8PkPEHCEHsv3///fn978+/f8JCnGWlWwACiGX/7jOmhiKPHn3+8wck8fvPv9+//wLRr1//wORfOCkvz8fAsAUggIB++AdxJ8iRQNf++f/rF8TZ/4B6fgEZQPIXRAEoLAACCKjhx9+/f/78+f0LaC/YbIjxyGaDSaCFvxgYvgAEEAs3r5qKqhAPLzs4GP4CnQR2G9CMf2A2iPEH7BNJSe5Tp8wAAojx58+fzMzM//79wxU4EACUBYbS27dvAQKI5R87O1NJCQPEjX//MvwGkn8Yf/8GRggCAY0DSgFt2bsXIIAYv6JGJJ44hgCAAAMA8pZimQIezaoAAAAASUVORK5CYII=')}.ytcenter-flag-tj{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGCSURBVHjaYtzPgAD/wAgI/oARhAtnQxgAAcQClFatrgaS///9AyKGv3////n77++f/3/A6Pfvf2ASyP73+/fhTZsAAogFbOL/X0+e/v/7F6gaKPoPqAdIAhUByV9Axq//v34BuWyyskAbAAKIxezrV05OToiT/v//DyR/3Wlg4tH+z8D89+MJZoXq/4yc/8GAkZGR/elTgABignsApPo/w++HE5gELP///fb/zwdmmay/jyb8RwJ//vwBCCCmf//+QVQDwe+H/cyyeYyCLkCp///+/GeVYpSr+HuvHqoc6PV//wACiPHjx488PDz/Ieb/B+n8+7Dz/7d7IA3s0ozytXDjmZiY7t+/DxBALHDj4QxG2VIGkPb/DEiOgfsQIIAYGVQZ0mrS7r269/vP799/f//68wuIgOxff8EkSPDXn7+///z9qyKucrH1IkAAsTD8YPj9948kv+RvsChQDsgAKv3z7w+E/PMXFC8g8O8v0AaAAGJgEGdg4GdgYGcgEgAEGADVtDiKtIsdZQAAAABJRU5ErkJggg==')}.ytcenter-flag-tk{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIQSURBVHjaYmTgPsrwiwEK/vxj+P+DAcT/BCZ5GBiYwIw/MMQAEAAxAM7/BAD4AHuRIQAAAP7+/wb/9TQn1DAk2BEM7v/+/OzzDMvWJcPQK+vwCvv8/vv8/7KZwAKIBWQEA8OTl78Y//9pz5ObsvCJGN/ng1fk//z+//ffHyP5/X++31iw3fnZGz5ZKXagsQABxMTwj+Hf3/9///7/8fVvRc+dvATLKRsjBVjeCLC/luJ/8uIjt4rMHRO1i7+ANvz+B3QVQAAxMfz99/fn7z/ffnuaHdJVuJzTfKe1QKV3eXD3ktAr92X+/vm7/YyxruL1X7+ATgJq+AUQQEAHffvz5z+QY6p2mZvnS6rf8vzW879+///9++/OUwZ//vxhZPglJ/bw1+9/QGVAGwACCKjhz99////8+ffopSDQGGWxe9a6Z4Aafv5mePb19+rPb+6JHbt4R/bX779AI4CKAQKIBegPoPeBBly+K6uvevXjN1Zf0z2mSicfvxLs3Or27pkon+StVc/Y/vz+B/QnUDFAAIFs+AMKsn/Hr6q//cAJtHjHBZP339i5uT+V+az99Y3t998/l3cEAw398xcU+AABBLThD1C1pBjb71/C+y74/fx71t3ogjDv+///fr/8wOv2SvniO2F5SV6gs//+BYUSQAAxMjCsRotLBoYvDAzPgIYxMAgwMLCAZf/BEBNAgAEA9lslgZu66XQAAAAASUVORK5CYII=')}.ytcenter-flag-tl{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGUSURBVHjaTMJBCgAQAACwXT3BMz1ckiRJ5GZNik5wvPu7mAw6jUohcwUQIwMDw+bVNV78DIzH/zF8+8vw9+//P0Dyz/8/fxj+/Pn/+/d/JPLLpk0AAcQC1HDiwr/n6k/jY/6xrvj7//wvkB6gCgj6BSR//f/1C8hmlJX9x8AAEEAgDf/+/T+06+/XL3/T8/6wH/77f9nv/69hSkGqf0M0MPz+DdQAEEBMQA3a2trV1dVH9/3v7Pv92vL3/9bf/+1//2cCq/sJNv4X1BKgYoAAAmnw8vSUk5Nrbm44c/L3snm//0n+/F/8678H1GCEhj9/gDYABBBIw9ZtWx88eFBaWqWm/is4+hcD0D19v/6v/wG24SdcA8RJAAEE8sOpU6eXLVtuaP6npOA39+E//2f++v8YZjaMBIXYH2DAMQAEEEjDz58/LRx/F/r+Zm/783/fT2R1UMYfoAZQiAMVAwQQSIO5wZ8ocSmm/t8M7/4wyIBCgxFsJAOEBKK/fyEI6CSAAGJ0ZWBYwwAC/8AIzsBEEAAQYAArG0lafStYOQAAAABJRU5ErkJggg==')}.ytcenter-flag-tm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHjSURBVHjaYmSwZACC3e8kP9x8/oWBIdGQgeEPA7eZ7tcDlxl+MTD8YICSPxkgACAAADEAzv8EAAAAfHOPIuf5//4HBhAKdQbwCwcJ7/TwUnOczd/V1OTa/P38+/77+/z9+/37sXOZAogJpOs/w6cHT5l+Pnx15pwAJ8+lhzf4uXjbt8wMMXP/+efX7ZcPbj1/eOvZvd9//wDVAgQQE8M/hn///7Gy/f/4/Dsb678z968m24ecunup3CuNiZGJk5X915/fv37/+vUXaMlvoAaAAGIBavjz7++Pz7+/fv/Jwfj/z1+GXZePTIip+f337+pT2++/efLr92+gnt8gBLIBIIBYgH769+8vK+vfb1/+8XL9+/Xnz+Unt1LnVKlLKN178/jVx7dApSBL/vyBOAkggFiAYQK04fvnX/c4fvN9BBrD8OvvL6D02YdXfgPNBrnkD9iGP0BvAzUABBDIBiCTjfUvx6/fHFz/f/35BXHAL2Dg/IFqALnn75+///4CNQAEEBMwjH//+8NnaG7CxsChoP0L6oDfYJ2/fv3+A3EPMHD//AVpAAggiA1/Pt+9xSKm+OvDcylJiT8g5wKN/A1W9O8P2Gwg+PMP5AeAAGJk4AdF5MSfDDIMDHcYGMoZCACAAAMAC9BBJrSMH4IAAAAASUVORK5CYII=')}.ytcenter-flag-tn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGBSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINUZGQxycv8FBP4DweHD/48f/79///9fv4CqGWVlgTYABBAL2Oz/UNVxcQyfP/+fMeP/7dv/ZWX/+/n9l5H+b2jw//ARoAaG37+BGgACiAnkbqBqsI0M//79P3Tov4bG/+nT/wsLg4z38Pz/+w/IBrAlQLUAAcQEctGfvyBXAhHQEqDZXl7/+/r+Hzjw39DwPy8vSByi4c8foOkAAQTS8P/vH7CffgH9/V9G5v+G9f8LCv5HR4Ns+PABrgHiJIAAAjkJIsTwG6zNxub/mbP/Q0NBfjUz+3/pEiR8QG7+8+cPAwNAALEANTBDhIDagC6pqPhfWPhfTAwUStu2/d+z5/++ff//ADWAQgXoHIAAAmlg+v2HQVISbMxfhnnzgDoZwUYyQEglJUgYAhFQMUAAMX5FjUg8cQwBAAEGAPoqOIu5WnWcAAAAAElFTkSuQmCC')}.ytcenter-flag-to{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE8SURBVHjaYvz48SMDEvj3D0TwCQoCaawIIIBYgPJ8fHwMd+78X7WKISSEQVX1/38Ghtxcxj9/mP/8Yfr9+/+fP/9h5JdNmwACiAVi8P+WFoa/fxla2/7Pm8vAyPj//n2QIiD6BSR//f/1C8hmlJUF2gAQQEwg1UAzi4sZWFj+FxZAuFClIHU/QeQvqB6gBoAAgtrAoKPzf+5chv8gCAIgFQizISQDEDEwAAQQCw8/P0NR8f+HD4CuZPj95/8fqDRcHdx4hj9/gDYABBDIhv9//4D99Auk4TfE4N/IZkP9AHYSQACxADEjWAhoAIoiVNUg2T9ANzAABBBIAzM4yBjgijC1/QFq+AsKRgYGgAACaWD6/YdBUhJszF+GPyCdjGAjGSAkEP39C0FAxQABxPgVNSIZcETwP1hSAAgwAP4dTt/+nGWfAAAAAElFTkSuQmCC')}.ytcenter-flag-tr{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAF+SURBVHjaYvzPgAD/UNlYEUAAmuTYBgAYhIEgJJmboZgtHbaJKNK8TvozM8LIllwagEY4sIFV1UD/3swngMAaGBn/P3kCVApS7ebG8O/f/x07/n/6BFL36/f/37/+//oFZDPKygJtAAggkIb/YINBqqOjGUxNQeqUlf93dIDV/QLpAWtg+P0bqAEggJhA7gaqBtqoqMjg5PR/+vT/SUn/N2z4//Xr/+XL//Pwgu2BWgJUCxBATCAn/fgJEnVx/Q+05NgxkNzp0/9XrPgvJPR/zZr/ZmZQDX/+AE0HCCCQhv9//4D89OQxMMT+a2uDnKGm9v/SJZCrHj36v28fRAPESQABxALEjGBLGRYv/s/H97+oCOQYIIiM/P/ly/9Fi6CO+QMy9A8DA0AAgTQwg4MMaMD/rq7/vr7/WVlBrv/8GeROiAf+ADWAQgXoHIAAAmlg+v+fQVISbMxfhpMngToZhYUZ+PkZwAaDEDgMgQioGCCAGL+iRiSeOIYAgAADAO/XO1xGA79vAAAAAElFTkSuQmCC')}.ytcenter-flag-tt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH7SURBVHjaHMFBBsAwEADA+cXap+X/coqqqoqIJXRGjZGZfhFRvVdrxWYx+Xh5uLk4Aojxv6rq/wsXFqxcefv27X///ikpKaVERjLs2/d/506GP3/+//79H4n8smkTQAAxN7x7x2hvb+DhcfbSpVu3bgG1Xb9zxy4s7P+HD/8PHfr/+s3/16//v3oFRIw8PD/u3AEIADEAzv8DgAAA/x0dAPLzOllZ193d5ubm4+Pj1NvbQWJi//7+/8/O//r7//r6//v7AA0N+N7eAoi5joGB0cqK4eRJhv//bWNjr96+/RgMLt286ZKeDtJz5gxcw8+HDwECiLkeqMHc4v+7d/+vXAHqsU9MBCp99OjRw4cPz1277pGbC9Jz6hRIAz//j8ePAQIIpIHBzAyk4fcvhouXgHqcU1PPX7/+AAzOXLniU1T4/9///ydOMPLzf3/6FCCAmGuBGoyN/799CwoToNXnz////989M/Pc9ev3weDMlat+5eWgUL9168vz5wABxFzDwMBkaAjSAAy732D/AR3NwOCVnw80/u69e3fv3Dl16VJQdTUDE9P33bsBAoi5GqhBT5+Bm+s/FxcDNw8DDwgx3rnDwMjom5//7O3bb9++ffr06dLt2+45OV/7+wECCD0igeg1A8NLBobnDAxPWVkfHzzIgARu794NEGAAoWM1UKSWerIAAAAASUVORK5CYII=')}.ytcenter-flag-tv{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGqSURBVHjaYsxkQIB/DAx/wAjI+AVDf2CMjFiGnsUMAAHEAlQX3lsPUv3vH8O/v//+/gUy/v/5DWL9+fvvz28lSwZBOYajcz+Lqvz/sXglQAAx/v//H6gaQsIZ/7EBRkbGT58+AQQQC0T69fffHSdefvr8/c+/f0DD/wDt+PsfyICgX3//rTZOXf4qrzDnLUAAMYFc8qJC9HV8t4N0ooHon39/f4P0/P31988vEAlSDdQz4U70wTcGDL/+AAQQE9CGrS9sFz/2AlpkIcPX6aL4/fcfoD2//jL8+vsfpOEPSE+a3EILgVMMv34BBBDj3+etDCz8/3+/+M/tcOmzSdvhhz/+QJwBdNL/HPm5DoKH3I7NBtopJ8ixq3QrQAAx/v79m/HH2def35edVvn85dsvuNP//f/9B+qHHeZRnbeTrv1031u0GSCAGH/+/MnMzAzyCY7AgQCgLDCU3r59CxBAjN4MDOnlaX+BzgaG/W8w+efPXxD5W07rl4Le72d3/l7e9//fv7/AgMvddR4ggBjdkSIVgn6AyTJFBgMnhhlzGdaAI/s/LDUABBgAJutTUOXJvRkAAAAASUVORK5CYII=')}.ytcenter-flag-tw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFjSURBVHjaYmRQ38wAB3/+gdCvfww//jx8Hy7BwPAPAwEEEAtQWUutDpA0EmZnZmI68vTL338Mf//+FbhQwPznK9Pv3////PkPI79s2gQQQCwQo0W+/nMOFWdlZXww+8vhN9///Pn3596Df78//f/1+//vX/9//QKqZpSVBdoAEEAsQGv+/fv3+9dfBgag4L/v3//8/vsPqAGqFKT6N0QDA1CagQEggFgY/vz5+5fhwo/fNXPu/fn379nHn3/+/vsNNAPJbLgGoFsAAoiF4RdQ2b+/f/4+f/cHaPDvv/+BHgAy2H9/QaiGaACKMjAABBDL36ehDJfy/z94ADSP4TfYf0jOQCYZwU4CCCAWIGYECwENQFGEqhokC3QBAwNAAIE0MIODjAGuCFPbH6CGv8DABvoBIIBAGph+/2GQlAQb85fhD0gnI9hIBggJRH//QhBQMUAAMX5FjUgGbLELlwICgAADAElTZuDmjaewAAAAAElFTkSuQmCC')}.ytcenter-flag-tz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIUSURBVHjaYmSYyMDwgwEK/jEw/IGRQPSNgYGHId6NIeEPg6MzVAlAALEwfGGodq0GKf7/D4j+/v/759/fv//+AIGSyJ8Asd8iLH8WLPwdHPzn9+/fmzZtAgggFgYWoOL/T74+BSr9++/v73+///7+y8D8O1bjtynz7xvnfmf2/nr79hdQta+HrPVcBoAAYgE6AGgyUOkfoNl/QarlRH6lKvzh/fZ71uxfu/f++vnzNxvTr/T0306h4ocfMgAEEMj8vwxA1X/+/P7zj+lPsNZvZ67fLx7/zqz//ebNLyDQUf+dUcLFLS164rVJcl0iQACxAD0HdPTvn7+lBP+kq/zh/fJ70fxfW7f//vED6LpfSTG/3SNFfjKwNp4qfPHTiuHLB4AAYgEGEdCLXmp/PPl+vX/+p6jx94uXQHN/K8n8yi5hVtbg2frYtuFk2S9GBiW+/wy//gEEEAuDBEOm5m9Ztl/Tpv7Zuh2o8vefX79iwn+7RQq/+itZcCTp+CvjX8BABrr733+GP38AAojlogfD36d/Epp/v3oFDInf4sK/8ov/iWtJH3xmOftSzNNfIr///f8DQkCXgyIHIIBY9FUZUlP+cHBISkr+trP46xXBzcbxt+9Czrm3ulxc/xXZ///5z/D3L+Pf/8CQZAA6CSCAGGGRzNDYyOAVx9BxjmHtvOsMf4SAcgwQYyGMf/9Acc/DABBgAHXkKRL4rPs9AAAAAElFTkSuQmCC')}.ytcenter-flag-ua{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFQSURBVHjaYmRo/c8AB//+MfwBkgwg8s8/KPoFI4GIgQEgAIdycgMACAMxUAF6oygqoQ1q45dkzSH5N26XR/8zCEuepggsVEPFkxB+S9bcRwCxMDCBVD/5+h+o9O8/BqDE378Mv/+DpCGKfgERmCHLw8jw4x9AAIFs+AdUBLQWZDZI9a/////8BSuFawBzf/8FuQMggFiALvsLsh2k+g/cbCTVUBLkKgaGDwwAAcTCIHJKhFPh19+fIHf/+/cbpBNI/gO75x+I/RfKluFiY5A6AhBAjH8fMjDI5P///+A/wy8GoFf/A+34hZVkYlJ6f/wUQACxAEOSESwEDEhURSiqwbJ/gKENEEAgDcwgDlAIrgiLNgaGvyD0hwEggEAamP4DdUrCREE6GRl/gyMPQv6BqgYG+z8GgABi/HoTFL///kBJBjgbwmBAcEEcBgaAAAMASIdu6OFHDhsAAAAASUVORK5CYII=')}.ytcenter-flag-ug{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGlSURBVHjaYmAgEQAEECMQd3TUA8l///7/+/f3799///79+fMHyPgDAr+BzD8w1p8FC1YDBBDj1/8MrAxV//8//c/wl4Hh7///v0GMf7/BDDD5/xcY/WZklH3zaTtAALGwnWNglAZKAZWC1DH8/wuW/vP/H1jpv18gxr9fDP9/M7D+ZjvOABBALEzGDIxlfxke/fn/5w/DbyD5m6G8fOmdO1HR0QyHDjGUljL8/s3w69f/378Z5X+zHGQACCCWEgYG3z9/P/7+DXT5399AB/8OMjX9e+tWUVFRd2fn4t+///76BUK/f/P/+VPGwAAQQCz9QO/+/fPgz59fv38BPfb792+xY8diYmKsVq48cOhQ98+fQJFfv34BSaXfv18zMAAEEOPqzQy6mlk/vt8HBs6/f7/+/f8NIv8Byd9/oYxf//8CyT+cXEobtp0DCCDGnz8ZmJnT/v27x4AaJjASygAGICOjytu3FwECiOUfOwNT6x+Gv5JAYxj+/GUAevrvb0agR/8CBYEif0CMf39BUv///lvKABBAjF+BfkBCDKhcNCkgAAgwAB4eRo3nku8lAAAAAElFTkSuQmCC')}.ytcenter-flag-um{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHNSURBVHjaYoxuvsoAA/+QwJ8/f6bsyfr79evfW7f+//v3l4EBggACiAGoASi96/Tbv//+7jz5Bqhu24lXv3792nL0+ffv3799+/bly5dPYPDhw4eKigqAAGIEaoj3kPj09c9/MABqBhJAxt9//7zXtDB8+vzv69f/37/9+/GDSVjo0eYtAAHE8o8BKM0QYCO89tDrQCB58GWAjciagy8//PvP0tcH1A9xKNP/f0xMzLd27QIIIBaGfwwM//+tPfgKaCpQNdACoOr3//69+vf/Z3j4/x8/QOjnz3+/fzOLigrv2wcQQCxA3zkbC6458BJkycFXQHLmgZfJNsK1214yL10KCQCG//8ZgSQz8+nZswECiOUP2MdAUaDBQMfPOPDy3f9/VZtffv34/5eXF9Ds/79///3z58efPwwSElJHjgAEEOP58+e1tLT+/v0L9u5/iJFwBpwNDDGgZwqKigACiEUkJeVnTs7fCxf+v3377/Pn/9+/AyVBBoPN/vXnz88/f37//fvz7182aWmjkycBAojx0KFDJiYmEHOQbYCzf/78+ePHT7DePz2dnQABxHiXiRHodHhE/ocxvjAwfAKT7xkYvjEwfACTQAAQYABGRX9Ie8/t6AAAAABJRU5ErkJggg==')}.ytcenter-flag-us{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC')}.ytcenter-flag-uy{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGmSURBVHjaYvz48SMDGPz7x8DEBCJBTDiFAQACiAUowcb25+/fTYyM/9hYA/4wCiw99fbHz7//GP4D8d+//37/BTL+/wGR/9rajwAEEOPbt2/Z2DYxMR1gYACKWPxnTvv/n/E/w384+AdjMDExXblxHyCAWP79+/Pv33cmpr////9lYLjC+P/PzmvfgIqApoLQ338g40Fu+c/LwVy66B5AALGwsXGwMAf8/PX0/78/HGyZv/6zbr/88fOPP7///f8NdM8fkJPA5D9ZQbbnM+8ABBDj67fvBfn5f/36DbSUlQ1o4b9vP4Fe/odw0j+ow1iYmM5fuQkQQCxFq57EOzB9/PYH7AaQ1X/Bvvz7H+iYf3/+gnwG5AIlBDhZsmbcAwgglsUrHsmK8z959wvmBrhL/sG4f0EB9fe/vDD7z5XXAAKI8fr959LiIkDPIQcIlMPwDyYKCjUWFsYT564BBBAjg/Pmqmx9YDgA9QAD+zckyMHsP+AQBJoNdNg/kAv/by1aDxBAjPcfPv/z7w80GiEshj9gBtD8P3+AFCjGGf6BWUwMDAABBgDMk5SpwCJLewAAAABJRU5ErkJggg==')}.ytcenter-flag-uz{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVHjaYmRgSFy7tkxDQ6Sr68jChRsYGP7s3Fl37corFTURX98iIJeB4RcY/YAwAAKIEajh06dpO3fePXfuxb9//7KzTb9//8vGxvj27feZM8/8+f3v95+/EPL377+bNlUBBBALAwPD69ff7O0V3rz55uqq9OTJJ2EhzsePvwoLc969++73r7+/fv/99esPULWsLD/QHoAAYkllmP9wjvbHxy9E//49v/fP379/7v8CmXnv198ooKrfv//9+v3nF4jB/1vqDMNrgABi/PjxJy8vK9Ce////M4AhLsDIyHju3AOAAGIBuhuiGqSBAbdyoCwj479/fwACiOUfwz+YAF7zgTb8///nDwNAADEGMzAkZTW8v//4358/f8Fu/fMLHCJABHT9b5AgJKQEleRyzm0CCCCWtf4Mwu7P7r17CFby+9efX+CAAQfPn9+//oH0AQ0AhoaK8H+GcwwAAcQCjJDff/9I8kr+Bov++QcxHBb6IHuBwn///v/7999foCcBAoiRwR4WlcgRCiEhsQwKCwQACDAAOjxvXowI8ZUAAAAASUVORK5CYII=')}.ytcenter-flag-va{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG7SURBVHjaYnx9XpTh3zsGBhYGBoZ/DH8Y/vz994/hHxMjl8o9BiaBf6jgz79/AAHEwvDvk6ByP1A1w/+/DP//g0iGP/8Z2Bj5RRkYOP6jghcvXgAEEMhgEPjzEqj0P0jPn///f/1n5GD6++c/4z+wsr9gkhEIgJYABBALyCEgdTDVDEAGkASqZvr+/c+XT9fu39/w8xerhpoTH58UUANAADEBHcYANgZs9t////78//cbhP6zvHr95fDJRax/GfkZ7l27mv/928U/f/4ABBATw7//YKVg1f9/g9EfEPn3u4w0r69n49cnT+6e4Te13MnF7wa0ASCAWP4BfcvwF6YHYjzQD8z/Gdm/ftj08eUuJT4baUbJ08eOCEnJsjGzAgQQC9BFIA8A1QHd/e8P1BIGFqAIK5eliLzFu7s32Jnfmpi7//739+WLlwABxAIMdbC6P1DHQDzACNTwi5lZ6D/Tf24TDUYmRiYWFg5GVqAfAAKI5Q/Iz38YmEWBrmIEMpj+MPz9ycDIwcjIxMDICAxwTiEhYPSAHA4GAAHEeHc/w78fwKBlALoNiP6ASSCXx+DwPwYR5GiGaAAIMABTlkYuN8jKzQAAAABJRU5ErkJggg==')}.ytcenter-flag-vc{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHTSURBVHjaYmRgOM7A8IeB4R0DA8Pfu/4M/xggCEQAyT8gkruHgeEXFAEEEAtQdXW1IgeH9N9//39J1bKzf////y9QkPH/H2aGP0z/f3/78yci9vfvv39+//u9acImgAACagCBp89+/fv77+/fx///fwHa9P//bzj68/fXzfe/fv/9LcsjC7QBIICYGMBW//3z78+f/2Cz/77/8evX399A8979+PX//8///4FcEAKKADUABBDQBqDB/4Hoz59/DP9/n3j1a9vD30Yiv1kZf+949Mtf4ZeJ8O9ff0CqgZYANQAEENAGkNlA1b9//2f8//vKu98nXv4yEv6lK/Tr2ItfZ9/8ZmSA2gB0BDB0AAIIYgNI9W+gwP/fWvy/EtR+tZ37/ff/rxSN38p8v379+w1xD8RJAAEE0vD7N8NvsADQuWaiv0xEfm249/vDr9/9Fr+YGX5/+gVS/efvn79/QTYABBAoWIHuAZoDJMHB8ovh/y9vud/f/4BUQ0SArv/z7+8fYJD8YQAIIJAGoHskJNiAPmFikmRg4GVg+B2uDLTuDyPDb6AsM9MfZf6/oDD/C9IAEECMDAxbwXH4BCj39mghUAgSu/BoBpLyReDE8A8UYwABBgBPe1r1zq2RDQAAAABJRU5ErkJggg==')}.ytcenter-flag-ve{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQW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uQ+XgMREKjjId0BHOP9EaX5PAMsLOwGFPf8Afr6/vv9+SkhB1Y/N/v9+Pv7/wAA+gKI5depYytUPU7eZHzOw8P099exEzfPy3Lp8zP8+fHt1y8OoCpFCf3/jKw/gZ74A9IAEAAxAM7/AqXhAuX1B/z898vrEMXpFPr6+9nY7aTDAPT4BPr6/P/9+73Tq/wA////+vv7/QAA/AKICYiBLKDtQOr3r9+/fv39+fM/kPz9+w9QQ6mjuCov261b6+rdZP7/A4UsQACxADX8+fMPqAeM/gF1wlQDBf/dus2hI8D779+fa9c5f/0GavgDEEBADUC7/klKcgFJoM4/f0DagJqBLgaS0+dYARl//zL9/fvr71+ghn8AAcTIwJDKwPADFp3IkYocxxD0j4GBCSDAACmtQ9ZuigirAAAAAElFTkSuQmCC')}.ytcenter-flag-vi{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAH6SURBVHjaYvz48SMDEvj3D0zAKQwAEEAsQHEOxl3M7MaMTKz/f9/9//MCE1/Br48LGBh/sfKn/PmygoFJhpFF9N/f37+/7n3+kgMgAAAxAM7/BAAAAvv++vTviwD/EgcHFgIDFAcA9/v+1QMD1v7+Wv8HQPrwiPr46fX67f0EGObuEwIAMQDO/wT8/P4KDln/+eL1+dr//tsJBgKOgj4GDUz39zrw6exlaaMRE8Xj7/oVCQ8HCnMUFAoCADEAzv8CiIjg/PwA4eU4/gIf+vgG/vz27unr08Qe1sYw4tf3Bv/B9vb6EQs3CQ5px8cV7Oz4AoiFiYHh/r1vT17qaujZAz367W1RfZ/6k+pGwbiY1xP72Vj/vPpeceKYmaOj4J/f34CeBgggJjkFjjdvfgsKsv5n+O87LeTnt1eMjP/+Mvz894fxH/dXZnauRw/93r37wsrK8P8/KJQAAojx7du3/Pz8////Bxr/4ZHH8mtcQUaeT2/t+XT7g6ixAq+QAt+3OW+ZT0pJcQMV3L17GyCAWCBBDtHAKrJMS3ovE6utnMyaXxKPf//T3r83XkHBwtSUE6iAkZERGEIAAQTSAFENJDk5BKw1g4DMf9zrfv58duWKkKzsXyYmHUZGZqAgJGYBAojx+fPnaHH5B2gO2FoIA8QGCoJFgAAgwADodh8TiRYmWwAAAABJRU5ErkJggg==')}.ytcenter-flag-vn{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFsSURBVHjaYvzPgAD/UNlYEUAAmuTYAAAQhAEYqF/zFbe50RZ1cMmS9TLi0pJLRjZohAMTGFUN9HdnHgEE1sDw//+Tp0ClINW/f4NI9d////3+f+b3/1+////+9f/XL6A4o6ws0AaAAGIBm/0fRTVQ2v3Pf97f/4/9Aqv+DdHA8Ps3UANAALEAMSNQNdDGP3+ALvnf8vv/t9//9X/////7f+uv/4K//iciNABNBwggsJP+/IW4kuH3n//1v/8v+wVSDURmv/57//7/CeokoKFA0wECiAnkpL9/wH4CO+DNr/+VQA1A9PN/w6//j36CVIMRxEkAAQR20m+QpSBXgU0CuSTj9/93v/8v//V/xW+48UBD/zAwAAQQSAMzOMiABoBUswCd8ev/M7A669//OX7///Lr/x+gBlCoAJ0DEEAgDUy//zBISoKNAfoepJNRFmQkyJecfxj4/kDCEIiAigECiPErakTiiWMIAAgwAB4ZUlqMMhQQAAAAAElFTkSuQmCC')}.ytcenter-flag-vu{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHuSURBVHjaTMLRCUARAADA+zWDGYxrCvMYQ5IkvV75dZ0U1SKQ+Z8fh81iMug0rgBiufyU4dKX6id3WFbO+3X57z+9v3////nL8PcP458/zH/+MP3+/f/Pn/8w8sumTQABxMLAwHDt3v+3bx6ERjJNbv/x6fdv6z9/QSog6BeQ/PX/1y8gm1FW9h8DA0AAMQE1/Pv7//Slv0s3/cguY9z89++237+gSkHqfoLIX1A9QA0AAQSyIcr3rzj/n3cf/ixa/ye/miG15vekP79//f395++vX39+ARm//4JI+b+/9zIwAAQQSMOPH387VvwuTflz9OyfHz9+z2/78/c3479/DP//AUmmf/8Y//9j/vf3LysX8+V1DAABBNLw+Pkfb4c/797/Mtb+kxDIGJb349ev30A7fv3+DSQgJJBQVPxy7AQDQACBNOw7/vv+vV8mOkDVDDGTvvwM+fXTBeiM37/+gb38F0T++f/nJ/sfhkMMAAEE0vDn9x9j7d9As6Mnff3l8OuH5a/fP8Cq/wFJkPf//Pv95x8wpP8yfGEACCCQBi2VP0GucqWLv0kGC/zWBpn9mw1kJFADkPzzDxjMf/8CPfH/L8MvBoAAYmFkYDDmnCelz8Bgy8AAJI8DgxloKQNQDsSAsIGIAUxyMAAEGAAkxVGbT0qdUQAAAABJRU5ErkJggg==')}.ytcenter-flag-wales{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIeSURBVHjaYnz+/DkDEvj3j+Hf758MzMxg9r////8DyZ9/f7MwMP0DA4AAYgFKiEuI///P8PX2re8Hdn65/Zg/IkTY0BSo9NmkLg5VTVZBIQZpGS5JaaDWe/fvAwQQSAMjA+PLvTv+vH717uxZ3nffmN+8Aaq+GenH8PbH+1/b//z+pXXgwIPcROH0gj+sHAABxATU8Pfvnz8MDNIRseIpWV/+/uV1cH6/fePPNz8YxHm4fv9UWLb0w9Ejry9fYhERBToJIIBAGpiYmP8uWghy7p5d7379+nLjyrfz55j//WJ9/OKfkw2jpNTTgixDn3w2UXGgBoAAADEAzv8Cx+q34/TeEwUV6vnq687JEgoG7Xd19L/ACRIJ/wAB/8/O9HdvFyQqoAOt6fno1erHAgAxAM7/AQmDAIxGeur14lCM7RgBBvgM/gTq+QL8/u0H+PMK/CfW9Aj782JvA+kX/ykJIpiJvQIAMQDO/wL6/AD+//v8/fvPRQTTH/oV4/3QJfiaUPYk5v+uPvZag/uHUgB3mQMG+vvx/e8A/gACADEAzv8C/foA/P78+/36rC7y5Ar3hlvtskj/4h79yBf0U6/8BPX5xjH91hr29wL8B/4IAPwAAogFiIGhJMwlsXia8C3Znw/U/ov+++2/6Ncbje8bPZkNHn9LXsx4UOe7AgfDf6D5XxgAAoiRIR8YpQwMv8DoDwbjH4z7D0wyMAAEGADW2hsQaHrpugAAAABJRU5ErkJggg==')}.ytcenter-flag-wf{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG8SURBVHjaYmRgmMrAwPD/fxaQ3MDI+I+BQcnT88H27X8YGDAREwMDQACxANVVV9uB9fzXKy//8/evgLk5l5rq/1+///358+/37/9//vz//fsvmL1j0yaAAAJpgKgGkt8fPfrz+ze3isqP+w/+/vwJVPH31+8/v38x/PoF1MMhKwtUAxBAIA3//jFAtf3+/e/vXxACMn79ZuLlUaqv59TS+vHw4Y3UFKAg0FUAAQR0FUgBxJJ/v/8wMTEBGX9//Pjz65d8be2dsrJ3u3bdSE6WKSr+CzSFgQEggFguOq+TMBZ7OuPo/z9/+R0d/v/99+fr17+/fgGluXR0pLKz75aVSaSnC7i4POjpAdoAEEAs9/bu59TR+/7gwb/fv4A2gBwDZAB9/OsX0CWPe3okUlNfLFjAbWDAAHYSQACxADHYxb9AYQIkIezfv4HSN5KSpEtKBF1duY2MbqSns/HyAhUDBBBIw/8/EIN/Q1WDNQBd9fvJkxvZ2UDu/z+/Gf78ZVFRASoGCCCWXyAb/rBJSoKC6A/QBzCd4OAHWQtk/P0LQT8YGAACiHEpA8M3pLj8h8T+BRP5B2NwMDAABBgAlkE9cYJ03a8AAAAASUVORK5CYII=')}.ytcenter-flag-ws{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFuSURBVHjaYmRgsGZAgH8MDL9g5I+fDHf/gTnICCCAWICqqqtLFJVETEzk9+y+bmQke/bs41ePXv3984/5zxGm37////nzH0Z+2bQJIIBYwAb/l5cTnjnj0K9ffwUEuI4du8P2++fv33///b77/9fv/79//f/1C6iaUVYWaANAADEB7fn3j2H//psfP/7w8NC6evUZUPbX7z9AzWB1P0HkL6geoAaAAAJp+PuX6d69NyHRFh9+/L9169Xv3wy/f/35DTQbqOjnL2QNQMcABBDQSb9Y/vxg+/3j1K6Ld2+/YP3zl+HXH6ANQCdBFCFU//kDtAEggFj+Mpxn+Hv8/58H/2//YvgN9h/I0b8RqmEkI9hJAAHEAsSMYCGgASiKUFWDZP/8+cPAABBAIA3M4CBjgCvC1PYHqOEvw9+/QD8ABBBIA9PvPwySkmBj/jL8AelkBBvJACGB6O9fCAIqBgggxq+oEcmAEbXIUkAAEGAAb9NdEO8MLm8AAAAASUVORK5CYII=')}.ytcenter-flag-ye{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEvSURBVHjaYnzPgAD/YCQyA47+gEmAAGIBSnC2VgPJ////Mfz9x/Dv7/8/fxn+/vkPRH+A6DeQZPjz+99vEPvFkk0AAcQCNuv/v+dPGf7+/Q9Ef34z/P4LVvf7/28w+evXv9+/gGwmaVmgDQABxCLQ2/vf3p7hyxegFf//AW34ByRBOv/+A/JBDLCdQEFGHh6hbywAAcT49etXTk5OsJP+M4AhLsDIyPjo0SOAAGL59+8fRDVIAwNu5UBZRkagYoAAAmmACeA1H2gDyMn/AAKIZcKEPhcXt8+fP//9+xfIh5NwAFQKEeTl5e3r6wMIIEagM/Ly8u7fv/8bDH79+oVE/QaSf4AIDJSUlE6cOAEQQKBgBYpISEj8hkj8BkMgDeX+BhoO0QDxLUAAkYwAAgwAVjNhonoORPsAAAAASUVORK5CYII=')}.ytcenter-flag-yt{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHjSURBVHjaJIZBCgAwCMNU/P9ve5ER1rkQQlJSfMA672aoCtd0+1kOXAEokmMTAEAYCqIRhMB3JvcvXCR2WSCe2lzxrr8v6ZW9bS0bg9bMnaqP55DJnEhARFwBxAIxHchhEBFhcHH5D+QwMgD1/P/77z8zE4j89es/GxtQJyMjI9ASgABigar+///jly9/GBh4ubnPnHn24f2vf/+B6v/Y28p/AjrsyxcBAQEmsMMAAghqw7379z+8ewc0WkVdY97cuy9f/mBg+v/nxx8zE/Fbly/8/v2Ph59PT0//z58/AAHEAvHmt69fVVVV2TjYf/z4BeRM6DYHOqwwcz9QVlNb5/9/xsuXrwAdAuQCBBBIA5AF1Hrt2lUDIyNmJqbKn1N+Z7X9//O7k5mZ+b/DX2bms8dPMjKzQDQABBATxA86urr/GRh///7z5+cP5l/fWBhAiPnXp18/fvz4/vPnr98WlhYQxwMEENRJQBuYmZhZWFh+MzJyJBT+f/3m76/f/9hYGJgZOdjY2Tk4/vz+DZQFKgMIIMa3b9/y8fEBLXn37t3/f/8FBAWA1vwFu5ORgQHowtevXwNNFBYWBobS3bt3AQKIEcj/BwN//vz68+ffH3AEAw0DWg10EtBgJhaoQ4AAIMAAV00kxNUSQrIAAAAASUVORK5CYII=')}.ytcenter-flag-za{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIUSURBVHjaYmBoFWZo5ffeX37z4unP6up/GRgg6DcDw08Ghu8MDF8ZGD4zMHxkYHjPwPCWgQEggBgbDzP8Yp3C8O+PuJB0kJit6N4jLEePMfz9/f/PH4Y/f/7/BjHg5JdNmwACiMXoBoNZ+OfaM18ePnx56sXlcodE1W9fWI6d/v/gHkjdr9//f//6/+sXkM0oK/uPgQEgAAAxAM7/AQAAAMnBfiEn6oPXCuf4BP3993MxaCQGDxLe5v/19f/+/v/+/f/9/v/+/gEJCvGrqwIIpKGsrExH44WDLcPEB5xP/7C++/Xz738GDmaOv//+/P4LQSA3yfCIb5g0ESCAWIAa/vz5u3Hr19fvmcv8vnfe53j9j+vHn2+fP7/49ff3r7+/gKp//fsN1Mb+9yfDCwaAAAJp+Pv3j5sTk7P9v9kP2B78ZP3x5+uf//+4uIXZ/v4Dmf33zx+ghn9/eLhEGHgYAAIIpMHfnVFDl7HjJvelzyy/fn2dbFPPzcT95i73ty9///4F++If0Bf/eLhZZNTSAAKIZX4zg7oZS+5Jvjdf/zCw/i42Sdi9nHXz2vcvXj8DGgsOpH9AK4BIRYXz4sVdAAHE8s+LoeYiNxcTs4W8aJiU/455nGfOfeHmY5Dn4gS54w8wAv4B7fn7F0gCXfMPIIAYGTKBvmYQt7CuE5iQHfyKAegvhn9g9AvG+ANGDGCSDSDAAOBCLl8bj6ZDAAAAAElFTkSuQmCC')}.ytcenter-flag-zm{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGGSURBVHjaYmRuZGaAgb///jL8Y2D4A0ZAxi8w4xcKAyCAWIDqJnlOApL/////+//vv///gACoE8gGkhIfPvp8+fD7369ff/9w//qj2bcSIIBYIGa/+voKpPrfvz///vz9++fP/78g6t/vqyz/D3H96Lz3iPXPrwlq+u+lGAACiAVo9f9//8FGAg3+8wekGkT+/fv397/frL/+/P77J1dSFCgiwQhyEkAAsYCUMoAdADLyDxT9/f3nH1DT797+a1wffzj9+vXm3++F6er1RxkAAghkA9ApCNV//wANBtnzD2g20PG///z6BUL/fgPtBwYEQACxAL0PZIEUQdwDVgfX9u/3L6CHfwMRw2+gv4AaAAIIrAHkRahLfsOUgrT9+/P/1y8g+g0EQHVABQwMAAEE0gBSjaQOohRCAm0AafgD1PCXAaSeASCAWIAeB0qIcIvALPkD9zowPFjkPjMJ/pT6/1cAEkUMDAABxMiQjBqj8HgFixw9yyDEwKAJjqvzDAx8DAwAAQYAza93S9217P4AAAAASUVORK5CYII=')}.ytcenter-flag-zw{width:16px;height:11px;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHQSURBVHjaYrz+8LpmmCaDHwPDHwaGf2D0B8b+BWb8QmKwMQAEEOPXz1/ZOdlnbm+S1fv99/+/f///gtEfIPr7D4iAgmDy358//38XHtwEEECMX79+5WJl/8v0f+/udFfX7/8ZfzMw/P3//zcS+gVGvxkZZT992g4QQCwMDAz/mTu+ruRxDpu5rDrJ6d8PJsZf///8+ff79/8/QMavf39+//8NIlnEf1+fyAAQQCyfJlUx+Svwhp/4MOudp4zM+pN3Vb9//fv7N0jD719/gegXkA1k/Ob+8nsZAwNAADG+PbqX5e55nqjj////+bYvitXOz9Pb+/fPn79///4FBFAKRCsqKh49ehQggFhYtEz+XjoAUn2In8nKe1WC/2TRH2Abfv0Dk///gNl/fnOI/97DwAAQQCz/GP7xpdb9AwaP/vtFBVHuzF9YgH749/sfw+//jL/+Mf7+B+Qy/v7P9IeN7Y8KAwNAAIE8zcDA+PvX9207k5Mnvv/PAg6Tf5DAgYUSw2+G/38ZGf8atTIABBDj9+/ff/z+OXt7kYQ2LMiBkQAif//59+ffX3icAMP6b9Wa8wABxPjw+UN5KXmGOAaGL7BI/QWLbGQ2JO55GAACDADqXViU/+zCZAAAAABJRU5ErkJggg==')}.ytcenter-comments-blocked>*{display:none!important}.ytcenter-comments-blocked>*:first-child,.ytcenter-comments-blocked.Jx>*:first-child+div{display:block!important;font-weight:bold;color:#ccc}", html5player: ".html5-video-player.ytcenter-autohide-none .html5-video-container{bottom:35px!important}.html5-video-player.ytcenter-autohide-progressbar .html5-video-container{bottom:30px!important}.html5-video-player.ytcenter-autohide-controlbar .html5-video-container{bottom:3px!important}html[data-player-size=fullscreen] .html5-video-player.ytcenter-autohide-controlbar .html5-video-container,html[data-player-size=fullscreen] .html5-video-player.ytcenter-autohide-progressbar .html5-video-container,html[data-player-size=fullscreen] .html5-video-player.ytcenter-autohide-none .html5-video-container,html[data-player-size=fullscreen] .html5-video-player.ytcenter-autohide-both .html5-video-container{bottom:0!important}html[data-player-size=fullscreen] .ytp-user-idle.autominimize-progress-bar-fullscreenonly.playing-mode:not(.seeking-mode) .ytp-progress-bar-container:not(.ytp-block-autohide) .ytp-progress-list{-moz-transform:scaley(0.375);-ms-transform:scaley(0.375);-webkit-transform:scaley(0.375);transform:scaley(0.375);-moz-transition:-moz-transform .5s ease-in,background .15s;-webkit-transition:-webkit-transform .5s ease-in,background .15s;-ms-transition:-ms-transform .5s ease-in,background .15s;transition:transform .5s ease-in,background .15s}html[data-player-size=fullscreen] .ytp-user-idle.autominimize-progress-bar-fullscreenonly.playing-mode:not(.seeking-mode) .ytp-progress-bar-container:not(.ytp-block-autohide) .ytp-progress-list{-moz-transform:scaley(0.375);-ms-transform:scaley(0.375);-webkit-transform:scaley(0.375);transform:scaley(0.375);-moz-transition:-moz-transform .5s ease-in,background .15s;-webkit-transition:-webkit-transform .5s ease-in,background .15s;-ms-transition:-ms-transform .5s ease-in,background .15s;transition:transform .5s ease-in,background .15s}html[data-player-size=fullscreen] .ytp-user-idle.autominimize-progress-bar-fullscreenonly.playing-mode:not(.seeking-mode) .ytp-progress-bar-container:not(.ytp-block-autohide) .html5-scrubber-button{-moz-transform:translateY(2.5px) scale(0,0);-ms-transform:translateY(2.5px) scale(0,0);-webkit-transform:translateY(2.5px) scale(0,0);transform:translateY(2.5px) scale(0,0);-moz-transition:-moz-transform .5s ease-in;-webkit-transition:-webkit-transform .5s ease-in;-ms-transition:-ms-transform .5s ease-in;transition:transform .5s ease-in}html[data-player-size=fullscreen] .ytp-user-idle.autominimize-progress-bar-fullscreenonly.playing-mode:not(.seeking-mode) .ytp-progress-bar-container:not(.ytp-block-autohide) .html5-clip-marker{-moz-transform:scaleY(0.1875);-ms-transform:scaleY(0.1875);-webkit-transform:scaleY(0.1875);transform:scaleY(0.1875);-moz-transition:-moz-transform .5s ease-in;-webkit-transition:-webkit-transform .5s ease-in;-ms-transition:-ms-transform .5s ease-in;transition:transform .5s ease-in}.ytp-user-idle.autohide-controlbar.playing-mode:not(.seeking-mode) .html5-video-controls:not(.ytp-block-autohide),html[data-player-size=fullscreen] .ytp-user-idle.autohide-controlbar-fullscreenonly.playing-mode:not(.seeking-mode) .html5-video-controls:not(.ytp-block-autohide){-moz-transform:translatey(27px);-ms-transform:translatey(27px);-webkit-transform:translatey(27px);transform:translatey(27px);-moz-transition:-moz-transform .5s ease-in;-webkit-transition:-webkit-transform .5s ease-in;-ms-transition:-ms-transform .5s ease-in;transition:transform .5s ease-in}.white .html5-volume-slider-foreground:before,.white .html5-volume-slider-foreground:after{background:#bbb!important}.white .html5-volume-slider-foreground:after{background:#777!important}.ytp-force-transform{-webkit-transform:none!important}.ytcenter-disable-endscreen .html5-video-player .html5-endscreen{display:none!important}.ytcenter-disable-html5 #movie_player.html5-video-player,.ytcenter-disable-html5 #player-unavailable{display:none!important}body.ytcenter-scrolled-top .html5-video-player.playlist-created .ytp-button.ytp-button-playlist,body.ytcenter-scrolled-top .html5-video-player.playlist-created .ytp-button.ytp-button-prev,body.ytcenter-scrolled-top .html5-video-player.playlist-created .ytp-button.ytp-button-next,body.ytcenter-scrolled-top .html5-video-player.playlist-created.playlist-loaded .ytp-playlist-tray-container{display:block}", gridview: ".ytcenter-grid-subscriptions-username,.ytcenter-gridview #browse-items-primary .branded-page-module-title{display:none}.ytcenter-gridview .ytcenter-grid-subscriptions-username{display:block}.ytcenter-gridview .branded-page-v2-secondary-col,.ytcenter-gridview .feed-item-container .feed-author-bubble-container{display:none!important}.ytcenter-gridview ul.feed-list{margin:0 auto}.ytcenter-gridview.cardified-page .feed-item-dismissable{padding:3px}.ltr.ytcenter-gridview.cardified-page .yt-lockup-thumbnail,.ltr.ytcenter-gridview.cardified-page .feed-item-action-menu{margin-left:-3px;margin-top:-3px}.rtl.ytcenter-gridview.cardified-page .yt-lockup-thumbnail,.rtl.ytcenter-gridview.cardified-page .feed-item-action-menu{margin-right:-3px;margin-top:-3px}.ytcenter-gridview .feed-item-container{padding:0!important;width:196px!important;border:0!important}.ytcenter-gridview .feed-item-container,.ytcenter-gridview .feed-item-container .yt-lockup-thumbnail{width:196px!important}.ytcenter-gridview .expanded-shelf-content-list,.ytcenter-gridview .expanded-shelf-content-item{margin-bottom:0!important;margin-right:0!important}.ytcenter-gridview #browse-items-primary{padding:15px;margin-right:-15px;font-size:0}.ytcenter-gridview .feed-item-container{display:inline-block;margin-right:10px;margin-bottom:20px;vertical-align:top}.ytcenter-gridview .feed-item-header{display:none!important;position:absolute!important;top:110px!important}.ytcenter-gridview .ytcenter-gridview-username{margin-bottom:5px}.ytcenter-gridview .feed-item-header .feed-item-time{display:none!important}.ltr.ytcenter-gridview .feed-item-action-menu{top:8px!important;right:0!important}.rtl.ytcenter-gridview .feed-item-action-menu{top:8px!important;left:0!important}.ytcenter-gridview .yt-lockup-meta{margin:0!important}.ytcenter-gridview .feed-item-container .feed-item-main{margin:0!important;border:0!important}.ltr.ytcenter-gridview .feed-item-container .feed-item-main .yt-lockup-content{float:left!important;width:100%!important}.rtl.ytcenter-gridview .feed-item-container .feed-item-main .yt-lockup-content{float:right!important;width:100%!important}.ytcenter-gridview .yt-lockup-badges,.ytcenter-hide-watched-videos .ytcenter-video-watched-wrapper{display:none!important}.ytcenter-gridview .feed-load-more-container,.ytcenter-gridview .feed-page .feed-list-item:last-child::after{clear:both}.ytcenter-gridview .feed-page .feed-list-item:last-child::before,.ytcenter-gridview .feed-page .feed-list-item:last-child::after{content:'.';display:block;height:0;visibility:hidden}.ytcenter-gridview .ytcenter-grid-subscriptions-username .yt-channel-title-icon-verified{margin-left:3px}", images: ".ytcenter-image-welcome-settings{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAocAAAE3CAIAAABXVHxdAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg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xvHjx//+90OlpaVElJeXl5GRuXfv3mHDhqXa357lRMTUDCdiTEgiJtRGJp0ZyaK0rLTyw8qWE4FMveIKcnzgnvRgdn5OZBEBAADQy1m/fv3HH//FNE0hLLWmqKjopptuUssfflj53nvvaZqmbFnLMgcPHjJr1s2uyVtRUXHRRReZptnqhQzD4JwzxlIKvJSWZbVwKtjKAAAAejN1dXUVFdvuv/8nhmEk3WH8+HHjx4/zrvn5z39x4MCBc88911kRnf7k5vWkmNyhpCpdRCIRRk6RC/dg1xx2wrOVPczsGhX2LsoohyoDAADozWiaRiR3797zL/8yqi37792717KsWAmXFJ2s7Ex3UoPC9kxjO+L6lWXLWo720jTthhtumHbVNKGiuZ06VsLWaagyAACAXk2/fv1mzpy5Zs2a6urqa675t/T09FR7CiHefXfT1q1br756+j/8wz94jF2m8mq6sV7ejCJOKUfJiDZu3NivX7+Wo702bdp01VVXOVay9M5vdhJzAgAAAL2ahoaG11//86FDf//2t789dOjQxB3q6+tXrlzZ1NRUWlqWn5/n3bRt27YRI0aEIxHbzRwTe83suhSMGONvvvnmhx9+2LKwXnHFFSWXlJBwhJg5Wi8ZQ80oAAAAZw87d+586631/+//LVSxXV4WL35q6NAhV111VeLw8/bt24cPHx5uDtsB2PZqb81k25/tS0vTNJ60yrJ7jGWakUjYLTtF5Kk8hXFlAAAAZw+FhYXSLscYgxCioeHksGHDUkWEOTWhKDaOKxq4pRYiZiRiusk4mbegsrO/m/E6GjTmDEtLklBlAAAAZw0fffS/F100MnHcl3M+btz4ioqK888/P8lhKo2mJOm6q1WpZFuqGSNBkpimLVu27J2332kpt5fGbygtu/LKq5yykLap7So8VBkAAMBZgRBi165dM2feoARxy5YtW7duHTx48HXXXZeRkTFhwvjf/e6DL7/88pxzzokXZXJqRqnU1cwTqkXkpt9kUr678d1Wo73e+5//ufKqq6SIZtukqAWOjJsAAADODvbt25eWljZ48ODGxqZVq149ePBgSUnJxx//5bnnnrvhhhsGDhw4atQ/b9++/eqrr44/0pZg6dq0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+jHlfNGiRYcOHVq9erW7cuPGjYMGDZoxY0YbT1JQULB+/fpgMLh27drCwsLNmzcHg8H333+/qKio61vkVV/vckFBwZo1azIyMvDSAYAqA9B90XX9oYceeuaZZ1wle/LJJ++9917DMPBwAABQZQC6mhEjRtx8881PPfWUEOKpp56aPXu2a+a63mnXI53KGG272UpEwWBQObpdP7lymwcCgcsvvzzpCXfv3p3oG487yjTNefPm1dTUXHHFFXv37nWX9+/f796AWli1alXcDbgt/fWvf+362JNeFAAAVQagc/nOd76zbdu2H/3oR8eOHXN910rkFi1aFAwGlyxZcuutt3bUuGx1dXVFRcW2bdtWrFhRUVEhhFi0aNF9990XDAZ//OMfL1y40DvOre7koYceWrlypbqTxx57LBKJJB4lpXz66acLCwvffvvt888/312O86U3NTVZlhUMBl966SXlJPC2dPTo0W+99Vaqi+KjAgBUGYBOR/mxd+zY4fVdHzlyRAgxatQoIiouLs7Pzz98+HCHXO7mm282DEPX9WnTpm3ZsqW2traqqkpdaMqUKUeOHKmpqYk7JBwOh0IhZdk/9dRThmG05ahUjR03bhwR5eTkZGdnq17CoEGDAoGAOtWQIUNSXRQfFQB66rccHgHoWeTk5OTm5ubn57tr6urqCgsLlRRxzs8777xQKNSxMVyDBw8+evSosl8nTZqkVvr9/kQdLS8vLysrO3DgABEtXry4pKSk1aNSYRiGt5lE5JVzzvnw4cNbuCgAAKoMwNej0zU1NZFIxDAMIcS+ffsKCgo69hIHDx4899xziSg9PX3z5s0txEjruv7aa68R0e7du++4445169YlPUqZtu2lsLDQXRZC7NmzZ/r06UkviihuAHoo8GCDHk9ubi7nfNeuXURUXV19+PDh/Px878pdu3YdP368LYfH7fnKK69EIpFQKLRy5crBgwfn5eWNHDlS7Zk0giwUCk2fPj0u3irVUZFIxPW0e5dboLi4+NChQ8FgkIg2btyojOOkFwUAwFYG4Gv6EOv6008/PXv27Lq6Or/fv3TpUmUpzpkz58477ySie+65Z9CgQS0cnmrP4uJi5Q1euHChWli0aJHyFXsv5FJQUPDII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d+8MEHl1xySff6zDkmMiOKqRMKAFQZgESRbiM/+9nPXnnllbFjx954441ENGbMmMmTJ7/yyis/+9nPWjiqtrb2hz/8YXp6+j333OOunD9/flNT0+OPP97GS69YseLiiy8OBAKPPvpoOBy+6667AoHA+PHjn3322Q58FAsWLPjRj350zz33BAKBadOmpaWltVcaz0QUH3/88ebm5kAg0Jarey/kXV6xYsUll1zywQcfdLvPGWQYQJUB6ED69OlzwQUXFBcXL1myZPLkyUSkNLK4uPiCCy7o06dPC8fu379/9erVF110kasiEyZMePXVV/fs2dN9GlhUVDRjxox33nlHSVptbe3LL79cUFCQ1BzvjKufe+6569evd7syL7/8cn5+frezegEAUGXQHTh58uTvf/9799dgMOgu//73vz958mTLhz/66KN79+6977778vLybrnllt27d7tmrus0dj3SqQzBtpuMRHTBBRcoV7DrJ1du82AwuH379sQTXn/99bquv/HGG14DvaSkRN1n4rHqckuWLHGvUlRUdOedd/p8vv/8z/9UDUl61Ntvv71+/fq4e2hoaKivr586dar36q7VG3ce74V+/OMfey/qPoTE24t72mvWrHH9/AsWLGh5UAAAAFUG3Yvvf//7M2fOJKITJ07cdNNNc+fOvemmm06cOKG+6Nsyxvzggw/m5eUtX77c5/O5vmslMBs2bAgEAuXl5d/97nc7yjocMGDALbfcUlpaOmzYsF/+8pd5eXn/9V//tWnTpkAgUFFR8Ytf/MI7zq04ceLEsWTZVFIdyznXNC0QCKxYseKiiy4aOHDg4sWLw+Hw3Xff/eyzz6Y6qm/fvpWVlRMmTPD6mZWfPy8vL3FQOfE86enp7oV+/etfey8a8wURe3uunKun/dlnn+Xl5alXcO211z7//PPqFXz7299OfDIAAKgy6HaqHAgEiKi6uvrTTz8lok8//bS6upqIAoFAW1RZ+bH79u3r9V1PmDCBMaYs1FWrVkUikX/+53/ukBvetm3bnj179u/fv3///hEjRnzjG9/o16+futATTzzh9/snTZrUxlOlOlZKqXwGNTU1lmW1/aiampqkz2fixImBQKC0tFTJs9Lm077zxNu7/vrrm5qali9frk7V7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6N6f/OTR3/525//9H8QYdKQ8E7G0NOXTZu6IMgBQZQBalufKnTv/dcoUtfKjjz6SUGXQYQLNNF3XDINrGoMkA6gyAO0lMzMTqgw6UpU1ze/36zq+sgBUGYD206dPH6gy6EBV5pzrug5VBlBlAE6HjIwMPATQscKMhwCgygDgOxQAALoOVHIEAAAAoMoAAAAAgCoDAAAAUGUAAAAAQJUBAAAAqDIAAAAAoMoAAAAAVBkAAAAAUGUAAAAAqgwAAAAAqDIAAAAAVQYAAAAAVBkAAACAKgMAAAAAqgwAAABAlQEAAAAAVQYAAACgygAAAACAKgMAAAAAqgwAAABAlQEAAAAAVQYAAACgygAAAACAKgMAAABQZQAAAABAlQEAAACoMgAAAACgygAAAEBv4P8PAKVLA2YYwsw+AAAAAElFTkSuQmCC') no-repeat;width:647px;height:311px}.ytcenter-image-welcome-settings-repeater{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAE3CAIAAADkI7zaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiY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position:fixed;top:0;width:100%;height:100%;text-align:center;z-index:2000000003;overflow:auto;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none}.ltr .ytcenter-dialog-base{left:0}.rtl .ytcenter-dialog-base{right:0}.ytcenter-dialog-fg{position:relative;background:#fff;vertical-align:middle;z-index:2000000002;-moz-box-shadow:0 0 15px rgba(0,0,0,.18);-ms-box-shadow:0 0 15px rgba(0,0,0,.18);-webkit-box-shadow:0 0 15px rgba(0,0,0,.18);box-shadow:0 0 15px rgba(0,0,0,.18);display:inline-block;zoom:1;-moz-user-select:text;-ms-user-select:text;-webkit-user-select:text}.ltr .ytcenter-dialog-fg{text-align:left}.rtl .ytcenter-dialog-fg{text-align:right}.ytcenter-dialog-align,.ytcenter-dialog-fg{vertical-align:middle;display:inline-block}.ytcenter-dialog-align{height:100%}.ytcenter-dialog-fg{border:1px solid #e2e2e2}.ytcenter-dialog-bg{position:absolute;top:0;width:100%;min-width:970px;border:0;z-index:2000000001;background-color:#fff;opacity:.8;filter:alpha(opacity=80)}.ltr .ytcenter-dialog-bg{left:0}.rtl .ytcenter-dialog-bg{right:0}.ytcenter-dialog-base .ytcenter-dialog-header{border-bottom:1px solid #e2e2e2;height:60px;margin:0 -20px 20px}.ytcenter-dialog-base .ytcenter-dialog-header h2{font-weight:400;border-bottom:0;color:#555;overflow:hidden;white-space:nowrap;word-wrap:normal;zoom:1;-o-text-overflow:ellipsis;text-overflow:ellipsis;margin:0;padding:0 20px}.ytcenter-dialog-footer{clear:both;padding-top:20px;text-align:right}.ytcenter-dialog-fg-content{overflow:hidden;color:#333;padding:0 20px 20px}.ytcenter-dialog-fg-content h2{border-bottom:1px solid #ccc;color:#333;font-weight:700;font-size:20px;line-height:60px;overflow:hidden;white-space:nowrap;word-wrap:normal;zoom:1;-o-text-overflow:ellipsis;text-overflow:ellipsis;margin:0 -20px 20px;padding:0 20px}.ytcenter-dialog-show-content .ytcenter-dialog-content{display:block}body.ytcenter-dialog-active{height:100%;overflow:hidden}.ltr .ytcenter-dialog-footer button{margin-left:10px}.rtl .ytcenter-dialog-footer button{margin-right:10px}.ytcenter-dialog .ytcenter-settings-content h2{border-bottom:inherit!important;margin:inherit!important;padding:inherit!important;color:inherit!important;font-size:inherit!important;line-height:inherit!important;overflow:inherit!important;white-space:inherit!important;word-wrap:inherit!important;-o-text-overflow:inherit!important;text-overflow:inherit!important}", scrollbar: ".ytcenter-scrollbar{overflow:hidden}.ytcenter-scrollbar:hover{overflow:auto}.ytcenter-scrollbar::-webkit-scrollbar{height:16px;overflow:visible;width:16px}.ytcenter-scrollbar::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2);background-clip:padding-box;border:solid transparent;border-width:1px 1px 1px 6px;min-height:28px;padding:100px 0 0;box-shadow:inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07)}.ytcenter-scrollbar::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25)}.ytcenter-scrollbar::-webkit-scrollbar-thumb:active{background-color:rgba(0,0,0,0.5);box-shadow:inset 1px 1px 3px rgba(0,0,0,0.35)}.ytcenter-scrollbar::-webkit-scrollbar-corner{background:transparent}.ytcenter-scrollbar::-webkit-scrollbar-button{height:0;width:0}.ytcenter-scrollbar::-webkit-scrollbar-track{background-clip:padding-box;border:solid transparent;border-width:0 0 0 4px}.ytcenter-scrollbar::-webkit-scrollbar-track:horizontal{border-width:4px 0 0}.ytcenter-scrollbar::-webkit-scrollbar-track:hover{background-color:rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(0,0,0,.1)}.ytcenter-scrollbar::-webkit-scrollbar-track:horizontal:hover{box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.ytcenter-scrollbar::-webkit-scrollbar-track:active{background-color:rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(0,0,0,.14),inset -1px 0 0 rgba(0,0,0,.07)}.ytcenter-scrollbar::-webkit-scrollbar-track:horizontal:active{box-shadow:inset 0 1px 0 rgba(0,0,0,.14),inset 0 -1px 0 rgba(0,0,0,.07)}", list: ".ytcenter-list{background:#fbfbfb;width:100%;height:100%;padding:0;margin:0}.ytcenter-list.ytcenter-dragdrop-indragging,.ytcenter-list.ytcenter-dragdrop-indragging *{cursor:move!important}.ytcenter-list-item:first-of-type{border-top-color:transparent}.ytcenter-list-item{position:relative;clear:both;margin:0;border-top:1px solid #fff;border-bottom:1px solid #e3e3e3;font-size:13px;width:100%;height:40px}.ytcenter-list-item .ytcenter-dragdrop-handle{width:20px;height:40px;cursor:move;position:absolute}.ltr .ytcenter-list-item .ytcenter-dragdrop-handle{left:0}.rtl .ytcenter-list-item .ytcenter-dragdrop-handle{left:0}.ytcenter-list-item.ytcenter-dragdrop-dragging{background:#f2f2f2}.ytcenter-list-item.ytcenter-dragdrop-dragging li{background:0}.ytcenter-list-item.ytcenter-dragdrop-dragging .ytcenter-dragdrop-handle{background:url(//s.ytimg.com/yts/img/playlist/drag-drop-indicator-vflv1iR5Z.png) 10px 15px no-repeat}.ytcenter-list.ytcenter-dragdrop-notdragging .ytcenter-list-item:hover .ytcenter-dragdrop-handle{background:url(//s.ytimg.com/yts/img/playlist/drag-drop-indicator-vflv1iR5Z.png) 10px 15px no-repeat}.ltr .ytcenter-list-item .ytcenter-list-item-content{padding:8px 13px 0 20px}.rtl .ytcenter-list-item .ytcenter-list-item-content{padding:8px 20px 0 13px}.ytcenter-list:hover .ytcenter-list-item{width:auto}.ytcenter-list-item .ytcenter-list-item-title{color:#000;font-weight:bold;font-size:13px}.ytcenter-list-item .ytcenter-list-item-subtext{display:block;font-size:11px;color:#777;line-height:1.4em;height:1.4em}.ytcenter-list-item-title,.ytcenter-list-item-subtext{text-overflow:ellipsis;-o-text-overflow:ellipsis;word-wrap:normal;white-space:nowrap;overflow:hidden}.ytcenter-list-item.ytcenter-list-item-selected{border-color:#e6e6e6;background:#e6e6e6!important}.ytcenter-list.ytcenter-dragdrop-notdragging .ytcenter-list-item:hover{background:#f2f2f2;cursor:pointer}.ytcenter-list-header-btn{min-width:172px!important;height:100%!important;border:0!important;border-radius:0!important;background:#fff!important;color:#000!important;text-shadow:0 0 0!important;overflow:hidden!important;position:relative!important}.ltr .ytcenter-list-header-btn{border-right:1px solid #eee!important}.rtl .ytcenter-list-header-btn{border-left:1px solid #eee!important}.ytcenter-list-header-btn:hover{background:0;border:0;padding-top:1px}.ytcenter-list-header-btn:hover:before{position:absolute;top:0;left:0;right:0;bottom:0;height:200px;content:' ';-moz-box-shadow:inset 0 0 5px #bbb;-ms-box-shadow:inset 0 0 5px #bbb;-webkit-box-shadow:inset 0 0 5px #bbb;box-shadow:inset 0 0 5px #bbb;background:transparent}", confirmbox: ".ytcenter-confirmbox{position:fixed;top:0;width:100%;height:100%;z-index:9999}.ltr .ytcenter-confirmbox{left:0}.rtl .ytcenter-confirmbox{right:0}.ytcenter-confirmbox .ytcenter-confirmbox-mask{opacity:.95;filter:alpha(opacity=95);background:#000}.ytcenter-confirmbox .ytcenter-confirmbox-floater{height:50%;margin-bottom:-59px}.ltr .ytcenter-confirmbox .ytcenter-confirmbox-floater{float:left}.rtl .ytcenter-confirmbox .ytcenter-confirmbox-floater{float:right}.ytcenter-confirmbox .ytcenter-confirmbox-box{width:350px;height:90px;position:relative;background:#fff;z-index:10000;padding:14px;clear:both;margin:0 auto;border:1px solid #bbb;-moz-box-shadow:0 0 5px #bbb;-ms-box-shadow:0 0 5px #bbb;-webkit-box-shadow:0 0 5px #bbb;box-shadow:0 0 5px #bbb}.ytcenter-confirmbox .ytcenter-confirmbox-message{height:100%}.ytcenter-confirmbox .ytcenter-confirmbox-controls{margin-top:-28px}", panel: ".ytcenter-panel{display:inline-block;width:773px;position:relative}.ltr .ytcenter-panel{border-left:1px solid #eee}.rtl .ytcenter-panel{border-right:1px solid #eee}.ytcenter-panel-label:first-of-type{padding-top:16px}.ytcenter-panel-label{padding:8px;color:#000;font-size:13px}.ytcenter-panel-label label{padding-right:8px;width:100px;display:inline-block}.ltr .ytcenter-panel-label label{padding-right:8px}.rtl .ytcenter-panel-label label{padding-left:8px}", resizePanel: ".ytcenter-resize-panel{border:1px solid #eee;border-bottom:0;width:100%;margin-top:5px;line-height:normal}.ltr .ytcenter-resize-panel{border-left:0}.rtl .ytcenter-resize-panel{border-right:0}.ytcenter-resize-panel-header{width:100%;height:34px;border-left:1px solid #eee}.ltr .ytcenter-resize-panel-header{border-left:1px solid #eee}.rtl .ytcenter-resize-panel-header{border-right:1px solid #eee}.ytcenter-resize-panel-content{border-bottom:1px solid #eee;position:relative;overflow:hidden}.ytcenter-resize-panel-right>*{width:100%!important}.ytcenter-resize-panel-right>*:before{position:absolute;top:0;width:100%;height:1000%;content:' ';-moz-box-shadow:inset 0 0 5px #bbb;-ms-box-shadow:inset 0 0 5px #bbb;-webkit-box-shadow:inset 0 0 5px #bbb;box-shadow:inset 0 0 5px #bbb;background:transparent}.ltr .ytcenter-resize-panel-right>*:before{right:0}.rtl .ytcenter-resize-panel-right>*:before{right:0}.ytcenter-resize-panel-list{width:171px;height:301px;display:inline-block;border-top:1px solid #eee}.ltr .ytcenter-resize-panel-list{float:left;border-left:1px solid #eee}.rtl .ytcenter-resize-panel-list{float:right;border-right:1px solid #eee}.ytcenter-resize-dropdown-selected{background:#555!important;color:#fff!important}.ltr .ytcenter-resize-aspect-bind{display:inline-block;width:5px;height:52px;border-top:2px solid #aaa;border-right:2px solid #aaa;border-bottom:2px solid #aaa}.rtl .ytcenter-resize-aspect-bind{display:inline-block;width:5px;height:52px;border-top:2px solid #aaa;border-left:2px solid #aaa;border-bottom:2px solid #aaa}.ytcenter-resize-chain{width:7px;height:30px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAYAAAD6S912AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQS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if9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAARNJREFUeNq8lD1uAjEQRp8XlCqnsEDiBNMlFUdYUVKgnIEy4qdJnTopUobcgRKkPQESaE6RKtLKNIO0QsIsjsVIK3vH9udv7XnrQgjkjO6lAREBGAGvQB/YAwtgVVXV7YJACbwBL0AFCPBhY6tLi4qI4AyYAGvg19qxOU5yOAA2QDibP4gJxhx2gD/rO2tryycJJsVdBWvgAcB7HxrHUKcK7oDnszN8snzSLc+BTwBVfbTcFzCNCbpr6IlIMIcBcDFK7nspIlKKiNrr6ZNVREapDk/oYejRBr2iBXrNstlmQU9V86Lnvc+LnqrmRa/xC8uCnms8V9ErWqA3tDocGnrLVJZ/bMN3oAccjOPvf7F8axwHAIVuR7EfyTcEAAAAAElFTkSuQmCC) no-repeat;background-color:#fff;background-position:center}.ytcenter-resize-unchain{width:7px;height:30px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAYAAAD6S912AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAE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H8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAYRJREFUeNq81L2KFEEUBeCvdTQQs30AsfFnNjCTThadZCPjxWARocVnEKPFn8TYWBkUE3czH0CYxKDAyMDxh/YBZDOTdR3a5DYMw0yP9DYeuFR3dd3T91adOlld15ahKAq4jT1cxjc8wX5KySoMrMYOnuE+Egq8iG/7q5JOtRA+wj28x68Y70bFnSoc4gPqhfXDNsK2Ck/jdzxnMc5ivhNhJ/xXwhnOQp7n9dw2zLoSTnGz2cOyLOFGzHcifIyXUFXV+Zh7hadrZRO3YhEHEXXoEC5goyiKrZDP1YghPqaUdrO6rpcRnsFFbM4lNYkbseYYP/AZX/AppfSmEfYdXMOVIMmDFA4jYYp3+BokVZAuvSm3cH0haYppWZY/x+PxVrSerZPNAFJKu0vcZgev47U5lAoPU0onMgdlWTaHstYcshY//INzOMrzXFVVTUdHKaXBicxhNBr1aw6TyaRfc4h2+zOHOZPtxRyyuejFHLZDh9v/bA4rcBA/fI5L+I4HeNtG+HcAnhVy1oN0DPgAAAAASUVORK5CYII=) no-repeat;background-color:#fff;background-position:center}.rtl .ytcenter-resize-chain,.rtl .ytcenter-resize-unchain{margin-left:0!important}.ytcenter-resize-ratio{cursor:pointer}.resize-options{padding:0 10px;position:absolute;bottom:-35px;left:0;right:0}.ytcenter-resize-panel-right{position:absolute;top:0;left:0;right:0}.ltr .ytcenter-resize-panel-right{margin-left:171px}.rtl .ytcenter-resize-panel-right{margin-right:171px}.ytcenter-resize-panel-right>*>*{position:relative;height:100%;padding-left:5px;margin-bottom:40px}.ytcenter-resize-panel .ytcenter-panel-label label{width:160px}.resize-options-right{min-width:60px}.ltr .resize-options-right{float:right;margin-left:10px}.rtl .resize-options-right{float:left;margin-right:10px}.resize-options-left{min-width:60px}.ltr .resize-options-left{float:left;margin-right:10px}.rtl .resize-options-left{float:right;margin-left:10px}", modules: ".ytcenter-module-container{display:inline-block;vertical-align:middle}.ytcenter-modules-rangetext{width:65px;vertical-align:middle;border:1px solid #ccc}.ltr .ytcenter-modules-rangetext{margin-left:4px}.rtl .ytcenter-modules-rangetext{margin-right:4px}.ytcenter-colorpicker-presets{margin-top:10px}.ytcenter-colorpicker-presets-color{display:inline-block;width:20px;height:29px;cursor:pointer;border:1px solid #eee}.ltr .ytcenter-colorpicker-presets-color{float:left;margin-right:5px}.rtl .ytcenter-colorpicker-presets-color{float:right;margin-left:5px}.ytcenter-colorpicker-presets-label{display:block}.ytcenter-modules-colorpicker-huewrapper{width:250px;height:225px;display:inline-block}.ytcenter-modules-colorpickerfield-hue{width:225px;height:225px;display:inline-block;border:0}.ytcenter-modules-huerange{display:inline-block;border:0}.ytcenter-modules-htmlcolor>*:first-child{width:80px}.ytcenter-modules-currentcolor{display:inline-block;width:20px;height:29px}.ltr .ytcenter-modules-currentcolor{float:left}.rtl .ytcenter-modules-currentcolor{float:right}.ytcenter-modules-rgbwrapper{display:inline-block;vertical-align:top;width:225px;height:225px;position:relative}.ytcenter-modules-hwrapper .ytcenter-modules-htmlcolorlabel+input{width:auto!important}.ytcenter-modules-cpwrapper{width:475px;position:relative;z-index:4}.ytcenter-modules-hue{position:absolute!important;top:0!important;background:-moz-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:-ms-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:-o-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:-webkit-gradient(linear,left top,left bottom,from(#f00),color-stop(0.17,#ff0),color-stop(0.33,#0f0),color-stop(0.5,#0ff),color-stop(0.67,#00f),color-stop(0.83,#f0f),to(#f00))!important;background:-webkit-linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important;background:linear-gradient(top,#f00 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)!important}.ytcenter-modules-hue .ie-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000',endColorstr='#ffff00')}.ytcenter-modules-hue .ie-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00',endColorstr='#00ff00')}.ytcenter-modules-hue .ie-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00',endColorstr='#00ffff')}.ytcenter-modules-hue .ie-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff',endColorstr='#0000ff')}.ytcenter-modules-hue .ie-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff',endColorstr='#ff00ff')}.ytcenter-modules-hue .ie-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff',endColorstr='#ff0000')}.ytcenter-modules-range{position:relative;display:inline-block;overflow:hidden;border:1px solid #eee;outline:0;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;vertical-align:middle}.ytcenter-modules-range .ytcenter-modules-range-handle{border-width:1px;border-style:solid;outline:0;font-weight:bold;font-size:11px;white-space:nowrap;word-wrap:normal;vertical-align:middle;border-top:0;border-bottom:0}.ytcenter-modules-hue.ytcenter-modules-range{border-color:#000}.ytcenter-modules-hue.ytcenter-range .ytcenter-modules-range-handle{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.ytcenter-modules-range.ytcenter-hue .ytcenter-modules-range-handle{border:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.ytcenter-modules-range.ytcenter-modules-hue{border:0!important;outline:0;overflow:visible;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.ytcenter-modules-range-handle{position:absolute;top:0;cursor:default!important;margin:0;padding:0;text-shadow:0 1px 0 rgba(255,255,255,.5);border-color:#d3d3d3;background-color:#f8f8f8;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fffcfcfc,EndColorStr=#fff8f8f8);background-image:-moz-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-ms-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fcfcfc),color-stop(100%,#f8f8f8));background-image:-webkit-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fcfcfc 0,#f8f8f8 100%)}.rtl .ytcenter-modules-range-handle{left:-1px!important}.ytcenter-modules-range-handle .ytcenter-modules-range-handle-left{position:absolute;top:-7px;width:0;height:0;border:solid transparent;border-width:7px}.ytcenter-modules-range-handle .ytcenter-modules-range-handle-right{position:absolute;top:-7px;width:0;height:0;border:solid transparent;border-width:7px}.ltr .ytcenter-modules-range-handle .ytcenter-modules-range-handle-right,.ltr .ytcenter-modules-range-handle .ytcenter-modules-range-handle-left{left:7px;border-right-color:#fff}.rtl .ytcenter-modules-range-handle .ytcenter-modules-range-handle-right,.rtl .ytcenter-modules-range-handle .ytcenter-modules-range-handle-left{right:-7px;border-left-color:#fff}.ytcenter-modules-range.ytcenter-modules-hue .ytcenter-modules-range-handle .ytcenter-modules-range-handle-right{border-top:7px solid transparent!important;border-bottom:7px solid transparent!important}.ltr .ytcenter-modules-range.ytcenter-modules-hue .ytcenter-modules-range-handle .ytcenter-modules-range-handle-right{border-right:7px solid #000!important}.rtl .ytcenter-modules-range.ytcenter-modules-hue .ytcenter-modules-range-handle .ytcenter-modules-range-handle-right{border-left:7px solid #000!important}.ytcenter-modules-colorpicker{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;width:16px;height:16px;cursor:pointer;border:1px solid #eee}.ytcenter-modules-colorpicker-saturation{position:absolute;width:100%;height:100%;top:0;background-image:-webkit-gradient(linear,0 0,100% 0,from(#FFF),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#FFF,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF, endColorstr=#00CC9A81');filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1,startColorstr='#FFFFFFFF',endColorstr='#00CC9A81')}.ytcenter-modules-colorpicker-value{position:absolute;width:100%;height:100%;top:0;background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81, endColorstr=#FF000000');filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81',endColorstr='#FF000000')}.ltr .ytcenter-modules-colorpicker-value,.ltr .ytcenter-modules-colorpicker-saturation{left:0}.rtl .ytcenter-modules-colorpicker-value,.rtl .ytcenter-modules-colorpicker-saturation{right:0}.ltr .ytcenter-modules-colorpicker-handler{position:absolute;top:0;left:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;width:5px;height:5px;border:1px solid #fff;background:#000}.rtl .ytcenter-modules-colorpicker-handler{position:absolute;top:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;width:5px;height:5px;border:1px solid #fff;background:#000}.ytcenter-scrollbar{overflow:hidden}.ytcenter-scrollbar:hover{overflow:auto}.ytcenter-scrollbar::-webkit-scrollbar{height:16px;overflow:visible;width:16px}.ytcenter-scrollbar::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2);background-clip:padding-box;border:solid transparent;border-width:1px 1px 1px 6px;min-height:28px;padding:100px 0 0;box-shadow:inset 1px 1px 0 rgba(0,0,0,.1),inset 0 -1px 0 rgba(0,0,0,.07)}.ytcenter-scrollbar::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4);box-shadow:inset 1px 1px 1px rgba(0,0,0,.25)}.ytcenter-scrollbar::-webkit-scrollbar-thumb:active{background-color:rgba(0,0,0,0.5);box-shadow:inset 1px 1px 3px rgba(0,0,0,0.35)}.ytcenter-scrollbar::-webkit-scrollbar-corner{background:transparent}.ytcenter-scrollbar::-webkit-scrollbar-button{height:0;width:0}.ytcenter-scrollbar::-webkit-scrollbar-track{background-clip:padding-box;border:solid transparent;border-width:0 0 0 4px}.ytcenter-scrollbar::-webkit-scrollbar-track:horizontal{border-width:4px 0 0}.ytcenter-scrollbar::-webkit-scrollbar-track:hover{background-color:rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(0,0,0,.1)}.ytcenter-scrollbar::-webkit-scrollbar-track:horizontal:hover{box-shadow:inset 0 1px 0 rgba(0,0,0,.1)}.ytcenter-scrollbar::-webkit-scrollbar-track:active{background-color:rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(0,0,0,.14),inset -1px 0 0 rgba(0,0,0,.07)}.ytcenter-scrollbar::-webkit-scrollbar-track:horizontal:active{box-shadow:inset 0 1px 0 rgba(0,0,0,.14),inset 0 -1px 0 rgba(0,0,0,.07)}.ltr .ytcenter-confirmbox{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999}.rtl .ytcenter-confirmbox{position:fixed;top:0;right:0;width:100%;height:100%;z-index:9999}.ytcenter-confirmbox .ytcenter-confirmbox-mask{opacity:.95;filter:alpha(opacity=95);background:#000}.ltr .ytcenter-confirmbox .ytcenter-confirmbox-floater{float:left;height:50%;margin-bottom:-59px}.rtl .ytcenter-confirmbox .ytcenter-confirmbox-floater{float:right;height:50%;margin-bottom:-59px}.ytcenter-confirmbox .ytcenter-confirmbox-box{width:350px;height:90px;position:relative;background:#fff;z-index:10000;padding:14px;clear:both;margin:0 auto;border:1px solid #bbb;-moz-box-shadow:0 0 5px #bbb;-ms-box-shadow:0 0 5px #bbb;-webkit-box-shadow:0 0 5px #bbb;box-shadow:0 0 5px #bbb}.ytcenter-confirmbox .ytcenter-confirmbox-message{height:100%}.ytcenter-confirmbox .ytcenter-confirmbox-controls{margin-top:-28px}.ytcenter-modules-hwrapper{margin-top:10px}.ytcenter-modules-htmlcolorlabel{display:block;vertical-align:middle}.ytcenter-modules-range{display:inline-block;cursor:default;position:relative;border:1px solid;outline:0;white-space:nowrap;word-wrap:normal;vertical-align:middle;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;border-color:#CCC #CCC #AAA;background:white;padding:0;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ytcenter-modules-range a.ytcenter-modules-range-handle{position:absolute;top:-1px;left:0;outline:0;margin-left:-.5em;cursor:default;padding:0;margin:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.rtl .ytcenter-modules-layoutExperiments{text-align:right}.ltr .ytcenter-modules-layoutExperiments{text-align:left}.ytcenter-modules-layoutExperiments ul.layoutExperimentList>li.empty{border-bottom:0!important;min-height:0!important}.ytcenter-modules-layoutExperiments ul.layoutExperimentList{margin-top:10px}.ytcenter-modules-layoutExperiments ul.layoutExperimentList>li{min-height:100px;padding:10px;border-bottom:1px solid #eee}.ytcenter-modules-layoutExperiments ul.layoutExperimentList>li:first-child{border-top:1px solid #eee}.ytcenter-modules-layoutExperiments .layoutExperimentDescription,.ytcenter-modules-layoutExperiments .layoutExperimentFeatures{padding-top:10px}.ytcenter-modules-layoutExperiments .layoutExperimentDescription span{display:block;padding-top:2px}.ltr .ytcenter-modules-layoutExperiments .layoutExperimentFeaturesList>li{padding:2px 0 2px 10px}.rtl .ytcenter-modules-layoutExperiments .layoutExperimentFeaturesList>li{padding:2px 10px 2px 0}.ltr .ytcenter-modules-layoutExperiments .layoutExperimentCodes{text-align:right;position:absolute;bottom:0;right:0}.rtl .ytcenter-modules-layoutExperiments .layoutExperimentCodes{text-align:left;position:absolute;bottom:0;left:0}.ytcenter-modules-layoutExperiments .layoutExperimentScreenshots{padding-top:5px;font-style:italic}.ytcenter-modules-layoutExperiments .layoutExperimentScreenshots a{margin:0 5px}.ytcenter-modules-layoutExperiments .layoutExperimentPreview{width:150px;height:150px;overflow:hidden}.ltr .ytcenter-modules-layoutExperiments .layoutExperimentPreview{float:left}.rtl .ytcenter-modules-layoutExperiments .layoutExperimentPreview{float:right}.ytcenter-modules-layoutExperiments .layoutExperimentPreview img{height:100%}.ltr .ytcenter-modules-layoutExperiments .layoutExperimentContent{position:relative;margin-left:160px;min-height:150px}.rtl .ytcenter-modules-layoutExperiments .layoutExperimentContent{position:relative;margin-right:160px;min-height:150px}.ytcenter-modules-layoutExperiments .layoutExperimentPad{padding-bottom:40px}.ltr .ytcenter-modules-layoutExperiments .layoutExperimentsHeaderUpdateListButton,.rtl .ytcenter-modules-layoutExperiments .layoutExperimentsHeaderSetCodeButton{float:right}.ltr .ytcenter-modules-layoutExperiments .layoutExperimentsHeaderSetCodeButton,.rtl .ytcenter-modules-layoutExperiments .layoutExperimentsHeaderUpdateListButton{float:left}.ltr .ytcenter-arrow-fix{margin-left:-10px}.rtl .ytcenter-arrow-fix{margin-right:-10px}.ltr .ytcenter-button-fix{text-align:left}.rtl .ytcenter-button-fix{text-align:right}.ltr .ytcenter-modules-links{margin-left:20px}.rtl .ytcenter-modules-links{margin-right:20px}", settings: ".yt-valign{white-space:nowrap}.yt-valign:before{content:'';height:100%}.yt-valign:before,.yt-valign-container{vertical-align:middle;display:inline-block}.clearfix:before{content:'.';display:block;height:0;visibility:hidden}.clearfix:after{content:'.';display:block;height:0;visibility:hidden;clear:both}.ytcenter-alert{position:relative;margin:5px 0;padding:0;overflow:hidden}.ytcenter-alert .close{margin:6px;border:0;overflow:hidden;cursor:pointer;background:no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNo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VVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAOxJREFUeNrs1DFqxDAQBdA5yt58ShkXnkIHSG8Qi+pBsm8w7cjNT+OYxJsU1hIIYQfUqHjFny8RAPqNQy/4H8LjON5FBCEEptOEEHiaJgzDIJfhlBJqrUgpQUQOXEQ4pYRSCuZ5xmW41sqtNZgZcs6IMXKMkXPOMDO4O0opfBkmIjIz3rYNZgZVharCzLDfMRFRF/wZd3e4+xf0KVhV2d3xMe4OVX0OjjGyquIbGDHGvihE5FjUHgW7+5F5zhkiwl11Oy/qvNCUUlfd7nvdHh6ImXFrDaWUt66M13W90Q+zLMutK+PX7/b34fcBAAona/0W7lqzAAAAAElFTkSuQmCC);width:22px;height:22px!important}.ytcenter-alert .close:hover{background-color:rgba(0,0,0,.15);border-radius:3px}.ytcenter-settings-close-button{position:absolute!important;top:0!important;margin:0!important}.ltr .ytcenter-settings-close-button{right:0}.rtl .ytcenter-settings-close-button{left:0}.ytcenter-settings-category-list{width:100%}.ytcenter-settings-category-list .ytcenter-settings-category-item{display:block;position:relative;border:0;height:24px;background:0;color:#555;font-size:11px;text-decoration:none;overflow:hidden}.ytcenter-settings-category-list .ytcenter-settings-category-item:hover{background:#444;color:#fff}.ytcenter-settings-category-list .ytcenter-settings-category-item.ytcenter-selected{background:#cc181e;color:#fff;font-weight:bold;text-shadow:-1px -1px 0 rgba(0,0,0,0.25)}.ytcenter-settings-category-list .ytcenter-settings-category-item .yt-valign-container{padding:0 24px}#ytcenter-settings .ytcenter-dialog-fg{min-width:1003px}#ytcenter-settings .ytcenter-dialog-content{margin:0 -20px -20px -20px}.ytcenter-settings-content{display:table;width:100%}.ytcenter-settings-panel-left{position:relative;display:table-cell;padding-bottom:30px;min-width:190px;width:190px}.ltr .ytcenter-settings-panel-left{border-right:1px solid #e2e2e2}.rtl .ytcenter-settings-panel-left{border-left:1px solid #e2e2e2}.ytcenter-settings-panel-right-content{width:100%}.ltr .ytcenter-settings-subcat-header li{float:left;margin-left:13px}.rtl .ytcenter-settings-subcat-header li{float:right;margin-right:13px}.ytcenter-settings-subcat-header-wrapper{padding-top:4px}.ytcenter-settings-subcat-header .ytcenter-settings-subcat-header-item{border:0;padding:0 .9em 3px;cursor:pointer;background:0;color:#9c9c9c;font-size:11px;font-weight:bold;height:29px;line-height:29px;-moz-box-sizing:content-box;-ms-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ytcenter-settings-subcat-header{border-bottom:1px solid #e6e6e6;height:32px}.ltr .ytcenter-settings-subcat-header li:last-child{margin-right:13px}.rtl .ytcenter-settings-subcat-header li:last-child{margin-left:13px}.ytcenter-settings-subcat-header .ytcenter-settings-subcat-header-item.ytcenter-selected,.ytcenter-settings-subcat-header .ytcenter-settings-subcat-header-item:hover{height:29px;line-height:29px;vertical-align:bottom;color:#333;border-bottom:3px solid;border-color:#b00;padding-bottom:0;display:inline-block;text-decoration:none}.ytcenter-settings-subcat-content-wrapper{position:relative;padding:8px 8px 31px}.ytcenter-settings-subcat-statusbar-wrapper{position:absolute;bottom:0;padding:9px;color:#999;opacity:0;filter:alpha(opacity=0);-moz-transition:opacity 1s;-webkit-transition:opacity 1s;transition:opacity 1s}.ltr .ytcenter-settings-subcat-statusbar-wrapper{right:0;text-align:right}.rtl .ytcenter-settings-subcat-statusbar-wrapper{left:0;text-align:left}.ytcenter-settings-subcat-statusbar-wrapper.visible{opacity:1;filter:alpha(opacity=100);-moz-transition:opacity .3s;-webkit-transition:opacity .3s;transition:opacity .3s}.ytcenter-settings-option-label{display:inline-block;width:260px;color:#555;vertical-align:middle}.ytcenter-settings-option-label.ytcenter-disabled{color:#b9b9b9}.ytcenter-settings-help{vertical-align:super;font-size:10px}.ytcenter-settings-version{position:absolute;bottom:0;right:0;left:0;color:#bbb;font-size:11px;padding:9px}.ytcenter-settings-subcat-option{margin:4px 8px 4px 0}.ytcenter-settings-table{width:100%}.ytcenter-settings-table tr{border-top:1px solid #ccc;background-color:#fff}.ytcenter-settings-table tr:nth-child(2n){background-color:#f8f8f8}.ytcenter-settings-table thead tr{background-color:#f8f8f8}.ytcenter-settings-table thead tr td{font-weight:bold}.ytcenter-settings-table tr td{border:1px solid #ddd;padding:6px 13px}.ytcenter-theme-dark .ytcenter-dialog-fg{background:#000;border:1px solid #1d1d1d}.ytcenter-theme-dark .ytcenter-dialog-bg{background:#000}.ytcenter-theme-dark .yt-alert .close:hover{background-color:rgba(255,255,255,.15)}.ytcenter-theme-dark .ytcenter-settings-content,.ytcenter-theme-dark .ytcenter-dialog-base .ytcenter-dialog-header h2,.ytcenter-theme-dark .ytcenter-settings-category-list .ytcenter-settings-category-item{color:#aaa}.ytcenter-theme-dark .ytcenter-settings-content a{color:#1a6299}.ytcenter-theme-dark .ytcenter-dialog-base .ytcenter-dialog-header,.ytcenter-theme-dark .ytcenter-settings-subcat-header{border-bottom:1px solid #1d1d1d}.ytcenter-theme-dark .ytcenter-dialog .yt-horizontal-rule{border-top:1px solid #1d1d1d}.ytcenter-theme-dark .ytcenter-settings-option-label{color:#aaa}.ltr.ytcenter-theme-dark .ytcenter-settings-panel-left{border-right:1px solid #1d1d1d}.rtl.ytcenter-theme-dark .ytcenter-settings-panel-left{border-left:1px solid #1d1d1d}.ytcenter-theme-dark .ytcenter-settings-category-list .ytcenter-settings-category-item:hover{background:#333}.ytcenter-theme-dark .ytcenter-settings-subcat-header .ytcenter-settings-subcat-header-item{color:#636363}.ytcenter-theme-dark .ytcenter-settings-subcat-header .ytcenter-settings-subcat-header-item.ytcenter-selected,.ytcenter-theme-dark .ytcenter-settings-subcat-header .ytcenter-settings-subcat-header-item:hover{color:#ccc;border-color:#400}.ytcenter-theme-dark .ytcenter-settings-table tr{border-top:1px solid #333;background-color:#000}.ytcenter-theme-dark .ytcenter-settings-table tr:nth-child(2n){background-color:#070707}.ytcenter-theme-dark .ytcenter-settings-table thead tr{background-color:#070707}.ytcenter-theme-dark .ytcenter-settings-table thead tr td{font-weight:bold}.ytcenter-theme-dark .ytcenter-settings-table tr td{border:1px solid #222;padding:6px 13px}.ytcenter-theme-dark .ytcenter-settings-category-list .ytcenter-settings-category-item:hover{color:#ddd}.ytcenter-theme-dark .ytcenter-settings-category-list .ytcenter-settings-category-item.ytcenter-selected{background:#330607;color:#fff}.ytcenter-dialog{font-family:arial,sans-serif;font-size:13px;line-height:1;text-align:left;text-align:start}", centering: ".ytcenter-site-center #yt-masthead,.ytcenter-site-center #footer-hh{width:1003px!important}#page.search.no-flex .branded-page-v2-container{min-width:0!important}.ytcenter-exp-settings-dialog .ytcenter-settings-content,.ytcenter-exp-settings-dialog .ytcenter-settings-content>div{padding-left:0!important}.ytcenter-exp-settings-dialog .yt-uix-form-textarea{width:100%!important}.ytcenter-site-center #alerts{margin:0 auto!important}.ytcenter-site-center #sb-wrapper{width:1003px!important}body.ytcenter-channelv2 #yt-masthead,body.ytcenter-channelv2 #page-container>#page.channel{width:auto!important;min-width:1003px;max-width:1422px}body.ytcenter-channelv2 #page.channel>#guide+#content{width:auto!important}.ytcenter-site-center #page-container>#page{margin:0 auto!important}.ytcenter-site-center #masthead-subnav>ul{width:1003px;margin:0 auto!important}.ytcenter-site-center #page.channel.page-default{width:100%!important}.ytcenter-site-center #content-container #baseDiv,.ytcenter-site-center #masthead-subnav{margin-left:auto!important;margin-right:auto!important}.ytcenter-site-center #footer-container #footer{width:1003px!important;margin-left:auto!important;margin-right:auto!important}.ytcenter-site-center #yt-masthead-container #yt-masthead,.ytcenter-site-center #header,.ytcenter-site-center #alerts{width:1003px;margin:0 auto!important;padding:0 10px!important}.ytcenter-site-search.ytcenter-site-center.exp-new-site-width #guide+#content{width:823px!important}.ytcenter-site-search.ytcenter-site-center.exp-new-site-width #page{width:1003px!important}.ytcenter-site-not-watch.ytcenter-site-center #page{width:1003px}.ytcenter-site-not-watch.ytcenter-site-center #page-container{padding:0 10px!important}.ytcenter-site-not-watch.ytcenter-site-center.flex-width-enabled #page{padding:0 10px!important}.flex-width-enabled #yt-masthead{width:auto!important;max-width:1422px!important;min-width:1003px!important}.flex-width-enabled.exp-top-guide #yt-masthead,.flex-width-enabled.site-center-aligned #yt-masthead,.flex-width-enabled.site-as-giant-card #yt-masthead{width:auto!important;max-width:none!important;min-width:none!important}.ytcenter-site-center.ytcenter-non-resize #player,.ytcenter-site-center.ytcenter-non-resize #player-legacy,.ytcenter-site-center.ytcenter-non-resize #content,.ytcenter-site-center.ytcenter-non-resize #watch7-main-container{width:1003px!important;padding-left:0!important;padding-right:0!important}@media screen and (max-width:1381px){.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible #content{margin:0!important}.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible #player,.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible #player-legacy,.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible #watch7-main-container{padding-left:190px!important;padding-right:190px!important;margin:0!important}.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible #guide-container{left:10px!important}.rtl.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible #guide-container{right:10px!important}}@media screen and (max-width:1165px){.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #player,.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #player-legacy,.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #watch7-main-container{margin:0!important}.ltr.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #player,.ltr.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #player-legacy,.ltr.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #watch7-main-container{padding-left:58px!important}.rtl.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #player,.rtl.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #player-legacy,.rtl.ytcenter-site-center.ytcenter-non-resize.ytcenter-guide-visible.guide-collapsed #watch7-main-container{padding-right:58px!important}.ltr.ytcenter-site-notcenter.ytcenter-resize-disaligned #player,.ltr.ytcenter-site-notcenter.ytcenter-resize-disaligned #player-legacy{padding-left:0!important}.rtl.ytcenter-site-notcenter.ytcenter-resize-disaligned #player,.rtl.ytcenter-site-notcenter.ytcenter-resize-disaligned #player-legacy{padding-right:0!important}}.ltr.ytcenter-site-notcenter.ytcenter-resize-disaligned #player,.ltr.ytcenter-site-notcenter.ytcenter-resize-disaligned #player-legacy{padding-left:0}.rtl.ytcenter-site-notcenter.ytcenter-resize-disaligned #player,.rtl.ytcenter-site-notcenter.ytcenter-resize-disaligned #player-legacy{padding-left:0}", embed: "#cued-embed .video-thumbnail{padding-top:30px;height:100%;background-size:100%;background-repeat:no-repeat;background-position:center}", player: "#player-api{position:relative}body.ytcenter-scrolled-top{overflow:hidden}.ytcenter-scrolled-top .watch-sidebar{top:0!important}.ytcenter-scrolled-top #page,.ytcenter-scrolled-top-player-pre #page{position:static!important}.ytcenter-scrolled-top #player-mole-container,.ytcenter-scrolled-top-player-pre #player-mole-container{position:static!important}.ytcenter-scrolled-top #player,.ytcenter-scrolled-top #player-legacy{overflow:visible!important}.ytcenter-scrolled-top-player-pre #player-api,.ytcenter-scrolled-top-player-pre #player-api-legacy{width:100%!important;height:100%!important;position:absolute!important;top:-100%!important}.ltr.ytcenter-scrolled-top-player-pre #player-api,.ltr.ytcenter-scrolled-top-player-pre #player-api-legacy,.ltr.ytcenter-scrolled-top #player-api,.ltr.ytcenter-scrolled-top #player-api-legacy{left:0!important}.rtl.ytcenter-scrolled-top-player-pre #player-api,.rtl.ytcenter-scrolled-top-player-pre #player-api-legacy,.rtl.ytcenter-scrolled-top #player-api,.rtl.ytcenter-scrolled-top #player-api-legacy{right:0!important}.ytcenter-scrolled-top #player-api,.ytcenter-scrolled-top #player-api-legacy{width:100%!important;height:100%!important;position:absolute!important;top:0!important;-moz-transition:top .5s linear;-ms-transition:top .5s linear;-o-transition:top .5s linear;-webkit-transition:top .5s linear;transition:top .5s linear}.ltr.ytcenter-scrolled-top #page{padding-left:0!important}.rtl.ytcenter-scrolled-top #page{padding-right:0!important}.ytcenter-scrolled-top-element{display:none}.ytcenter-site-watch .ytcenter-scrolled-top-element{width:100%;height:0;background:#000;-moz-transition:height .5s linear;-ms-transition:height .5s linear;-o-transition:height .5s linear;-webkit-transition:height .5s linear;transition:height .5s linear;display:block}.ytcenter-scrolled-top .ytcenter-scrolled-top-element{height:100%}.ytcenter-scrolled-inverse #player-api,.ytcenter-scrolled-inverse #player-api-legacy{margin-top:0!important}.ytcenter-scrolled-top.ytcenter-scrolled-inverse .ytcenter-scrolled-top-element{padding-bottom:0}.ytcenter-scrolled-top-noscrollbar{overflow:hidden!important}.ytcenter-scrolled-top #masthead-positioner,.ytcenter-scrolled-top-static #masthead-positioner{position:static!important}.ytcenter-scrolled-top #masthead-positioner-height-offset,.ytcenter-scrolled-top-static #masthead-positioner-height-offset{display:none!important}.ytcenter-scrolled-top #guide,.ytcenter-scrolled-top-static #guide{display:none!important}.ytcenter-scrolled-top-disable-animation .ytcenter-scrolled-top-element,.ytcenter-scrolled-top-disable-animation.ytcenter-scrolled-top #player-api,.ytcenter-scrolled-top-disable-animation.ytcenter-scrolled-top #player-api-legacy,.ytcenter-scrolled-top-player-pre #player-api,.ytcenter-scrolled-top-player-pre #player-api-legacy{-moz-transition:none!important;-ms-transition:none!important;-o-transition:none!important;-webkit-transition:none!important;transition:none!important}", darkside: "body #player #theater-background,body.ytcenter-player-darkside-bg #player.watch-small #theater-background{display:none}body.ytcenter-player-darkside-bg #player #theater-background{display:block;position:absolute;left:0;margin-top:0;width:100%;-moz-transition:background-color .3s ease;-webkit-transition:background-color .3s ease;transition:background-color .3s ease;background-color:#1b1b1b}body.ytcenter-player-darkside-bg.ytcenter-non-resize #player.watch-medium #theater-background{height:510px}body.ytcenter-player-darkside-bg.ytcenter-non-resize #player.watch-large #theater-background{height:750px}body.ytcenter-player-darkside-bg.ytcenter-player-darkside-bg-retro #player #theater-background{background-color:#444;background-image:-moz-linear-gradient(top,#555,#333);background-image:-webkit-gradient(linear,left top,left bottom,from(#555),to(#333));filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr='#555555',endColorStr='#333333')}", feather: ".yt-uix-form-input-select,.yt-uix-form-input-text,.yt-uix-form-input-textarea{border:1px solid #d3d3d3;color:#333}.yt-uix-form-input-select{position:relative;display:inline-block;font-weight:bold;font-size:11px;vertical-align:middle;cursor:pointer;overflow:hidden;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#f8f8f8;filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#fffcfcfc,EndColorStr=#fff8f8f8);background-image:-moz-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-ms-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:-webkit-linear-gradient(top,#fcfcfc 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fcfcfc 0,#f8f8f8 100%)}.yt-uix-form-input-select-content{position:absolute;top:0;left:0;width:100%;height:100%;line-height:26px}.yt-uix-form-input-select-arrow{float:right;width:0;height:0;border:1px solid transparent;border-width:4px 4px 0;border-top-color:#666;margin-top:11px;margin-right:10px}.yt-uix-form-input-select-value{display:block;margin:0 10px;overflow:hidden;white-space:nowrap;word-wrap:normal;-o-text-overflow:ellipsis;text-overflow:ellipsis}.yt-uix-form-input-select-element{position:relative;height:26px;padding:0 1.65em;-webkit-appearance:none;-moz-appearance:none;opacity:0;filter:alpha(opacity=0);_filter:none}.yt-uix-form-input-select-element option{padding:0}.yt-uix-form-input-radio-container,.yt-uix-form-input-checkbox-container{position:relative;display:inline-block;height:20px;line-height:0;font-size:0;vertical-align:middle}.yt-uix-form-input-checkbox,.yt-uix-form-input-checkbox-element{width:14px;height:14px}.yt-uix-form-input-radio-container input,.yt-uix-form-input-checkbox-container input{cursor:pointer;position:absolute;top:1px;left:1px;border:0;outline:0;margin:0;padding:0;opacity:0;filter:alpha(opacity=0);-moz-appearance:none;-webkit-appearance:none}.yt-uix-form-input-checkbox-element,.yt-uix-form-input-radio-element,.yt-uix-form-input-text,.yt-uix-form-input-textarea{box-shadow:inset 0 0 1px rgba(0,0,0,.05)}.yt-uix-form-input-radio-element,.yt-uix-form-input-checkbox-element{border:1px solid #c6c6c6;display:inline-block;vertical-align:middle;cursor:pointer}.yt-uix-form-input-checkbox-container:hover .yt-uix-form-input-checkbox-element,.yt-uix-form-input-radio-container:hover .yt-uix-form-input-radio-element{border-color:#b9b9b9}.yt-uix-form-input-checkbox-container input:checked+.yt-uix-form-input-checkbox-element{background:no-repeat url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2Z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uarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAKFJREFUeNqc0qsKAkEUANCDaFjEYhBEBP9Cm/gFYrWLxaqgwaBJEINY7P7nWq7v5+7AhXmdYebekaapPHHrZGv1PLCNfVbYxQnDLHCAI2Yo/ANLGAeaXGd/wDLmgaZxyAs8oI9iLNWwDrRE8nDkHezFpgU62MV4jcrLXZ6uOorNl9ig+vYRTzDBKtAWjY8pe5OcZqDW1+J8yGrys6p5P/l5AN+NrTnw2BBDAAAAAElFTkSuQmCC);border:1px solid #36649c}.ytcenter-dialog menu,.ytcenter-dialog ol,.ytcenter-dialog ul{list-style:none}.yt-uix-form-input-text{width:250px;padding:5px 10px 6px;margin-top:0;margin-bottom:0;font-size:13px}.yt-uix-form-input-select:hover,.yt-uix-form-input-text:hover,.yt-uix-form-input-textarea:hover{border-color:#b9b9b9}.yt-uix-form-input-select.focused,.yt-uix-form-input-checkbox:focus+.yt-uix-form-input-checkbox-element,.yt-uix-form-input-radio:focus+.yt-uix-form-input-radio-element,.yt-uix-form-input-text:focus,.yt-uix-form-input-textarea:focus{outline:0;border-color:#1b7fcc;box-shadow:inset 0 0 1px rgba(0,0,0,.1)}.yt-horizontal-rule{position:relative;margin:20px;height:0;border-top:1px solid #e2e2e2;border-bottom:0}.yt-uix-button{display:inline-block;height:28px;border:solid 1px transparent;padding:0 10px;outline:0;font-weight:bold;font-size:11px;text-decoration:none;white-space:nowrap;word-wrap:normal;line-height:normal;vertical-align:middle;cursor:pointer;border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,0.05)}.yt-uix-button-default,.yt-uix-button-default[disabled],.yt-uix-button-default[disabled]:hover,.yt-uix-button-default[disabled]:active,.yt-uix-button-default[disabled]:focus{border-color:#d3d3d3;background:#f8f8f8;color:#333}.yt-uix-tooltip{display:inline-block}.yt-uix-button-arrow{margin-top:-3px;margin-left:5px;border:1px solid transparent;border-top-color:#333;border-width:4px 4px 0;width:0;height:0}.yt-uix-button img,.yt-uix-button-icon-wrapper+.yt-uix-button-content{vertical-align:middle}.yt-uix-button:focus,.yt-uix-button:focus:hover,.yt-uix-button-focused,.yt-uix-button-focused:hover{box-shadow:0 0 0 2px rgba(27,127,204,0.4)}.yt-uix-button-default:hover,.yt-uix-button-text:hover{border-color:#c6c6c6;background:#f0f0f0;box-shadow:0 1px 0 rgba(0,0,0,0.10)}.yt-uix-button-menu{outline:0;padding:8px 0;position:absolute;border:1px solid #ccc;z-index:2147483647;overflow:auto;background:#fff;border-radius:2px}.yt-uix-button-menu-external{overflow:visible}.yt-uix-button .yt-uix-button-menu{display:none}.yt-uix-button-default:active,.yt-uix-button-default.yt-uix-button-toggled,.yt-uix-button-default.yt-uix-button-active,.yt-uix-button-default.yt-uix-button-active:focus,.yt-uix-button-text:active{border-color:#c6c6c6;background:#e9e9e9;box-shadow:inset 0 1px 0 #ddd}.yt-uix-button-menu li{margin:0;padding:0}.yt-uix-button-menu .yt-uix-button-menu-item{display:block;margin:0;padding:0 25px;color:#333;font-size:13px;text-decoration:none;white-space:nowrap;word-wrap:normal;line-height:25px;cursor:pointer;cursor:hand}.yt-uix-button-primary,.yt-uix-button-primary[disabled],.yt-uix-button-primary[disabled]:hover,.yt-uix-button-primary[disabled]:active,.yt-uix-button-primary[disabled]:focus{border-color:#1b7fcc;background:#1b7fcc;color:#fff}.yt-uix-button-primary:hover{background:#126db3}.yt-uix-button-group{display:inline-block;white-space:nowrap;vertical-align:middle}.yt-uix-button:hover{text-decoration:none}.yt-uix-button-group .yt-uix-button{margin-right:-2px;border-radius:0}.yt-uix-button-group .start{-moz-border-radius-topleft:2px;border-top-left-radius:2px;-moz-border-radius-bottomleft:2px;border-bottom-left-radius:2px}.yt-uix-button-group .end{margin-right:0;-moz-border-radius-topright:2px;border-top-right-radius:2px;-moz-border-radius-bottomright:2px;border-bottom-right-radius:2px}.yt-uix-button-default:hover,.yt-uix-button-text:hover{border-color:#c6c6c6;background:#f0f0f0;box-shadow:0 1px 0 rgba(0,0,0,0.10)}.yt-uix-button-group .yt-uix-button:hover{position:relative;z-index:2147483645}.yt-uix-button-text,.yt-uix-button-text[disabled]{border:solid 1px transparent;outline:0;background:0;color:#333;box-shadow:none}", elementFocus: ".element-focus-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:19999999999;background:#000;opacity:.75}.element-focus-wrapper{position:absolute;z-index:199999999999}.element-focus{position:relative;background:#fff;-moz-box-shadow:inset 0 0 10px #000;-webkit-box-shadow:inset 0 0 10px #000;box-shadow:inset 0 0 10px #000}.element-focus>.element-focus-container{position:relative}.element-focus-btn-wrapper{padding:10px;background:#fff;text-align:right;margin-top:10px;-moz-box-shadow:inset 0 0 10px #000;-webkit-box-shadow:inset 0 0 10px #000;box-shadow:inset 0 0 10px #000}.element-focus-btn-wrapper button{margin-left:10px}" /*, yonez: "@styles-yonez-clean-yt@"*/ }; ytcenter.topScrollPlayer = (function(){ function enterComplete() { if (inTransition) { ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top"); /*if (ytcenter.settings.topScrollPlayerHideScrollbar) { ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-noscrollbar"); } else { ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); }*/ ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-player-pre"); uw.setTimeout(function(){ inTransition = false; }, 500); } } function exitComplete() { if (inTransition) { ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-static"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-disable-animation"); inTransition = false; } } function onTransitionEnd() { if (!transitionEndListenerAdded) { inTransition = true; if (inTransitionTimer !== null) { uw.clearTimeout(inTransitionTimer); } var fullscreenData = { fullscreen: activated }; var api = ytcenter.player.getAPI(); if (api && api.getVideoData) { var data = api.getVideoData(); fullscreenData.videoId = data.video_id; if (data.list) { fullscreenData.listId = data.list; } ytcenter.player.listeners.fireEvent("onFullscreenChange", fullscreenData); } if (activated) { inTransitionTimer = uw.setTimeout(function(){ enterComplete(); inTransitionTimer = null; }, 50); } else { inTransitionTimer = uw.setTimeout(function(){ exitComplete(); inTransitionTimer = null; }, 500); } } } function onTransitionEndListener() { if (activated) { enterComplete(); } else { exitComplete(); } } function scroll(e, delta, deltaX, deltaY) { if (!enabled || inTransition) return; if (ytcenter.html5) { var playlistPlayerTray = document.getElementsByClassName("ytp-playlist-tray-container"); if (playlistPlayerTray && playlistPlayerTray.length > 0 && playlistPlayerTray[0] && ytcenter.utils.isParent(playlistPlayerTray[0], e.target)) { return; } } var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; var pa = document.getElementById("player-api") || document.getElementById("player-api-legacy"), p = document.getElementById("player") || document.getElementById("player-api"), api = ytcenter.player.getAPI(), scrollUpExit = ytcenter.settings.topScrollPlayerScrollUpToExit; if (document.getElementById("player")) { document.getElementById("player").style.position = ""; } if (activated) { if ((deltaY < 0 && !scrollUpExit) || (deltaY > 0 && scrollUpExit)) { if (ytcenter.settings.topScrollPlayerTimesToExit > count) { exports.bumpCount(); count++; //ytcenter.utils.scrollTop(scrollUpExit ? 1 : 0); } else { //ytcenter.utils.scrollTop(1); p.style.height = ""; ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-inverse"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-static"); activated = false; onTransitionEnd(); count = 0; exports.stopTimer(); } } else if (scrollUpExit) { //ytcenter.utils.scrollTop(1); } } else { if (scrollTop === 0 && deltaY > 0) { if (ytcenter.settings.topScrollPlayerTimesToEnter > count) { exports.bumpCount(); count++; } else { if (ytcenter.settings.topScrollPlayerEnabledOnlyVideoPlaying && (!api || !api.getPlayerState || api.getPlayerState() !== 1)) { return; } p.style.height = pa.style.height; if (!ytcenter.settings.topScrollPlayerAnimation) ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-disable-animation"); ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-player-pre"); if (scrollUpExit) ytcenter.utils.addClass(document.body, "ytcenter-scrolled-inverse"); activated = true; onTransitionEnd(); count = 0; exports.stopTimer(); } } else if (scrollTop === 0 && ytcenter.settings.topScrollPlayerCountIncreaseBefore) { exports.bumpCount(); count++; } } } function addEventListeners() { if (throttleFunc) ytcenter.scrollEvent.removeEventListener(window, throttleFunc); throttleFunc = ytcenter.utils.throttle(scroll, throttleTimer); ytcenter.scrollEvent.addEventListener(window, throttleFunc); } function removeEventListener() { if (throttleFunc) ytcenter.scrollEvent.removeEventListener(window, throttleFunc); throttleFunc = null; } function setEnabled(a) { var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; enabled = a; if (enabled && ytcenter.getPage() !== "watch") enabled = false; removeEventListener(); if (!enabled) { if (elm && elm.parentNode) elm.parentNode.removeChild(elm); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-inverse"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-player-pre"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-disable-animation"); } else { addEventListeners(); if (elm) { if (!elm.parentNode) { document.body.insertBefore(elm, document.body.children[0]); } } else { elm = document.createElement("div"); elm.className = "ytcenter-scrolled-top-element"; document.body.insertBefore(elm, document.body.children[0]); } } } function enter() { p.style.height = pa.style.height; if (!ytcenter.settings.topScrollPlayerAnimation) ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-disable-animation"); ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-player-pre"); if (scrollUpExit) ytcenter.utils.addClass(document.body, "ytcenter-scrolled-inverse"); activated = true; onTransitionEnd(); count = 0; exports.stopTimer(); } function exit() { p.style.height = ""; ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-inverse"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-static"); activated = false; onTransitionEnd(); count = 0; exports.stopTimer(); } function setRedirectURL(url) { redirectURL = url; } function isActive() { return activated; } var exports = {}; var count = 0; var activated = false; var enabled = null; var elm = null; var timer = null; var buffer = null; var throttleTimer = 50; var throttleFunc = null; var prev = null; var transitionEndListenerAdded = false; var inTransition = false; var inTransitionTimer = null; var redirectURL = null; exports.isActive = isActive; exports.setRedirectURL = setRedirectURL; exports.setEnabled = setEnabled; exports.bumpCount = function(){ uw.clearTimeout(timer); timer = uw.setTimeout(function(){ count = 0; }, ytcenter.settings.topScrollPlayerBumpTimer); }; exports.stopTimer = function(){ uw.clearTimeout(timer); }; exports.setup = function(){ if (elm && elm.parentNode) elm.parentNode.removeChild(elm); if (!elm) { elm = document.createElement("div"); elm.className = "ytcenter-scrolled-top-element"; if (ytcenter.settings.topScrollPlayerEnabled) document.body.insertBefore(elm, document.body.children[0]); } enabled = ytcenter.settings.topScrollPlayerEnabled; activated = ytcenter.settings.topScrollPlayerActivated; removeEventListener(); if (enabled) { if (ytcenter.settings.topScrollPlayerEnabled && ytcenter.getPage() === "watch") { if (activated) { if (!ytcenter.settings.topScrollPlayerAnimation) ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-disable-animation"); if (ytcenter.settings.topScrollPlayerScrollUpToExit) ytcenter.utils.addClass(document.body, "ytcenter-scrolled-inverse"); ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top"); if (ytcenter.settings.topScrollPlayerHideScrollbar) { ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-noscrollbar"); } else { ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); } //ytcenter.utils.scrollTop(ytcenter.settings.topScrollPlayerScrollUpToExit ? 1 : 0); } else { ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-disable-animation"); //ytcenter.utils.scrollTop(1); } addEventListeners(); } if (document.getElementById("player")) { document.getElementById("player").style.position = ""; } } exports.setEnabled(ytcenter.settings.topScrollPlayerEnabled); ytcenter.player.listeners.addEventListener("onStateChange", function(state){ if (!enabled) return; var p = document.getElementById("player") || document.getElementById("player-api"), pa = document.getElementById("player-api") || document.getElementById("player-api-legacy"), api = ytcenter.player.getAPI(), scrollUpExit = ytcenter.settings.topScrollPlayerScrollUpToExit; if (state === 0 && ytcenter.settings.topScrollPlayerExitOnVideoEnd && activated) { p.style.height = ""; ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-inverse"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top"); ytcenter.utils.removeClass(document.body, "ytcenter-scrolled-top-noscrollbar"); ytcenter.utils.addClass(document.body, "ytcenter-scrolled-top-static"); activated = false; onTransitionEnd(); count = 0; exports.stopTimer(); } else if (state === 1 && ytcenter.settings.topScrollPlayerEnterOnVideoPlay && !activated) { enter(); } else if (state === 2 && ytcenter.settings.topScrollPlayerExitOnVideoPause && activated) { exit(); } }); ytcenter.events.addEvent("settings-update", function(){ exports.setEnabled(ytcenter.settings.topScrollPlayerEnabled); if (enabled) { if (document.getElementById("player")) { document.getElementById("player").style.position = ""; } } }); ytcenter.events.addEvent("resize-update", function(){ exports.setEnabled(ytcenter.settings.topScrollPlayerEnabled); if (enabled) { if (document.getElementById("player")) { document.getElementById("player").style.position = ""; } } }); }; return exports; })(); ytcenter.flags = { /* Country Code : CSS Class */ "ad": "ytcenter-flag-ad", "ae": "ytcenter-flag-ae", "af": "ytcenter-flag-af", "ag": "ytcenter-flag-ag", "ai": "ytcenter-flag-ai", "al": "ytcenter-flag-al", "am": "ytcenter-flag-am", "an": "ytcenter-flag-an", "ao": "ytcenter-flag-ao", "aq": "ytcenter-flag-aq", "ar": "ytcenter-flag-ar", "as": "ytcenter-flag-as", "at": "ytcenter-flag-at", "au": "ytcenter-flag-au", "aw": "ytcenter-flag-aw", "ax": "ytcenter-flag-ax", "az": "ytcenter-flag-az", "ba": "ytcenter-flag-ba", "bb": "ytcenter-flag-bb", "bd": "ytcenter-flag-bd", "be": "ytcenter-flag-be", "bf": "ytcenter-flag-bf", "bg": "ytcenter-flag-bg", "bh": "ytcenter-flag-bh", "bi": "ytcenter-flag-bi", "bj": "ytcenter-flag-bj", "bm": "ytcenter-flag-bm", "bn": "ytcenter-flag-bn", "bo": "ytcenter-flag-bo", "br": "ytcenter-flag-br", "bs": "ytcenter-flag-bs", "bt": "ytcenter-flag-bt", "bv": "ytcenter-flag-bv", "bw": "ytcenter-flag-bw", "by": "ytcenter-flag-by", "bz": "ytcenter-flag-bz", "ca": "ytcenter-flag-ca", "catalonia": "ytcenter-flag-catalonia", "cc": "ytcenter-flag-cc", "cd": "ytcenter-flag-cd", "cf": "ytcenter-flag-cf", "cg": "ytcenter-flag-cg", "ch": "ytcenter-flag-ch", "ci": "ytcenter-flag-ci", "ck": "ytcenter-flag-ck", "cl": "ytcenter-flag-cl", "cm": "ytcenter-flag-cm", "cn": "ytcenter-flag-cn", "co": "ytcenter-flag-co", "cr": "ytcenter-flag-cr", "cs": "ytcenter-flag-cs", "cu": "ytcenter-flag-cu", "cv": "ytcenter-flag-cv", "cx": "ytcenter-flag-cx", "cy": "ytcenter-flag-cy", "cz": "ytcenter-flag-cz", "de": "ytcenter-flag-de", "dj": "ytcenter-flag-dj", "dk": "ytcenter-flag-dk", "dm": "ytcenter-flag-dm", "do": "ytcenter-flag-do", "dz": "ytcenter-flag-dz", "ec": "ytcenter-flag-ec", "ee": "ytcenter-flag-ee", "eg": "ytcenter-flag-eg", "eh": "ytcenter-flag-eh", "england": "ytcenter-flag-england", "er": "ytcenter-flag-er", "es": "ytcenter-flag-es", "et": "ytcenter-flag-et", "europeanunion": "ytcenter-flag-europeanunion", "fam": "ytcenter-flag-fam", "fi": "ytcenter-flag-fi", "fj": "ytcenter-flag-fj", "fk": "ytcenter-flag-fk", "fm": "ytcenter-flag-fm", "fo": "ytcenter-flag-fo", "fr": "ytcenter-flag-fr", "ga": "ytcenter-flag-ga", "gb": "ytcenter-flag-gb", "gd": "ytcenter-flag-gd", "ge": "ytcenter-flag-ge", "gf": "ytcenter-flag-gf", "gh": "ytcenter-flag-gh", "gi": "ytcenter-flag-gi", "gl": "ytcenter-flag-gl", "gm": "ytcenter-flag-gm", "gn": "ytcenter-flag-gn", "gp": "ytcenter-flag-gp", "gq": "ytcenter-flag-gq", "gr": "ytcenter-flag-gr", "gs": "ytcenter-flag-gs", "gt": "ytcenter-flag-gt", "gu": "ytcenter-flag-gu", "gw": "ytcenter-flag-gw", "gy": "ytcenter-flag-gy", "hk": "ytcenter-flag-hk", "hm": "ytcenter-flag-hm", "hn": "ytcenter-flag-hn", "hr": "ytcenter-flag-hr", "ht": "ytcenter-flag-ht", "hu": "ytcenter-flag-hu", "id": "ytcenter-flag-id", "ie": "ytcenter-flag-ie", "il": "ytcenter-flag-il", "in": "ytcenter-flag-in", "io": "ytcenter-flag-io", "iq": "ytcenter-flag-iq", "ir": "ytcenter-flag-ir", "is": "ytcenter-flag-is", "it": "ytcenter-flag-it", "jm": "ytcenter-flag-jm", "jo": "ytcenter-flag-jo", "jp": "ytcenter-flag-jp", "ke": "ytcenter-flag-ke", "kg": "ytcenter-flag-kg", "kh": "ytcenter-flag-kh", "ki": "ytcenter-flag-ki", "km": "ytcenter-flag-km", "kn": "ytcenter-flag-kn", "kp": "ytcenter-flag-kp", "kr": "ytcenter-flag-kr", "kw": "ytcenter-flag-kw", "ky": "ytcenter-flag-ky", "kz": "ytcenter-flag-kz", "la": "ytcenter-flag-la", "lb": "ytcenter-flag-lb", "lc": "ytcenter-flag-lc", "li": "ytcenter-flag-li", "lk": "ytcenter-flag-lk", "lr": "ytcenter-flag-lr", "ls": "ytcenter-flag-ls", "lt": "ytcenter-flag-lt", "lu": "ytcenter-flag-lu", "lv": "ytcenter-flag-lv", "ly": "ytcenter-flag-ly", "ma": "ytcenter-flag-ma", "mc": "ytcenter-flag-mc", "md": "ytcenter-flag-md", "me": "ytcenter-flag-me", "mg": "ytcenter-flag-mg", "mh": "ytcenter-flag-mh", "mk": "ytcenter-flag-mk", "ml": "ytcenter-flag-ml", "mm": "ytcenter-flag-mm", "mn": "ytcenter-flag-mn", "mo": "ytcenter-flag-mo", "mp": "ytcenter-flag-mp", "mq": "ytcenter-flag-mq", "mr": "ytcenter-flag-mr", "ms": "ytcenter-flag-ms", "mt": "ytcenter-flag-mt", "mu": "ytcenter-flag-mu", "mv": "ytcenter-flag-mv", "mw": "ytcenter-flag-mw", "mx": "ytcenter-flag-mx", "my": "ytcenter-flag-my", "mz": "ytcenter-flag-mz", "na": "ytcenter-flag-na", "nc": "ytcenter-flag-nc", "ne": "ytcenter-flag-ne", "nf": "ytcenter-flag-nf", "ng": "ytcenter-flag-ng", "ni": "ytcenter-flag-ni", "nl": "ytcenter-flag-nl", "no": "ytcenter-flag-no", "np": "ytcenter-flag-np", "nr": "ytcenter-flag-nr", "nu": "ytcenter-flag-nu", "nz": "ytcenter-flag-nz", "om": "ytcenter-flag-om", "pa": "ytcenter-flag-pa", "pe": "ytcenter-flag-pe", "pf": "ytcenter-flag-pf", "pg": "ytcenter-flag-pg", "ph": "ytcenter-flag-ph", "pk": "ytcenter-flag-pk", "pl": "ytcenter-flag-pl", "pm": "ytcenter-flag-pm", "pn": "ytcenter-flag-pn", "pr": "ytcenter-flag-pr", "ps": "ytcenter-flag-ps", "pt": "ytcenter-flag-pt", "pw": "ytcenter-flag-pw", "py": "ytcenter-flag-py", "qa": "ytcenter-flag-qa", "re": "ytcenter-flag-re", "ro": "ytcenter-flag-ro", "rs": "ytcenter-flag-rs", "ru": "ytcenter-flag-ru", "rw": "ytcenter-flag-rw", "sa": "ytcenter-flag-sa", "sb": "ytcenter-flag-sb", "sc": "ytcenter-flag-sc", "scotland": "ytcenter-flag-scotland", "sd": "ytcenter-flag-sd", "se": "ytcenter-flag-se", "sg": "ytcenter-flag-sg", "sh": "ytcenter-flag-sh", "si": "ytcenter-flag-si", "sj": "ytcenter-flag-sj", "sk": "ytcenter-flag-sk", "sl": "ytcenter-flag-sl", "sm": "ytcenter-flag-sm", "sn": "ytcenter-flag-sn", "so": "ytcenter-flag-so", "sr": "ytcenter-flag-sr", "st": "ytcenter-flag-st", "sv": "ytcenter-flag-sv", "sy": "ytcenter-flag-sy", "sz": "ytcenter-flag-sz", "tc": "ytcenter-flag-tc", "td": "ytcenter-flag-td", "tf": "ytcenter-flag-tf", "tg": "ytcenter-flag-tg", "th": "ytcenter-flag-th", "tj": "ytcenter-flag-tj", "tk": "ytcenter-flag-tk", "tl": "ytcenter-flag-tl", "tm": "ytcenter-flag-tm", "tn": "ytcenter-flag-tn", "to": "ytcenter-flag-to", "tr": "ytcenter-flag-tr", "tt": "ytcenter-flag-tt", "tv": "ytcenter-flag-tv", "tw": "ytcenter-flag-tw", "tz": "ytcenter-flag-tz", "ua": "ytcenter-flag-ua", "ug": "ytcenter-flag-ug", "um": "ytcenter-flag-um", "us": "ytcenter-flag-us", "uy": "ytcenter-flag-uy", "uz": "ytcenter-flag-uz", "va": "ytcenter-flag-va", "vc": "ytcenter-flag-vc", "ve": "ytcenter-flag-ve", "vg": "ytcenter-flag-vg", "vi": "ytcenter-flag-vi", "vn": "ytcenter-flag-vn", "vu": "ytcenter-flag-vu", "wales": "ytcenter-flag-wales", "wf": "ytcenter-flag-wf", "ws": "ytcenter-flag-ws", "ye": "ytcenter-flag-ye", "yt": "ytcenter-flag-yt", "za": "ytcenter-flag-za", "zm": "ytcenter-flag-zm", "zw": "ytcenter-flag-zw" }; ytcenter.videoHistory = (function(){ var exports = {}; exports.watchedVideos = []; exports.loadWatchedVideosFromYouTubePage = function(){ var a = document.getElementsByClassName("watched"), i, b; for (i = 0; i < a.length; i++) { if (a[i].tagName === "A") { b = ytcenter.utils.getVideoIdFromLink(a[i].getAttribute("href")); if (b && !ytcenter.utils.inArray(exports.watchedVideos, b)) exports.watchedVideos.push(b); } } }; exports.isVideoWatched = function(id){ if (ytcenter.utils.inArray(ytcenter.settings.notwatchedVideos, id)) return false; if (ytcenter.utils.inArray(ytcenter.settings.watchedVideos, id) || ytcenter.utils.inArray(exports.watchedVideos, id)) return true; return false; }; exports.removeVideo = function(id){ var i = ytcenter.utils.inArrayIndex(ytcenter.settings.watchedVideos, id); if (i !== -1) { ytcenter.settings.watchedVideos.splice(i, 1); } if (!ytcenter.utils.inArray(ytcenter.settings.notwatchedVideos, id)) { if (ytcenter.settings.notwatchedVideosLimit < ytcenter.settings.notwatchedVideos.length) { ytcenter.settings.notwatchedVideos.splice(0, ytcenter.settings.notwatchedVideos.length - ytcenter.settings.notwatchedVideosLimit); } ytcenter.settings.notwatchedVideos.push(id); } ytcenter.saveSettings(); }; exports.addVideo = function(id){ var i = ytcenter.utils.inArrayIndex(ytcenter.settings.notwatchedVideos, id); if (i !== -1) { ytcenter.settings.notwatchedVideos.splice(i, 1); } if (!ytcenter.utils.inArray(ytcenter.settings.watchedVideos, id)) { if (ytcenter.settings.watchedVideosLimit < ytcenter.settings.watchedVideos.length) { ytcenter.settings.watchedVideos.splice(0, ytcenter.settings.watchedVideos.length - ytcenter.settings.watchedVideosLimit); } ytcenter.settings.watchedVideos.push(id); } ytcenter.saveSettings(); }; return exports; })(); ytcenter.subtitles = (function(){ /** ytcenter.subtitles.getLanguageList(VIDEO_ID, function(doc){ var l = ytcenter.subtitles.parseLanguageList(doc)[0], // Just selecting the first subtitle in the list. filename; if (typeof l.name === "string" && l.name !== "") filename = "[" + l.languageCode + "]" + l.name; // Generating filename else filename = l.languageCode; // Using language code as filename ytcenter.subtitles.getSubtitleLanguage(VIDEO_ID, l.name, l.languageCode, null, function(cc){ // Getting the selected subtitle cc = ytcenter.subtitles.parseSubtitle(cc); // Parsing the selected subtitle to JSON. ytcenter.subtitles.saveSubtitle(cc, "srt", filename); // Downloading the subtitle as srt with generated filename. }); }); **/ var a = {}; a.saveSubtitle = function(cc, type, filename){ if (typeof type !== "string") type = "srt"; var blob; if (type === "srt") { blob = new ytcenter.unsafe.io.Blob([ytcenter.subtitles.convertToSRT(cc)], { "type": "application/octet-stream" }); ytcenter.unsafe.io.saveAs(blob, filename + ".srt"); } else if (type === "cc") { } else { throw new Error("[Subtitles saveSubtitle] Invalid type (" + type + ")!"); } }; a.parseLanguageList = function(doc){ if (!doc.children || doc.children.length <= 0 || doc.children[0].tagName !== "transcript_list") throw new Error("[Subtitles] Invalid language list!"); var tl = doc.children[0].children, i, a = []; for (i = 0; i < tl.length; i++) { a.push({ type: tl[i].tagName, languageCode: tl[i].getAttribute("lang_code") || "", displayedLanguageName: tl[i].getAttribute("lang_translated") || "", name: tl[i].getAttribute("name") || "", kind: tl[i].getAttribute("kind") || "", id: tl[i].getAttribute("id") || "", isDefault: tl[i].getAttribute("lang_default") || false, isTranslateable: tl[i].getAttribute("cantran") || false, formatList: (tl[i].getAttribute("formats") || "").split(",") }); } return a; }; a.parseSubtitle = function(doc){ if (!doc.children || doc.children.length <= 0 || doc.children[0].tagName !== "transcript") throw new Error("[Subtitles] Invalid transcript (" + doc.children[0].tagName + ")!"); var tl = doc.children[0].children, i, a = [], start, dur; for (i = 0; i < tl.length; i++) { if (tl[i].tagName === "text") { start = parseFloat(tl[i].getAttribute("start")); dur = parseFloat(tl[i].getAttribute("dur")); a.push({ start: start, dur: dur, end: start + dur, text: ytcenter.utils.unescapeHTML(tl[i].textContent) }); } else { con.warn("[Subtitles parseSubtitle] Invalid tag name (" + tl[i].tagName + ")!"); } } return a; }; a.convertToSRT = function(cc){ var srt = "", i; for (i = 0; i < cc.length; i++) { srt += (i + 1) + "\r\n" + ytcenter.utils.srtTimeFormat(cc[i].start) + " --> " + ytcenter.utils.srtTimeFormat(cc[i].end) + "\r\n" + cc[i].text + "\r\n" + "\r\n"; } return srt; }; a.getLanguageList = function(videoId, callback, error){ ytcenter.utils.xhr({ url: "http://video.google.com/timedtext?type=list&v=" + encodeURIComponent(videoId), method: "GET", onload: function(response){ var doc = ytcenter.utils.parseXML(response.responseText); if (callback) callback(doc); }, onerror: function(){ con.error("[Subtitles] Couldn't load subtitle list for video (" + videoId + ")"); if (error) error(); } }); }; a.getTranslatedLanguageList = function(videoId, callback, error){ ytcenter.utils.xhr({ url: "http://video.google.com/timedtext?type=list&tlangs=1&v=" + encodeURIComponent(videoId), method: "GET", onload: function(response){ var doc = ytcenter.utils.parseXML(response.responseText); if (callback) callback(doc); }, onerror: function(){ con.error("[Subtitles] Couldn't load subtitle list for video (" + videoId + ")"); if (error) error(); } }); }; a.getSubtitleLanguage = function(videoId, langName, langCode, translateLang, callback, error){ ytcenter.utils.xhr({ url: "http://video.google.com/timedtext?type=track&v=" + encodeURIComponent(videoId) + (langName ? "&name=" + encodeURIComponent(langName) : "") + (langCode ? "&lang=" + encodeURIComponent(langCode) : "") + (translateLang ? "&tlang=" + encodeURIComponent(translateLang) : ""), method: "GET", onload: function(response){ var doc = ytcenter.utils.parseXML(response.responseText); if (callback) callback(doc); }, onerror: function(){ con.error("[Subtitles] Couldn't load subtitle list for video (" + videoId + ")"); if (error) error(); } }); }; return a; })(); ytcenter.commentsLoader = (function(){ function createLoadCommentsButton() { var el = document.createElement("div"); el.className = "yt-card yt-card-has-padding"; var btn = document.createElement("button"); btn.className = "yt-uix-button yt-uix-button-size-default yt-uix-button-expander"; btn.setAttribute("type", "button"); btn.setAttribute("onclick", ";return false;"); btn.style.borderTop = "none"; btn.style.margin = "-10px 0 -10px"; btn.addEventListener("click", showCommentsFunc, false); var btnText = document.createElement("span"); btnText.className = "yt-uix-button-content"; btnText.textContent = ytcenter.language.getLocale("LOAD_COMMENTS_TEXT"); ytcenter.events.addEvent("language-refresh", function(){ btnText.textContent = ytcenter.language.getLocale("LOAD_COMMENTS_TEXT"); }); btn.appendChild(btnText); el.appendChild(btn); return el; } function fixWidth() { var iframe = discussionElement.getElementsByTagName("iframe"); iframe = iframe.length > 0 ? iframe[0] : null; var container = discussionElement.getElementsByClassName("comments-iframe-container"); container = container.length > 0 ? container[0] : null; if (iframe && container) { iframe.style.width = container.offsetWidth + "px"; } } function showCommentsFunc() { if (discussionElement && loadCommentsElement && loadCommentsElement.parentNode) { discussionElement.style.display = ""; showComments = true; if (discussionElement.parentNode) { loadCommentsElement.parentNode.removeChild(loadCommentsElement); } else { loadCommentsElement.parentNode.replaceChild(discussionElement, loadCommentsElement); } setTimeout(function(){ if (uw.yt && uw.yt.pubsub && uw.yt.pubsub.publish) { uw.yt.pubsub.publish("page-resize", ytcenter.utils.getViewPort()); } fixWidth(); }, 7); } } function update() { var scrolldetect = discussionElement.getAttribute("data-scrolldetect-callback"); if (scrolldetect) { observer.disconnect(); observer = null; if (!showComments) { discussionElement.parentNode.removeChild(discussionElement); } } } function setup() { if (ytcenter.page === "watch" && !ytcenter.settings.enableComments) { loadCommentsElement = createLoadCommentsButton(); discussionElement = document.getElementById("watch-discussion"); if (discussionElement && discussionElement.parentNode) { discussionElement.style.display = "none"; //discussionElement.style.visibility = "hidden"; if (observer) { observer.disconnect(); observer = null; } observer = ytcenter.mutation.observe(discussionElement, { childList: true, subtree: true }, update); discussionElement.parentNode.appendChild(loadCommentsElement); /*discussionElement.parentNode.replaceChild(loadCommentsElement, discussionElement);*/ /*discussionElement.parentNode.removeChild(discussionElement);*/ } } } var loadCommentsElement = null; var discussionElement = null; var observer = null; var observerWidthFix = null; var showComments = false; var exports = {}; exports.setup = setup; return exports; })(); ytcenter.commentsPlus = (function(){ var exports = {}, comments = [], observer = null; ytcenter.unload(function(){ if (observer) { observer.disconnect(); } }); exports.filters = {}; exports.filters.repeat = function(condition, obj){ return (new RegExp("(.)\\1{" + parseInt(condition.amount, 10) + ",}")).test(obj.contentElement.textContent); }; exports.filters.biggerThan = function(condition, obj){ var len = obj.contentElement.textContent.length; if (len < parseInt(condition.length, 10)) return true; return false; }; exports.filters.smallerThan = function(condition, obj){ var len = obj.contentElement.textContent.length; if (len > parseInt(condition.length, 10)) return true; return false; }; exports.filters.equals = function(condition, obj){ var len = obj.contentElement.textContent.length; if (len === parseInt(condition.length, 10)) return true; return false; }; exports.filters.text = function(condition, obj){ var regex = new RegExp(ytcenter.utils.replaceTextToText(condition.regex, { "${username}": ytcenter.utils.escapeRegExp(obj.username), "${textContent}": ytcenter.utils.escapeRegExp(obj.textContent), "${isReply}": ytcenter.utils.escapeRegExp(obj.isReply ? "1" : "0") })); return regex.test(obj.contentElement.textContent); }; exports.filters.links = function(condition, obj){ var regex, regexString = ytcenter.utils.replaceTextToText(condition.regex, { "${username}": ytcenter.utils.escapeRegExp(obj.username), "${textContent}": ytcenter.utils.escapeRegExp(obj.textContent), "${isReply}": ytcenter.utils.escapeRegExp(obj.isReply ? "1" : "0") }), attr = condition.attr || "href", links = obj.contentElement.getElementsByTagName("a"), i; for (i = 0; i < links.length; i++) { regex = new RegExp(ytcenter.utils.replaceTextToText(regexString, { "${linkContent}": links[i].textContent })); if (ytcenter.utils.hasClass(links[i], "ot-anchor") && regex.test(links[i][attr])) return true; } return false; }; exports.filters.profilelinks = function(condition, obj){ var regex, regexString = ytcenter.utils.replaceTextToText(condition.regex, { "${username}": ytcenter.utils.escapeRegExp(obj.username), "${textContent}": ytcenter.utils.escapeRegExp(obj.textContent), "${isReply}": ytcenter.utils.escapeRegExp(obj.isReply ? "1" : "0") }), attr = condition.attr || "href", links = obj.contentElement.getElementsByTagName("a"), i; for (i = 0; i < links.length; i++) { regex = new RegExp(ytcenter.utils.replaceTextToText(regexString, { "${linkContent}": links[i].textContent })); if (ytcenter.utils.hasClass(links[i], "proflink") && regex.test(links[i][attr])) return true; } return false; }; exports.filters.hashlinks = function(condition, obj){ var regex, regexString = ytcenter.utils.replaceTextToText(condition.regex, { "${username}": ytcenter.utils.escapeRegExp(obj.username), "${textContent}": ytcenter.utils.escapeRegExp(obj.textContent), "${isReply}": ytcenter.utils.escapeRegExp(obj.isReply ? "1" : "0") }), attr = condition.attr || "href", links = obj.contentElement.getElementsByTagName("a"), i; for (i = 0; i < links.length; i++) { regex = new RegExp(ytcenter.utils.replaceTextToText(regexString, { "${linkContent}": links[i].textContent })); if (ytcenter.utils.hasClass(links[i], "ot-hashtag") && regex.test(links[i][attr])) return true; } return false; }; exports.filters.username = function(condition, obj){ var regex = new RegExp(ytcenter.utils.replaceTextToText(condition.regex, { "${username}": ytcenter.utils.escapeRegExp(obj.username), "${textContent}": ytcenter.utils.escapeRegExp(obj.textContent), "${isReply}": ytcenter.utils.escapeRegExp(obj.isReply ? "1" : "0") })), img = obj.wrapper.getElementsByTagName("img")[0]; if (regex.test(img.getAttribute("title"))) return true; return false; }; exports.testFilters = function(list, obj){ var i; for (i = 0; i < list.length; i++) { if (list[i].type in exports.filters) { if (exports.filters[list[i].type](list[i], obj)) return true; } } return false; }; exports.__commentInfoIdNext = 0; exports.getCommentObjectByWrapper = function(wrapper){ var i; for (i = 0; i < exports.comments.length; i++) { if (exports.comments[i].wrapper === wrapper) return exports.comments[i]; } return null; }; exports.getCommentObject = function(contentElement, reshared){ var commentInfo = {}, tmp; commentInfo.isShared = (typeof reshared === "boolean" ? reshared : false); if (!contentElement) { con.error("[CommentsPlus:getCommentObject] contentElement is undefined!"); return commentInfo; } commentInfo.inDOM = true; commentInfo.contentElement = contentElement; commentInfo.textContent = contentElement.textContent; commentInfo.shared = commentInfo.textContent === ""; commentInfo.children = ytcenter.utils.toArray(contentElement.childNodes); // We don't want the array to change commentInfo.isReply = !commentInfo.isShared && contentElement && contentElement.parentNode && contentElement.parentNode.className.indexOf("Pm") === -1; commentInfo.isOrignalSharedReference = !commentInfo.isShared && contentElement && contentElement.parentNode && contentElement.parentNode.parentNode && contentElement.parentNode.parentNode.parentNode && contentElement.parentNode.parentNode.parentNode.parentNode && contentElement.parentNode.parentNode.parentNode.parentNode.className.indexOf("dga") !== -1; if (commentInfo.isReply) { commentInfo.wrapper = contentElement.parentNode.parentNode.parentNode; commentInfo.parentId = exports.getCommentObjectByWrapper(commentInfo.wrapper.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.firstChild).id; } else if (commentInfo.isOrignalSharedReference) { try { exports.addCommentObject(exports.getCommentObject(contentElement, true)); } catch (e) { con.error(e); } commentInfo.wrapper = contentElement.parentNode.parentNode.parentNode.parentNode; var parent = exports.getCommentObjectByWrapper(commentInfo.wrapper.parentNode.parentNode); commentInfo.parentId = (parent !== null ? parent.id : null); } else { if (commentInfo.isShared) { commentInfo.wrapper = contentElement.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; } else { commentInfo.wrapper = contentElement.parentNode.parentNode.parentNode.parentNode.parentNode; } commentInfo.parentId = -1; } if (commentInfo.isOrignalSharedReference) { commentInfo.username = commentInfo.wrapper.children[1].textContent; } else { commentInfo.username = commentInfo.wrapper.getElementsByTagName("img")[0].getAttribute("title"); } commentInfo.profileRedirectURL = commentInfo.wrapper.getElementsByTagName("img")[0].parentNode.href; if (loc.href.indexOf("https://") === 0) { // Profile Redirect URL has to be a secure connection if (commentInfo.profileRedirectURL.indexOf("http://") === 0) { commentInfo.profileRedirectURL = commentInfo.profileRedirectURL.replace(/http\:\/\//, "https://"); } } else { // Profile Redirect URL has to be an unsecure connection if (commentInfo.profileRedirectURL.indexOf("https://") === 0) { commentInfo.profileRedirectURL = commentInfo.profileRedirectURL.replace(/https\:\/\//, "http://"); } } if (commentInfo.profileRedirectURL.indexOf("youtube.com/profile_redirector/") !== -1) { commentInfo.profileRedirectId = commentInfo.profileRedirectURL.split("youtube.com/profile_redirector/")[1]; commentInfo.channelRedirectId = null; commentInfo.googlePlusRedirectId = null; } else if (commentInfo.profileRedirectURL.indexOf("youtube.com/channel/") !== -1) { commentInfo.channelRedirectId = commentInfo.profileRedirectURL.split("youtube.com/channel/")[1]; commentInfo.profileRedirectId = null; commentInfo.googlePlusRedirectId = null; } else if (commentInfo.profileRedirectURL.indexOf("youtube.com/user/") !== -1) { commentInfo.channelRedirectId = commentInfo.profileRedirectURL.split("youtube.com/user/")[1]; commentInfo.profileRedirectId = null; commentInfo.googlePlusRedirectId = null; } else if (commentInfo.profileRedirectURL.indexOf("apis.google.com/u/") !== -1) { var s = commentInfo.profileRedirectURL.split("/"); commentInfo.googlePlusRedirectId = s[s.length - 1]; commentInfo.channelRedirectId = null; commentInfo.profileRedirectId = null; } else { commentInfo.profileRedirectId = null; commentInfo.channelRedirectId = null; commentInfo.googlePlusRedirectId = null; } if (commentInfo.isReply) { commentInfo.headerElement = commentInfo.wrapper.getElementsByClassName("fR")[0]; } else if (commentInfo.isOrignalSharedReference) { commentInfo.headerElement = commentInfo.wrapper; } else { commentInfo.headerElement = commentInfo.wrapper.getElementsByClassName("Mpa")[0]; } if (!commentInfo.headerElement) { con.error("[Comment Info] headerElement is undefined"); } if (commentInfo.isReply || commentInfo.isOrignalSharedReference) { commentInfo.headerUserDataElement = commentInfo.headerElement; } else { commentInfo.headerUserDataElement = commentInfo.headerElement.parentNode; } if (commentInfo.isReply) { commentInfo.viaGooglePlus = commentInfo.headerElement && commentInfo.headerElement.children && commentInfo.headerElement.children.length === 3 ? false : true; } else if (commentInfo.isOrignalSharedReference) { commentInfo.viaGooglePlus = true; } else { commentInfo.viaGooglePlus = commentInfo.headerElement && commentInfo.headerElement.children && commentInfo.headerElement.children.length === 1 ? false : true; } commentInfo.country = ytcenter.cache.getItem("profile_country", commentInfo.profileRedirectId || commentInfo.channelRedirectId); if (commentInfo.country) commentInfo.country = commentInfo.country.data; else commentInfo.country = null; commentInfo.flagAdded = false; return commentInfo; }; exports.comments = []; exports.commentLoaded = function(commentObject){ var i; for (i = 0; i < exports.comments.length; i++) { /* Make sure that a comment won't be added multiple times */ if (exports.comments[i].isOrignalSharedReference === commentObject.isOrignalSharedReference && exports.comments[i].isShared === commentObject.isShared && (exports.comments[i].contentElement === commentObject.contentElement || exports.comments[i].wrapper === commentObject.wrapper)) return true; } return false; }; exports.addCommentObject = function(commentObject){ //if (ytcenter.utils.hasClass(commentObject.contentElement, "ytcenter-comments-loaded")) return; if (exports.commentLoaded(commentObject)) return; con.log("[CommentsPlus:addCommentObject] Adding new comment with id: " + exports.__commentInfoIdNext + "."); commentObject.id = exports.__commentInfoIdNext; exports.__commentInfoIdNext += 1; exports.comments.push(commentObject); }; exports.loadComments = function(){ var a = document.getElementsByClassName("Ct"), i; for (i = 0; i < a.length; i++) { try { exports.addCommentObject(exports.getCommentObject(a[i])); } catch (e) { con.error(e); } } }; exports.filter = function(){ var i, obj, blockedElement; for (i = 0; i < exports.comments.length; i++) { if (ytcenter.utils.hasClass(exports.comments[i].contentElement, "ytcenter-comments-loaded")) continue; exports.comments[i].contentElement.className += " ytcenter-comments-loaded"; obj = exports.comments[i]; if (exports.testFilters(ytcenter.settings.commentsPlusWhitelist, obj)) continue; /* Blacklist */ if (exports.testFilters(ytcenter.settings.commentsPlusBlacklist, obj)) { blockedElement = document.createElement("div"); blockedElement.textContent = "Comment Blocked by YouTube Center!"; // This is only temporary /*blockedElement.addEventListener("click", (function(obj, blockedElement, wrap){ function blockedElementListener(){ ytcenter.utils.removeClass(wrap, "ytcenter-comments-blocked"); blockedElement.parentNode.removeChild(blockedElement); blockedElement.removeEventListener("click", blockedElementListener, false); } return blockedElementListener; })(obj, blockedElement, obj.contentElement.parentNode.parentNode), false);*/ obj.contentElement.parentNode.parentNode.className += " ytcenter-comments-blocked"; obj.contentElement.parentNode.parentNode.insertBefore(blockedElement, obj.contentElement.parentNode); if (obj.wrapper) { obj.wrapper.lastChild.style.display = "none"; } } } }; exports.commentDuplicates = function(){ var i, j, duplicates, msg; for (i = 0; i < exports.comments.length; i++) { if (typeof exports.comments[i].duplicateId === "number" || !exports.comments[i].inDOM) continue; if (!ytcenter.utils.contains(document, exports.comments[i].wrapper)) { exports.comments[i].inDOM = false; continue; } duplicates = 0; for (j = 0; j < exports.comments.length; j++) { if (i === j || exports.comments[j].duplicateId === "number" || exports.comments[j].duplicates || !exports.comments[j].inDOM) continue; if (!ytcenter.utils.contains(document, exports.comments[j].wrapper)) { exports.comments[j].inDOM = false; continue; } if (exports.comments[i].username === exports.comments[j].username && exports.comments[i].textContent === exports.comments[j].textContent) { duplicates += 1; exports.comments[j].duplicateId = i; exports.comments[j].wrapper.style.display = "none"; } } if (duplicates > 0) { exports.comments[i].duplicates = duplicates; } } }; exports.completeFlag = function(comment, country){ var countryContainer = document.createElement("span"), metadata = comment.headerUserDataElement, countryName = ytcenter.language.getLocale("COUNTRY_ISO3166-1_CODES_" + country.toUpperCase()); comment && comment.unloadLoadButton && comment.unloadLoadButton(); countryContainer.className = "country"; if (ytcenter.settings.commentCountryShowFlag && ytcenter.flags[country.toLowerCase()]) { var img = document.createElement("img"); img.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; img.className = ytcenter.flags[country.toLowerCase()]; if (ytcenter.settings.commentCountryUseNames) { img.setAttribute("alt", countryName || country); img.setAttribute("title", countryName || country); ytcenter.events.addEvent("language-refresh", function(){ var _countryName = ytcenter.language.getLocale("COUNTRY_ISO3166-1_CODES_" + country.toUpperCase()); img.setAttribute("alt", _countryName || country); img.setAttribute("title", _countryName || country); }); } else { img.setAttribute("alt", country); img.setAttribute("title", country); } countryContainer.appendChild(img); } else { if (ytcenter.settings.commentCountryUseNames) { countryContainer.textContent = countryName || country; ytcenter.events.addEvent("language-refresh", function(){ var _countryName = ytcenter.language.getLocale("COUNTRY_ISO3166-1_CODES_" + country.toUpperCase()); countryContainer.textContent = _countryName || country; }); } else { countryContainer.textContent = country; } } if (ytcenter.settings.commentCountryPosition === "before_username") { countryContainer.style.marginRight = "10px"; if (comment.isOrignalSharedReference) { metadata.insertBefore(countryContainer, metadata.children[1]); } else { metadata.insertBefore(countryContainer, metadata.children[0]); } } else if (ytcenter.settings.commentCountryPosition === "after_username") { if (comment.isOrignalSharedReference) { countryContainer.style.marginLeft = "4px"; } else if (!comment.isReply) { countryContainer.style.marginLeft = "10px"; } else { countryContainer.style.marginRight = "8px"; } if (comment.isOrignalSharedReference) { metadata.insertBefore(countryContainer, metadata.childNodes[2]); } else { metadata.insertBefore(countryContainer, metadata.children[1]); } } else if (ytcenter.settings.commentCountryPosition === "last") { countryContainer.style.marginLeft = "10px"; if (comment.isOrignalSharedReference) { metadata.insertBefore(countryContainer, metadata.lastChild); } else if (!comment.isReply) { if (metadata.children.length > 2) { metadata.insertBefore(countryContainer, metadata.children[2]); } else { metadata.appendChild(countryContainer); } } else { if (metadata.children.length > 3) { metadata.insertBefore(countryContainer, metadata.children[3]); } else { metadata.appendChild(countryContainer); } } } }; exports.addLoadButton = function(comment){ function onLanguageRefresh(){ btn.element.setAttribute("alt", ytcenter.language.getLocale(btn_text)); btn.element.setAttribute("title", ytcenter.language.getLocale(btn_text)); btn.element.setAttribute("data-tooltip-text", ytcenter.language.getLocale(btn_text)); } var countryContainer = document.createElement("span"), metadata = comment.headerUserDataElement, btn = null, btn_text = "COMMENTS_COUNTRY_BUTTON_LOAD"; countryContainer.className = "country"; btn = ytcenter.modules.button({ args: { listeners: [ { event: "click", callback: function(){ if (countryContainer && countryContainer.parentNode) { btn_text = "COMMENTS_COUNTRY_BUTTON_LOAD_LOADING"; onLanguageRefresh(); btn.element.className += " ytcenter-flag-button-loading"; btn.setEnabled(false); comment.unloadLoadButton = function(){ countryContainer && countryContainer.parentNode && countryContainer.parentNode.removeChild && countryContainer.parentNode.removeChild(countryContainer); ytcenter.events.removeEvent("language-refresh", onLanguageRefresh); comment.unloadLoadButton = null; btn = null; btn_text = null; countryContainer = null; metadata = null; }; exports.handleFlagWorker(comment); } } } ] } }); onLanguageRefresh(); ytcenter.events.addEvent("language-refresh", onLanguageRefresh); btn.element.className += " ytcenter-flag-button yt-uix-tooltip"; btn.element.style.verticalAlign = "middle"; countryContainer.appendChild(btn.element); if (ytcenter.settings.commentCountryPosition === "before_username") { countryContainer.style.marginRight = "10px"; if (comment.isOrignalSharedReference) { metadata.insertBefore(countryContainer, metadata.children[1]); } else { metadata.insertBefore(countryContainer, metadata.children[0]); } } else if (ytcenter.settings.commentCountryPosition === "after_username") { if (comment.isOrignalSharedReference) { countryContainer.style.marginLeft = "4px"; } else if (!comment.isReply) { countryContainer.style.marginLeft = "10px"; } else { countryContainer.style.marginRight = "8px"; } if (comment.isOrignalSharedReference) { metadata.insertBefore(countryContainer, metadata.childNodes[2]); } else { metadata.insertBefore(countryContainer, metadata.children[1]); } } else if (ytcenter.settings.commentCountryPosition === "last") { countryContainer.style.marginLeft = "10px"; if (comment.isOrignalSharedReference) { metadata.insertBefore(countryContainer, metadata.lastChild); } else if (!comment.isReply) { if (metadata.children.length > 2) { metadata.insertBefore(countryContainer, metadata.children[2]); } else { metadata.appendChild(countryContainer); } } else { if (metadata.children.length > 3) { metadata.insertBefore(countryContainer, metadata.children[3]); } else { metadata.appendChild(countryContainer); } } } }; exports.handleFlagWorker = function(comment){ ytcenter.jobs.createWorker(comment.profileRedirectId || comment.channelRedirectId || comment.googlePlusRedirectId, function(args){ try { if (comment.profileRedirectId || comment.googlePlusRedirectId) { ytcenter.getGooglePlusUserData(comment.profileRedirectId || comment.googlePlusRedirectId, function(data){ if (data && data.entry && data.entry.yt$location && data.entry.yt$location.$t) { comment.country = data.entry.yt$location.$t; } else { comment && comment.unloadLoadButton && comment.unloadLoadButton(); con.error("[Comment Country] Unknown Location", data); } args.complete(comment.country || null); }); } else if (comment.channelRedirectId) { ytcenter.getUserData(comment.channelRedirectId, function(data){ if (data && data.entry && data.entry.yt$location && data.entry.yt$location.$t) { comment.country = data.entry.yt$location.$t; } else { comment && comment.unloadLoadButton && comment.unloadLoadButton(); con.error("[Comment Country] Unknown Location", data); } args.complete(comment.country || null); }); } } catch (e) { comment && comment.unloadLoadButton && comment.unloadLoadButton(); con.error(e); args.complete(null); } }, function(data){ if (!data) return; if (comment.profileRedirectId || comment.channelRedirectId) { ytcenter.cache.putItem("profile_country", comment.profileRedirectId || comment.channelRedirectId, data, 2678400000 /* 31 days */); } comment.country = data; exports.completeFlag(comment, data); }); }; exports.handleFlag = function(comment){ if (comment.flagAdded) return; comment.flagAdded = true; if (comment.country) { exports.completeFlag(comment, comment.country); } else if (ytcenter.settings.commentCountryButtonLoad) { exports.addLoadButton(comment); } else { if (ytcenter.settings.commentCountryLazyLoad) { ytcenter.domEvents.addEvent(comment.wrapper, "enterview", function(){ exports.handleFlagWorker(comment); }, true); } else { exports.handleFlagWorker(comment); } } }; exports.addFlags = function(){ if (!ytcenter.settings.commentCountryEnabled) return; var i; for (i = 0; i < exports.comments.length; i++) { exports.handleFlag(exports.comments[i]); } }; exports.update = function(){ if (!ytcenter.settings.commentCountryEnabled) return; exports.loadComments(); /*exports.filter(); exports.commentDuplicates();*/ exports.addFlags(); }; exports.setupObserver = function(){ try { observer = ytcenter.mutation.observe(document.body, { childList: true, subtree: true }, exports.update); } catch (e) { con.error(e); } }; exports.dispose = function(){ if (observer) { observer.disconnect(); observer = null; } }; exports.setup = function(){ if (!ytcenter.settings.commentCountryEnabled) return; ytcenter.cache.putCategory("profile_country", ytcenter.settings.commentCacheSize); ytcenter.domEvents.setup(); exports.update(); document.body.className += " ytcenter-comments-plus"; ytcenter.events.addEvent("resize-update", function(){ exports.update(); }); exports.setupObserver(); }; return exports; })(); ytcenter.uploaderFlag = (function(){ function init() { if (!ytcenter.settings.uploaderCountryEnabled) return; ytcenter.cache.putCategory("profile_country", ytcenter.settings.commentCacheSize); var userHeader = (ytcenter.feather ? document.getElementById("ud") : document.getElementById("watch7-user-header")), user, id; if (userHeader) { user = (ytcenter.feather ? userHeader.getElementsByTagName("a")[0] : userHeader.getElementsByTagName("a")[1]); id = user.getAttribute("data-ytid"); var country = ytcenter.cache.getItem("profile_country", id); if (country) { addFlag(country.data); } else { work(id); } } } function work(id) { ytcenter.jobs.createWorker(id, function(args){ try { ytcenter.getUserData(id, function(data){ var country = null; if (data && data.entry && data.entry.yt$location && data.entry.yt$location.$t) { country = data.entry.yt$location.$t; } else { con.error("[Comment Country] Unknown Location", data); } args.complete(country); }); } catch (e) { con.error(e); args.complete(null); } }, function(data){ if (!data) return; if (id) { ytcenter.cache.putItem("profile_country", id, data, 2678400000 /* 31 days */); } addFlag(data); }); } function addFlag(country) { var userHeader = (ytcenter.feather ? document.getElementById("ud") : document.getElementById("watch7-user-header")); var userInfo = userHeader; if (!ytcenter.feather && userHeader && userHeader.getElementsByClassName("yt-user-info").length > 0) { userInfo = userHeader.getElementsByClassName("yt-user-info")[0]; } var separator = userInfo.children[1]; var user = (ytcenter.feather ? userInfo.getElementsByTagName("a")[0] : userInfo.getElementsByTagName("a")[1]); var linebreak = (ytcenter.feather ? userInfo.lastChild : userInfo.getElementsByTagName("br")[0]); var countryContainer = document.createElement("span"); var countryName = ytcenter.language.getLocale("COUNTRY_ISO3166-1_CODES_" + country.toUpperCase()); if (userInfo.getElementsByClassName("country").length > 0) return; countryContainer.className = "country"; if (ytcenter.settings.uploaderCountryShowFlag && ytcenter.flags[country.toLowerCase()]) { var img = document.createElement("img"); img.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; img.className = ytcenter.flags[country.toLowerCase()] + " yt-uix-tooltip"; if (ytcenter.settings.uploaderCountryUseNames) { img.setAttribute("alt", countryName || country); img.setAttribute("title", countryName || country); ytcenter.events.addEvent("language-refresh", function(){ var _countryName = ytcenter.language.getLocale("COUNTRY_ISO3166-1_CODES_" + country.toUpperCase()); img.setAttribute("alt", _countryName || country); img.setAttribute("title", _countryName || country); }); } else { img.setAttribute("alt", country); img.setAttribute("title", country); } countryContainer.appendChild(img); } else { if (ytcenter.settings.uploaderCountryUseNames) { countryContainer.textContent = countryName || country; ytcenter.events.addEvent("language-refresh", function(){ var _countryName = ytcenter.language.getLocale("COUNTRY_ISO3166-1_CODES_" + country.toUpperCase()); countryContainer.textContent = _countryName || country; }); } else { countryContainer.textContent = country; } } countryContainer.style.verticalAlign = "middle"; if (ytcenter.settings.uploaderCountryPosition === "before_username") { countryContainer.style.marginRight = "10px"; userInfo.insertBefore(countryContainer, userInfo.children[0]); } else if (ytcenter.settings.uploaderCountryPosition === "after_username") { if (ytcenter.utils.hasClass(separator, "yt-user-name-icon-verified") || ytcenter.utils.hasClass(separator, "yt-channel-title-icon-verified")) { separator = userInfo.children[2]; } else { countryContainer.style.marginLeft = "5px"; } userInfo.insertBefore(countryContainer, separator); } else if (ytcenter.settings.uploaderCountryPosition === "last") { countryContainer.style.marginLeft = "5px"; if (ytcenter.feather) { userInfo.appendChild(countryContainer); } else { userInfo.insertBefore(countryContainer, linebreak); } } } return { init: init }; })(); ytcenter.jobs = (function(){ var exports = {}, workers = {}, pendingWorkers = [], workingWorkers = [], completedWorkers = [], _max_workers = 20; /* id the id of the worker. action the action function, which will do the job. complete the function which will be called when the job is finished. *** This creates a new worker, which will execute a job. If a worker with the same id is created it will just execute the complete function instead with the previous data. */ exports.createWorker = function(id, action, complete){ if (id in workers) { if (workers[id].completed) { con.log("[Worker] Job has already been executed once (" + id + ")"); complete(workers[id].data); } else { con.log("[Worker] Job is currently being executed (" + id + ")"); workers[id].completeActions.push(complete); } } else { workers[id] = { completeActions: [ complete ], run: function(){ action(workers[id].args); }, args: { complete: function(data){ con.log("[Worker] Job completed (" + id + ")"); var i; for (i = 0; i < workingWorkers.length; i++) { if (workingWorkers[i] === id) { completedWorkers.push(workingWorkers.splice(i, 1)[0]); break; } } workers[id].completed = true; workers[id].data = data; var i; for (i = 0; i < workers[id].completeActions.length; i++) { workers[id].completeActions[i](data); } exports.run(); }, remove: ytcenter.utils.once(function(){ delete workers[id]; }) }, completed: false }; con.log("[Worker] Addiong new job (" + id + ")"); pendingWorkers.push(id); exports.run(); } }; exports.run = function(){ var id; while ((workingWorkers.length < _max_workers || _max_workers === -1) && pendingWorkers.length > 0) { id = pendingWorkers.splice(0, 1)[0]; workingWorkers.push(id); con.log("[Worker] Executing new job (" + id + ")"); workers[id].run(); } }; exports.getPendingWorkers = function(){ return pendingWorkers; }; exports.getWorkingWorkers = function(){ return workingWorkers; }; exports.getCompletedWorkers = function(){ return completedWorkers; }; return exports; })(); ytcenter.cache = (function(){ function saveChanges() { if (!_timer) { _timer = uw.setTimeout(function(){ _timer = null; ytcenter.saveSettings(); }, 2000); } } var exports = {}, _timer = null; exports.putCategory = function(id, size){ if (!ytcenter.settings.cache) ytcenter.settings.cache = {}; if (ytcenter.settings.cache[id] && ytcenter.settings.cache[id].size === size) return; if (ytcenter.settings.cache[id]) { ytcenter.settings.cache[id].size = size; } else { ytcenter.settings.cache[id] = { size: size, items: [] }; } exports.checkCache(); saveChanges(); }; exports.getCategory = function(id){ if (!ytcenter.settings.cache) ytcenter.settings.cache = {}; return ytcenter.settings.cache[id] || null; }; exports.getItem = function(catId, id){ if (!ytcenter.settings.cache) ytcenter.settings.cache = {}; var cat = exports.getCategory(catId), i; if (!cat) return false; for (i = 0; i < cat.items.length; i++) { if (cat.items[i].i === id) return { id: cat.items[i].i, categoryId: catId, data: cat.items[i].d, expires: cat.items[i].e, lastUpdated: cat.items[i].l, index: i }; } return null; }; /** * catId : the unique id of the category the item is in. * id : the unique id of the item. * data : the data of the item. * expires : the milliseconds after the last update date. If the sum of expires and the lastUpdate is less than the date the item will be removed. */ exports.putItem = function(catId, id, data, expires){ if (!ytcenter.settings.cache) ytcenter.settings.cache = {}; exports.checkCache(); var cat = exports.getCategory(catId), item; if (!cat) throw "[Cache] Category " + catId + " doesn't exist!"; item = exports.getItem(catId, id); if (item) { cat.items[item.index].d = data; cat.items[item.index].e = expires; cat.items[item.index].l = +new Date; } else { item = { i: id, d: data, e: expires, l: +new Date }; if (cat.items.length >= cat.size) cat.items.shift(); cat.items.push(item); } saveChanges(); }; /* Find expired items and removes them. */ exports.checkCache = function(){ if (!ytcenter.settings.cache) return; var key, i, now = +new Date, save = false; for (key in ytcenter.settings.cache) { if (ytcenter.settings.cache.hasOwnProperty(key)) { for (i = 0; i < ytcenter.settings.cache[key].items.length; i++) { if (ytcenter.settings.cache[key].items[i].l + ytcenter.settings.cache[key].items[i].e < now) { save = true; ytcenter.settings.cache[key].items.splice(i, 1); i--; } } } } saveChanges(); }; return exports; })(); ytcenter.getUserData = function(userId, callback){ ytcenter.utils.xhr({ url: "https://gdata.youtube.com/feeds/api/users/" + userId + "?alt=json", method: "GET", onload: function(r){ var data = null; try { data = JSON.parse(r.responseText); } catch (e) { con.error("[Comments getUserData] Couldn't parse data from https://gdata.youtube.com/feeds/api/users/" + userId + "?alt=json"); con.error(e); } callback(data); }, onerror: function(){ con.error("[Comments getUserData] Couldn't fetch data from https://gdata.youtube.com/feeds/api/users/" + userId + "?alt=json"); callback(null); } }); }; ytcenter.getGooglePlusUserData = function(oId, callback){ function handleFinalUrl(url) { var userId = null; if (url.indexOf("youtube.com/channel/") !== -1) { userId = url.split("youtube.com/channel/"); if (userId && userId[1]) ytcenter.getUserData(userId[1], callback); } else if (url.indexOf("youtube.com/user/") !== -1) { userId = url.split("youtube.com/user/"); if (userId && userId[1]) ytcenter.getUserData(userId[1], callback); } else { con.error("[Comments getGooglePlusUserData] Final URL: " + r.finalUrl); callback(null); } } ytcenter.utils.xhr({ url: "http://www.youtube.com/profile_redirector/" + oId, method: "GET", onload: function(r){ try { if (!r.finalUrl || r.finalUrl === "") { handleFinalUrl(ytcenter.utils.getContentByTags(r.responseText, "<meta property=\"og:url\" content=\"", "\">")); } else { handleFinalUrl(r.finalUrl); } } catch (e) { con.error("[Comments getGooglePlusUserData] Couldn't parse data from http://www.youtube.com/profile_redirector/" + oId); con.error(r); con.error(e); callback(null); } }, onerror: function(){ con.error("[Comments getGooglePlusUserData] Couldn't fetch data from http://www.youtube.com/profile_redirector/" + oId); callback(null); } }); }; ytcenter.getPage = function(url){ url = url || loc.href; var pathname = (url && url.split("youtube.com")[1]) || loc.pathname; if (!!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\/watch\?/)) { ytcenter.page = "watch"; } else if (!!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\/edit\?/)) { ytcenter.page = "edit"; } else if (!!url.match(/^http(s)?:\/\/((apis\.google\.com)|(plus\.googleapis\.com))\/([0-9a-zA-Z-_\/]+)\/widget\/render\/comments\?/)) { ytcenter.page = "comments"; } else if (!!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\//) && (loc.pathname === "/" || loc.pathname === "/feed/what_to_watch")) { ytcenter.page = "feed_what_to_watch"; } else if (!!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\/embed\//) || !!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\/watch_popup\?\//)) { ytcenter.page = "embed"; } else if ( document && document.body && document.body.innerHTML.indexOf("data-swf-config") !== -1 && document.body.innerHTML.indexOf("movie_player") !== -1 && document.body.innerHTML.indexOf("youtube.com/v/") !== -1 && document.body.innerHTML.indexOf("flashvars=") !== -1) { ytcenter.page = "channel"; } else if (document.getElementById("page") && ytcenter.utils.hasClass(document.getElementById("page"), "channel")) { ytcenter.page = "channel"; } else if (!!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\/(user|channel)\//)) { ytcenter.page = "channel"; } else if (!!url.match(/^http(s)?:\/\/(www\.)?youtube\.com\//)) { if (loc.pathname === "/results") { ytcenter.page = "search"; } else { ytcenter.page = "other"; } } return ytcenter.page; }; ytcenter.pageReadinessListener = (function(){ function call(event){ for (i = 0; i < events.length; i++) { if (events[i].event === event) { con.log("[PageReadinessListener] Calling => " + events[i].event); for (j = 0; j < events[i].callbacks.length; j++) { events[i].callbacks[j](); } } } } function addEventListener(event, callback){ var i; for (i = 0; i < events.length; i++) { if (events[i].event === event) { if (!events[i].callbacks) events[i].callbacks = []; events[i].callbacks.push(callback); return; } } } function update(){ var i, j, page = ytcenter.getPage(loc.href); if (ytcenter.pageReadinessListener.waitfor) { if (!ytcenter.pageReadinessListener.waitfor()) return; } for (i = 0; i < events.length; i++) { if (events[i].called) continue; if (events[i].test && !events[i].test()) break; events[i].called = true; if (events[i].event === "stopInterval") { con.log("[PageReadinessListener] Stopping interval"); uw.clearInterval(preTester); ytcenter.utils.removeEventListener(document, "readystatechange", update, true); ytcenter.utils.removeEventListener(document, "DOMContentLoaded", update, true); events = null; preTester = null; preTesterInterval = null; update = null; return; } else if (events[i].event === "startInterval") { con.log("[PageReadinessListener] Starting interval"); uw.clearInterval(preTester); // Just to make sure that only one instance is running. preTester = uw.setInterval(function(){ update(); }, preTesterInterval); } else { con.log("[PageReadinessListener] At event => " + events[i].event, page); events[i].called = true; for (j = 0; j < events[i].callbacks.length; j++) { events[i].callbacks[j](page); } } } }; function setup(){ ytcenter.utils.addEventListener(document, "readystatechange", update, true); ytcenter.utils.addEventListener(document, "DOMContentLoaded", update, true); preTester = uw.setInterval(function(){ update(); }, preTesterInterval); update(); } var events = [ { event: "headerInitialized", test: function(){ if (document && document.getElementsByTagName && document.getElementsByTagName("head")[0]) return true; return false; }, called: false, callbacks: [] }, { event: "bodyInitialized", test: function(){ if (document && document.body && (document.body.className !== "" || ytcenter.feather)) return true; return false; }, called: false, callbacks: [] }, { event: "bodyInteractive", test: function(){ if (document.readyState === "interactive" || document.readyState === "complete") return true; return false; }, called: false, callbacks: [] }, { event: "bodyComplete", test: function(){ if (document.readyState === "complete") return true; return false; }, called: false, callbacks: [] }, { event: "stopInterval", called: false, callbacks: [] } ]; var preTester; var preTesterInterval = 75; return { setup: setup, update: update, addEventListener: addEventListener, call: call, }; })(); ytcenter.thumbnail = (function(){ function getPlaylistVideoThumbs() { var pt = document.getElementById("watch7-playlist-tray"), pt2 = document.getElementById("guide"), pt3 = document.getElementById("watch-appbar-playlist"), a = [], b, i; if (pt) { b = pt.getElementsByClassName("video-thumb"); for (i = 0; i < b.length; i++) { a.push(b[i]); } } if (pt2) { b = pt2.getElementsByClassName("video-thumb"); for (i = 0; i < b.length; i++) { a.push(b[i]); } } if (pt3) { b = pt3.getElementsByClassName("video-thumb"); for (i = 0; i < b.length; i++) { a.push(b[i]); } } return a; } function handleVideoThumbs(videoThumb, videoElement) { var maxIterations = 10; var linkRegex = /v=([a-zA-Z0-9-_]+)/; var linkRegex2 = /index=([0-9]+)/; var linkRegex3 = /video_ids=([0-9a-zA-Z-_%]+)/; var i = null; var a = null; var id = null; var data = null; var cacheData = null; var wrapper = null; var rgx = null; var index = null; if (videoElement.tagName === "A") { wrapper = videoElement; } else if (videoElement.parentNode.tagName === "A") { wrapper = videoElement.parentNode; } else { wrapper = null; } if (wrapper) { if (wrapper.href.match(linkRegex)) { rgx = linkRegex.exec(wrapper.href); if (rgx && rgx[1]) id = rgx[1]; else return null; cacheData = getDataCacheById(id); data = {id: id, content: videoElement, wrapper: wrapper, videoThumb: videoThumb}; if (cacheData) { if (cacheData.stream) data.stream = cacheData.stream; if (cacheData.likes) data.likes = cacheData.likes; if (cacheData.dislikes) data.dislikes = cacheData.dislikes; } } else if (wrapper.href.match(linkRegex3)) { rgx = linkRegex2.exec(wrapper.href); if (rgx && rgx[1]) index = parseInt(rgx[1]); else index = 0; rgx = linkRegex3.exec(wrapper.href); if (rgx && rgx[1]) id = rgx[1]; else return null; if (id.split("%2C").length > 0 && id.split("%2C")[index]) id = id.split("%2C")[index]; else return null; cacheData = getDataCacheById(id); data = {id: id, content: videoElement, wrapper: wrapper, videoThumb: videoThumb}; if (cacheData) { if (cacheData.stream) data.stream = cacheData.stream; if (cacheData.likes) data.likes = cacheData.likes; if (cacheData.dislikes) data.dislikes = cacheData.dislikes; } } if (data) { a = wrapper; for (i = 0; i < maxIterations; i++) { a = a.parentNode; if (!a) break; // At the top of the tree if (a.tagName === "LI") { // We found it guys. Great job. data.itemWrapper = a; break; } } if (ytcenter.utils.hasClass(videoThumb, "yt-uix-simple-thumb-wrap")) { data.content = videoThumb; } var img = videoThumb.getElementsByTagName("img"); if (img && img.length > 0 && img[0]) { data.thumbnailImage = img[0]; } return data; } } return null; } function getVideoThumbs() { var arr = ytcenter.utils.toArray(document.getElementsByClassName("video-thumb")).concat(ytcenter.utils.toArray(document.getElementsByClassName("yt-uix-simple-thumb-wrap"))); var videos = []; var playlistVideoThumbs = getPlaylistVideoThumbs(); var i; for (var i = 0, len = arr.length; i < len; i++) { if (ytcenter.utils.inArray(playlistVideoThumbs, arr[i])) continue; var data = handleVideoThumbs(arr[i], arr[i].parentNode); if (data) videos.push(data); } return videos; } function loadVideoConfig(item, callback) { if (item.stream && item.storyboard) { callback(item.stream, item.storyboard); } else { var spflink = true, url = "//www.youtube.com/watch?v=" + item.id + (spflink ? "&spf=navigate" : ""); if (loc.href.indexOf("https://") === 0) { url = "https:" + url; } else { url = "http:" + url; } ytcenter.utils.xhr({ url: url, method: "GET", onload: function(r){ var cfg = null; var errorType = "unknown"; try { try { if (spflink) { var parts = JSON.parse(r.responseText); for (var i = 0, len = parts.length; i < len; i++) { var part = parts[i]; if (part && part.data && part.data.swfcfg) { cfg = part.data.swfcfg; break; } } if (!cfg) throw "Player configurations not found in spf."; } else { cfg = r.responseText.split("<script>var ytplayer = ytplayer || {};ytplayer.config = ")[1].split(";</script>")[0]; cfg = JSON.parse(cfg); } } catch (e) { con.error(e); if (r.responseText.indexOf("flashvars=\"") !== -1) { var a = r.responseText.split("flashvars=\"")[1].split("\"")[0].replace(/&/g, "&").replace(/"/g, "\"").split("&"), i, b; cfg = {args: {}}; for (i = 0; i < a.length; i++) { b = a[i].split("="); cfg.args[decodeURIComponent(b[0])] = decodeURIComponent(b[1]); } } else if (r.responseText.indexOf("new yt.player.Application('p', {") !== -1) { cfg = {}; cfg.args = r.responseText.split("new yt.player.Application('p', ")[1].split(");var fbetatoken")[0]; cfg.args = JSON.parse(cfg.args); } } item.stream = ytcenter.player.getBestStream(ytcenter.parseStreams(cfg.args), (ytcenter.settings.videoThumbnailQualitySeparated ? (ytcenter.settings.dashPlayback ? 1 : 0) : -1)); if (!item.stream) { if (cfg && cfg.args && cfg.args.ypc_module && cfg.args.ypc_vid) { item.stream = { quality: "ondemand" }; } } if (cfg && cfg.args) { item.storyboard = cfg.args.storyboard_spec || cfg.args.live_storyboard_spec; } try { delete item.stream.fallback_host; delete item.stream.sig; delete item.stream.flashVersion; delete item.stream.url; } catch (e) { con.error(e); } try { if (isInCache(item)) { updateItemInCache(item); } else { addNewDataToCache(item); } } catch (e) { con.error(e); } if (item.stream) { callback(item.stream, item.storyboard); } else { callback("error", null, "Error!"); } } catch (e) { var msg = ""; if (e === "unavailable") { msg = "Video Unavailable!"; } else { if (r.responseText.indexOf("Too many") !== -1) { msg = "Too many requests!"; } else { msg = "Error!"; con.error(e); con.error(cfg); try { con.error(JSON.parse(r.responseText)); } catch (e) { con.error(r.responseText); } } } con.error("[VideoThumbnail Quality] IO Error => " + msg); callback("error", null, msg); } }, onerror: function(){ var msg = "Connection failed!"; con.error("[VideoThumbnail Quality] IO Error => " + msg); callback("error", null, msg); } }); } } function loadVideoData(item, callback) { if (item.likes && item.dislikes) { callback(item.likes, item.dislikes); } else if (item.id) { ytcenter.utils.xhr({ url: "https://gdata.youtube.com/feeds/api/videos/" + item.id + "?v=2&alt=json", method: "GET", onload: function(r){ try { if (!r.responseText) throw "unavailable"; var videoData = JSON.parse(r.responseText).entry, ratings = videoData.yt$rating; item.likes = parseInt(ratings ? ratings.numLikes : 0); item.dislikes = parseInt(ratings ? ratings.numDislikes : 0); if (isInCache(item)) { updateItemInCache(item); } else { addNewDataToCache(item); } callback(item.likes, item.dislikes); } catch (e) { var msg = ""; if (e === "unavailable") { msg = "Unavailable!"; } else { if (r.responseText.indexOf("<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain>") === 0) { msg = "Error!"; if (r.responseText.indexOf("<internalReason>") !== -1 && r.responseText.indexOf("</internalReason>") !== -1) { msg = ytcenter.utils.unescapeXML(r.responseText.split("<internalReason>")[1].split("</internalReason>")[0]) + "!"; } } else if (r.responseText.indexOf("<code>too_many_recent_calls</code>") !== -1 && r.responseText.indexOf("<domain>yt:quota</domain>") !== -1) { msg = "Too many requests!"; } else { msg = "Error!"; con.error(e); try { con.error(JSON.parse(r.responseText)); } catch (e) { con.error(r.responseText); } } } con.error("[VideoThumbnail Ratings] IO Error => " + msg); callback("error", msg); } }, onerror: function(){ var msg = "Connection failed!"; con.error("[VideoThumbnail Quality] IO Error => " + msg); callback("error", msg); } }); } } function appendRatingBar(item, likes, dislikes) { try { var total = likes + dislikes, sparkBars = document.createElement("div"), sparkBarLikes = document.createElement("div"), sparkBarDislikes = document.createElement("div"), barLength; sparkBars.className = "video-extras-sparkbars" + (ytcenter.settings.videoThumbnailRatingsBarVisible === "show_hover" ? " ytcenter-video-thumb-show-hover" : "") + (ytcenter.settings.videoThumbnailRatingsBarVisible === "hide_hover" ? " ytcenter-video-thumb-hide-hover" : ""); sparkBars.style.height = ytcenter.settings.videoThumbnailRatingsBarHeight + "px"; if (!ytcenter.utils.hasClass(item.videoThumb, "yt-thumb-fluid") && item.videoThumb.className.match(/yt-thumb-[0-9]+/)) { barLength = /yt-thumb-([0-9]+)/.exec(item.videoThumb.className)[1] + "px"; } else if (item.videoThumb.style.width && parseInt(item.videoThumb.style.width) > 0) { barLength = item.videoThumb.style.width; } else { barLength = "100%"; } sparkBarLikes.className = "video-extras-sparkbar-likes"; sparkBarLikes.style.background = ytcenter.settings.videoThumbnailRatingsBarLikesColor; sparkBarLikes.style.height = ytcenter.settings.videoThumbnailRatingsBarHeight + "px"; sparkBarDislikes.className = "video-extras-sparkbar-dislikes"; sparkBarDislikes.style.height = ytcenter.settings.videoThumbnailRatingsBarHeight + "px"; if (likes === "error") { sparkBarDislikes.style.background = "#BF3EFF"; total = 1; likes = 0; dislikes = 1; } else if (total > 0) { sparkBarDislikes.style.background = ytcenter.settings.videoThumbnailRatingsBarDislikesColor; } else { dislikes = 1; total = 1; } sparkBars.appendChild(sparkBarLikes); sparkBars.appendChild(sparkBarDislikes); sparkBars.style.position = "absolute"; switch (ytcenter.settings.videoThumbnailRatingsBarPosition) { case "top": sparkBars.style.top = "0px"; sparkBars.style.left = "0px"; sparkBarLikes.style.width = (likes/total*100) + "%"; sparkBarDislikes.style.width = (dislikes/total*100) + "%"; sparkBars.style.width = barLength; break; case "bottom": sparkBars.style.bottom = "0px"; sparkBars.style.left = "0px"; sparkBarLikes.style.width = (likes/total*100) + "%"; sparkBarDislikes.style.width = (dislikes/total*100) + "%"; sparkBars.style.width = barLength; break; case "left": sparkBars.style.top = "0px"; sparkBars.style.left = "0px"; sparkBarLikes.style.height = (likes/total*100) + "%"; sparkBarDislikes.style.height = (dislikes/total*100) + "%"; sparkBarLikes.style.width = "2px"; sparkBarDislikes.style.width = "2px"; sparkBarLikes.style.cssFloat = "none"; sparkBarDislikes.style.cssFloat = "none"; sparkBars.style.height = "100%"; break; case "right": sparkBars.style.top = "0px"; sparkBars.style.right = "0px"; sparkBarLikes.style.height = (likes/total*100) + "%"; sparkBarDislikes.style.height = (dislikes/total*100) + "%"; sparkBarLikes.style.width = "2px"; sparkBarDislikes.style.width = "2px"; sparkBarLikes.style.cssFloat = "none"; sparkBarDislikes.style.cssFloat = "none"; sparkBars.style.height = "100%"; break; } item.content.appendChild(sparkBars); } catch (e) { con.error("[Id=" + item.id + "] Likes: " + likes + ", " + dislikes); con.error(e); } } function appendRatingCount(item, likes, dislikes) { try { var numLikesDislikes = document.createElement("span"), likesCount = document.createElement("span"), dislikesCount = document.createElement("span"), likeIcon = document.createElement("img"), dislikeIcon = document.createElement("img"); numLikesDislikes.className = "video-extras-likes-dislikes" + (ytcenter.settings.videoThumbnailRatingsCountVisible === "show_hover" ? " ytcenter-video-thumb-show-hover" : "") + (ytcenter.settings.videoThumbnailRatingsCountVisible === "hide_hover" ? " ytcenter-video-thumb-hide-hover" : "") + " ytcenter-thumbnail-ratingcount"; numLikesDislikes.style.background = "#000"; numLikesDislikes.style.opacity = "0.75"; numLikesDislikes.style.filter = "alpha(opacity=75)"; numLikesDislikes.style.padding = "0 4px"; numLikesDislikes.style.lineHeight = "14px"; numLikesDislikes.style.fontWeight = "bold"; numLikesDislikes.style.zoom = "1"; if (likes === "error") { numLikesDislikes.style.color = "#fff"; numLikesDislikes.style.verticalAlign = "middle"; numLikesDislikes.style.fontSize = "11px"; numLikesDislikes.appendChild(document.createTextNode(dislikes)); } else { likesCount.className = "likes-count"; likesCount.style.marginRight = "4px"; likesCount.style.color = "#fff"; likesCount.style.verticalAlign = "middle"; likesCount.style.fontSize = "11px"; likesCount.textContent = ytcenter.utils.number1000Formating(likes); dislikesCount.className = "dislikes-count"; dislikesCount.style.color = "#fff"; dislikesCount.style.verticalAlign = "middle"; dislikesCount.style.fontSize = "11px"; dislikesCount.textContent = ytcenter.utils.number1000Formating(dislikes); if (ytcenter.utils.hasClass(item.videoThumb, "yt-thumb-120") || ytcenter.utils.hasClass(item.videoThumb, "yt-thumb-106")) { likesCount.style.fontSize = "11px"; dislikesCount.style.fontSize = "11px"; } likeIcon.className = ""; // icon-watch-stats-like likeIcon.setAttribute("alt", "Like"); likeIcon.src = ytcenter.icon.smallThumbsUpWhite; likeIcon.style.position = "relative"; likeIcon.style.marginRight = "2px"; likeIcon.style.marginTop = "4px"; likeIcon.style.top = "-2px"; likeIcon.style.verticalAlign = "middle"; dislikeIcon.className = ""; // icon-watch-stats-dislike dislikeIcon.setAttribute("alt", "Dislike"); dislikeIcon.src = ytcenter.icon.smallThumbsDownWhite; dislikeIcon.style.position = "relative"; dislikeIcon.style.marginRight = "2px"; dislikeIcon.style.marginTop = "4px"; dislikeIcon.style.top = "-2px"; dislikeIcon.style.verticalAlign = "middle"; numLikesDislikes.appendChild(likeIcon); numLikesDislikes.appendChild(likesCount); numLikesDislikes.appendChild(dislikeIcon); numLikesDislikes.appendChild(dislikesCount); } numLikesDislikes.style.position = "absolute"; item.content.className += " ytcenter-thumbnail-ratingcount-pos-" + ytcenter.settings.videoThumbnailRatingsCountPosition; item.content.appendChild(numLikesDislikes); } catch (e) { con.error("[Id=" + item.id + "] Likes: " + likes + ", " + dislikes); con.error(e); } } function appendAnimatedThumbnail(item, storyboard, errorMessage){ function preload(images) { var i, img; for (i = 0; i < images.length; i++) { img = new Image(); img.src = images[i]; } } function preloadNextMosaic(frame) { if (level) { var nextMosaic = level.getMosaic(frame) + 1; if (preloadURLS.length <= nextMosaic || nextMosaic < 0) { nextMosaic = 0; } if (!preloaded[nextMosaic]) { preload([preloadURLS[nextMosaic]]); con.log("[Animated Thumbnail] Preloaded " + preloadURLS[nextMosaic]); preloaded[nextMosaic] = true; } } else { frame += 1; if (frame > 3 || frame < 1) frame = 1; if (!preloadedDefaultImgs[frame - 1]) { preload([urlTemplate.replace("$N", frame)]); con.log("[Animated Thumbnail] Preloaded " + urlTemplate.replace("$N", frame)); preloadedDefaultImgs[frame - 1] = true; } } } function mouseover() { function moi() { if (level) { a.src = "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; a.parentNode.style.backgroundColor = "#000"; if (frame >= level.frames) frame = 0; rect = level.getRect(frame, box); a.style.width = rect.width + "px"; a.style.height = rect.height + "px"; a.style.top = "0px"; a.style.backgroundSize = rect.imageWidth + "px " + rect.imageHeight + "px"; a.style.backgroundImage = "URL(" + level.getURL(frame) + ")"; a.style.backgroundPosition = -rect.x + "px " + -rect.y + "px"; preloadNextMosaic(frame); } else { if (frame > 3 || frame < 1) frame = 1; a.src = urlTemplate.replace("$N", frame); preloadNextMosaic(frame); } if (ytcenter.settings.videoThumbnailAnimationShuffle) { if (level) { frame = Math.round(Math.random()*(level.frames - 1)); } else { frame = Math.round(Math.random()*2) + 1; } } else { frame++; } } preloadNextMosaic(frame - 1); timer2 = uw.setTimeout(function(){ if (level) { timer = uw.setInterval(moi, ytcenter.settings.videoThumbnailAnimationInterval); } else { urlTemplate = originalImage.replace(/\/(mq)?default\.jpg$/, "/$N.jpg"); timer = uw.setInterval(moi, ytcenter.settings.videoThumbnailAnimationFallbackInterval); } moi(); }, ytcenter.settings.videoThumbnailAnimationDelay); } function mouseout() { uw.clearInterval(timer); uw.clearTimeout(timer2); a.src = originalImage; a.style.backgroundSize = ""; a.style.backgroundImage = ""; a.style.backgroundPosition = ""; a.style.width = ""; a.style.height = ""; a.style.top = ""; a.parentNode.style.backgroundColor = ""; frame = 0; } try { var a = item.wrapper.getElementsByTagName("img")[0], b = ytcenter.player.parseThumbnailStream(storyboard || ""), originalImage = a.getAttribute("data-thumb") || a.src, timer, timer2, frame = 0, level, i, urlTemplate, box = { width: a.offsetWidth, height: 0 }, rect, preloaded = [], preloadURLS = null, preloadedDefaultImgs = [false, false, false]; if (b.levels.length > 0) { for (i = 0; i < b.levels.length; i++) { if (!level) level = b.levels[i]; else if (b.levels[i].width > level.width) level = b.levels[i]; } } if (level) { preloadURLS = level.getURLS(); for (i = 0; i < preloadURLS.length; i++) { preloaded.push(false); } } else { urlTemplate = originalImage.replace(/\/(mq)?default\.jpg$/, "/$N.jpg"); } if (item.mouseover) { mouseover(); } else { mouseout(); } ytcenter.utils.addEventListener(item.wrapper, "mouseover", mouseover, false); ytcenter.utils.addEventListener(item.wrapper, "mouseout", mouseout, false); } catch (e) { con.error(e); } } function appendQuality(item, stream, errorMessage) { var tableQuality = { "error": errorMessage, "auto": errorMessage, "ondemand": "OnDemand", "tiny": "144p", "small": "240p", "medium": "360p", "large": "480p", "hd720": "720p", "hd1080": "1080p", "hd1440": "1440p", "highres": "1080p+" }, tableBackground = { "error": "#b00", "auto": "#b00", "ondemand": "#aaa", "tiny": "#7e587e", "small": "#aaa", "medium": "#0aa", "large": "#00f", "hd720": "#0a0", "hd1080": "#f00", "hd1440": "#000", "highres": "#000" }, tableColor = { "error": "#fff", "auto": "#fff", "ondemand": "#fff", "tiny": "#fff", "small": "#fff", "medium": "#fff", "large": "#fff", "hd720": "#fff", "hd1080": "#fff", "hd1440": "#fff", "highres": "#fff" }, text, background, color, wrapper = document.createElement("span"); if (stream === null) { text = tableQuality["error"]; background = tableBackground["error"]; color = tableColor["error"]; } else if (stream === "error") { text = tableQuality[stream]; background = tableBackground[stream]; color = tableColor[stream]; } else if (stream && stream.quality === "ondemand") { text = tableQuality[stream.quality]; background = tableBackground[stream.quality]; color = tableColor[stream.quality]; } else if (stream && stream.quality) { text = stream.dimension.split("x")[1] + "p"; background = tableBackground[stream.quality]; color = tableColor[stream.quality]; } else if (stream && stream.size) { var quality = ytcenter.player.convertDimensionToQuality(stream.size); text = stream.size.split("x")[1] + "p"; background = tableBackground[quality]; color = tableColor[quality]; } if (ytcenter.settings.videoThumbnailQualityFPS && stream && stream !== "error") { var fps = stream.fps || "30"; text += "@" + fps; } wrapper.className = (ytcenter.settings.videoThumbnailQualityVisible === "show_hover" ? " ytcenter-video-thumb-show-hover" : "") + (ytcenter.settings.videoThumbnailQualityVisible === "hide_hover" ? " ytcenter-video-thumb-hide-hover" : "") + " ytcenter-thumbnail-quality"; wrapper.textContent = text; item.content.className += " ytcenter-thumbnail-quality-pos-" + ytcenter.settings.videoThumbnailQualityPosition; wrapper.style.background = background; wrapper.style.color = color; item.content.appendChild(wrapper); } function updateWatchedClass(item) { var watched = ytcenter.utils.hasClass(item.content, "watched"), am, li, s; if (item.itemWrapper && watched) { ytcenter.utils.addClass(item.itemWrapper, "ytcenter-video-watched-wrapper"); // For hiding the item } else if (item.itemWrapper) { ytcenter.utils.removeClass(item.itemWrapper, "ytcenter-video-watched-wrapper"); // For hiding the item } if (loc.pathname === "/feed/subscriptions" && !item.actionMenu) { item.actionMenu = item.wrapper.parentNode.parentNode.parentNode.parentNode.parentNode.nextElementSibling; if (item.actionMenu) { am = item.actionMenu.getElementsByTagName("ul")[0]; li = document.createElement("li"); li.setAttribute("role", "menuitem"); s = document.createElement("span"); s.className = "dismiss-menu-choice yt-uix-button-menu-item"; s.setAttribute("onclick", ";return false;"); if (ytcenter.videoHistory.isVideoWatched(item.id)) { s.textContent = ytcenter.language.getLocale("VIDEOWATCHED_REMOVE"); } else { s.textContent = ytcenter.language.getLocale("VIDEOWATCHED_ADD"); } ytcenter.utils.addEventListener(li, "click", function(){ if (ytcenter.videoHistory.isVideoWatched(item.id)) { ytcenter.videoHistory.removeVideo(item.id); s.textContent = ytcenter.language.getLocale("VIDEOWATCHED_ADD"); } else { ytcenter.videoHistory.addVideo(item.id); s.textContent = ytcenter.language.getLocale("VIDEOWATCHED_REMOVE"); } updateWatchedMessage(item); }, false); li.appendChild(s); am.insertBefore(li, am.children[0]); ytcenter.events.addEvent("language-refresh", function(){ if (ytcenter.videoHistory.isVideoWatched(item.id)) { s.textContent = ytcenter.language.getLocale("VIDEOWATCHED_REMOVE"); } else { s.textContent = ytcenter.language.getLocale("VIDEOWATCHED_ADD"); } }); } } } function updateWatchedMessage(item) { var ivw = ytcenter.videoHistory.isVideoWatched(item.id), watchedElement; if (ivw) { watchedElement = document.createElement("div"); if (item.content.getElementsByClassName("watched-message").length === 0 && item.content.getElementsByClassName("watched-badge").length === 0) { //watchedElement.className = "watched-message"; watchedElement.className = "watched-badge"; watchedElement.textContent = ytcenter.language.getLocale("SETTINGS_WATCHED"); ytcenter.language.addLocaleElement(watchedElement, "SETTINGS_WATCHED", "@textContent"); item.content.insertBefore(watchedElement, item.content.children[0]); } ytcenter.utils.addClass(item.content, "watched"); } else { ytcenter.utils.removeClass(item.content, "watched"); if (item.itemWrapper) ytcenter.utils.removeClass(item.itemWrapper, "ytcenter-video-watched-wrapper"); } } function getChannelBubble(item) { var elm = null; if (item.itemWrapper) { elm = item.itemWrapper.getElementsByTagName("a"); if (elm && elm.length > 0) { elm = elm[0]; } else { elm = null; } } return elm; } function getChannelName(wrapper) { var elm = null; if (wrapper) { elm = wrapper.getElementsByTagName("img"); if (elm && elm.length > 0) { elm = elm[0]; } } if (elm) { elm = elm.getAttribute("alt"); } return elm; } function convertChannelBubble(elm) { if (elm) { elm.textContent = getChannelName(elm); elm.className = elm.className.replace("feed-author-bubble", ""); } return elm; } function isInSubscription(item) { var feed = document.getElementById("feed"), children = feed.getElementsByClassName("video-thumb"), i; for (i = 0; i < children.length; i++) { if (children[i] === item.videoThumb) { return true; } } return false; } function processItemHeavyLoad(item) { if (!ytcenter.settings.videoThumbnailQualityBar && !ytcenter.settings.videoThumbnailAnimationEnabled) return; if (ytcenter.settings.videoThumbnailQualityDownloadAt === "scroll_into_view") { ytcenter.domEvents.addEvent(item.wrapper, "enterview", function(){ loadVideoConfig(item, function(stream, storyboard, errorMessage){ if (ytcenter.settings.videoThumbnailQualityBar) appendQuality(item, stream, errorMessage); if (ytcenter.settings.videoThumbnailAnimationEnabled) appendAnimatedThumbnail(item, storyboard, errorMessage); }); }, true); } else if (ytcenter.settings.videoThumbnailQualityDownloadAt === "hover_thumbnail") { ytcenter.utils.addEventListener(item.wrapper, "mouseover", (function(){ var added = false; return function(){ if (added) return; added = true; loadVideoConfig(item, function(stream, storyboard, errorMessage){ if (ytcenter.settings.videoThumbnailQualityBar) appendQuality(item, stream, errorMessage); if (ytcenter.settings.videoThumbnailAnimationEnabled) appendAnimatedThumbnail(item, storyboard, errorMessage); }); }; })(), false); } else { loadVideoConfig(item, function(stream, storyboard, errorMessage){ if (ytcenter.settings.videoThumbnailQualityBar) appendQuality(item, stream, errorMessage); if (ytcenter.settings.videoThumbnailAnimationEnabled) { ytcenter.utils.addEventListener(item.wrapper, "mouseover", (function(){ var added = false; return function(){ if (added) return; added = true; appendAnimatedThumbnail(item, storyboard, errorMessage); }; })(), false); } }); } } function processItem(item) { if (!ytcenter.settings.videoThumbnailRatingsCount && !ytcenter.settings.videoThumbnailRatingsBar) return; if (ytcenter.settings.videoThumbnailRatingsBarDownloadAt === "hover_thumbnail" && ytcenter.settings.videoThumbnailRatingsCountDownloadAt === "hover_thumbnail") { ytcenter.utils.addEventListener(item.wrapper, "mouseover", (function(){ var added = false; return function(){ if (added) return; added = true; loadVideoData(item, function(likes, dislikes){ if (ytcenter.settings.videoThumbnailRatingsCount) { appendRatingCount(item, likes, dislikes); } if (ytcenter.settings.videoThumbnailRatingsBar) { appendRatingBar(item, likes, dislikes); } }); }; })(), false); } else { if (ytcenter.settings.videoThumbnailRatingsBarDownloadAt === "page_start" || ytcenter.settings.videoThumbnailRatingsCountDownloadAt === "page_start") { loadVideoData(item, function(likes, dislikes){ if (ytcenter.settings.videoThumbnailRatingsCount) { appendRatingCount(item, likes, dislikes); } if (ytcenter.settings.videoThumbnailRatingsBar) { appendRatingBar(item, likes, dislikes); } }); } else { if (ytcenter.settings.videoThumbnailRatingsBarDownloadAt === "scroll_into_view" && ytcenter.settings.videoThumbnailRatingsBar) { ytcenter.domEvents.addEvent(item.wrapper, "enterview", function(){ loadVideoData(item, function(likes, dislikes){ appendRatingBar(item, likes, dislikes); }); }, true); } else if (ytcenter.settings.videoThumbnailRatingsBarDownloadAt === "hover_thumbnail" && ytcenter.settings.videoThumbnailRatingsBar) { ytcenter.utils.addEventListener(item.wrapper, "mouseover", (function(){ var added = false; return function(){ if (added) return; added = true; loadVideoData(item, function(likes, dislikes){ appendRatingBar(item, likes, dislikes); }); }; })(), false); } else if (ytcenter.settings.videoThumbnailRatingsBar) { loadVideoData(item, function(likes, dislikes){ appendRatingBar(item, likes, dislikes); }); } if (ytcenter.settings.videoThumbnailRatingsCountDownloadAt === "scroll_into_view" && ytcenter.settings.videoThumbnailRatingsCount) { ytcenter.domEvents.addEvent(item.wrapper, "enterview", function(){ loadVideoData(item, function(likes, dislikes){ appendRatingCount(item, likes, dislikes); }); }, true); } else if (ytcenter.settings.videoThumbnailRatingsCountDownloadAt === "hover_thumbnail" && ytcenter.settings.videoThumbnailRatingsCount) { ytcenter.utils.addEventListener(item.wrapper, "mouseover", (function(){ var added = false; return function(){ if (added) return; added = true; loadVideoData(item, function(likes, dislikes){ appendRatingCount(item, likes, dislikes); }); }; })(), false); } else if (ytcenter.settings.videoThumbnailRatingsCount) { loadVideoData(item, function(likes, dislikes){ appendRatingCount(item, likes, dislikes); }); } } } } function compareDifference(newData, oldData) { var a = false; var arr = []; for (var i = 0, len = newData.length; i < len; i++) { a = false; for (var j = 0, lenj = oldData.length; j < lenj; j++) { if (oldData[j].wrapper === newData[i].wrapper) { a = true; break; } } if (!a) { arr.push(newData[i]); } } return arr; } function updateItemInCache(data) { var index = getDataCacheIndex(data); if (data.stream && !ytcenter.settings.videoThumbnailData[index].stream) { ytcenter.settings.videoThumbnailData[index].stream = data.stream; } if (data.storyboard && !ytcenter.settings.videoThumbnailData[index].storyboard) { ytcenter.settings.videoThumbnailData[index].storyboard = data.storyboard; } if (data.likes && data.dislikes && !ytcenter.settings.videoThumbnailData[index].likes && !ytcenter.settings.videoThumbnailData[index].dislikes) { ytcenter.settings.videoThumbnailData[index].likes = data.likes; ytcenter.settings.videoThumbnailData[index].dislikes = data.dislikes; } ytcenter.saveSettings(); } function updateReuse(data) { var index = getDataCacheIndex(data); if (index === -1) return; ytcenter.settings.videoThumbnailData[index].reused++; if (ytcenter.settings.videoThumbnailData[index].reused > 5) ytcenter.settings.videoThumbnailData[index].reused = 5; ytcenter.saveSettings(); } function getDataCacheById(id) { var i; for (i = 0; i < ytcenter.settings.videoThumbnailData.length; i++) { if (id === ytcenter.settings.videoThumbnailData[i].id) return ytcenter.settings.videoThumbnailData[i]; } return null; } function getDataCacheIndex(data) { var i; for (i = 0; i < ytcenter.settings.videoThumbnailData.length; i++) { if (data.id === ytcenter.settings.videoThumbnailData[i].id) return i; } return -1; } function isInCache(data) { return getDataCacheIndex(data) !== -1; } function addNewDataToCache(data) { if (isInCache(data)) return; var nData = {}; while (ytcenter.settings.videoThumbnailData.length >= ytcenter.settings.videoThumbnailCacheSize) removeOldestFromCache(); nData.id = data.id; nData.reused = 0; nData.date = ytcenter.utils.now(); if (data.stream) nData.stream = data.stream; if (data.storyboard) nData.storyboard = data.storyboard; if (data.likes) nData.likes = data.likes; if (data.dislikes) nData.dislikes = data.dislikes; ytcenter.settings.videoThumbnailData.push(nData); ytcenter.saveSettings(); } function calculateCacheLife(data) { return 1000*60*10 + (1000*60*5)*(data.reused ? data.reused : 0); } function removeOldestFromCache() { if (ytcenter.settings.videoThumbnailData.length === 0) return; var i, now = ytcenter.utils.now(), life, lifeRemaining, oldest = ytcenter.settings.videoThumbnailData[0], j = 0; for (i = 1; i < ytcenter.settings.videoThumbnailData.length; i++) { life = calculateCacheLife(ytcenter.settings.videoThumbnailData[i]); lifeRemaining = (ytcenter.settings.videoThumbnailData[i].date + life) - now; if (lifeRemaining < (oldest.date + calculateCacheLife(oldest)) - now) { oldest = ytcenter.settings.videoThumbnailData[i]; j = i; } } ytcenter.settings.videoThumbnailData.splice(j, 1); } function cacheChecker() { if (ytcenter.settings.videoThumbnailData.length === 0) return; var i, now = ytcenter.utils.now(), life, nData = []; for (i = 0; i < ytcenter.settings.videoThumbnailData.length; i++) { life = calculateCacheLife(ytcenter.settings.videoThumbnailData[i]); if (now < ytcenter.settings.videoThumbnailData[i].date + life) { if (ytcenter.settings.videoThumbnailData[i].reused < 5) ytcenter.settings.videoThumbnailData[i].reused++; nData.push(ytcenter.settings.videoThumbnailData[i]); } } ytcenter.settings.videoThumbnailData = nData; ytcenter.saveSettings(); } var exports = {}, videoThumbs = [], observer = null, observer2 = null; exports.update = function(){ ytcenter.gridview.update(); ytcenter.videoHistory.loadWatchedVideosFromYouTubePage(); ytcenter.channelPlaylistLinks.update(); var vt = compareDifference(getVideoThumbs(), videoThumbs), i; for (i = 0; i < vt.length; i++) { ytcenter.utils.addEventListener(vt[i].wrapper, "mouseover", (function(item){ return function(){ item.mouseover = true; }; })(vt[i]), false); ytcenter.utils.addEventListener(vt[i].wrapper, "mouseout", (function(item){ return function(){ item.mouseover = false; }; })(vt[i]), false); videoThumbs.push(vt[i]); updateReuse(vt[i]); // TODO make it load with scrolling. /*if (vt[i].thumbnailImage && vt[i].thumbnailImage.hasAttribute("data-thumb")) { vt[i].thumbnailImage.src = vt[i].thumbnailImage.getAttribute("data-thumb"); }*/ processItem(vt[i]); processItemHeavyLoad(vt[i]); if (loc.pathname === "/" || loc.pathname === "/results" || loc.pathname.indexOf("/feed/") === 0) { updateWatchedClass(vt[i]); } if ((loc.pathname === "/" || loc.pathname === "/results" || loc.pathname.indexOf("/feed/") === 0) && ytcenter.settings.watchedVideosIndicator) { updateWatchedMessage(vt[i]); } } }; exports.setupObserver = function(){ exports.dispose(); // We don't want multiple observers if (document.getElementById("content")) { observer = ytcenter.mutation.observe(document.getElementById("content"), { childList: true, subtree: true }, function(){ exports.update(); }); } }; exports.dispose = function(){ if (observer) { observer.disconnect(); observer = null; } if (observer2) { observer2.disconnect(); observer2 = null; } }; ytcenter.unload(exports.dispose); exports.setup = function(){ con.log("[Thumbnail] Setup has begun..."); ytcenter.gridview.update(); try { var i; cacheChecker(); ytcenter.videoHistory.loadWatchedVideosFromYouTubePage(); videoThumbs = getVideoThumbs(); for (i = 0; i < videoThumbs.length; i++) { ytcenter.utils.addEventListener(videoThumbs[i].wrapper, "mouseover", (function(item){ return function(){ item.mouseover = true; }; })(videoThumbs[i]), false); ytcenter.utils.addEventListener(videoThumbs[i].wrapper, "mouseout", (function(item){ return function(){ item.mouseover = false; }; })(videoThumbs[i]), false); updateReuse(videoThumbs[i]); processItem(videoThumbs[i]); processItemHeavyLoad(videoThumbs[i]); if (loc.pathname === "/" || loc.pathname === "/results" || loc.pathname.indexOf("/feed/") === 0) { updateWatchedClass(videoThumbs[i]); } if ((loc.pathname === "/" || loc.pathname === "/results" || loc.pathname.indexOf("/feed/") === 0) && ytcenter.settings.watchedVideosIndicator) { updateWatchedMessage(videoThumbs[i]); } } exports.setupObserver(); } catch (e) { con.error(e); } }; return exports; })(); ytcenter.getDebug = function(){ var debugText = "{}", dbg = {}, a; try { dbg.htmlelements = {}; if (document.body) dbg.htmlelements.body = { "className": document.body.className }; dbg.injected = injected; dbg.identifier = identifier; dbg.devbuild = devbuild; // variable is true if this a developer build dbg.devnumber = devnumber; // developer build number. Only really needed for the developer build. dbg.feather = ytcenter.feather; dbg.cookies = {}; dbg.cookies["VISITOR_INFO1_LIVE"] = ytcenter.utils.getCookie("VISITOR_INFO1_LIVE"); dbg.location = { hash: loc.hash, host: loc.host, hostname: loc.hostname, href: loc.href, origin: loc.origin, pathname: loc.pathname, port: loc.port, protocol: loc.protocol, search: loc.search }; dbg.navigator = { userAgent: uw.navigator.userAgent, vendor: uw.navigator.vendor, vendorSub: uw.navigator.vendorSub, platform: uw.navigator.platform }; dbg.settings = {}; for (a in ytcenter.settings) { if (ytcenter.settings.hasOwnProperty(a)) { if (ytcenter.settings.debug_settings_playersize && a === "resize-playersizes") continue; if (ytcenter.settings.debug_settings_buttonPlacement && (a === "buttonPlacement" || a === "buttonPlacementWatch7")) continue; if (ytcenter.settings.debug_settings_videoThumbnailData && a === "videoThumbnailData") continue; if (ytcenter.settings.debug_settings_commentCountryData && a === "commentCountryData") continue; if (ytcenter.settings.debug_settings_watchedVideos && a === "watchedVideos") continue; if (ytcenter.settings.debug_settings_notwatchedVideos && a === "notwatchedVideos") continue; dbg.settings[a] = ytcenter.settings[a]; } } dbg.settings = ytcenter.settings; dbg.ytcenter = {}; dbg.ytcenter.video = ytcenter.video; dbg.ytcenter.signatureDecipher = ytcenter.utils._signatureDecipher; dbg.ytcenter._signatureDecipher = ytcenter.utils.__signatureDecipher; dbg.ytcenter.player = {}; dbg.ytcenter.player.flashvars = ""; try { dbg.ytcenter.player.flashvars = document.getElementById("movie_player").getAttribute("flashvars"); } catch (e) { dbg.ytcenter.player.flashvars = e; } dbg.ytcenter.player.config = ytcenter.player.config; try { dbg.ytcenter.player.apiinterface = ytcenter.player.getReference().api.getApiInterface(); } catch (e) { dbg.ytcenter.player.apiinterface = {}; } if (typeof dbg.ytcenter.player.reference !== "undefined") { dbg.ytcenter.player.reference = true; } else { dbg.ytcenter.player.reference = false; } try { var tests = ["getAvailablePlaybackRates", "getAvailableQualityLevels", "getCurrentTime", "getDebugText", "getDuration", "getPlaybackQuality", "getPlaybackRate", "getPlayerState", "getPlayerType", "getVolume", "isMuted", "isReady"]; dbg.player_test = {}; for (var i = 0; i < tests.length; i++) { if (ytcenter.player.getReference().api[tests[i]]) dbg.player_test[tests[i]] = ytcenter.player.getReference().api[tests[i]](); } } catch (e) { dbg.player_test_error = e.message; } dbg.console = _console; debugText = JSON.stringify(dbg); } catch (e) { con.error(e); con.log("[Debug Text]", dbg); debugText = e.message; } return debugText; }; ytcenter.alert = function(type, message, closeable){ var exports = {}, types = { "error": "yt-alert-error", "warning": "yt-alert-warning", "info": "yt-alert-info" }, wrapper = document.createElement("div"), icon = document.createElement("div"), iconImg = document.createElement("img"), content = document.createElement("div"), contentVerticalTrick = document.createElement("span"), contentMessage = document.createElement("div"); closeable = typeof closeable === "boolean" ? closeable : true; wrapper.className = "yt-alert yt-alert-default " + types[type]; icon.className = "yt-alert-icon"; iconImg.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; iconImg.className = "icon master-sprite"; icon.appendChild(iconImg); wrapper.appendChild(icon); if (closeable) { var buttons = document.createElement("div"), closeButton = document.createElement("button"), closeButtonText = document.createElement("span"); buttons.className = "yt-alert-buttons"; closeButton.setAttribute("type", "button"); closeButton.setAttribute("role", "button"); closeButton.setAttribute("onclick", ";return false;"); closeButton.className = "close yt-uix-close yt-uix-button yt-uix-button-close"; ytcenter.utils.addEventListener(closeButton, "click", function(){ exports.setVisibility(false); }); closeButtonText.className = "yt-uix-button-content"; closeButtonText.textContent = "Close "; closeButton.appendChild(closeButtonText); buttons.appendChild(closeButton); wrapper.appendChild(buttons); } content.className = "yt-alert-content"; contentVerticalTrick.className = "yt-alert-vertical-trick"; contentMessage.className = "yt-alert-message"; if (typeof message === "string") { contentMessage.textContent = message; } else { contentMessage.appendChild(message); } content.appendChild(contentVerticalTrick); content.appendChild(contentMessage); wrapper.appendChild(content); exports.setVisibility = function(visible){ if (visible) { if (wrapper.parentNode) wrapper.parentNode.removeChild(wrapper); document.getElementById("alerts").appendChild(wrapper); } else { if (wrapper.parentNode) wrapper.parentNode.removeChild(wrapper); } }; return exports; }; ytcenter.message = (function(){ var exports = {}; exports.listen = function(win, origin, token, callback){ ytcenter.utils.addEventListener(win || uw, "message", function(e){ if (origin && e.origin !== origin) return; if (!e || !e.data) return; // Checking if data is present if (typeof e.data !== "string") return; // Checking if the object is a string. if (!e.data.indexOf || e.data.indexOf(token) !== 0) return; // Checking if the token is present at the start of the string var data = JSON.parse(e.data.substring(token.length)); //con.log("[Message:" + loc.href + "] Listen@" + token, data); callback(data); }, false); }; exports.broadcast = function(win, origin, token, data){ win.postMessage(token + JSON.stringify(data), origin); }; return exports; })(); ytcenter.domEvents = (function(){ function onViewUpdate() { if (uw.self !== uw.top && !offset && !windowDim) return; onEnterViewUpdate(); onExitViewUpdate(); var i, elms = document.getElementsByTagName("iframe"), scrollOffset = null, elmOffset = null, data; for (i = 0; i < elms.length; i++) { if (elms[i] && elms[i].src && (elms[i].src.indexOf("http://apis.google.com/") === 0 || elms[i].src.indexOf("https://apis.google.com/") === 0 || elms[i].src.indexOf("http://plus.googleapis.com") === 0 || elms[i].src.indexOf("https://plus.googleapis.com") === 0) && elms[i].src.indexOf("/widget/render/comments?") !== -1) { scrollOffset = ytcenter.utils.getBoundingClientRect(elms[i]); data = { scrollOffset: scrollOffset, windowDim: windowDim || {width: window.innerWidth || document.documentElement.clientWidth, height: window.innerHeight || document.documentElement.clientHeight } }; ytcenter.message.broadcast( elms[i].contentWindow, elms[i].src, "$_scroll", data ); } } } function onEnterViewUpdate() { if (!db["enterview"]) return; var trash = [], i = 0, a; while (i < db["enterview"].length) { if (processEnterViewUpdate(db["enterview"][i])) { if (db["enterview"][i].once) { db["enterview"].splice(i, 1); i -= 1; } } i += 1; } } function onExitViewUpdate() { if (!db["exitview"]) return; var trash = [], i = 0, a; while (i < db["exitview"].length) { if (processExitViewUpdate(db["exitview"][i])) { if (db["exitview"][i].once) { db["exitview"].splice(i, 1); i -= 1; } } i += 1; } } function processEnterViewUpdate(item) { var inView = ytcenter.utils.isElementPartlyInView(item.element, offset, windowDim); if (!inView) { item.inview = false; return false; } if (!("inview" in item)) item.inview = false; if (item.inview) return false; item.inview = true; item.callback.apply(item.element, []); return true; } function processExitViewUpdate(item) { var inView = ytcenter.utils.isElementPartlyInView(item.element, offset, windowDim); if (inView) { item.inview = true; return false; } if (!("inview" in item)) { item.inview = inView; return false; } if (item.inview && !inView) { item.callback.apply(item.element, []); } item.inview = inView; return true; } var exports = {}, db = {}, _buffer = null, onViewUpdateBuffer = null, offset = null, windowDim = null; exports.update = function(){ onViewUpdate(); }; exports.addEvent = function(elm, event, callback, once){ if (!elm) return; if (!db[event]) db[event] = []; db[event].push({ element: elm, callback: callback, once: once || false }); }; exports.ready = function(){ if (uw.self === uw.top) return; if ((loc.href.indexOf("apis.google.com/u/") !== -1 || loc.href.indexOf("plus.googleapis.com") !== -1) && loc.href.indexOf("/widget/render/comments?") !== -1) { ytcenter.message.broadcast( uw.parent, document.referrer, "$_ready", {} ); } }; exports.setup = function(){ if (onViewUpdateBuffer) { ytcenter.utils.removeEventListener(window, "scroll", onViewUpdateBuffer, false); ytcenter.utils.removeEventListener(window, "resize", onViewUpdateBuffer, false); ytcenter.events.removeEvent("ui-refresh", onViewUpdateBuffer); } else { if ((loc.href.indexOf("apis.google.com/u/") !== -1 || loc.href.indexOf("plus.googleapis.com") !== -1) && loc.href.indexOf("/widget/render/comments?") !== -1) { ytcenter.message.listen(uw, null, "$_scroll", function(data){ offset = data.scrollOffset; windowDim = data.windowDim; }); } if (ytcenter.getPage() === "watch") { ytcenter.message.listen(uw, null, "$_ready", function(data){ onViewUpdate(); }); } } onViewUpdateBuffer = ytcenter.utils.throttle(onViewUpdate, 500); ytcenter.utils.addEventListener(window, "scroll", onViewUpdateBuffer, false); ytcenter.utils.addEventListener(window, "resize", onViewUpdateBuffer, false); ytcenter.events.addEvent("ui-refresh", onViewUpdateBuffer); uw.setInterval(onViewUpdateBuffer, 7500); // Todo attach this to an event instead. onViewUpdateBuffer(); }; return exports; })(); ytcenter.scrollEvent = (function(){ function createHandler(group) { return function(event){ var data = handler(event), i; for (i = 0; i < group.listeners.length; i++) { group.listeners[i].apply(group.element, data); } }; } function addEventListener(elm, listener) { var group = getEventGroup(elm); if (group === null) { group = { element: elm, listeners: [], handler: null }; groups.push(group); } group.listeners.push(listener); if (group.listeners.length > 0 && group.handler === null) { setupGroup(group); } } function removeEventListener(elm, listener) { var group = getEventGroup(elm), i; if (group !== null) { for (i = 0; i < group.listeners.length; i++) { if (group.listeners[i] === listener) { group.listeners.splice(i, 1); } } if (group.listeners.length === 0 && group.handler !== null) { destroyGroup(group); } } } function getEventGroup(elm) { var i; for (i = 0; i < groups.length; i++) { if (groups[i].element === elm) { return groups[i]; } } return null; } function setupGroup(group) { var i; if (group.handler === null) { group.handler = createHandler(group); for (i = 0; i < events.length; i++) { ytcenter.utils.addEventListener(group.element, events[i], group.handler, false); } } } function destroyGroup(group) { var i; if (group.handler !== null) { for (i = 0; i < events.length; i++) { ytcenter.utils.removeEventListener(group.element, events[i], group.handler, false); } group.handler = null; } } function setup() { var i; for (i = 0; i < groups.length; i++) { setupGroup(groups[i]); } } function destroy() { var i; for (i = 0; i < groups.length; i++) { destroyGroup(groups[i]); } } function unload() { destroy(); groups = []; } function handler(event) { var orgEvent = event || window.event; var args = Array.prototype.splice.call(arguments, 1); var delta = 0; var deltaX = 0; var deltaY = 0; var absDelta = 0; var absDeltaXY = 0; var fn = null; // Old school scrollwheel delta if (orgEvent.wheelDelta) { delta = orgEvent.wheelDelta; } if (orgEvent.detail) { delta = orgEvent.detail * -1; } // New school wheel delta (wheel event) if (orgEvent.deltaY) { deltaY = orgEvent.deltaY * -1; delta = deltaY; } if (orgEvent.deltaX) { deltaX = orgEvent.deltaX; delta = deltaX * -1; } // Webkit if (orgEvent.wheelDeltaY !== undefined) { deltaY = orgEvent.wheelDeltaY; } if (orgEvent.wheelDeltaX !== undefined) { deltaX = orgEvent.wheelDeltaX * -1; } // Look for lowest delta to normalize the delta values absDelta = Math.abs(delta); if (!lowestDelta || absDelta < lowestDelta) { lowestDelta = absDelta; } absDeltaXY = Math.max(Math.abs(deltaY), Math.abs(deltaX)); if (!lowestDeltaXY || absDeltaXY < lowestDeltaXY) { lowestDeltaXY = absDeltaXY; } fn = delta > 0 ? "floor" : "ceil"; delta = Math[fn](delta / lowestDelta); deltaX = Math[fn](deltaX / lowestDeltaXY); deltaY = Math[fn](deltaY / lowestDeltaXY); return [event, delta, deltaX, deltaY]; } var events = 'onwheel' in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], lowestDelta = null, lowestDeltaXY = null, groups = []; return { addEventListener: addEventListener, removeEventListener: removeEventListener, destroy: destroy, setup: setup, unload: unload }; })(); ytcenter.events = (function(){ var db = {}, exports = {}; exports.addEvent = function(event, callback){ if (!db.hasOwnProperty(event)) db[event] = []; db[event].push(callback); return [event, callback]; }; exports.removeEvent = function(event, callback){ var i; for (i = 0; i < db[event].length; i++) { if (db[event][i] === callback) { db[event].splice(i, 1); return; } } }; exports.performEvent = function(event){ if (!db.hasOwnProperty(event)) return; var staticArguments = Array.prototype.splice.call(arguments, 1, arguments.length); //con.log("performEvent: " + event, staticArguments, arguments); for (var i = 0; i < db[event].length; i++) { try { db[event][i].apply(null, staticArguments); } catch (e) { con.error(e); } } }; return exports; })(); ytcenter._dialogVisible = null ytcenter.dialog = function(titleLabel, content, actions, alignment){ var exports = {}, ___parent_dialog = null, bgOverlay, root, base, fg, fgContent, footer, eventListeners = {}, actionButtons = {}, _visible = false; alignment = alignment || "center"; bgOverlay = ytcenter.dialogOverlay(); root = document.createElement("div"); root.className = "ytcenter-dialog"; base = document.createElement("div"); base.className = "ytcenter-dialog-base"; fg = document.createElement("div"); fg.className = "ytcenter-dialog-fg"; fgContent = document.createElement("div"); fgContent.className = "ytcenter-dialog-fg-content ytcenter-dialog-show-content"; fg.appendChild(fgContent); if (alignment === "center") { var align = document.createElement("span"); align.className = "ytcenter-dialog-align"; base.appendChild(align); } else { fg.style.margin = "13px 0"; } base.appendChild(fg); root.appendChild(base); if (typeof titleLabel === "string" && titleLabel !== "") { var header = document.createElement("div"); header.className = "ytcenter-dialog-header"; var title = document.createElement("h2"); title.className = "ytcenter-dialog-title"; title.textContent = ytcenter.language.getLocale(titleLabel); ytcenter.language.addLocaleElement(title, titleLabel, "@textContent"); header.appendChild(title); fgContent.appendChild(header); } else { var header = document.createElement("div"); header.style.margin = "0 -20px 20px"; fgContent.appendChild(header); } if (typeof content !== "undefined") { var cnt = document.createElement("div"); cnt.className = "ytcenter-dialog-content"; cnt.appendChild(content); fgContent.appendChild(cnt); } footer = document.createElement("div"); footer.className = "ytcenter-dialog-footer"; fgContent.appendChild(footer); if (typeof actions !== "undefined") { /* Array * Object * label: "", * primary: false, # Should be the primary button. * callback: Function */ for (var i = 0; i < actions.length; i++) { var btn = document.createElement("button"); btn.setAttribute("type", "button"); btn.setAttribute("role", "button"); btn.setAttribute("onclick", ";return false;"); btn.className = "yt-uix-button " + (actions[i].primary ? "yt-uix-button-primary" : "yt-uix-button-default"); if (typeof actions[i].callback === "function") { ytcenter.utils.addEventListener(btn, "click", actions[i].callback, false); } var btnContent = document.createElement("span"); btnContent.className = "yt-uix-button-content"; btnContent.textContent = ytcenter.language.getLocale(actions[i].label); ytcenter.language.addLocaleElement(btnContent, actions[i].label, "@textContent"); btn.appendChild(btnContent); footer.appendChild(btn); if (actions[i].name) actionButtons[actions[i].name] = btn; } } else { // Default var closeBtn = document.createElement("button"); closeBtn.setAttribute("type", "button"); closeBtn.setAttribute("role", "button"); closeBtn.setAttribute("onclick", ";return false;"); closeBtn.className = "yt-uix-button yt-uix-button-default"; ytcenter.utils.addEventListener(closeBtn, "click", function(){ exports.setVisibility(false); }, false); var closeContent = document.createElement("span"); closeContent.className = "yt-uix-button-content"; closeContent.textContent = ytcenter.language.getLocale("DIALOG_CLOSE"); ytcenter.language.addLocaleElement(closeContent, "DIALOG_CLOSE", "@textContent"); closeBtn.appendChild(closeContent); footer.appendChild(closeBtn); actionButtons['close'] = btn; } exports.getActionButton = function(name){ return actionButtons[name]; }; exports.addEventListener = function(eventName, func){ if (!eventListeners.hasOwnProperty(eventName)) eventListeners[eventName] = []; eventListeners[eventName].push(func); return eventListeners[eventName].length - 1; }; exports.removeEventListener = function(eventName, index){ if (!eventListeners.hasOwnProperty(eventName)) return; if (index < 0 && index >= eventListeners[eventName].length) return; eventListeners[eventName].splice(index, 1); }; exports.setWidth = function(width){ fg.style.width = width; }; exports.getRoot = function(){ return root; }; exports.getBase = function(){ return base; }; exports.getContent = function(){ return cnt; }; exports.getFooter = function(){ return footer; }; exports.getHeader = function(){ return header; }; exports.setPureVisibility = function(visible){ if (visible) { if (!root.parentNode) document.body.appendChild(root); else { root.parentNode.removeChild(root); document.body.appendChild(root); } if (!bgOverlay.parentNode) document.body.appendChild(bgOverlay); else { bgOverlay.parentNode.removeChild(bgOverlay); document.body.appendChild(bgOverlay); } if (document.getElementById("player-api-legacy") || document.getElementById("player-api")) (document.getElementById("player-api-legacy") || document.getElementById("player-api")).style.visibility = "hidden"; } else { if (root.parentNode) root.parentNode.removeChild(root); if (bgOverlay.parentNode) bgOverlay.parentNode.removeChild(bgOverlay); if ((document.getElementById("player-api-legacy") || document.getElementById("player-api")) && !___parent_dialog) (document.getElementById("player-api-legacy") || document.getElementById("player-api")).style.visibility = ""; } }; exports.setFocus = function(focus){ if (!base) { con.error("[Dialog.setFocus] base element was not found!"); return; } if (focus) { base.style.zIndex = ""; } else { base.style.zIndex = "1998"; } }; exports.setVisibility = function(visible){ if (_visible === visible) return; _visible = visible; if (eventListeners["visibility"]) { for (var i = 0; i < eventListeners["visibility"].length; i++) { eventListeners["visibility"][i](visible); } } if (visible) { if (document.body) ytcenter.utils.addClass(document.body, "ytcenter-dialog-active"); ___parent_dialog = ytcenter._dialogVisible; if (___parent_dialog) { ___parent_dialog.setFocus(false); } exports.setPureVisibility(true); ytcenter._dialogVisible = exports; } else { exports.setPureVisibility(false); if (___parent_dialog) { ___parent_dialog.setFocus(true); ytcenter._dialogVisible = ___parent_dialog; } else { ytcenter._dialogVisible = null; if (document.body) ytcenter.utils.removeClass(document.body, "ytcenter-dialog-active"); } } }; return exports; }; ytcenter.dialogOverlay = function(){ var bg = document.createElement("div"); bg.id = "ytcenter-dialog-bg"; bg.className = "ytcenter-dialog-bg"; bg.style.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px"; bg.style.position = "absolute"; return bg; }; ytcenter.confirmBox = function(titleLabel, messageLabel, onConfirm, confirmLabel){ // Only being used for the resizeitemlist confirmLabel = confirmLabel || "EMBED_RESIZEITEMLIST_CONFIRM_DISCARD"; var msgElm = document.createElement("h3"); msgElm.style.fontWeight = "normal"; msgElm.textContent = ytcenter.language.getLocale(messageLabel); ytcenter.language.addLocaleElement(msgElm, messageLabel, "@textContent"); var dialog = ytcenter.dialog(titleLabel, msgElm, [ { label: "CONFIRM_CANCEL", primary: false, callback: function(){ try { onConfirm(false); dialog.setVisibility(false); } catch (e) { con.error(e); } } }, { label: confirmLabel, primary: true, callback: function(){ try { onConfirm(true); dialog.setVisibility(false); } catch (e) { con.error(e); } } } ]); dialog.setVisibility(true); }; ytcenter.welcome = (function(){ function update() { return ytcenter.utils.replaceText(ytcenter.language.getLocale("WELCOME_CONTENT"), { "{lb}": function(){ return document.createElement("br"); }, "{sectionbreak}": function(){ var c = document.createElement("div"); c.style.marginTop = "40px"; return c; }, "{img1}": img1, "{wiki-url}": wikilink, "{donate}": donatelink } ); } var a = {}, dialog, b = document.createElement("div"), img1 = document.createElement("div"), img1src = document.createElement("img"), wikilink = document.createElement("a"), donatelink = document.createElement("a"); img1.className = "ytcenter-image-welcome-settings-repeater"; img1src.className = "ytcenter-image-welcome-settings clearfix"; img1src.style.cssFloat = "right"; img1src.style.backgroundPosition = "right"; img1src.style.width = "100%"; img1src.src = "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; img1.appendChild(img1src); wikilink.href = "https://github.com/YePpHa/YouTubeCenter/wiki"; wikilink.setAttribute("target", "_blank"); donatelink.href = "https://github.com/YePpHa/YouTubeCenter/wiki/Donate"; donatelink.setAttribute("target", "_blank"); a.createDialog = function(){ if (dialog) return; donatelink.textContent = ytcenter.language.getLocale("WELCOME_CONTENT_DONATE"); ytcenter.language.addLocaleElement(donatelink, "WELCOME_CONTENT_DONATE", "@textContent"); wikilink.textContent = ytcenter.language.getLocale("WELCOME_CONTENT_WIKI"); ytcenter.language.addLocaleElement(wikilink, "WELCOME_CONTENT_WIKI", "@textContent"); ytcenter.events.addEvent("language-refresh", function(){ b.innerHTML = ""; b.appendChild(update()); }); b.appendChild(update()); dialog = ytcenter.dialog("WELCOME_TITLE", b, [ { label: "DIALOG_CLOSE", primary: false, callback: function(){ try { a.setLaunchStatus(true); a.setVisibility(false); } catch (e) { con.error(e); } } }, { label: "WELCOME_CONFIRM_SETTINGS", primary: true, callback: function(){ try { a.setLaunchStatus(true); a.setVisibility(false); if (!ytcenter.settingsPanelDialog) ytcenter.settingsPanelDialog = ytcenter.settingsPanel.createDialog(); ytcenter.settingsPanelDialog.setVisibility(true); } catch (e) { con.error(e); } } } ]); dialog.setWidth("530px"); }; a.setLaunchStatus = function(launch){ ytcenter.settings['welcome_launched'] = launch; ytcenter.saveSettings(); }; a.hasBeenLaunched = function(){ return ytcenter.settings['welcome_launched'] ? true : false; }; a.setVisibility = function(visible){ a.createDialog(); if (visible) { ytcenter.utils.addClass(document.body, "player-disable"); } else { ytcenter.utils.removeClass(document.body, "player-disable"); } dialog.setVisibility(visible); }; return a; })(); ytcenter.dragdrop = function(list){ function mousemove(e) { if (!dragging) return; if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } var target = e.target; if (e && e.type.indexOf("touched") !== -1 && e.changedTouches && e.changedTouches.length > 0 && e.changedTouches[0]) { e = e.changedTouches[0]; } var t = ytcenter.utils.toParent(target, "ytcenter-dragdrop-item"); if (t === draggingElement || t === document.body || typeof t === "undefined") return; var offset = ytcenter.utils.getOffset(target, t); var top = (typeof e.offsetY === "undefined" ? e.layerY : e.offsetY) + offset.top; if (top > t.clientHeight/2) { if (t.nextSibling === draggingElement) return; ytcenter.utils.insertAfter(draggingElement, t); } else { if (t.previousSibling === draggingElement) return; t.parentNode.insertBefore(draggingElement, t); } ytcenter.utils.each(listeners.onDragging, function(i, callback){ callback(getItemIndex(draggingElement) /* Current Index */, draggingIndex, draggingElement); }); return false; } function mousedownListener(e) { if (!ytcenter.utils.hasClass(e.target, "ytcenter-dragdrop-handle")) return; if (!ytcenter.utils.hasChild(list, e.target)) return; draggingElement = ytcenter.utils.toParent(e.target, "ytcenter-dragdrop-item"); if (typeof draggingElement === "undefined") return; dragging = true; ytcenter.utils.addClass(draggingElement, "ytcenter-dragdrop-dragging"); ytcenter.utils.addClass(list, "ytcenter-dragdrop-indragging"); ytcenter.utils.removeClass(list, "ytcenter-dragdrop-notdragging"); draggingIndex = getItemIndex(draggingElement); ytcenter.utils.each(listeners.onDrag, function(i, callback){ callback(draggingIndex, draggingElement); }); throttleFunc = ytcenter.utils.throttle(mousemove, 50); ytcenter.utils.addEventListener(document, "mousemove", throttleFunc, false); ytcenter.utils.addEventListener(document, "touchmove", throttleFunc, false); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function mouseupListener(e) { if (!dragging) return; dragging = false; ytcenter.utils.removeClass(draggingElement, "ytcenter-dragdrop-dragging"); ytcenter.utils.removeClass(list, "ytcenter-dragdrop-indragging"); ytcenter.utils.addClass(list, "ytcenter-dragdrop-notdragging"); ytcenter.utils.each(listeners.onDrop, function(i, callback){ callback(getItemIndex(draggingElement) /* Drop Index */, draggingIndex, draggingElement); }); if (throttleFunc) ytcenter.utils.removeEventListener(document, "mousemove", throttleFunc); if (throttleFunc) ytcenter.utils.removeEventListener(document, "touchmove", throttleFunc); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function getItemIndex(item) { for (var i = 0; i < list.children.length; i++) { if (list.children[i] === item) return i; } return -1; } var dragging = false; var draggingElement; var draggingIndex; var offset; var listeners = { onDrag: [], onDragging: [], onDrop: [] }; var throttleFunc = null; ytcenter.utils.addClass(list, "ytcenter-dragdrop-notdragging"); ytcenter.utils.addEventListener(list, "mousedown", mousedownListener); ytcenter.utils.addEventListener(document, "mouseup", mouseupListener); ytcenter.utils.addEventListener(list, "touchstart", mousedownListener); ytcenter.utils.addEventListener(document, "touchend", mouseupListener); return { addEventListener: function(event, callback){ if (typeof listeners[event] === "undefined") listeners[event] = []; listeners[event].push(callback); } }; }; ytcenter.style = {}; ytcenter.style.update = function(){ var containerWidth = 985, guideWidth = 175, guideOffset = 10, contentWidth = 640, sidebarOffset = 0; var pageWidth = containerWidth + 2*(guideWidth + guideOffset), sidebarWidth = containerWidth - contentWidth - sidebarOffset; // @media and screen (max-width: ...){...} }; ytcenter.listeners = (function(){ var exports = {}; exports.addEvent = function(elm, event, callback, useCapture){ if (elm.addEventListener) { elm.addEventListener(event, callback, useCapture || false); } else if (elm.attachEvent) { elm.attachEvent("on" + event, callback); } }; return exports; })(); ytcenter.gui = {}; ytcenter.gui.icons = {}; ytcenter.gui.icons.cog = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAFM0aXcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAu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+v//P8OqVatcmVavXt3JwMDwGAAAAP//Yvr//z/D////GZhWr179f/Xq1RMBAAAA//9igqr5D8WKTAwQ0MPAwPCEgYGhBwAAAP//TMtBEUBQAAXA9ZsII8IrIIQOBHF5EdwU42TGffcT+/8e2No+MLAmmaDtMnC3PTEnuV4AAAD//zTOQRGCUAAG4YWrCbxSwQzYYDt452AGHCKQ4H9gAYNwcsabMeDyKLD7nY01SZfkn2ROMiV5n80euABf9VoFA3ArpYyt+gEe9bEDW6Uu6rMFUH8VcgdeaqMOAAcZZIiDMBQE0cdv0jQhQREMGDRB9B5Ihssguc2OhHsg4ACoKhQgSIPAbDGsG7GZee/HHhFVRByHPPRPbJ+BGbCxPU5HdQHewBrosvMFXCX1BTgAVQ4ZAXdgZftWgB3/9wRcJC3T8jaRpulgX2zXwAKY51cDXICmSOqTrQNOwEdSK+nxZZJ8VSIKoyD+24uw3CAIYhAEBZNdbK6r0ShM9AH2abRpNwhnwEfQVaPYDQZBk4KIZTX4p8wut33nMMw3Z2a6d/aqqp93W1WvSfm4gxlUVTvzIfYOgF/gy/ZzrF6KjJHtx+i9Bu5st9MeIOkGWAO+o38VuAJOgTdgPUQXwCYwB9DYHof1CegHdChpT9JI0gpwm/0BMAE+bY8bSUNgPil9BHRm+9L2ie0XYDv7+5jXkzScNv4HOAcWMr8Du6nccn5+SB//4tHs5gmwBeyEdRE46hDtS9pIhk084n8AVJscCePQvIsAAAAASUVORK5CYII="; ytcenter.gui.createMiddleAlignHack = function(content){ var e = document.createElement("div"), a = document.createElement("span"); a.className = "yt-dialog-align"; content.style.verticalAlign = "middle"; content.style.display = "inline-block"; e.appendChild(a); e.appendChild(content); return e; }; ytcenter.gui.createYouTubeButtonIcon = function(src){ var wrapper = document.createElement("span"); wrapper.className = "yt-uix-button-icon-wrapper"; var img = document.createElement("img"); img.src = src; img.alt = ""; img.style.marginLeft = "3px"; wrapper.appendChild(img); return wrapper; }; ytcenter.gui.createYouTubeButtonArrow = function(){ var img = document.createElement("img"); img.className = "yt-uix-button-arrow"; img.src = "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"; img.alt = ""; return img; }; ytcenter.gui.createYouTubeTextInput = function(){ var elm = document.createElement("input"); elm.setAttribute("type", "text"); elm.className = "yt-uix-form-input-text"; return elm; }; ytcenter.gui.createYouTubeCheckBox = function(selected){ if (typeof selected === "undefined") selected = false; var cw = document.createElement("span"); cw.className = "yt-uix-form-input-checkbox-container" + (selected ? " checked" : ""); cw.style.height = "auto"; var checkbox = document.createElement("input"); checkbox.setAttribute("type", "checkbox"); checkbox.setAttribute("value", "true"); checkbox.className = "yt-uix-form-input-checkbox"; if (selected) checkbox.checked = true; var elm = document.createElement("span"); elm.className = "yt-uix-form-input-checkbox-element"; cw.appendChild(checkbox); cw.appendChild(elm); return cw; }; ytcenter.gui.createYouTubeButtonText = function(text){ var wrapper = document.createElement("span"); wrapper.className = "yt-uix-button-content"; wrapper.textContent = text; return wrapper; }; ytcenter.gui.createYouTubeButtonTextLabel = function(label){ var wrapper = document.createElement("span"); wrapper.className = "yt-uix-button-content"; wrapper.textContent = ytcenter.language.getLocale(label); ytcenter.language.addLocaleElement(wrapper, label, "@textContent"); return wrapper; }; ytcenter.gui.createYouTubeButton = function(title, content, styles){ var btn = document.createElement("button"); if (typeof title === "string" && title !== "") { btn.setAttribute("title", ytcenter.language.getLocale(title)); ytcenter.language.addLocaleElement(btn, title, "title"); } btn.setAttribute("role", "button"); btn.setAttribute("type", "button"); btn.setAttribute("onclick", ";return false;"); btn.className = "yt-uix-tooltip-reverse yt-uix-button yt-uix-button-text yt-uix-tooltip"; if (typeof styles !== "undefined") { for (var key in styles) { if (styles.hasOwnProperty(key)) { btn.style[key] = styles[key]; } } } for (var i = 0; i < content.length; i++) { btn.appendChild(content[i]); } return btn; }; ytcenter.gui.createYouTubeDefaultButton = function(title, content, styles){ var btn = document.createElement("button"); if (title !== "") { btn.setAttribute("title", ytcenter.language.getLocale(title)); ytcenter.language.addLocaleElement(btn, title, "title"); } btn.setAttribute("role", "button"); btn.setAttribute("type", "button"); btn.setAttribute("onclick", ";return false;"); btn.className = "yt-uix-button yt-uix-button-default yt-uix-tooltip"; if (typeof styles !== "undefined") { for (var key in styles) { if (styles.hasOwnProperty(key)) { btn.style[key] = styles[key]; } } } for (var i = 0; i < content.length; i++) { btn.appendChild(content[i]); } return btn; }; ytcenter.gui.createYouTubePrimaryButton = function(title, content, styles){ var btn = document.createElement("button"); if (title !== "") { btn.setAttribute("title", ytcenter.language.getLocale(title)); ytcenter.language.addLocaleElement(btn, title, "title"); } btn.setAttribute("role", "button"); btn.setAttribute("type", "button"); btn.setAttribute("onclick", ";return false;"); btn.setAttribute("class", "yt-uix-tooltip-reverse yt-uix-button yt-uix-button-primary yt-uix-tooltip"); if (typeof styles !== "undefined") { for (var key in styles) { if (styles.hasOwnProperty(key)) { btn.style[key] = styles[key]; } } } for (var i = 0; i < content.length; i++) { btn.appendChild(content[i]); } return btn; }; ytcenter.gui.createYouTubeButtonGroup = function(buttons){ // <span style="margin: 0px 4px 0px 0px;" class="yt-uix-button-group yt-uix-tooltip-reverse"> start end var wrapper = document.createElement("span"); wrapper.className = "yt-uix-button-group"; for (var i = 0; i < buttons.length; i++) { if (i == 0) { ytcenter.utils.addClass(buttons[i], "start"); } else { ytcenter.utils.removeClass(buttons[i], "start"); } if (i === buttons.length-1) { ytcenter.utils.addClass(buttons[i], "end"); } else { ytcenter.utils.removeClass(buttons[i], "end"); } wrapper.appendChild(buttons[i]); } return wrapper; }; ytcenter.gui.createYouTubeGuideHelpBoxAfter = function(){ var after = document.createElement("div"); after.className = "after"; return after; }; ytcenter.gui.createMask = function(zIndex){ zIndex = zIndex || "4"; var iframe = document.createElement("iframe"); iframe.setAttribute("frameborder", "0"); iframe.setAttribute("src", ""); iframe.style.position = "absolute"; iframe.style.top = "0px"; iframe.style.left = "0px"; iframe.style.width = "100%"; iframe.style.height = "100%"; iframe.style.overflow = "hidden"; iframe.style.zIndex = zIndex; return iframe; }; ytcenter.listeners = (function(){ var exports = {}; exports.addEvent = function(elm, event, callback, useCapture){ if (elm.addEventListener) { elm.addEventListener(event, callback, useCapture || false); } else if (elm.attachEvent) { elm.attachEvent("on" + event, callback); } }; return exports; })(); ytcenter.modules = {}; ytcenter.modules.layoutExperiments = function(option){ function loadExperiments() { loadedOnce = true; setButtonStatus(1); ytcenter.utils.xhr({ method: "GET", url: "https://raw.github.com/YePpHa/YouTubeCenter/master/data/ytexperiments.json", ignoreCache: true, headers: { "Content-Type": "text/plain" }, onload: function(response){ try { var data = JSON.parse(response.responseText); ytcenter.settings[option.defaultSetting] = data; ytcenter.saveSettings(); setButtonStatus(2); setStatus("Updated"); update(); } catch (e) { con.error(e); setButtonStatus(3); setStatus("error"); } }, onerror: function(){ setButtonStatus(3); setStatus("error"); } }); } function setButtonStatus(status) { if (setButtonStatusTimer) uw.clearTimeout(setButtonStatusTimer); if (status === 0) { updateButton.setText("MODULES_YTEXPERIMENTS_UPDATELIST"); updateButton.setEnabled(true); } else if (status === 1) { updateButton.setText("MODULES_YTEXPERIMENTS_UPDATINGLIST"); updateButton.setEnabled(false); } else if (status === 2) { updateButton.setText("MODULES_YTEXPERIMENTS_UPDATEDLIST"); updateButton.setEnabled(true); setButtonStatusTimer = uw.setTimeout(function(){ setButtonStatus(0); }, 2500); } else if (status === 3) { updateButton.setText("MODULES_YTEXPERIMENTS_UPDATELISTERROR"); updateButton.setEnabled(true); } } function createText(data, replace) { function getText() { if (data.locale) { return ytcenter.language.getLocale(data.locale) || data.raw; } else if (data.raw_locales) { if (data.raw_locales[language]) { return data.raw_locales[language]; } else { return data.raw_locales["en-US"] || data.raw; } } else if (data.raw) { return data.raw; } } var node = document.createTextNode((replace ? ytcenter.utils.replaceTextToText(getText(), replace) : getText())); unloadEventList.push(ytcenter.events.addEvent("language-refresh", function(){ node.textContent = (replace ? ytcenter.utils.replaceTextToText(getText(), replace) : getText()); })); return node; } function createListItem(data) { var wrapper = document.createElement("li"); wrapper.className = "clearfix"; if (data.preview) { var previewWrapper = document.createElement("div"), redirectElm = document.createElement("a"), img = document.createElement("img"), src = ""; if (ytcenter.utils.isArray(data.preview)) { if (data.preview.length > 0) { var rand = Math.floor(Math.random()*data.preview.length); src = data.preview[rand]; } } else { src = data.preview; } redirectElm.href = src; redirectElm.setAttribute("target", "_blank"); img.src = src; previewWrapper.className = "layoutExperimentPreview"; redirectElm.appendChild(img); previewWrapper.appendChild(redirectElm); wrapper.appendChild(previewWrapper); } var content = document.createElement("div"); content.className = "layoutExperimentContent"; if (data.description) { var descriptionWrapper = document.createElement("div"), descriptionTitle = document.createElement("h3"), descriptionContent = document.createElement("span"); descriptionWrapper.className = "layoutExperimentDescription"; descriptionTitle.textContent = ytcenter.language.getLocale("MODULES_YTEXPERIMENTS_DESCRIPTION"); // Raw: Description unloadEventList.push(ytcenter.events.addEvent("language-refresh", function(){ descriptionTitle.textContent = ytcenter.language.getLocale("MODULES_YTEXPERIMENTS_DESCRIPTION"); })); descriptionContent.appendChild(createText(data.description)); descriptionWrapper.appendChild(descriptionTitle); descriptionWrapper.appendChild(descriptionContent); content.appendChild(descriptionWrapper); } if (data.features) { var featuresWrapper = document.createElement("div"), featuresTitle = document.createElement("h3"), featuresContent = document.createElement("ul"); featuresWrapper.className = "layoutExperimentFeatures"; featuresContent.className = "layoutExperimentFeaturesList"; featuresTitle.textContent = ytcenter.language.getLocale("MODULES_YTEXPERIMENTS_FEATURES"); // Raw: Description unloadEventList.push(ytcenter.events.addEvent("language-refresh", function(){ featuresTitle.textContent = ytcenter.language.getLocale("MODULES_YTEXPERIMENTS_FEATURES"); })); featuresWrapper.appendChild(featuresTitle); var i; for (i = 0; i < data.features.length; i++) { var item = document.createElement("li"); item.appendChild(createText(data.features[i])); featuresContent.appendChild(item); } featuresWrapper.appendChild(featuresContent); content.appendChild(featuresWrapper); } if (data.screenshots) { var screenshotsWrapper = document.createElement("div"); screenshotsWrapper.className = "layoutExperimentScreenshots"; var i; for (i = 0; i < data.screenshots.length; i++) { var screenshot = document.createElement("a"); screenshot.href = data.screenshots[i]; screenshot.setAttribute("target", "_blank"); screenshot.appendChild(createText({ locale: "MODULES_YTEXPERIMENTS_SCREENSHOTS" }, { "{number}": i + 1 })); screenshotsWrapper.appendChild(screenshot); } content.appendChild(screenshotsWrapper); } if (data.date) { // data = { expires: some data, created/started: some date } } if (data.codes) { var codesWrapper = document.createElement("div"), codesButton = ytcenter.modules.button({ args: { text: "MODULES_YTEXPERIMENTS_CODES_SELECT", listeners: [ { event: "click", callback: function(){ applyCookieCode(data.codes[0]); } } ] } }); codesWrapper.className = "layoutExperimentCodes"; codesWrapper.appendChild(codesButton.element); if (content.children.length > 0) { content.lastChild.className += " layoutExperimentPad"; } content.appendChild(codesWrapper); } wrapper.appendChild(content); return wrapper; } function update() { var i; unloadEvents(); // Unloading events list.innerHTML = ""; // Clearing the list if (ytcenter.settings[option.defaultSetting].length === 0) { var listItem = document.createElement("li"); listItem.className = "empty"; listItem.textContent = ytcenter.language.getLocale("MODULES_YTEXPERIMENTS_EMPTY"); // Raw: Description unloadEventList.push(ytcenter.events.addEvent("language-refresh", function(){ listItem.textContent = ytcenter.language.getLocale("MODULES_YTEXPERIMENTS_EMPTY"); })); list.appendChild(listItem); } else { for (i = 0; i < ytcenter.settings[option.defaultSetting].length; i++) { list.appendChild(createListItem(ytcenter.settings[option.defaultSetting][i])); } } } function unloadEvents() { var i; for (i = 0; i < unloadEventList.length; i++) { ytcenter.events.removeEvent(unloadEventList[i][0], unloadEventList[i][1]); } unloadEventList = []; } function setStatus(text) { } function applyCookieCode(code) { ytcenter.utils.setCookie("VISITOR_INFO1_LIVE", code, ".youtube.com", "/", 3600*60*24*30); loc.reload(); } function init() { var headerWrapper = document.createElement("div"), setCodeWrapper = document.createElement("div"); updateButton.element.className += " layoutExperimentsHeaderUpdateListButton"; setCodeWrapper.className = "layoutExperimentsHeaderSetCodeButton"; setButtonInput.style.width = "85px"; setButtonInput.style.height = "15px"; setButtonInput.style.verticalAlign = "middle"; setButtonInput.value = ytcenter.utils.getCookie("VISITOR_INFO1_LIVE"); setCodeWrapper.appendChild(setButton.element); setCodeWrapper.appendChild(setButtonInput); headerWrapper.appendChild(setCodeWrapper); headerWrapper.appendChild(updateButton.element); elm.className = "ytcenter-modules-layoutExperiments"; headerWrapper.className = "layoutExperimentsHeader clearfix"; list.className = "layoutExperimentList"; elm.appendChild(headerWrapper); elm.appendChild(list); } var elm = document.createElement("div"), list = document.createElement("ul"), updateButton = ytcenter.modules.button({ args: { text: "MODULES_YTEXPERIMENTS_UPDATELIST", listeners: [ { event: "click", callback: function(){ loadExperiments(); } } ] } }), setButton = ytcenter.modules.button({ args: { text: "MODULES_YTEXPERIMENTS_SETCODE", listeners: [ { event: "click", callback: function(){ applyCookieCode(setButtonInput.value); } } ] } }), setButtonInput = ytcenter.gui.createYouTubeTextInput(), unloadEventList = [], setButtonStatusTimer = null, loadedOnce = false; init(); update(); return { element: elm, bind: function(){}, update: function(){ update(); }, loadExperiments: function(){ loadExperiments(); }, hasLoadedOnce: function(){ return loadedOnce; } }; }; ytcenter.modules.aboutText = function(option){ var elm = document.createElement("div"), content1 = document.createElement("div"); content1.textContent = ytcenter.language.getLocale("SETTINGS_ABOUT_COPYRIGHTS"); elm.appendChild(content1); elm.appendChild(document.createElement("br")); elm.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("SETTINGS_ABOUT_TEXT"), { "{email}": function(){ var a = document.createElement("a"); a.href = "mailto:jepperm@gmail.com"; a.textContent = "jepperm@gmail.com"; return a; }, "{lb}": function(){ return document.createElement("br"); } })); ytcenter.events.addEvent("language-refresh", function(){ elm.innerHTML = ""; content1 = document.createElement("div"); content1.textContent = ytcenter.language.getLocale("SETTINGS_ABOUT_COPYRIGHTS"); elm.appendChild(content1); elm.appendChild(document.createElement("br")); elm.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("SETTINGS_ABOUT_TEXT"), { "{email}": function(){ var a = document.createElement("a"); a.href = "mailto:jepperm@gmail.com"; a.textContent = "jepperm@gmail.com"; return a; }, "{lb}": function(){ return document.createElement("br"); } })); }); return { element: elm, bind: function(){}, update: function(){} }; }; ytcenter.modules.bool = function(option){ function update(checked) { checkboxInput.checked = checked; if (checked) { ytcenter.utils.addClass(checkboxOuter, "checked"); } else { ytcenter.utils.removeClass(checkboxOuter, "checked"); } } function bind(callback) { boundCallback = callback; } var boundCallback = null, frag = document.createDocumentFragment(), checkboxOuter = document.createElement("span"), checkboxInput = document.createElement("input"), checkboxOverlay = document.createElement("span"), checked = ytcenter.settings[option.defaultSetting]; if (typeof checked !== "boolean") checked = false; // Just to make sure it's a boolean! checkboxOuter.className = "yt-uix-form-input-checkbox-container" + (checked ? " checked" : ""); checkboxInput.className = "yt-uix-form-input-checkbox"; checkboxOverlay.className = "yt-uix-form-input-checkbox-element"; checkboxInput.checked = checked; checkboxInput.setAttribute("type", "checkbox"); checkboxInput.setAttribute("value", checked); checkboxOuter.appendChild(checkboxInput); checkboxOuter.appendChild(checkboxOverlay); ytcenter.utils.addEventListener(checkboxOuter, "click", function(){ checked = !checked; if (checked) { ytcenter.utils.addClass(checkboxOuter, "checked"); checkboxInput.checked = true; } else { ytcenter.utils.removeClass(checkboxOuter, "checked"); checkboxInput.checked = false; } checkboxInput.setAttribute("value", checked); if (boundCallback) boundCallback(checked); if (option && option.args && option.args.listeners) { for (var i = 0; i < option.args.listeners.length; i++) { if (option.args.listeners[i].event === "click") option.args.listeners[i].callback.apply(this, arguments); } } }, false); frag.appendChild(checkboxOuter); return { element: frag, bind: bind, update: update }; }; ytcenter.modules.button = function(option){ var elm = document.createElement("button"), languageListener = null, localeText = null; elm.setAttribute("type", "button"); elm.setAttribute("role", "button"); elm.setAttribute("onclick", ";return false;"); elm.className = "yt-uix-button yt-uix-button-default"; var c = document.createElement("span"); c.className = "yt-uix-button-content"; if (option && option.args && option.args.text) { localeText = option.args.text; c.textContent = ytcenter.language.getLocale(localeText); languageListener = ytcenter.events.addEvent("language-refresh", function(){ c.textContent = ytcenter.language.getLocale(localeText); }); } if (option && option.args && option.args.listeners) { for (var j = 0; j < option.args.listeners.length; j++) { elm.addEventListener(option.args.listeners[j].event, option.args.listeners[j].callback, (option.args.listeners[j].bubble ? option.args.listeners[j].bubble : false)); } } if (option && option.args && option.args.style) { for (var key in option.args.style) { if (option.args.style.hasOwnProperty(key)) { elm.style[key] = option.args.style[key]; } } } elm.appendChild(c); return { element: elm, bind: function(){}, update: function(){}, addEventListener: function(event, callback, bubble){ elm.addEventListener(event, callback, bubble); }, removeEventListener: function(event, callback, bubble){ elm.removeEventListener(event, callback, bubble); }, setText: function(text){ localeText = text; c.textContent = ytcenter.language.getLocale(localeText); if (!languageListener) { languageListener = ytcenter.events.addEvent("language-refresh", function(){ c.textContent = ytcenter.language.getLocale(localeText); }) } }, setStyle: function(key, value){ elm.style[key] = value; }, setEnabled: function(enabled){ elm.disabled = !enabled; } }; }; ytcenter.modules.checkbox = function(selected){ selected = selected || false; var wrapper = document.createElement("span"); wrapper.className = "ytcenter-embed"; var cw = document.createElement("span"); cw.className = "yt-uix-form-input-checkbox-container" + (selected ? " checked" : ""); var checkbox = document.createElement("input"); checkbox.setAttribute("type", "checkbox"); checkbox.setAttribute("value", "true"); checkbox.className = "yt-uix-form-input-checkbox"; if (selected) checkbox.checked = true; var elm = document.createElement("span"); elm.className = "yt-uix-form-input-checkbox-element"; cw.appendChild(checkbox); cw.appendChild(elm); wrapper.appendChild(cw); return { element: wrapper, // So the element can be appended to an element. bind: function(callback){ ytcenter.utils.addEventListener(checkbox, "change", function(){ callback(ytcenter.utils.hasClass(cw, "checked")); }, false); }, update: function(value){ if (value === true) { ytcenter.utils.addClass(cw, "checked"); checkbox.checked = true; } else { ytcenter.utils.removeClass(cw, "checked"); checkbox.checked = false; } }, fixHeight: function(){ cw.style.height = "auto"; }, isSelected: function(){ return checkbox.checked; } }; }; ytcenter.modules.colorpicker = function(option){ function update() { wrapper.style.background = ytcenter.utils.colorToHex(red, green, blue); currentColor.style.background = ytcenter.utils.colorToHex(red, green, blue); redRange.update(red); greenRange.update(green); blueRange.update(blue); htmlColor.update(ytcenter.utils.colorToHex(red, green, blue)); } function updateHueRange() { if (Math.max(red, green, blue) !== Math.min(red, green, blue)) { hsv = ytcenter.utils.getHSV(red, green, blue); hueRange.update(hsv.hue); } else { var __hsv = ytcenter.utils.getHSV(red, green, blue); if (hsv.value > hsv.saturation) { hsv.saturation = __hsv.saturation; } else if (hsv.value < hsv.saturation) { hsv.value = __hsv.value; } else { hsv.saturation = __hsv.saturation; hsv.value = __hsv.value; } hueRange.update(hsv.hue); } } function updateColorField() { if (Math.max(red, green, blue) !== Math.min(red, green, blue)) { hsv = ytcenter.utils.getHSV(red, green, blue); hueRangeField.update(hsv.hue, hsv.saturation, hsv.value); } else { var __hsv = ytcenter.utils.getHSV(red, green, blue); if (hsv.value > hsv.saturation) { hsv.saturation = __hsv.saturation; } else if (hsv.value < hsv.saturation) { hsv.value = __hsv.value; } else { hsv.saturation = __hsv.saturation; hsv.value = __hsv.value; } hueRangeField.update(hsv.hue, hsv.saturation, hsv.value); } } var red = 0, green = 0, blue = 0, sessionHex = "#000000", hsv = ytcenter.utils.getHSV(red, green, blue), _hue = hsv.hue, bCallback, wrapper = document.createElement("span"), redRange = ytcenter.modules.range({ args: { value: red, min: 0, max: 255 } }), greenRange = ytcenter.modules.range({ args: { value: green, min: 0, max: 255 } }), blueRange = ytcenter.modules.range({ args: { value: blue, min: 0, max: 255 } }), rWrapper = document.createElement("div"), rText = ytcenter.modules.label({label: "COLORPICKER_COLOR_RED"}), gWrapper = document.createElement("div"), gText = ytcenter.modules.label({label: "COLORPICKER_COLOR_GREEN"}), bWrapper = document.createElement("div"), bText = ytcenter.modules.label({label: "COLORPICKER_COLOR_BLUE"}), hueWrapper = document.createElement("div"), hueRangeField = ytcenter.modules.colorPickerField(), rgb, hueRangeHandle = document.createElement("div"), hueRangeHandleRight = document.createElement("div"), hueRange = ytcenter.modules.range({ args: { value: hsv.hue, min: 0, max: 360, method: "vertical", handle: hueRangeHandle, offset: 7 } }), d1, d2, d3, d4, d5, d6, hWrapper = document.createElement("div"), htmlColorLabel = ytcenter.utils.wrapModule(ytcenter.modules.label({label: "COLORPICKER_COLOR_HTMLCODE"})), htmlColor = ytcenter.modules.textfield(), currentColor = document.createElement("span"), rgbWrapper = document.createElement("div"), cpWrapper = document.createElement("div"), dialog; wrapper.className += " ytcenter-modules-colorpicker"; redRange.bind(function(value){ red = value; update(); updateColorField(); updateHueRange(); }); greenRange.bind(function(value){ green = value; update(); updateColorField(); updateHueRange(); }); blueRange.bind(function(value){ blue = value; update(); updateColorField(); updateHueRange(); }); rWrapper.appendChild(rText.element); rWrapper.appendChild(redRange.element); gWrapper.appendChild(gText.element); gWrapper.appendChild(greenRange.element); bWrapper.appendChild(bText.element); bWrapper.appendChild(blueRange.element); hueWrapper.className += " ytcenter-modules-colorpicker-huewrapper"; hueRangeField.bind(function(saturation, value){ hsv.saturation = saturation; hsv.value = value; rgb = ytcenter.utils.getRGB(hsv.hue, hsv.saturation, hsv.value); red = rgb.red; green = rgb.green; blue = rgb.blue; update(); }); hueRangeField.element.className += " ytcenter-modules-colorpickerfield-hue"; hueRangeHandle.className += " ytcenter-modules-range-handle"; hueRangeHandleRight.className += " ytcenter-modules-range-handle-right"; hueRangeHandle.appendChild(hueRangeHandleRight); hueRange.element.className += " ytcenter-modules-huerange ytcenter-modules-hue"; d1 = document.createElement("div"); d1.className = "ie-1"; d2 = document.createElement("div"); d2.className = "ie-2"; d3 = document.createElement("div"); d3.className = "ie-3"; d4 = document.createElement("div"); d4.className = "ie-4"; d5 = document.createElement("div"); d5.className = "ie-5"; d6 = document.createElement("div"); d6.className = "ie-6"; hueRange.element.appendChild(d1); hueRange.element.appendChild(d2); hueRange.element.appendChild(d3); hueRange.element.appendChild(d4); hueRange.element.appendChild(d5); hueRange.element.appendChild(d6); hueRange.bind(function(value){ hsv.hue = value; rgb = ytcenter.utils.getRGB(hsv.hue, hsv.saturation, hsv.value); red = rgb.red; green = rgb.green; blue = rgb.blue; update(); updateColorField(); }); hWrapper.className += " ytcenter-modules-hwrapper"; htmlColorLabel.className += " ytcenter-modules-htmlcolorlabel"; htmlColor.bind(function(value){ rgb = ytcenter.utils.hexToColor(value); red = rgb.red; green = rgb.green; blue = rgb.blue; hsv = ytcenter.utils.getHSV(red, green, blue); update(); updateColorField(); updateHueRange(); }); htmlColor.element.className += " ytcenter-modules-htmlcolor"; currentColor.className += " ytcenter-modules-currentcolor"; currentColor.style.background = sessionHex; htmlColor.element.appendChild(currentColor); hWrapper.appendChild(htmlColorLabel); hWrapper.appendChild(htmlColor.element); rgbWrapper.className += " ytcenter-modules-rgbwrapper"; rgbWrapper.appendChild(rWrapper); rgbWrapper.appendChild(gWrapper); rgbWrapper.appendChild(bWrapper); rgbWrapper.appendChild(hWrapper); if (option && option.args && option.args.presetColors && option.args.presetColors.length > 0) { var presets = document.createElement("div"), presetsLabel = ytcenter.utils.wrapModule(ytcenter.modules.label({label: "COLORPICKER_PRESETS"})), i, color; presets.className = "ytcenter-colorpicker-presets clearfix"; presetsLabel.className = "ytcenter-colorpicker-presets-label"; presets.appendChild(presetsLabel); for (i = 0; i < option.args.presetColors.length; i++) { color = document.createElement("div"); color.className = "ytcenter-colorpicker-presets-color"; color.style.background = option.args.presetColors[i]; ytcenter.utils.addEventListener(color, "click", (function(bgcolor){ return function(){ rgb = ytcenter.utils.hexToColor(bgcolor); red = rgb.red; green = rgb.green; blue = rgb.blue; hsv = ytcenter.utils.getHSV(red, green, blue); update(); updateColorField(); updateHueRange(); }; })(option.args.presetColors[i]), false); presets.appendChild(color); } rgbWrapper.appendChild(presets); } hueWrapper.appendChild(hueRangeField.element); hueWrapper.appendChild(hueRange.element); cpWrapper.className += " ytcenter-modules-cpwrapper"; cpWrapper.appendChild(hueWrapper); cpWrapper.appendChild(rgbWrapper); dialog = ytcenter.dialog("COLORPICKER_TITLE", cpWrapper, [ { label: "COLORPICKER_CANCEL", primary: false, callback: function(){ rgb = ytcenter.utils.hexToColor(sessionHex); red = rgb.red; green = rgb.green; blue = rgb.blue; update(); updateColorField(); updateHueRange(); ytcenter.events.performEvent("ui-refresh"); dialog.setVisibility(false); } }, { label: "COLORPICKER_SAVE", primary: true, callback: function(){ ytcenter.events.performEvent("ui-refresh"); sessionHex = ytcenter.utils.colorToHex(red, green, blue); if (bCallback) bCallback(sessionHex); dialog.setVisibility(false); } } ]); ytcenter.utils.addEventListener(wrapper, "click", function(){ dialog.setVisibility(true); ytcenter.events.performEvent("ui-refresh"); ytcenter.events.performEvent("settings-update"); update(); }); update(); updateColorField(); updateHueRange(); return { element: wrapper, bind: function(callback){ bCallback = callback; }, update: function(value){ sessionHex = value; rgb = ytcenter.utils.hexToColor(sessionHex); red = rgb.red; green = rgb.green; blue = rgb.blue; update(); updateColorField(); updateHueRange(); //ytcenter.events.performEvent("ui-refresh"); } }; }; ytcenter.modules.colorPickerField = function(option){ function update() { var x = sat/100*wrapper.clientWidth, y = (100 - val)/100*wrapper.clientHeight; handler.style.top = Math.round(y - handler.offsetHeight/2) + "px"; if (ytcenter.ltr) { handler.style.left = Math.round(x - handler.offsetWidth/2) + "px"; } else { handler.style.right = Math.round(wrapper.clientWidth - x - handler.offsetWidth/2) + "px"; } } function updateBackground() { wrapper.style.background = ytcenter.utils.hsvToHex(hue, 100, 100); } function eventToValue(e) { if (e && e.type.indexOf("touched") !== -1 && e.changedTouches && e.changedTouches.length > 0 && e.changedTouches[0]) { e = e.changedTouches[0]; } var offset = ytcenter.utils.getOffset(wrapper), scrollOffset = ytcenter.utils.getScrollOffset(), x = Math.max(0, Math.min(e.pageX - offset.left - scrollOffset.left, wrapper.clientWidth)), y = e.pageY - offset.top - scrollOffset.top; if (y < 0) y = 0; if (y > wrapper.clientHeight) y = wrapper.clientHeight; sat = x/wrapper.clientWidth*100; val = 100 - y/wrapper.clientHeight*100; } function mousemove(e) { if (!mousedown) return; eventToValue(e); update(); if (bCallback) bCallback(sat, val); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function mousedownListener(e) { if (mousedown) return; mousedown = true; eventToValue(e); update(); if (bCallback) bCallback(sat, val); throttleFunc = ytcenter.utils.throttle(mousemove, 50); ytcenter.utils.addEventListener(document, "mousemove", throttleFunc, false); ytcenter.utils.addEventListener(document, "touchmove", throttleFunc, false); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function mouseupListener(e) { if (!mousedown) return; mousedown = false; if (throttleFunc) ytcenter.utils.removeEventListener(document, "mousemove", throttleFunc, false); if (throttleFunc) ytcenter.utils.removeEventListener(document, "touchmove", throttleFunc, false); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } var bCallback, hue = (option && option.args && option.args.hue) || 0, sat = (option && option.args && option.args.sat) || 0, val = (option && option.args && option.args.val) || 0, wrapper = document.createElement("div"), _sat = document.createElement("div"), _value = document.createElement("div"), handler = document.createElement("div"), mousedown = false, throttleFunc = null; wrapper.style.background = ytcenter.utils.hsvToHex(hue, 100, 100); wrapper.style.position = "relative"; // CLASS!! wrapper.style.overflow = "hidden"; // CLASS!! _sat.className = "ytcenter-modules-colorpicker-saturation"; _value.className = "ytcenter-modules-colorpicker-value"; _sat.appendChild(_value); wrapper.appendChild(_sat); handler.className = "ytcenter-modules-colorpicker-handler"; wrapper.appendChild(handler); ytcenter.utils.addEventListener(wrapper, "mousedown", mousedownListener); ytcenter.utils.addEventListener(document, "mouseup", mouseupListener); ytcenter.utils.addEventListener(wrapper, "touchstart", mousedownListener); ytcenter.utils.addEventListener(document, "touchend", mouseupListener); /*throttleFunc = ytcenter.utils.throttle(mousemove, 50); ytcenter.utils.addEventListener(document, "mousemove", throttleFunc, false);*/ ytcenter.events.addEvent("settings-update", function(){ update(); updateBackground(); }); update(); updateBackground(); return { element: wrapper, bind: function(callback){ bCallback = callback; }, update: function(h, s, v){ hue = h; sat = s; val = v; update(); updateBackground(); } }; }; ytcenter.modules.defaultplayersizedropdown = function(option){ function getItemTitle(item) { try { var dim = ytcenter.utils.calculateDimensions(item.config.width, item.config.height); if (typeof item.config.customName !== "undefined" && item.config.customName !== "") { return item.config.customName; } else if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { return (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")); } else { return dim[0] + "×" + dim[1]; } } catch (e) { con.error(e); } } function getItemSubText(item) { try{ if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { return (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.config.scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } else { return (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")) + " - " + (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.config.scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } }catch(e){con.error(e)} } function setValue(id) { selectedId = id; if (selectedId === "default") { btnLabel.textContent = ytcenter.language.getLocale("SETTINGS_RESIZE_DEFAULTPLAYERSIZE_DEFAULT"); } else { var item; ytcenter.utils.each(items, function(i, val){ if (val.id !== selectedId) return; item = val; return false; }); btnLabel.textContent = getItemTitle(item); } } function defaultItem(db) { if (typeof selectedId === "undefined") setValue("default"); if ("default" === selectedId) { setValue("default"); } var li = document.createElement("li"); li.setAttribute("role", "menuitem"); var span = document.createElement("span"); db.push(span); span.className = "yt-uix-button-menu-item" + ("default" === selectedId ? " ytcenter-resize-dropdown-selected" : ""); var title = document.createElement("span"); title.textContent = ytcenter.language.getLocale("SETTINGS_RESIZE_DEFAULTPLAYERSIZE_DEFAULT"); ytcenter.language.addLocaleElement(title, "SETTINGS_RESIZE_DEFAULTPLAYERSIZE_DEFAULT", "@textContent"); title.style.display = "block"; ytcenter.utils.addEventListener(li, "click", function(){ if ("default" === selectedId) return; setValue("default"); ytcenter.utils.each(db, function(_i, elm){ ytcenter.utils.removeClass(elm, "ytcenter-resize-dropdown-selected"); }); ytcenter.utils.addClass(span, "ytcenter-resize-dropdown-selected"); if (saveCallback) saveCallback("default"); try { document.body.click(); } catch (e) { con.error(e); } }); span.appendChild(title); li.appendChild(span); menu.appendChild(li); } function updateItems(_items) { items = _items; menu.innerHTML = ""; // Clearing it var db = []; defaultItem(db); ytcenter.utils.each(items, function(i, item){ if (typeof selectedId === "undefined") setValue(item.id); if (item.id === selectedId) { setValue(item.id); } var li = document.createElement("li"); li.setAttribute("role", "menuitem"); var span = document.createElement("span"); db.push(span); span.className = "yt-uix-button-menu-item" + (item.id === selectedId ? " ytcenter-resize-dropdown-selected" : ""); span.style.paddingBottom = "12px"; var title = document.createElement("span"); title.textContent = getItemTitle(item); title.style.display = "block"; title.style.fontWeight = "bold"; var subtext = document.createElement("span"); subtext.textContent = getItemSubText(item); subtext.style.display = "block"; subtext.style.fontSize = "11px"; subtext.style.lineHeight = "0px"; ytcenter.utils.addEventListener(li, "click", function(){ if (item.id === selectedId) return; setValue(item.id); ytcenter.utils.each(db, function(_i, elm){ ytcenter.utils.removeClass(elm, "ytcenter-resize-dropdown-selected"); }); ytcenter.utils.addClass(span, "ytcenter-resize-dropdown-selected"); if (saveCallback) saveCallback(item.id); try { document.body.click(); } catch (e) { con.error(e); } }); span.appendChild(title); span.appendChild(subtext); li.appendChild(span); menu.appendChild(li); }); } var saveCallback, selectedId = ytcenter.settings[option.defaultSetting], items, wrapper = document.createElement("div"), btnLabel = ytcenter.gui.createYouTubeButtonText("Player Sizes..."), menu = document.createElement("ul"), arrow = ytcenter.gui.createYouTubeButtonArrow(), btn = ytcenter.gui.createYouTubeDefaultButton("", [btnLabel, arrow, menu]); wrapper.style.display = "inline-block"; btnLabel.style.display = "inline-block"; btnLabel.style.width = "100%"; menu.className = "yt-uix-button-menu yt-uix-button-menu-default yt-uix-button-menu-external hid"; menu.setAttribute("role", "menu"); arrow.className += " ytcenter-arrow-fix"; btn.className += " ytcenter-button-fix"; btn.style.width = "175px"; wrapper.appendChild(btn); if (option.parent) { option.parent.addEventListener("click", function(){ selectedId = ytcenter.settings[option.defaultSetting]; var opt = ytcenter.settings[option.args.bind], found = false, i; for (i = 0; i < opt.length; i++) { if (opt[i].id === selectedId) found = true; } if (!found && selectedId !== "default") { selectedId = opt[0].id; if (saveCallback) saveCallback(selectedId); } updateItems(opt); }); } return { element: wrapper, // So the element can be appended to an element. bind: function(callback){ saveCallback = callback; }, update: function(v){ selectedId = v; var opt = ytcenter.settings[option.args.bind], found = false, i; for (i = 0; i < opt.length; i++) { if (opt[i].id === selectedId) found = true; } if (!found && selectedId !== "default") { selectedId = opt[0].id; if (saveCallback) saveCallback(selectedId); } updateItems(opt); } }; }; ytcenter.modules.element = function(option){ var elm = document.createElement(option && option.args && option.args.tagname); if (option && option.args && option.args.style) { for (var key in option.args.style) { if (option.args.style.hasOwnProperty(key)) { elm.style[key] = option.args.style[key]; } } } if (option && option.args && option.args.className) { elm.className += " " + option.args.className; } if (option && option.args && option.args.text) { elm.textContent = option.args.text; } if (option && option.args && option.args.html) { con.error("[Settings Recipe] Element attribute HTML not allowed!"); } if (option && option.args && option.args.load) { tab.addEventListener("click", function(){ option.args.load.apply(null, [elm]); }); } if (option && option.args && option.args.listeners) { for (var i = 0; i < option.args.listeners.length; i++) { elm.addEventListener(option.args.listeners[i].event, option.args.listeners[i].callback, (option.args.listeners[i].bubble ? option.args.listeners[i].bubble : false)); } } return { element: elm, bind: function(){}, update: function(){} }; }; ytcenter.modules.importexport = function(){ var textLabel = ytcenter.gui.createYouTubeButtonTextLabel("SETTINGS_IMEX_TITLE"), content = document.createElement("div"), VALIDATOR_STRING = "YTCSettings=>", dropZone = document.createElement("div"), dropZoneContent = document.createElement("div"), filechooser = document.createElement("input"), settingsPool = document.createElement("textarea"), dialog = ytcenter.dialog("SETTINGS_IMEX_TITLE", content, [ { label: "SETTINGS_IMEX_CANCEL", primary: false, callback: function(){ dialog.setVisibility(false); } }, { name: "save", label: "SETTINGS_IMEX_SAVE", primary: true, callback: function(){ if (!saveEnabled) return; ytcenter.settings = JSON.parse(settingsPool.value); ytcenter.saveSettings(); loc.reload(); } } ]), status, loadingText = document.createElement("div"), messageText = document.createElement("div"), messageTimer, dropZoneEnabled = true, saveEnabled = true, pushMessage = function(message, color, timer){ //dropZoneEnabled = false; messageText.textContent = message; messageText.style.display = "inline-block"; if (typeof color === "string") messageText.style.color = color; else messageText.style.color = ""; status.style.display = ""; dropZoneContent.style.visibility = "hidden"; uw.clearTimeout(messageTimer); if (typeof timer === "number") { messageTimer = uw.setTimeout(function(){ removeMessage(); }, timer); } }, removeMessage = function(){ status.style.display = "none"; dropZoneContent.style.visibility = ""; messageText.style.display = "none"; messageText.textContent = ""; //dropZoneEnabled = true; uw.clearTimeout(messageTimer); }, validateFileAndLoad = function(file){ dropZone.style.border = "2px dashed rgb(187, 187, 187)"; pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_VALIDATE")); var reader = new FileReader(); reader.onerror = function(e){ switch (e.target.error.code) { case e.target.error.NOT_FOUND_ERR: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_NOT_FOUND"), "#ff0000", 10000); break; case e.target.error.NOT_READABLE_ERR: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_NOT_READABLE"), "#ff0000", 10000); break; case e.target.error.ABORT_ERR: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_ABORT"), "#ff0000", 10000); break; default: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_UNKNOWN"), "#ff0000", 10000); break; } }; reader.onabort = function(){ pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_ABORT"), "#ff0000", 10000); }; reader.onload = function(e){ if (e.target.result === VALIDATOR_STRING) { readFile(file); } else { pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_VALIDATE_ERROR_NOT_VALID"), "#ff0000", 3500); } }; reader.readAsText(file.slice(0, VALIDATOR_STRING.length)); }, readFile = function(file){ pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_LOADING")); var reader = new FileReader(); reader.onerror = function(e){ switch (e.target.error.code) { case e.target.error.NOT_FOUND_ERR: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_NOT_FOUND"), "#ff0000", 10000); break; case e.target.error.NOT_READABLE_ERR: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_NOT_READABLE"), "#ff0000", 10000); break; case e.target.error.ABORT_ERR: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_ABORT"), "#ff0000", 10000); break; default: pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_UNKNOWN"), "#ff0000", 10000); break; } }; reader.onabort = function(){ pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_ERROR_ABORT"), "#ff0000", 10000); }; reader.onload = function(e){ settingsPool.value = e.target.result; pushMessage(ytcenter.language.getLocale("SETTINGS_IMEX_IMPORT_MESSAGE"), "", 10000); }; reader.readAsText(file.slice(VALIDATOR_STRING.length)); }, exportFileButtonLabel = ytcenter.gui.createYouTubeButtonTextLabel("SETTINGS_IMEX_EXPORT_AS_FILE"), exportFileButton = ytcenter.gui.createYouTubeDefaultButton("", [exportFileButtonLabel]), statusContainer = document.createElement("div"); var elm = ytcenter.gui.createYouTubeDefaultButton("", [textLabel]); // Message Text messageText.style.fontWeight = "bold"; messageText.style.fontSize = "16px"; messageText.style.textAlign = "center"; messageText.style.width = "100%"; messageText.style.display = "none"; status = ytcenter.gui.createMiddleAlignHack(messageText); status.style.position = "absolute"; status.style.top = "0px"; status.style.left = "0px"; status.style.width = "100%"; status.style.height = "100%"; status.style.display = "none"; filechooser.setAttribute("type", "file"); ytcenter.utils.addEventListener(elm, "click", function(){ dialog.setVisibility(true); }, false); var __f = function(e){ validateFileAndLoad(e.target.files[0]); var newNode = document.createElement("input"); newNode.setAttribute("type", "file"); ytcenter.utils.addEventListener(newNode, "change", __f, false); filechooser.parentNode.replaceChild(newNode, filechooser); filechooser = newNode; }; ytcenter.utils.addEventListener(filechooser, "change", __f, false); ytcenter.utils.addEventListener(dropZone, "drop", function(e){ e.stopPropagation(); e.preventDefault(); validateFileAndLoad(e.dataTransfer.files[0]); }, false); ytcenter.utils.addEventListener(dropZone, "dragover", function(e){ if (!dropZoneEnabled) return; e.stopPropagation(); e.preventDefault(); e.dataTransfer.dropEffect = "copy"; dropZone.style.border = "2px dashed rgb(130, 130, 130)"; }, false); ytcenter.utils.addEventListener(dropZone, "dragleave", function(e){ if (!dropZoneEnabled) return; dropZone.style.border = "2px dashed rgb(187, 187, 187)"; e.dataTransfer.dropEffect = "none"; }, false); ytcenter.utils.addEventListener(dropZone, "dragend", function(e){ if (!dropZoneEnabled) return; dropZone.style.border = "2px dashed rgb(187, 187, 187)"; e.dataTransfer.dropEffect = "none"; }, false); var text1 = document.createElement("span"); text1.style.fontWeight = "bold"; text1.style.fontSize = "16px"; text1.textContent = ytcenter.language.getLocale("SETTINGS_IMEX_DROPFILEHERE"); ytcenter.language.addLocaleElement(text1, "SETTINGS_IMEX_DROPFILEHERE", "@textContent"); dropZoneContent.appendChild(text1); dropZoneContent.appendChild(document.createElement("br")); var text2 = document.createTextNode(ytcenter.language.getLocale("SETTINGS_IMEX_OR")); ytcenter.language.addLocaleElement(text2, "SETTINGS_IMEX_OR", "@textContent"); dropZoneContent.appendChild(text2); dropZoneContent.appendChild(document.createTextNode(" ")); dropZoneContent.appendChild(filechooser); dropZone.style.position = "relative"; dropZone.style.border = "2px dashed rgb(187, 187, 187)"; dropZone.style.borderRadius = "4px"; dropZone.style.color = "rgb(110, 110, 110)"; dropZone.style.padding = "20px 0"; dropZone.style.width = "100%"; dropZone.style.marginBottom = "10px"; dropZone.style.textAlign = "center"; settingsPool.style.width = "100%"; settingsPool.style.height = "120px"; dropZoneContent.style.margin = "0 auto"; dropZoneContent.style.display = "inline-block"; if (ytcenter.ltr) { dropZoneContent.style.textAlign = "left"; } else { dropZoneContent.style.textAlign = "right"; } dropZone.appendChild(dropZoneContent); dropZone.appendChild(status); content.appendChild(dropZone); content.appendChild(settingsPool); dialog.setWidth("490px"); var settingsPoolChecker = function(){ try { JSON.parse(settingsPool.value); dialog.getActionButton("save").disabled = false; settingsPool.style.background = ""; saveEnabled = true; } catch (e) { dialog.getActionButton("save").disabled = true; settingsPool.style.background = "#FFAAAA"; saveEnabled = false; } }; ytcenter.utils.addEventListener(settingsPool, "input", settingsPoolChecker, false); ytcenter.utils.addEventListener(settingsPool, "keyup", settingsPoolChecker, false); ytcenter.utils.addEventListener(settingsPool, "paste", settingsPoolChecker, false); ytcenter.utils.addEventListener(settingsPool, "change", settingsPoolChecker, false); dialog.addEventListener("visibility", function(visible){ if (visible) settingsPool.value = JSON.stringify(ytcenter.settings); else settingsPool.value = ""; }); ytcenter.utils.addEventListener(exportFileButton, "click", function(){ try { var blob = new ytcenter.unsafe.io.Blob([VALIDATOR_STRING + settingsPool.value], { "type": "application/octet-stream" }); ytcenter.unsafe.io.saveAs(blob, "ytcenter-settings.ytcs"); } catch (e) { con.error(e); } }, false); content.appendChild(exportFileButton); return { element: elm, bind: function(){}, update: function(){} }; }; ytcenter.modules.label = function(option){ var frag = document.createDocumentFragment(), text = document.createTextNode(ytcenter.language.getLocale(option.label)); frag.appendChild(text); ytcenter.language.addLocaleElement(text, option.label, "@textContent"); return { element: frag, // So the element can be appended to an element. bind: function(){}, update: function(){} }; }; ytcenter.modules.line = function(){ var frag = document.createDocumentFragment(), hr = document.createElement("hr"); hr.className = "yt-horizontal-rule"; frag.appendChild(hr); return { element: frag, bind: function(){}, update: function(){} }; }; ytcenter.modules.link = function(option){ var elm = document.createElement("div"), title = document.createElement("b"); if (option && option.args && option.args.titleLocale) { var __t1 = document.createTextNode(ytcenter.language.getLocale(option.args.titleLocale)), __t2 = document.createTextNode(":"); ytcenter.language.addLocaleElement(__t1, option.args.titleLocale, "@textContent", option.args.replace || {}); title.appendChild(__t1); title.appendChild(__t2); } else if (option && option.args && option.args.title) { title.textContent = option.args.title + ":"; } var content = document.createElement("div"); content.className = "ytcenter-modules-links"; for (var i = 0; i < option.args.links.length; i++) { if (i > 0) content.appendChild(document.createElement("br")); var __a = document.createElement("a"); __a.href = option.args.links[i].url; __a.textContent = option.args.links[i].text; __a.setAttribute("target", "_blank"); content.appendChild(__a); } elm.appendChild(title); elm.appendChild(content); return { element: elm, bind: function(){}, update: function(){} }; }; ytcenter.modules.list = function(option){ function update(value) { var i; for (i = 0; i < s.options.length; i++) { if (s.options[i].value === value) { s.selectedIndex = i; break; } } } function bind(callback) { cCallback = callback; } var frag = document.createDocumentFragment(), elm = document.createElement("span"), sc = document.createElement("span"), defaultLabel, s = document.createElement("select"), list = [], defaultLabelText, sc1 = document.createElement("img"), sc2 = document.createElement("span"), cCallback; elm.className = "yt-uix-form-input-select"; sc.className = "yt-uix-form-input-select-content"; s.className = "yt-uix-form-input-select-element"; s.style.cursor = "pointer"; if (typeof option.args.list === "function") { list = option.args.list(); } else { list = option.args.list; } if (list && list.length > 0) { defaultLabelText = ytcenter.language.getLocale(list[0].label); for (var i = 0; i < list.length; i++) { var item = document.createElement("option"); item.value = list[i].value; if (typeof list[i].label === "function") { item.textContent = list[i].label(); } else if (typeof list[i].label !== "undefined") { item.textContent = ytcenter.language.getLocale(list[i].label); ytcenter.language.addLocaleElement(item, list[i].label, "@textContent"); } if (list[i].value === ytcenter.settings[option.defaultSetting]) { item.selected = true; defaultLabelText = item.textContent; } s.appendChild(item); } sc1.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; sc1.className = "yt-uix-form-input-select-arrow"; sc.appendChild(sc1); sc2.className = "yt-uix-form-input-select-value"; sc2.textContent = defaultLabelText; sc.appendChild(sc2); ytcenter.events.addEvent("language-refresh", function(){ sc2.textContent = s.options[s.selectedIndex].textContent; }); ytcenter.utils.addEventListener(s, "change", function(){ if (cCallback) cCallback(s.value); if (option && option.args && option.args.listeners) { for (var i = 0; i < option.args.listeners.length; i++) { if (option.args.listeners[i].event === "update") { option.args.listeners[i].callback(); } else { con.error("[Module:List] Unknown event " + option.args.listeners[i].event); } } } }, false); } elm.appendChild(sc); elm.appendChild(s); frag.appendChild(elm); return { element: frag, bind: bind, update: update }; }; ytcenter.modules.multilist = function(option){ function fixList(_settingData) { if (_settingData === "") return ""; var a = _settingData.split("&"), b = [], c = [], d, i; for (i = 0; i < list.length; i++) { c.push(list[i].value); } for (i = 0; i < a.length; i++) { if (a[i] !== "") { d = decodeURIComponent(a[i]); if ($ArrayIndexOf(c, d) !== -1 && $ArrayIndexOf(b, d) === -1) { b.push(a[i]); } } } return b.join("&"); } function saveItem(value) { if (settingData === "") return encodeURIComponent(value); var a = settingData.split("&"), i; for (i = 0; i < a.length; i++) { if (decodeURIComponent(a[i]) === value) return; } a.push(encodeURIComponent(value)); return a.join("&"); } function removeItem(value) { if (settingData === "") return encodeURIComponent(value); var a = settingData.split("&"), b = [], i; for (i = 0; i < a.length; i++) { if (decodeURIComponent(a[i]) !== value) { b.push(a[i]); } } return b.join("&"); } function isEnabled(value) { if (settingData === "") return false; var a = settingData.split("&"), i; for (i = 0; i < a.length; i++) { if (decodeURIComponent(a[i]) === value) return true; } return false; } function createItem(label, value) { var s = document.createElement("label"), cb = ytcenter.modules.checkbox(isEnabled(value)), text = document.createTextNode(ytcenter.language.getLocale(label)); ytcenter.language.addLocaleElement(text, label, "@textContent"); cb.bind(function(checked){ if (checked) { settingData = saveItem(value); } else { settingData = removeItem(value); } if (typeof saveCallback === "function") saveCallback(settingData); callbackListeners(); }); cb.element.style.marginRight = "6px"; s.appendChild(cb.element); s.appendChild(text); return s; } function updateList() { var d, item; settingData = fixList(settingData); wrapper.innerHTML = ""; for (var i = 0; i < list.length; i++) { d = document.createElement("div"); item = createItem(list[i].label, list[i].value); d.appendChild(item); wrapper.appendChild(d); } } function callbackListeners() { var i; if (option.args.listeners && option.args.listeners) { for (i = 0; i < option.args.listeners.length; i++) { if (option.args.listeners[i].event === "click") { option.args.listeners[i].callback(); } } } } var list = (option && option.args && option.args.list) || [], settingData, wrapper = document.createElement("div"), saveCallback; wrapper.style.paddingLeft = "16px"; settingData = ytcenter.settings[option.defaultSetting]; updateList(); return { element: wrapper, update: function(data){ settingData = data; updateList(); }, bind: function(a){ saveCallback = a; } }; }; ytcenter.modules.newline = function(option){ var elm = document.createElement("br"); if (option && option.args && option.args.style) { for (var key in option.args.style) { if (option.args.style.hasOwnProperty(key)) { elm.style[key] = option.args.style[key]; } } } return { element: elm, bind: function(){}, update: function(){} }; }; ytcenter.modules.placement = function(args){ function createListItem(content) { var a = document.createElement("li"); a.className = "ytcenter-module-placement-item"; a.textContent = content; return a; } var template = [ { "type": "block", "id": "player", "prepend": true, "insert": false, "append": false, "content": "Player" }, { "type": "interactive", "id": "watch7-headline", "prepend": true, "insert": true, "append": false }, { "type": "interactive", "id": "watch7-sentiment-actions", "prepend": true, "insert": true, "append": false } ], predefinedElements = [ { "parent": "watch7-sentiment-actions", "id": "watch-like-dislike-buttons", "content": "Like/Dislike" }, { "parent": "watch7-headline", "id": "watch-headline-title", "content": "TITLE" } ]; var elm = document.createElement("div"), i, j, a, b, c; for (i = 0; i < template.length; i++) { a = document.createElement("ol"); if (template[i].type === "interactive") { a.className = "ytcenter-moduel-placement-interactive"; } else if (template[i].type === "block") { a.className = "ytcenter-moduel-placement-block"; } else if (template[i].type === "hidden") { a.className = "ytcenter-moduel-placement-hidden"; } if (template[i].content) a.textContent = template[i].content; if (template[i].prepend) { b = document.createElement("ol"); b.className = "ytcenter-moduel-placement-empty"; b.textContent = "+"; elm.appendChild(b); } if (template[i].insert) { for (j = 0; j < predefinedElements.length; j++) { if (predefinedElements[j].parent === template[i].id) { c = createListItem(predefinedElements[j].content); a.appendChild(c); } } } elm.appendChild(a); if (template[i].append) { b = document.createElement("ol"); b.className = "ytcenter-moduel-placement-empty"; b.textContent = "+"; elm.appendChild(b); } } return { element: elm, update: function(){}, bind: function(){} }; }; ytcenter.modules.range = function(option){ function setValue(val) { if (val === options.value) return; if (options.step !== 0) { var diff = val%options.step; if (diff >= options.step/2 && (options.step-diff)+val <= options.max) { options.value = (options.step-diff)+val; } else { options.value = val - diff; } } else { options.value = val; } update(); if (options.value > options.max) { setValue(options.max); return; } if (options.value < options.min) { setValue(options.min); return; } }; function update() { if (options.method === "vertical") { handle.style.top = ((options.value - options.min)/(options.max - options.min)*(wrapper.clientHeight - handle.offsetHeight)) + "px"; } else { handle.style.left = ((options.value - options.min)/(options.max - options.min)*(wrapper.clientWidth - handle.offsetWidth)) + "px"; handle.style.right = ((options.value - options.min)/(options.max - options.min)*(wrapper.clientWidth - handle.offsetWidth)) + "px"; } } function eventToValue(e) { var offset = ytcenter.utils.getOffset(wrapper), scrollOffset = ytcenter.utils.getScrollOffset(), v, l; if (e && e.type.indexOf("touch") !== -1 && e.changedTouches && e.changedTouches.length > 0 && e.changedTouches[0]) { e = e.changedTouches[0]; } if (options.method === "vertical") { offset.top += options.offset; v = e.pageY - scrollOffset.top - offset.top; l = v + parseInt(options.height)/2 - 3; if (l < 0) l = 0; if (l > wrapper.clientHeight - handle.clientHeight) l = wrapper.clientHeight - handle.clientHeight; setValue(l/(wrapper.clientHeight - handle.clientHeight)*(options.max - options.min) + options.min); } else { offset.left += options.offset; v = e.pageX - scrollOffset.left - offset.left; l = v - parseInt(options.height)/2; if (l < 0) l = 0; if (l > wrapper.clientWidth - handle.clientWidth) l = wrapper.clientWidth - handle.clientWidth; if (!ytcenter.ltr) l = (wrapper.clientWidth - handle.clientWidth) - l; setValue(l/(wrapper.clientWidth - handle.clientWidth)*(options.max - options.min) + options.min); } update(); } function mousemove(e){ if (!mousedown) return; eventToValue(e); if (bCallback) bCallback(options.value); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function initListeners() { /* Mouse */ ytcenter.utils.addEventListener(wrapper, "mousedown", mousedownListener); ytcenter.utils.addEventListener(document, "mouseup", mouseupListener); /* Touch */ ytcenter.utils.addEventListener(wrapper, "touchstart", mousedownListener); ytcenter.utils.addEventListener(document, "touchend", mouseupListener); } function unloadListeners() { /* Mouse */ ytcenter.utils.removeEventListener(wrapper, "mousedown", mousedownListener); ytcenter.utils.removeEventListener(document, "mouseup", mouseupListener); /* Touch */ ytcenter.utils.removeEventListener(wrapper, "touchstart", mousedownListener); ytcenter.utils.removeEventListener(document, "touchend", mouseupListener); } function mouseupListener(e) { if (!mousedown) return; mousedown = false; if (throttleFunc) ytcenter.utils.removeEventListener(document, "mousemove", throttleFunc, false); if (throttleFunc) ytcenter.utils.removeEventListener(document, "touchmove", throttleFunc, false); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function mousedownListener(e) { if (mousedown) return; mousedown = true; eventToValue(e); if (bCallback) bCallback(options.value); throttleFunc = ytcenter.utils.throttle(mousemove, 50); ytcenter.utils.addEventListener(document, "mousemove", throttleFunc, false); ytcenter.utils.addEventListener(document, "touchmove", throttleFunc, false); if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } var options = ytcenter.utils.mergeObjects({ value: 0, min: 0, max: 100, step: 1, width: "225px", height: "14px", method: "horizontal", // horizontal, vertical handle: null, offset: 0 }, option.args), handle, mousedown = false, bCallback, wrapper = document.createElement("span"), throttleFunc = null; wrapper.className = "ytcenter-modules-range"; if (options.method === "vertical") { wrapper.style.width = options.height; wrapper.style.height = options.width; } else { wrapper.style.width = options.width; wrapper.style.height = options.height; } if (options.handle) { handle = options.handle; } else { handle = document.createElement("div"); handle.className = "ytcenter-modules-range-handle"; handle.style.width = (parseInt(options.height)) + "px"; handle.style.height = parseInt(options.height) + "px"; } wrapper.appendChild(handle); if (option.parent) { option.parent.addEventListener("click", function(){ setValue(options.value); update(); }); } setValue(options.value); update(); initListeners(); return { element: wrapper, bind: function(callback){ bCallback = callback; }, update: function(value){ setValue(value); update(); }, getValue: function(){ return options.value; } }; }; ytcenter.modules.rangetext = function(option){ function getValue(text) { if (prefixSuffixActive) { if (option.args.prefix && option.args.prefix !== "") { if (text.indexOf(option.args.prefix) === 0) text = text.substring(option.args.prefix.length); } if (option.args.suffix && option.args.suffix !== "") { if (text.indexOf(option.args.suffix) === text.length - option.args.suffix.length) text = text.substring(0, text.length - option.args.suffix.length); } } text = parseInt(text, 10); if (isNaN(text) || text === Infinity) text = 0; return text; } function update() { _text.value = (option.args.prefix ? option.args.prefix : "") + Math.round(range.getValue()) + (option.args.suffix ? option.args.suffix : ""); prefixSuffixActive = true; } var range = ytcenter.modules.range(option), wrapper = document.createElement("div"), bCallback, prefixSuffixActive = true; wrapper.style.display = "inline-block"; wrapper.appendChild(range.element); var _text = document.createElement("input"); _text.setAttribute("type", "text"); _text.value = Math.round(range.getValue()); _text.className = "ytcenter-modules-rangetext"; if (option.args["text-width"]) { _text.style.width = option.args["text-width"]; } wrapper.appendChild(_text); range.bind(function(value){ update(); if (bCallback) bCallback(value); }); if (option.parent) { option.parent.addEventListener("click", function(){ update(); }); } _text.addEventListener("focus", function(){ var val = getValue(this.value); range.update(val); var sel = ytcenter.utils.getCaretPosition(this); this.value = val; prefixSuffixActive = false; ytcenter.utils.setCaretPosition(this, sel); this.setSelectionRange(); }, false); _text.addEventListener("blur", function(){ var val = getValue(this.value); range.update(val); val = range.getValue(); if (bCallback) bCallback(val); update(); }, false); _text.addEventListener("input", function(){ var val = getValue(this.value); range.update(val); }, false); _text.addEventListener("change", function(){ var val = getValue(this.value); range.update(val); val = range.getValue(); if (bCallback) bCallback(val); update(); }, false); return { element: wrapper, bind: function(callback){ var a = null, b = false, c = null; bCallback = function(value){ c = value; if (b) { return; } b = true; uw.clearTimeout(a); a = uw.setTimeout(function(){ callback(c); b = false; }, 500); }; }, update: function(value){ range.update(value); update(); }, getValue: function(){ return range.getValue(); } }; }; ytcenter.modules.resizedropdown = function(option){ function getItemTitle(item) { var dim = ytcenter.utils.calculateDimensions(item.config.width, item.config.height); if (typeof item.config.customName !== "undefined" && item.config.customName !== "") { return item.config.customName; } else if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { return (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")); subtext.textContent = (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")); } else { return dim[0] + "×" + dim[1]; subtext.textContent = (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")) + " - " + (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")); } } function getItemSubText(item) { if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { return (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.config.scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } else { return (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")) + " - " + (item.config.align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.config.scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } } function setValue(id) { selectedId = id; var item; ytcenter.utils.each(items, function(i, val){ if (val.id !== selectedId) return; item = val; return false; }); btnLabel.textContent = getItemTitle(item); } function updateItems(_items) { items = _items; menu.innerHTML = ""; // Clearing it var db = []; ytcenter.utils.each(items, function(i, item){ if (typeof selectedId === "undefined") setValue(item.id); if (item.id === selectedId) { setValue(item.id); } var li = document.createElement("li"); li.setAttribute("role", "menuitem"); var span = document.createElement("span"); db.push(span); span.className = "yt-uix-button-menu-item" + (item.id === selectedId ? " ytcenter-resize-dropdown-selected" : ""); span.style.paddingBottom = "12px"; var title = document.createElement("span"); title.textContent = getItemTitle(item); title.style.display = "block"; title.style.fontWeight = "bold"; var subtext = document.createElement("span"); subtext.textContent = getItemSubText(item); subtext.style.display = "block"; subtext.style.fontSize = "11px"; subtext.style.lineHeight = "0px"; ytcenter.utils.addEventListener(li, "click", function(){ if (item.id === selectedId) return; setValue(item.id); ytcenter.utils.each(db, function(_i, elm){ ytcenter.utils.removeClass(elm, "ytcenter-resize-dropdown-selected"); }); ytcenter.utils.addClass(span, "ytcenter-resize-dropdown-selected"); if (saveCallback) saveCallback(item.id); try { document.body.click(); } catch (e) { con.error(e); } }); span.appendChild(title); span.appendChild(subtext); li.appendChild(span); menu.appendChild(li); }); } var saveCallback; var selectedId; var items; var wrapper = document.createElement("div"); wrapper.className = "ytcenter-embed"; var btnLabel = ytcenter.gui.createYouTubeButtonText("Player Sizes..."); btnLabel.style.display = "inline-block"; btnLabel.style.width = "100%"; var menu = document.createElement("ul"); menu.className = "yt-uix-button-menu yt-uix-button-menu-default yt-uix-button-menu-external hid"; menu.setAttribute("role", "menu"); var arrow = ytcenter.gui.createYouTubeButtonArrow(); arrow.style.marginLeft = "-10px"; var btn = ytcenter.gui.createYouTubeDefaultButton("", [btnLabel, arrow, menu]); btn.style.width = "175px"; btn.style.textAlign = "left"; wrapper.appendChild(btn); updateItems(ytcenter.settings[option.defaultSetting]); if (option.parent) { option.parent.addEventListener("click", function(){ var opt = ytcenter.settings[option.defaultSetting]; var found = false; for (var i = 0; i < opt.length; i++) { if (opt[i].id === selectedId) found = true; } if (!found) { selectedId = opt[0].id; if (saveCallback) saveCallback(selectedId); } updateItems(opt); }); } return { element: wrapper, // So the element can be appended to an element. bind: function(callback){ saveCallback = callback; }, update: function(v){ selectedId = v; updateItems(items); } }; }; ytcenter.modules.resizeItemList = function(option){ function wrapItem(item) { if (typeof item.getItemElement !== "undefined") return item; // It's already been processed var selected = false; var li = document.createElement("li"); li.className = "ytcenter-list-item ytcenter-dragdrop-item"; var order = document.createElement("div"); order.className = "ytcenter-dragdrop-handle"; var content = document.createElement("div"); content.className = "ytcenter-list-item-content"; var title = document.createElement("span"); title.className = "ytcenter-list-item-title"; var subtext = document.createElement("span"); subtext.className = "ytcenter-list-item-subtext"; content.appendChild(title); content.appendChild(subtext); li.appendChild(order); li.appendChild(content); ytcenter.utils.addEventListener(content, "click", function(){ if (selected) return; selectSizeItem(item.id); }); var out = { getId: function(){ return item.id; }, getData: function(){ return item; }, getConfig: function(){ return item.config; }, setConfig: function(conf){ item.config = conf; }, updateItemElement: function(){ var dim = ytcenter.utils.calculateDimensions(item.config.width, item.config.height); title.textContent = getItemTitle(out); subtext.textContent = getItemSubText(out); }, getItemElement: function(){ return li; }, select: function(){ if (selected) return; selectSizeItem(item.id); }, setSelection: function(_selected){ selected = _selected; if (selected) { ytcenter.utils.addClass(li, "ytcenter-list-item-selected"); } else { ytcenter.utils.removeClass(li, "ytcenter-list-item-selected"); } } }; out.updateItemElement(); ytcenter.events.addEvent("ui-refresh", function(){ out.updateItemElement(); }); return out; } function getItemInfo(item) { var exports = {}; var dim = ytcenter.utils.calculateDimensions(item.getConfig().width, item.getConfig().height); if (item.getConfig().width === "" && item.getConfig().height === "") { exports.width = ""; exports.height = ""; } else { if (typeof dim[0] === "number" && !isNaN(parseInt(item.getConfig().width))) { exports.width = dim[0] + "px"; } else if (!isNaN(parseInt(item.getConfig().width))) { exports.width = dim[0]; } else { exports.width = ""; } if (typeof dim[1] === "number" && !isNaN(parseInt(item.getConfig().height))) { exports.height = dim[1] + "px"; } else if (!isNaN(parseInt(item.getConfig().height))) { exports.height = dim[1]; } else { exports.height = ""; } } exports.large = item.getConfig().large; exports.align = item.getConfig().align; exports.scrollToPlayer = item.getConfig().scrollToPlayer; exports.scrollToPlayerButton = item.getConfig().scrollToPlayerButton; exports.customName = (typeof item.getConfig().customName === "undefined" ? "" : item.getConfig().customName); exports.aspectRatioLocked = (typeof item.getConfig().aspectRatioLocked === "undefined" ? false : item.getConfig().aspectRatioLocked); return exports; } function createEditor() { function hasUnsavedChanges() { if (state === 0) return false; if (state === 2) return true; if (original.width !== __getWidth()) return true; if (original.height !== __getHeight()) return true; if (original.large !== largeInput.isSelected()) return true; if (original.align !== alignInput.isSelected()) return true; if (original.scrollToPlayer !== scrollToPlayerInput.isSelected()) return true; if (original.scrollToPlayerButton !== scrollToPlayerButtonInput.isSelected()) return true; if (original.customName !== customNameInput.value) return true; if (original.aspectRatioLocked !== ratioLocked) return true; return false; } var __getWidth = function(){ if (isNaN(parseInt(widthInput.value))) { return widthUnit.getValue(); } else { return parseInt(widthInput.value) + widthUnit.getValue(); } }; var __getHeight = function(){ if (isNaN(parseInt(heightInput.value))) { return heightUnit.getValue(); } else { return parseInt(heightInput.value) + heightUnit.getValue(); } }; var __getAspectRatio = function(){ if (isNaN(parseInt(widthInput.value)) || isNaN(parseInt(heightInput.value)) || widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") return; return parseInt(widthInput.value)/parseInt(heightInput.value); }; var __updateAspectRatio = function(){ aspectRatio = __getAspectRatio(); }; var __setAspectRatioLocked = function(locked){ ratioLocked = locked; if (ratioLocked) { ytcenter.utils.addClass(ratioIcon, "ytcenter-resize-chain"); ytcenter.utils.removeClass(ratioIcon, "ytcenter-resize-unchain"); aspectRatio = __getAspectRatio(); } else { ytcenter.utils.removeClass(ratioIcon, "ytcenter-resize-chain"); ytcenter.utils.addClass(ratioIcon, "ytcenter-resize-unchain"); aspectRatio = undefined; } }; var __setAspectVisibility = function(visible){ if (visible) { ytcenter.utils.removeClass(linkBorder, "force-hid"); ytcenter.utils.removeClass(ratioIcon, "force-hid"); } else { ytcenter.utils.addClass(linkBorder, "force-hid"); ytcenter.utils.addClass(ratioIcon, "force-hid"); } }; var saveListener, cancelListener, deleteListener, newSessionCallback; var original = {}; var state = 0; var ratioLocked = false; var aspectRatio; var wrp = document.createElement("div"); wrp.style.visibility = "hidden"; // Editor Panel var customNameWrapper = document.createElement("div"); customNameWrapper.className = "ytcenter-panel-label"; var customNameLabel = document.createElement("label"); customNameLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_CUSTOMNAME"); ytcenter.language.addLocaleElement(customNameLabel, "EMBED_RESIZEITEMLIST_CUSTOMNAME", "@textContent"); customNameWrapper.appendChild(customNameLabel); var customNameInput = ytcenter.gui.createYouTubeTextInput(); customNameInput.style.width = "210px"; customNameWrapper.appendChild(customNameInput); var dimensionWrapper = document.createElement("div"); var sizeWrapper = document.createElement("div"); sizeWrapper.style.display = "inline-block"; var widthWrapper = document.createElement("div"); widthWrapper.className = "ytcenter-panel-label"; var widthLabel = document.createElement("label"); widthLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_WIDTH"); ytcenter.language.addLocaleElement(widthLabel, "EMBED_RESIZEITEMLIST_WIDTH", "@textContent"); widthWrapper.appendChild(widthLabel); var widthInput = ytcenter.gui.createYouTubeTextInput(); widthInput.style.width = "105px"; widthWrapper.appendChild(widthInput); ytcenter.utils.addEventListener(widthInput, "change", function(){ if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") return; aspectRatio = __getAspectRatio(); }); ytcenter.utils.addEventListener(widthInput, "input", function(){ if (isNaN(parseInt(widthInput.value))) widthInput.value = ""; else widthInput.value = parseInt(widthInput.value); if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") return; if (typeof aspectRatio === "undefined" || !ratioLocked) return; if (isNaN(parseInt(widthInput.value))) { heightInput.value = ""; } else if (aspectRatio !== 0) { heightInput.value = Math.round(parseInt(widthInput.value)/aspectRatio); } }); var widthUnit = ytcenter.modules.select({args: {list: [ {label: "EMBED_RESIZEITEMLIST_PIXEL", value: "px"}, {label: "EMBED_RESIZEITEMLIST_PERCENT", value: "%"} ]}}); widthUnit.bind(function(){ if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") { __setAspectVisibility(false); return; } __setAspectVisibility(true); aspectRatio = __getAspectRatio(); }); widthWrapper.appendChild(widthUnit.element); sizeWrapper.appendChild(widthWrapper); var heightWrapper = document.createElement("div"); heightWrapper.className = "ytcenter-panel-label"; var heightLabel = document.createElement("label"); heightLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_HEIGHT"); ytcenter.language.addLocaleElement(heightLabel, "EMBED_RESIZEITEMLIST_HEIGHT", "@textContent"); heightWrapper.appendChild(heightLabel); var heightInput = ytcenter.gui.createYouTubeTextInput(); heightInput.style.width = "105px"; heightWrapper.appendChild(heightInput); ytcenter.utils.addEventListener(heightInput, "change", function(){ if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") return; aspectRatio = __getAspectRatio(); }); ytcenter.utils.addEventListener(heightInput, "input", function(){ if (isNaN(parseInt(heightInput.value))) heightInput.value = ""; else heightInput.value = parseInt(heightInput.value); if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") return; if (typeof aspectRatio === "undefined" || !ratioLocked) return; if (isNaN(parseInt(heightInput.value))) { widthInput.value = ""; } else if (aspectRatio !== 0) { widthInput.value = Math.round(parseInt(heightInput.value)*aspectRatio); } }); var heightUnit = ytcenter.modules.select({args: {list: [ {label: "EMBED_RESIZEITEMLIST_PIXEL", value: "px"}, {label: "EMBED_RESIZEITEMLIST_PERCENT", value: "%"} ]}}); heightUnit.bind(function(){ if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") { __setAspectVisibility(false); return; } __setAspectVisibility(true); aspectRatio = __getAspectRatio(); }); heightWrapper.appendChild(heightUnit.element); sizeWrapper.appendChild(heightWrapper); dimensionWrapper.appendChild(sizeWrapper); var linkBorder = document.createElement("div"); linkBorder.className = "ytcenter-resize-aspect-bind"; dimensionWrapper.appendChild(linkBorder); var ratioIcon = document.createElement("div"); ratioIcon.className = "ytcenter-resize-unchain ytcenter-resize-ratio"; ratioIcon.style.display = "inline-block"; ratioIcon.style.marginBottom = "13px"; ratioIcon.style.marginLeft = "-11px"; ratioIcon.style.width = "20px"; ytcenter.utils.addEventListener(ratioIcon, "click", function(e){ if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") return; if (ratioLocked) { __setAspectRatioLocked(false); } else { __setAspectRatioLocked(true); } if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; }); dimensionWrapper.appendChild(ratioIcon); var largeWrapper = document.createElement("div"); largeWrapper.className = "ytcenter-panel-label"; var largeLabel = document.createElement("label"); largeLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_LARGE"); ytcenter.language.addLocaleElement(largeLabel, "EMBED_RESIZEITEMLIST_LARGE", "@textContent"); largeWrapper.appendChild(largeLabel); var largeInput = ytcenter.modules.checkbox(); largeInput.element.style.background = "#fff"; largeInput.fixHeight(); largeWrapper.appendChild(largeInput.element); var alignWrapper = document.createElement("div"); alignWrapper.className = "ytcenter-panel-label"; var alignLabel = document.createElement("label"); alignLabel.textContent = "Align"; alignLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_ALIGN"); ytcenter.language.addLocaleElement(alignLabel, "EMBED_RESIZEITEMLIST_ALIGN", "@textContent"); alignWrapper.appendChild(alignLabel); var alignInput = ytcenter.modules.checkbox(); alignInput.element.style.background = "#fff"; alignInput.fixHeight(); alignWrapper.appendChild(alignInput.element); var scrollToPlayerWrapper = document.createElement("div"); scrollToPlayerWrapper.className = "ytcenter-panel-label"; var scrollToPlayerLabel = document.createElement("label"); scrollToPlayerLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_SCROLLTOPLAYER"); ytcenter.language.addLocaleElement(scrollToPlayerLabel, "EMBED_RESIZEITEMLIST_SCROLLTOPLAYER", "@textContent"); scrollToPlayerWrapper.appendChild(scrollToPlayerLabel); var scrollToPlayerInput = ytcenter.modules.checkbox(); scrollToPlayerInput.element.style.background = "#fff"; scrollToPlayerInput.fixHeight(); scrollToPlayerWrapper.appendChild(scrollToPlayerInput.element); var scrollToPlayerButtonWrapper = document.createElement("div"); scrollToPlayerButtonWrapper.className = "ytcenter-panel-label"; var scrollToPlayerButtonLabel = document.createElement("label"); scrollToPlayerButtonLabel.textContent = ytcenter.language.getLocale("EMBED_RESIZEITEMLIST_SCROLLTOPLAYERBUTTON"); ytcenter.language.addLocaleElement(scrollToPlayerButtonLabel, "EMBED_RESIZEITEMLIST_SCROLLTOPLAYERBUTTON", "@textContent"); scrollToPlayerButtonWrapper.appendChild(scrollToPlayerButtonLabel); var scrollToPlayerButtonInput = ytcenter.modules.checkbox(); scrollToPlayerButtonInput.element.style.background = "#fff"; scrollToPlayerButtonInput.fixHeight(); scrollToPlayerButtonWrapper.appendChild(scrollToPlayerButtonInput.element); var optionsWrapper = document.createElement("div"); optionsWrapper.className = "clearfix resize-options"; var saveBtn = ytcenter.gui.createYouTubePrimaryButton("", [ytcenter.gui.createYouTubeButtonTextLabel("SETTINGS_PLAYERSIZE_SAVE")]); saveBtn.className += " resize-options-right"; ytcenter.utils.addEventListener(saveBtn, "click", function(){ state = 0; wrp.style.visibility = "hidden"; if (typeof saveListener !== "undefined") saveListener(); ytcenter.events.performEvent("ui-refresh"); }); var cancelBtn = ytcenter.gui.createYouTubeDefaultButton("", [ytcenter.gui.createYouTubeButtonTextLabel("SETTINGS_PLAYERSIZE_CANCEL")]); cancelBtn.className += " resize-options-right"; ytcenter.utils.addEventListener(cancelBtn, "click", function(){ if (hasUnsavedChanges()) { ytcenter.confirmBox("EMBED_RESIZEITEMLIST_CONFIRM_TITLE", "EMBED_RESIZEITEMLIST_UNSAVED_CONFIRM_MESSAGE", function(accepted){ if (accepted) { state = 0; wrp.style.visibility = "hidden"; if (typeof cancelListener !== "undefined") cancelListener(); ytcenter.events.performEvent("ui-refresh"); } }); } else { state = 0; wrp.style.visibility = "hidden"; if (typeof cancelListener !== "undefined") cancelListener(); ytcenter.events.performEvent("ui-refresh"); } }); var deleteBtn = ytcenter.gui.createYouTubeDefaultButton("", [ytcenter.gui.createYouTubeButtonTextLabel("SETTINGS_PLAYERSIZE_DELETE")]); deleteBtn.className += " resize-options-left"; ytcenter.utils.addEventListener(deleteBtn, "click", function(){ ytcenter.confirmBox("EMBED_RESIZEITEMLIST_DELETE_CONFIRM_TITLE", "EMBED_RESIZEITEMLIST_DELETE_CONFIRM_MESSAGE", function(del){ if (del) { state = 0; wrp.style.visibility = "hidden"; if (typeof deleteListener !== "undefined") deleteListener(); ytcenter.events.performEvent("ui-refresh"); } }, "EMBED_RESIZEITEMLIST_CONFIRM_DELETE"); }); optionsWrapper.appendChild(deleteBtn); optionsWrapper.appendChild(saveBtn); optionsWrapper.appendChild(cancelBtn); wrp.appendChild(customNameWrapper); wrp.appendChild(dimensionWrapper); wrp.appendChild(largeWrapper); wrp.appendChild(alignWrapper); wrp.appendChild(scrollToPlayerWrapper); wrp.appendChild(scrollToPlayerButtonWrapper); wrp.appendChild(optionsWrapper); editWrapper.appendChild(wrp); return { destroy: function(){ editWrapper.removeChild(wrp); }, hasUnsavedChanges: hasUnsavedChanges, setState: function(s){ state = s; }, setDeleteButtonVisibility: function(visible) { if (visible) { deleteBtn.style.visibility = ""; } else { deleteBtn.style.visibility = "hidden"; } }, setSaveListener: function(callback){ saveListener = callback; }, setCancelListener: function(callback){ cancelListener = callback; }, setDeleteListener: function(callback){ deleteListener = callback; }, updateAspectRatio: function(){ __updateAspectRatio(); }, getAspectRatio: function(){ return aspectRatio; }, setAspectRatioLocked: function(locked){ __setAspectRatioLocked(locked); original.aspectRatioLocked = ratioLocked; }, isAspectRatioLocked: function(){ return ratioLocked; }, setWidth: function(width){ state = 1; if (width === "") { // Default widthInput.value = ""; widthUnit.setSelected("px"); width = "px"; } else { var _val = parseInt(width); if (isNaN(_val)) { widthInput.value = ""; } else { widthInput.value = _val; } widthUnit.setSelected((width.indexOf("%") !== -1 ? "%" : "px")); } original.width = __getWidth(); if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") { __setAspectVisibility(false); } else { __setAspectVisibility(true); } }, getWidth: __getWidth, setHeight: function(height){ state = 1; if (height === "") { // Default heightInput.value = ""; heightUnit.setSelected("px"); height = "px"; } else { var _val = parseInt(height); if (isNaN(_val)) { heightInput.value = ""; } else { heightInput.value = _val; } heightUnit.setSelected((height.indexOf("%") !== -1 ? "%" : "px")); } original.height = __getHeight(); if (widthUnit.getValue() !== "px" || heightUnit.getValue() !== "px") { __setAspectVisibility(false); } else { __setAspectVisibility(true); } }, getHeight: __getHeight, setLarge: function(large){ state = 1; largeInput.update(large); original.large = largeInput.isSelected(); }, getLarge: function(){ return largeInput.isSelected(); }, setAlign: function(align){ state = 1; alignInput.update(align); original.align = alignInput.isSelected(); }, getAlign: function(){ return alignInput.isSelected(); }, setScrollToPlayer: function(scrollToPlayer){ state = 1; scrollToPlayerInput.update(scrollToPlayer); original.scrollToPlayer = scrollToPlayerInput.isSelected(); }, getScrollToPlayer: function(){ return scrollToPlayerInput.isSelected(); }, setScrollToPlayerButton: function(scrollToPlayerButton){ state = 1; scrollToPlayerButtonInput.update(scrollToPlayerButton); original.scrollToPlayerButton = scrollToPlayerButtonInput.isSelected(); }, getScrollToPlayerButton: function(){ return scrollToPlayerButtonInput.isSelected(); }, setCustomName: function(customName){ if (typeof customName !== "string") customName = ""; state = 1; customNameInput.value = customName; original.customName = customName; }, getCustomName: function(){ return customNameInput.value; }, setVisibility: function(visible) { if (visible) { wrp.style.visibility = ""; } else { wrp.style.visibility = "hidden"; } }, newSession: function(){ if (typeof newSessionCallback !== "undefined") newSessionCallback(); }, setSessionListener: function(callback){ newSessionCallback = callback; }, focusCustomNameField: function(){ customNameInput.focus(); }, focusWidthField: function(){ widthInput.focus(); }, focusHeightField: function(){ heightInput.focus(); } }; } function getItemTitle(item) { var dim = ytcenter.utils.calculateDimensions(item.getConfig().width, item.getConfig().height); if (typeof item.getConfig().customName !== "undefined" && item.getConfig().customName !== "") { return item.getConfig().customName; } else if (isNaN(parseInt(item.getConfig().width)) && isNaN(parseInt(item.getConfig().height))) { return (item.getConfig().large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")); subtext.textContent = (item.getConfig().align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")); } else { return dim[0] + "×" + dim[1]; subtext.textContent = (item.getConfig().large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")) + " - " + (item.getConfig().align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")); } } function getItemSubText(item) { if (isNaN(parseInt(item.getConfig().width)) && isNaN(parseInt(item.getConfig().height))) { return (item.getConfig().align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.getConfig().scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } else { return (item.getConfig().large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")) + " - " + (item.getConfig().align ? ytcenter.language.getLocale("SETTINGS_RESIZE_ALIGN") : ytcenter.language.getLocale("SETTINGS_RESIZE_CENTER")) + (item.getConfig().scrollToPlayer ? " - " + ytcenter.language.getLocale("SETTINGS_RESIZE_SCROLLTOPLAYER") : ""); } } function updateListHeight() { var _h = editWrapper.clientHeight || editWrapper.scrollHeight; if (_h > 0) listWrapper.style.height = _h + "px"; } function selectSizeItem(id) { var bypassConfirm = false; if (typeof editor === "undefined") { bypassConfirm = true; editor = createEditor(); } var overrideData = function(){ editor.newSession(); var newItem = false; var newItemSaved = false; var newItemCancled = false; var item; if (typeof id === "undefined") { newItem = true; item = createEmptyItem(); items.push(item); listOl.appendChild(item.getItemElement()); listOl.scrollTop = listOl.scrollHeight - listOl.clientHeight; } else { item = getItemById(id); } markItem(item.getId()); var inf = getItemInfo(item); editor.setCustomName(inf.customName); editor.setWidth(inf.width); editor.setHeight(inf.height); editor.setAspectRatioLocked(inf.aspectRatioLocked); editor.setLarge(inf.large); editor.setAlign(inf.align); editor.setScrollToPlayer(inf.scrollToPlayer); editor.setScrollToPlayerButton(inf.scrollToPlayerButton); editor.updateAspectRatio(); editor.setSessionListener(function(){ if (!newItem || newItemSaved || newItemCancled) return; var sI; for (var i = 0; i < items.length; i++) { sI = i; if (items[i].getId() === item.getId()) break; } items.splice(sI, 1); if (typeof item.getItemElement().parentNode !== "undefined") item.getItemElement().parentNode.removeChild(item.getItemElement()); if (typeof saveCallback !== "undefined") saveCallback(getSaveArray()); }); editor.setSaveListener(function(){ newItemSaved = true; item.setConfig({ customName: editor.getCustomName(), width: editor.getWidth(), height: editor.getHeight(), large: editor.getLarge(), align: editor.getAlign(), scrollToPlayer: editor.getScrollToPlayer(), scrollToPlayerButton: editor.getScrollToPlayerButton(), aspectRatioLocked: editor.isAspectRatioLocked() }); item.updateItemElement(); unMarkAllItems(); if (typeof saveCallback !== "undefined") saveCallback(getSaveArray()); }); editor.setCancelListener(function(){ if (newItem) { newItemCancled = true; var sI; for (var i = 0; i < items.length; i++) { sI = i; if (items[i].getId() === item.getId()) break; } items.splice(sI, 1); if (item.getItemElement().parentNode) item.getItemElement().parentNode.removeChild(item.getItemElement()); if (typeof saveCallback !== "undefined") saveCallback(getSaveArray()); } unMarkAllItems(); }); editor.setDeleteListener(function(){ try { if (newItem) return; if (ytcenter.player.isSelectedPlayerSizeById(item.getId())) { if (ytcenter.settings["resize-playersizes"][0].id === item.getId()) { if (ytcenter.settings["resize-playersizes"].length > 1) { ytcenter.player.resize(ytcenter.settings["resize-playersizes"][1]); } } else { ytcenter.player.resize(ytcenter.settings["resize-playersizes"][0]); } } unMarkAllItems(); if (typeof item.getItemElement().parentNode !== "undefined") item.getItemElement().parentNode.removeChild(item.getItemElement()); var sI; for (var i = 0; i < items.length; i++) { sI = i; if (items[i].getId() === item.getId()) break; } items.splice(sI, 1); if (typeof saveCallback !== "undefined") saveCallback(getSaveArray()); } catch (e) { con.error(e); } }); editor.setDeleteButtonVisibility(!newItem); editor.setVisibility(true); editor.focusCustomNameField(); if (newItem) editor.setState(2); }; if (editor.hasUnsavedChanges() && !bypassConfirm) { ytcenter.confirmBox("EMBED_RESIZEITEMLIST_CONFIRM_TITLE", "EMBED_RESIZEITEMLIST_UNSAVED_CONFIRM_MESSAGE", function(accepted){ if (accepted) { editor.setState(0); overrideData(); } }); } else { overrideData(); } updateListHeight(); } function getItemById(id) { for (var i = 0; i < items.length; i++) { if (items[i].getId() === id) return items[i]; } } function unMarkAllItems() { for (var i = 0; i < items.length; i++) { items[i].setSelection(false); } } function markItem(id) { unMarkAllItems(); getItemById(id).setSelection(true); } function getSaveArray() { var _s = []; for (var i = 0; i < items.length; i++) { _s.push(items[i].getData()); } return _s; } function getItemByElement(li) { for (var i = 0; i < items.length; i++) { if (items.getItemElement() === li) return items[i]; } } function createEmptyItem() { return wrapItem({ id: ytcenter.utils.assignId("resize_item_list_"), config: { customName: "", width: "", height: "", large: true, align: false, scrollToPlayer: false, scrollToPlayerButton: false, aspectRatioLocked: false } }); } function setItems(_items) { items = []; ytcenter.utils.each(_items, function(i, item){ items.push(wrapItem(item)); }); listOl.innerHTML = ""; ytcenter.utils.each(items, function(i, item){ var a = item.getItemElement(); listOl.appendChild(a); }); } var editor; var saveCallback; var items = []; var lastValue = ytcenter.settings[option.defaultSetting]; var wrapper = document.createElement("div"); wrapper.className = "ytcenter-embed ytcenter-resize-panel"; var headerWrapper = document.createElement("div"); headerWrapper.className = "ytcenter-resize-panel-header"; var addButton = ytcenter.gui.createYouTubeDefaultButton("", [ytcenter.gui.createYouTubeButtonTextLabel("EMBED_RESIZEITEMLIST_ADD_SIZE")]); ytcenter.utils.addClass(addButton, "ytcenter-list-header-btn"); ytcenter.utils.addEventListener(addButton, "click", function(){ selectSizeItem(); }); headerWrapper.appendChild(addButton); var contentWrapper = document.createElement("div"); contentWrapper.className = "ytcenter-resize-panel-content"; var positionerEditWrapper = document.createElement("div"); positionerEditWrapper.className = "ytcenter-resize-panel-right"; var editWrapper = document.createElement("div"); editWrapper.className = "ytcenter-panel"; positionerEditWrapper.appendChild(editWrapper); var listWrapper = document.createElement("div"); listWrapper.className = "ytcenter-resize-panel-list"; var listOl = document.createElement("ol"); listOl.className = "ytcenter-list ytcenter-dragdrop ytcenter-scrollbar ytcenter-scrollbar-hover"; var dd = ytcenter.dragdrop(listOl); dd.addEventListener("onDrop", function(newIndex, oldIndex, item){ var itm = items[oldIndex]; items.splice(oldIndex, 1); items.splice(newIndex, 0, itm); if (saveCallback) saveCallback(getSaveArray()); //ytcenter.events.performEvent("ui-refresh"); }); listWrapper.appendChild(listOl); contentWrapper.appendChild(listWrapper); contentWrapper.appendChild(positionerEditWrapper); wrapper.appendChild(headerWrapper); wrapper.appendChild(contentWrapper); if (option.parent) { option.parent.addEventListener("click", function(){ if (!editor) { editor = createEditor(); } updateListHeight(); }); } setItems(lastValue); return { element: wrapper, // So the element can be appended to an element. bind: function(callback){ saveCallback = function(arg){ if (callback) callback(arg); ytcenter.player.resizeUpdater(); } }, update: function(value){ if (value === lastValue) return; lastValue = value; setItems(value); if (typeof editor !== "undefined") editor.setVisibility(false); } }; }; ytcenter.modules.select = function(option){ function updateList() { select.innerHTML = ""; ytcenter.utils.each(list, function(i, item){ var o = document.createElement("option"); o.setAttribute("value", i); if (typeof item.label !== "undefined") { o.textContent = ytcenter.language.getLocale(item.label); ytcenter.language.addLocaleElement(o, item.label, "@textContent"); } else if (typeof item.text !== "undefined") { o.textContent = item.text; } else { o.textContent = "undefined"; } if (selectedValue === item.value) { o.setAttribute("selected", "selected"); selectedText.textContent = o.textContent; } select.appendChild(o); }); } var list = (option && option.args && option.args.list) || [], selectedValue, saveCallback, wrapper = document.createElement("span"), selectedContentWrapper = document.createElement("span"), selectedArrow = document.createElement("img"), selectedText = document.createElement("span"), select = document.createElement("select"); wrapper.className = "ytcenter-embed yt-uix-form-input-select"; wrapper.style.marginBottom = "2px"; wrapper.style.height = "27px"; selectedContentWrapper.className = "yt-uix-form-input-select-content"; selectedArrow.setAttribute("src", "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"); selectedArrow.className = "yt-uix-form-input-select-arrow"; selectedText.className = "yt-uix-form-input-select-value"; selectedContentWrapper.appendChild(selectedArrow); selectedContentWrapper.appendChild(selectedText); select.className = "yt-uix-form-input-select-element"; select.style.cursor = "pointer"; select.style.height = "27px"; updateList(); ytcenter.utils.addEventListener(select, "change", function(e){ selectedText.textContent = select.options[select.selectedIndex].textContent; if (saveCallback) saveCallback(list[select.selectedIndex].value); }); wrapper.appendChild(selectedContentWrapper); wrapper.appendChild(select); return { element: wrapper, bind: function(callback){ saveCallback = callback; }, setSelected: function(value){ selectedValue = value; for (var i = 0; i < list.length; i++) { if (list[i].value === value) { select.selectedIndex = i; break; } } if (select.options.length > 0) selectedText.textContent = select.options[select.selectedIndex].textContent; }, update: function(value){ selectedValue = value; for (var i = 0; i < list.length; i++) { if (list[i].value === value) { select.selectedIndex = i; break; } } if (select.options.length > 0) selectedText.textContent = select.options[select.selectedIndex].textContent; }, updateList: function(_list){ list = _list; updateList(); }, getValue: function(){ return list[select.selectedIndex].value; } }; }; ytcenter.modules.textarea = function(option){ var elm = document.createElement('textarea'), i, key; elm.className = "yt-uix-form-textarea"; if (option && option.args && option.args.className) { elm.className += " " + option.args.className; } if (option && option.args && option.args.styles) { for (key in option.args.styles) { if (option.args.styles.hasOwnProperty(key)) { elm.style.setProperty(key, option.args.styles[key]); } } } if (option && option.args && option.args.text) { elm.textContent = option.args.text; } if (option && option.args && option.args.attributes) { for (key in option.args.attributes) { if (option.args.attributes.hasOwnProperty(key)) { elm.setAttribute(key, option.args.attributes[key]); } } } if (option && option.args && option.args.listeners) { for (i = 0; i < option.args.listeners.length; i++) { elm.addEventListener(option.args.listeners[i].event, option.args.listeners[i].callback, (option.args.listeners[i].bubble ? option.args.listeners[i].bubble : false)); } } return { element: elm, bind: function(){}, update: function(){}, setText: function(txt){ elm.textContent = txt; }, selectAll: function(){ elm.focus(); elm.select(); } }; }; ytcenter.modules.textContent = function(option){ var elm = document.createElement("div"); if (option && option.args && option.args.styles) { for (var key in option.args.styles) { if (option.args.styles.hasOwnProperty(key)) { elm.style[key] = option.args.styles[key]; } } } if (option && option.args && option.args.text) { if (option && option.args && option.args.replace) { elm.appendChild(ytcenter.utils.replaceText(option.args.text, option.args.replace)); } else { elm.textContent = option.args.text; } } if (option && option.args && option.args.textlocale) { if (option && option.args && option.args.replace) { elm.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale(option.args.textlocale), option.args.replace)); } else { elm.textContent = ytcenter.language.getLocale(option.args.textlocale); } ytcenter.events.addEvent("language-refresh", function(){ elm.innerHTML = ""; if (option && option.args && option.args.replace) { elm.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale(option.args.textlocale), option.args.replace)); } else { elm.textContent = ytcenter.language.getLocale(option.args.textlocale); } }); } if (option && option.args && option.args.listeners) { for (var i = 0; i < option.args.listeners.length; i++) { elm.addEventListener(option.args.listeners[i].event, option.args.listeners[i].callback, (option.args.listeners[i].bubble ? option.args.listeners[i].bubble : false)); } } if (option && option.args && option.args.styles) { for (var key in option.args.styles) { if (option.args.styles.hasOwnProperty(key)) { elm.style[key] = option.args.styles[key]; } } } return { element: elm, bind: function(){}, update: function(){} }; }; ytcenter.modules.textfield = function(option){ function update(text) { input.value = text; } function bind(callback) { ytcenter.utils.addEventListener(input, "change", function(){ callback(input.value); }, false); } var frag = document.createDocumentFragment(), input = document.createElement("input"); input.setAttribute("type", "text"); input.className = "yt-uix-form-input-text"; input.value = option && ytcenter.settings[option.defaultSetting]; if (option && option.style) { for (var key in option.style) { if (option.style.hasOwnProperty(key)) { elm.style[key] = option.style[key]; } } } frag.appendChild(input); return { element: frag, bind: bind, update: update }; }; ytcenter.modules.translators = function(option){ option = typeof option !== "undefined" ? option : false; var elm = document.createElement("div"); var translators = document.createElement("div"), table = document.createElement("table"), thead = document.createElement("thead"), tbody = document.createElement("tbody"), tr, td; table.className = "ytcenter-settings-table"; tr = document.createElement("tr"); td = document.createElement("td"); td.textContent = ytcenter.language.getLocale("TRANSLATOR_LANGUAGE"); ytcenter.language.addLocaleElement(td, "TRANSLATOR_LANGUAGE", "@textContent"); tr.appendChild(td); td = document.createElement("td"); td.textContent = ytcenter.language.getLocale("TRANSLATOR_ENGLISH"); ytcenter.language.addLocaleElement(td, "TRANSLATOR_ENGLISH", "@textContent"); tr.appendChild(td); td = document.createElement("td"); td.textContent = ytcenter.language.getLocale("TRANSLATOR_CONTRIBUTORS"); ytcenter.language.addLocaleElement(td, "TRANSLATOR_CONTRIBUTORS", "@textContent"); tr.appendChild(td); thead.appendChild(tr); table.appendChild(thead); table.appendChild(tbody); ytcenter.utils.each(option.args.translators, function(key, value){ if (value.length > 0) { tr = document.createElement("tr"); td = document.createElement("td"); td.textContent = ytcenter.language.getLocale("LANGUAGE", key); tr.appendChild(td); td = document.createElement("td"); td.textContent = ytcenter.language.getLocale("LANGUAGE_ENGLISH", key); tr.appendChild(td); td = document.createElement("td"); for (var i = 0; i < value.length; i++) { if (i > 0) td.appendChild(document.createTextNode(" & ")); var el; if (value[i].url) { el = document.createElement("a"); el.href = value[i].url; el.textContent = value[i].name; el.setAttribute("target", "_blank"); } else { el = document.createTextNode(value[i].name); } td.appendChild(el); } tr.appendChild(td); tbody.appendChild(tr); } }); translators.appendChild(table); elm.appendChild(translators); return { element: elm, bind: function(){}, update: function(){} }; }; // @support ytcenter.supported = {}; ytcenter.supported.localStorage = (function(){ var mod = "ytc.supported"; try { uw.localStorage.setItem(mod, mod); uw.localStorage.removeItem(mod); return true; } catch (e) { return false; } })(); ytcenter.supported.CustomEvent = (function(){ var mod = "support.test"; try { var e = document.createEvent('CustomEvent'); if (e && typeof e.initCustomEvent === "function") { e.initCustomEvent(mod, true, true, { mod: mod }); return true; } return false; } catch (e) { return false; } })(); // @unsafeCall ytcenter.unsafeCall = (function(){ function storeFunctions(obj) { if (Object.prototype.toString.call(obj) === "[object Array]") { var i; for (i = 0; i < obj.length; i++) { obj[i] = storeFunctions(obj[i]); } } else if (typeof obj === "function") { return comm.push(obj) - 1; } else if (obj === Object(obj)) { var key; for (key in obj) { if (obj.hasOwnProperty(key)) { obj[key] = storeFunctions(obj[key]); } } } return obj; } function call(method, args, callback) { var id = null; if (callback !== null) { id = comm.push(callback) - 1; } var detail = { id: id, method: method, arguments: storeFunctions(args) }; if (ytcenter.supported.CustomEvent) { callEvent(detail); } else { callMessage(detail); } } function callMessage(detail) { detail.level = "unsafe"; postMessage(JSON.stringify(detail)); } function callEvent(detail) { var event = document.createEvent("CustomEvent"); event.initCustomEvent("ytc-content-call", true, true, JSON.stringify(detail)); document.documentElement.dispatchEvent(event); } function resp(e) { if (!e || !e.data) return; // Checking if data is present if (typeof e.data !== "string") return; // Checking if the object is a string. if (!e.data.indexOf || e.data.indexOf("{") !== 0) return; var data = JSON.parse(e.data); if (data.level === "unsafe") return; if (typeof comm[data.id] === "function") { comm[data.id].apply(null, data.arguments); } } function eventResponse(e) { var detail = e.detail; if (typeof detail !== "object") detail = JSON.parse(detail); if (typeof comm[detail.id] === "function") { comm[detail.id].apply(null, detail.arguments); } if (e && typeof e.stopPropagation === "function") e.stopPropagation(); } function postMessage(data) { window.postMessage(data, "*"); } function initListeners() { if (ytcenter.supported.CustomEvent) { window.addEventListener("ytc-page-call", eventResponse, false); } else { window.addEventListener("message", resp, false); } } var comm = []; initListeners(); return call; })(); /* The util function "throttle" and "once" has been taken from Underscore. * ************************** * http://underscorejs.org * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Underscore may be freely distributed under the MIT license. */ ytcenter.utils.throttle = function(func, delay, options){ function timeout() { previous = options.leading === false ? 0 : new Date; timer = null; result = func.apply(context, args); } var context, args, result, timer = null, previous = 0; options = options || {}; return function(){ var now = new Date, dt; context = this; args = arguments; if (!previous && options.leading === false) previous = now; dt = delay - (now - previous); if (dt <= 0) { uw.clearTimeout(timer); timer = null; previous = now; result = func.apply(context, args); } else if (!timer && options.trailing !== false) { timer = uw.setTimeout(timeout, dt); } return result; }; }; // @tabEvents ytcenter.tabEvents = (function(){ /* Fire an event to the other tabs for Firefox */ function fireEventFirefox() { ytcenter.unsafeCall("firefox_windowLinkerFireRegisteredEvent", Array.prototype.slice.call(arguments, 0)); } function fireEventLocalStorage() { // Create a guid if a guid hasn't been created. if (!guid) guid = ytcenter.utils.guid(); var locked = parseInt(uw.localStorage.getItem(STORAGE_LOCK) || 0, 10); var now = ytcenter.utils.now(); var args = Array.prototype.slice.call(arguments, 0); if (locked && now - locked < STORAGE_TIMEOUT) { uw.setTimeout(ytcenter.utils.funcBind.apply(ytcenter.utils, [null, fireEventLocalStorage].concat(args)), STORAGE_WAIT); } else { hasLock = true; uw.localStorage.setItem(STORAGE_LOCK, now); uw.localStorage.setItem(STORAGE_KEY, JSON.stringify({ origin: guid, args: args })); cleanThrottle(); // wait x milliseconds until cleaning items } } /* The standard event handler, which every handler will call at the end. */ function eventFired(event) { if (!listeners[event]) return; var args = Array.prototype.slice.call(arguments, 1); for (var i = 0, len = listeners[event].length; i < len; i++) { listeners[event][i].apply(null, args); } } /* Event handler for the localStorage */ function eventFiredStorage(e) { e = e || uw.event; if (e.key === STORAGE_KEY) { var data = JSON.parse(e.newValue || "{}"); if (data.origin !== guid) { eventFired.apply(null, data.args); } } } function clean() { if (hasLock) { hasLock = false; uw.localStorage.removeItem(STORAGE_LOCK); uw.localStorage.removeItem(STORAGE_KEY); } } /* Add an event listener to get information from other tabs */ function addEventListener(event, callback) { if (!listeners[event]) listeners[event] = []; listeners[event].push(callback); } /* Remove the added event listener */ function removeEventListener(event, callback) { if (!listeners[event]) return; for (var i = 0, len = listeners[event].length; i < len; i++) { listeners[event].splice(i, 1); break; } } /* Firefox replacement */ function addWindowListener(callback) { ytcenter.unsafeCall("firefox_addWindowListener", [], callback); } /* Init the event handlers */ function init() { if (firefox) { addWindowListener(eventFired); /* Firefox addon function */ } else if (ytcenter.supported.localStorage) { if (typeof uw.addEventListener === "function") { uw.addEventListener("storage", eventFiredStorage, false); } else if (typeof uw.attachEvent === "function") { uw.attachEvent("onstorage", eventFiredStorage, false); } } } function getExportsFirefox() { return { addEventListener: addEventListener, removeEventListener: removeEventListener, fireEvent: fireEventFirefox }; } function getExportsLocalStorage() { return { addEventListener: addEventListener, removeEventListener: removeEventListener, fireEvent: fireEventLocalStorage }; } function getExportsPlaceholder() { function empty() { } return { addEventListener: empty, removeEventListener: empty, fireEvent: empty }; } function getExports() { if (firefox) { return getExportsFirefox(); } else if (ytcenter.supported.localStorage) { return getExportsLocalStorage(); } else { return getExportsPlaceholder(); } } var listeners = {}; var guid = null; var firefox = identifier === 6; var hasLock = false; var STORAGE_KEY = "CMS-YTC"; var STORAGE_LOCK = "CMS-YTC-LOCK"; var STORAGE_EXPIRED = 3600000; var STORAGE_WAIT = 50; var STORAGE_TIMEOUT = 1000; var STORAGE_CLEAN = 1000; var cleanThrottle = ytcenter.utils.throttle(clean, STORAGE_CLEAN); init(); return getExports(); })(); ytcenter.channelPlaylistLinks = (function(){ function update() { var page = ytcenter.getPage(); if (page === "channel") { if (!ytcenter.settings.channelUploadedVideosPlaylist) { var elements = document.getElementsByTagName("a"); for (var i = 0, len = elements.length; i < len; i++) { var el = elements[i]; if (el && typeof el.getAttribute === "function") { var href = el.getAttribute("href"); if (href && typeof href.match === "function" && href.match(/^\/watch\?v=[a-zA-Z0-9_\-]+&list=/g) && (ytcenter.utils.hasClass(el, "ux-thumb-wrap") || ytcenter.utils.hasClass(el, "yt-uix-tile-link"))) { el.setAttribute("href", /^(\/watch\?v=[a-zA-Z0-9_\-]+)&list=/g.exec(href)[1]); el.setAttribute("data-ytc-href", href); } } } } else { var elements = document.getElementsByTagName("a"); for (var i = 0, len = elements.length; i < len; i++) { var el = elements[i]; if (el && typeof el.getAttribute === "function") { var href = el.getAttribute("data-ytc-href"); if (href) { el.setAttribute("href", href); el.removeAttribute("data-ytc-href"); } } } } } } return { update: update }; })(); // @utils ytcenter.utils.getViewPort = function() { var width = 0; var height = 0; if (typeof window.innerWidth === "number") { width = window.innerWidth; height = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { width = document.body.clientWidth; height = document.body.clientHeight; } return { width: width, height: height }; }; ytcenter.utils.getAbsolutePosition = function(el) { var x = el.offsetLeft || 0; var y = el.offsetTop || 0; if (el.offsetParent) { var parentAbsolutePosition = ytcenter.utils.getAbsolutePosition(el.offsetParent); x += parentAbsolutePosition.x; y += parentAbsolutePosition.y; } return { x: x, y: y }; }; ytcenter.utils.listClass = function(el) { if (!el || !el.className) return []; return el.className.split(" "); }; ytcenter.utils.getLocationOrigin = function(){ if (loc.origin) { return loc.origin; } else { return loc.protocol + "//" + loc.hostname + (loc.port ? ":" + loc.port: ""); } }; ytcenter.utils.getHTML5Player = function(){ var movie_player = document.getElementById("movie_player"); if (!movie_player) return null; var video = movie_player.getElementsByClassName("html5-main-video")[0]; return video || null; }; ytcenter.utils.errorProxy = function(scope, func){ var args = Array.prototype.slice.call(arguments, 2); return function(){ try { return func.apply(scope, args.concat(Array.prototype.slice.call(arguments))) } catch (e) { console.error(e); } }; }; ytcenter.utils.funcBind = function(scope, func){ var args = Array.prototype.slice.call(arguments, 2); return function(){ return func.apply(scope, args.concat(Array.prototype.slice.call(arguments))) }; }; (function(){ var cssElements = {}; ytcenter.utils.setCustomCSS = function(id, css){ ytcenter.utils.removeCustomCSS(id); var el = document.createElement("style"); el.type = "text/css"; el.textContent = css; document.getElementsByTagName('head')[0].appendChild(el); cssElements[id] = el; }; ytcenter.utils.removeCustomCSS = function(id){ if (cssElements.hasOwnProperty(id)) { cssElements[id].parentNode.removeChild(cssElements[id]); delete cssElements[id]; } }; })(); (function(){ function loadCanvas(url, rgba) { var i; for (i = 0; i < tintImages.length; i++) { if (url === tintImages[i].url && rgba.r === tintImages[i].rgba.r && rgba.g === tintImages[i].rgba.g && rgba.b === tintImages[i].rgba.b && rgba.a === tintImages[i].rgba.a ) { return tintImages[i].canvas; } } } var tintImages = []; ytcenter.utils.tintImage = function(url, rgba, callback) { function onerror() { throw "Couldn't load image!"; } function onload() { canvas.width = img.width; canvas.height = img.height; ctx.clearRect(0, 0, img.width, img.height); ctx.drawImage(img, 0, 0, img.width, img.height); var imageData = ctx.getImageData(0, 0, img.width, img.height); var idx, i, pixel; for (i = (img.width * img.height); i >= 0; --i) { idx = i << 2; pixel = {r: imageData.data[idx], g: imageData.data[idx + 1], b: imageData.data[idx + 2]}; imageData.data[idx] = (rgba.a * rgba.r + (1 - rgba.a) * pixel.r); imageData.data[idx + 1] = (rgba.a * rgba.g + (1 - rgba.a) * pixel.g); imageData.data[idx + 2] = (rgba.a * rgba.b + (1 - rgba.a) * pixel.b); } ctx.putImageData(imageData, 0, 0); tintImages.push({ url: url, rgba: rgba, canvas: canvas }); if (tintImages.length > 10) tintImages.splice(0, tintImages.length - 10); callback && callback(canvas); } var cache = loadCanvas(url, rgba); if (cache) { callback && callback(cache); return; } var canvas = document.createElement("canvas"); if (!(canvas.getContext && canvas.getContext('2d'))) return null; // Canvas is not supported! var ctx = canvas.getContext("2d"); var img = new Image(); img.src = url; img.onload = onload; img.onerror = onerror; }; })(); ytcenter.utils.setStyles = function(el, styles){ var key; for (key in styles) { if (styles.hasOwnProperty(key)) { el.style.setProperty(key, styles[key]) } } }; ytcenter.utils.filterColor = function(color, ohsv){ var hsv = ytcenter.utils.getHSV(color.red, color.green, color.blue); hsv.hue = Math.round(hsv.hue - ohsv.hue); if (hsv.hue < 0) hsv.hue += 360; hsv.saturation = Math.round(100 + (hsv.saturation - ohsv.saturation)); hsv.value = Math.round(100 + (hsv.value - ohsv.value)); return "hue-rotate(" + hsv.hue + "deg) saturate(" + hsv.saturation + "%) brightness(" + hsv.value + "%)"; }; ytcenter.utils.asyncCall = function(func){ var args = Array.prototype.splice.call(arguments, 1, arguments.length); var proxy = ytcenter.utils.oldBind(func); uw.setTimeout(function(){ proxy.apply(null, args); }, 0); }; ytcenter.utils.getScrollPosition = function(scrollElm){ var posX = 0; var posY = 0; while (scrollElm != null) { posX += scrollElm.offsetLeft; posY += scrollElm.offsetTop; scrollElm = scrollElm.offsetParent; } return { x: posX, y: posY }; }; ytcenter.utils.live = (function(){ function getElements(query) { return document.querySelectorAll(query); } function isElementParent(el, parent) { var found = false; while (el && !(found = el === parent)) el = el.parentElement; return found; } function handleElements(elements, e, listener) { var i; for (i = 0; i < elements.length; i++) { if (isElementParent(e.target, elements[i]) && typeof listener.listener === "function") { listener.listener.call(e.target, e); } } } function onListener(e) { var i; e = e || win.event; for (i = 0; i < listeners.length; i++) { if (listeners[i].type === e.type) { handleElements(getElements(listeners[i].query), e, listeners[i]); } } } function shutdown() { listeners = []; var i; for (i = 0; i < events.length; i++) { shutdownEvent(events[i]); } events = []; } function shutdownEvent(event) { document.removeEventListener(event, onListener, false); } function setupEvent(event) { if (!isEventInitialized(event)) { document.addEventListener(event, onListener, false); } } function clean(event) { var i; for (i = 0; i < listeners.length; i++) { if (listeners[i].type === event) { return; } } shutdownEvent(event); for (i = 0; i < events.length; i++) { if (events[i] === event) { events.splice(i, 1); break; } } } function isEventInitialized(event) { var i; for (i = 0; i < events.length; i++) { if (events[i] === event) return true; } return false; } function addEventListener(type, query, listener) { setupEvent(type); listeners.push({ type: type, query: query, listener: listener }); } function removeEventListener(type, query, listener) { var i; for (i = 0; i < listeners.length; i++) { if (type === listeners[i].type && query === listeners[i].query && listener === listeners[i].listener) { listeners.splice(i, 1); return; } } } var listeners = [], events = []; return { add: addEventListener, rem: removeEventListener, unload: shutdown }; })(); ytcenter.utils.setZeroTimeout = (function(){ function setZeroTimeout(fn) { timeouts.push(fn); window.postMessage(uniqueMessageName, "*"); } function handleMessage(event) { if ((event.source === window || event.source === uw) && event.data === uniqueMessageName) { event && event.stopPropagation && event.stopPropagation(); if (timeouts.length > 0) { timeouts.shift()(); } } } var timeouts = [], uniqueMessageName = "ytcenter-zero-timeout-message"; window.addEventListener("message", handleMessage, true); return setZeroTimeout; })(); ytcenter.utils.addEndTransitionListener = function(elm, listener){ function getTransitionEndKey() { var transitions = { "transition": "transitionend", "WebkitTransition": "webkitTransitionEnd", "MozTransition": "transitionend", "OTransition": "oTransitionEnd otransitionend" }, key; for (key in transitions) { if (typeof elm.style[key] !== "undefined") { return transitions[key]; } } return null; } var transitionKey = getTransitionEndKey(); if (transitionKey === null) return false; transitionKey = transitionKey.split(" "); ytcenter.utils.addEventListener(elm, transitionKey[0], listener, false); if (transitionKey[1]) { ytcenter.utils.addEventListener(elm, transitionKey[1], listener, false); } return true; }; ytcenter.utils.removeEndTransitionListener = function(elm, listener){ function getTransitionEndKey() { var transitions = { "transition": "transitionend", "WebkitTransition": "webkitTransitionEnd", "MozTransition": "transitionend", "OTransition": "oTransitionEnd otransitionend" }, key; for (key in transitions) { if (typeof elm.style[key] !== "undefined") { return transitions[key]; } } return null; } var transitionKey = getTransitionEndKey(); if (transitionKey === null) return false; transitionKey = transitionKey.split(" "); ytcenter.utils.removeEventListener(elm, transitionKey[0], listener, false); if (transitionKey[1]) { ytcenter.utils.removeEventListener(elm, transitionKey[1], listener, false); } return true; }; ytcenter.utils.urlComponentToObject = function(str){ var parts = str.split("&"), hash = {}, i, _tmp; for (i = 0; i < parts.length; i++) { _tmp = parts[i].split("="); hash[decodeURIComponent(_tmp[0])] = decodeURIComponent(_tmp[1]); } return hash; }; ytcenter.utils.objectToUrlComponent = function(obj){ var urlComponent = "", key; for (key in obj) { if (obj.hasOwnProperty(key)) { if (urlComponent !== "") urlComponent += "&"; urlComponent += encodeURIComponent(key) + "=" + encodeURIComponent(obj[key]); } } return urlComponent; }; ytcenter.utils.cssFix = function(elm){ var width = elm.style.width; elm.style.width = "0px"; elm.offsetHeight; elm.style.width = (width ? width : ""); }; ytcenter.utils.getContentByTags = function(text, startTag, endTag){ text = text.split(startTag)[1]; text = text.split(endTag)[0]; return text; }; ytcenter.utils.cleanObject = function(obj){ try { if (obj instanceof Object && typeof obj["__exposedProps__"] !== "undefined") delete obj["__exposedProps__"]; } catch (e) { con.error(e); } var key; for (key in obj) { if (!obj.hasOwnProperty(key)) { delete obj[key]; } else { if (key === "__exposedProps__") { delete obj[key]; } else if (obj[key] instanceof Object) { obj[key] = ytcenter.utils.cleanObject(obj[key]); } } } return obj; }; ytcenter.utils.setCaretPosition = function(el, pos){ if (pos < 0) pos = 0; if (pos > el.value.length) pos = el.value.length; if (typeof el.selectionStart === "number") { el.selectionStart = pos; el.selectionEnd = pos; } else if (document.selection) { el.focus(); var sel = document.selection.createRange(); sel.moveStart("character", pos); sel.moveEnd("character", 0); sel.select(); } }; ytcenter.utils.getCaretPosition = function(el){ var pos = 0; if (typeof el.selectionStart === "number") { pos = el.selectionStart; } else if (document.selection) { el.focus(); var sel = document.selection.createRange(); sel.moveStart("character", -el.value.length); pos = sel.text.length; } return pos; }; ytcenter.utils.prefixText = function(text, prefixChar, preferedLength){ var t = ("" + text); if (t.length < preferedLength) { var i; for (i = 0; i < preferedLength - t.length; i++) { t = prefixChar + t; } } return t; }; ytcenter.utils.replaceContent = function(content, data, start, end) { var a = content.indexOf(start) b = content.indexOf(end); return content.substring(0, a + start.length) + JSON.stringify(data) + content.substring(b); } /* Code taken from https://code.google.com/p/doctype-mirror/wiki/ArticleNodeContains */ ytcenter.utils.contains = function(parent, descendant){ // W3C DOM Level 3 if (typeof parent.compareDocumentPosition != 'undefined') { return parent == descendant || Boolean(parent.compareDocumentPosition(descendant) & 16); } // W3C DOM Level 1 while (descendant && parent != descendant) { descendant = descendant.parentNode; } return descendant == parent; }; ytcenter.utils.toArray = function(list){ var arr = [], i, len = list.length; for (i = 0; i < len; i++) { arr.push(list[i]); } return arr; }; ytcenter.utils.scrollTop = function(scrollTop){ if (!document) return null; if (typeof scrollTop === "number") { con.log("[scrollTop] Scrolling to y-position: " + scrollTop); window.scroll(0, scrollTop); } else if (typeof scrollTop === "object" && scrollTop.scrollIntoView) { con.log("[scrollTop] Scrolling to element."); scrollTop.scrollIntoView(true); } if (document.body && typeof document.body.scrollTop === "number") { return document.body.scrollTop; } else { return document.documentElement.scrollTop; } }; ytcenter.utils.isParent = function(parent, child){ var children = parent.getElementsByTagName(child.tagName); for (var i = 0, len = children.length; i < len; i++) { if (children[i] === child) { return true; } } return false; }; ytcenter.utils.once = function(func) { var ran = false, memo; return function() { if (ran) return memo; ran = true; memo = func.apply(this, arguments); func = null; return memo; }; }; ytcenter.utils.isContainerOverflowed = function(a){ // Possible going to use this one // AKA Is the container bigger on the inside than the outside? return { x: a.scrollWidth > a.clientWidth, y: a.scrollHeight > a.clientHeight }; }; ytcenter.utils.isScrollable = function(a){ var b = ytcenter.utils.getOverflow(a); if (!b.x && !b.y) return false; return { x: b.x && a.scrollWidth > a.clientWidth, y: b.y && a.scrollHeight > a.clientHeight }; }; ytcenter.utils.getOverflow = function(a){ var b = ytcenter.utils.getComputedStyles(a), c = { auto: true, scroll: true, visible: false, hidden: false }; return { x: c[b.overflowX.toLowerCase()], y: c[b.overflowY.toLowerCase()] }; }; ytcenter.utils.getComputedStyles = function(a){ if (!a) return {}; if (document && document.defaultView && document.defaultView.getComputedStyle) return document.defaultView.getComputedStyle(a, null); return a.currentStyle; }; ytcenter.utils.getComputedStyle = function(a, b) { return ytcenter.utils.getComputedStyles(a)[b]; }; ytcenter.utils.getBoundingClientRect = function(a) { var b; if (!a) return null; try { b = a.getBoundingClientRect(); b = { left: b.left, top: b.top, right: b.right, bottom: b.bottom }; } catch (c) { return { left: 0, top: 0, right: 0, bottom: 0 } } if (a.ownerDocument.body) { a = a.ownerDocument; b.left -= a.documentElement.clientLeft + a.body.clientLeft; b.top -= a.documentElement.clientTop + a.body.clientTop; } return b; }; ytcenter.utils.getDimension = function(elm){ if (!elm) return { width: 0, height: 0 }; return { width: elm.offsetWidth, height: elm.offsetHeight }; }; ytcenter.utils.isElementPartlyInView = function(elm, offset, winDim){ var box = ytcenter.utils.getBoundingClientRect(elm) || { left: 0, top: 0, right: 0, bottom: 0 }, dim = ytcenter.utils.getDimension(elm), a = elm, b, c, d; offset = offset || { top: 0, left: 0 }; winDim = winDim || {width: window.innerWidth || document.documentElement.clientWidth, height: window.innerHeight || document.documentElement.clientHeight }; return (box.top + offset.top >= 0 - dim.height && box.left + offset.left >= 0 - dim.width && box.bottom + offset.top <= winDim.height + dim.height && box.right + offset.left <= winDim.width + dim.width); }; ytcenter.utils.isElementInView = function(elm){ // TODO Implement scrollable elements support. if (ytcenter.utils.getComputedStyle(elm, "display").toLowerCase() === "none") return false; var box = ytcenter.utils.getBoundingClientRect(elm) || { left: 0, top: 0, right: 0, bottom: 0 }, a = elm, b, c; while (!!(a = a.parentNode) && a !== document.body) { if (ytcenter.utils.getComputedStyle(a, "display").toLowerCase() === "none") return false; b = ytcenter.utils.isContainerOverflowed(a); if (b.x || b.y) { c = ytcenter.utils.getBoundingClientRect(a) || { left: 0, top: 0, right: 0, bottom: 0 }; c.top = c.top - box.top + a.scrollTop; c.left = c.left - box.left + a.scrollLeft; c.bottom = c.bottom - box.bottom + a.scrollTop; c.right = c.right - box.right + a.scrollLeft; if (!(c.top >= 0 && c.left >= 0 && c.bottom <= a.clientHeight && c.right <= a.clientWidth)) return false; // We now know that the element is visible in the parent and therefore we can just check if the parent is visible ~magic. return ytcenter.utils.isElementInView(a); } }; return (box.top >= 0 && box.left >= 0 && box.bottom <= (window.innerHeight || document.documentElement.clientHeight) && box.right <= (window.innerWidth || document.documentElement.clientWidth)); }; ytcenter.utils.getVideoIdFromLink = function(url){ var videoIdRegex = /v=([a-zA-Z0-9-_]+)/, indexRegex = /index=([0-9]+)/, videoIdsRegex = /video_ids=([0-9a-zA-Z-_%]+)/, i = 0, a; if (url.match(videoIdRegex)) { a = videoIdRegex.exec(url); if (a && a[1]) return a[1]; } else if (url.match(videoIdsRegex)) { a = indexRegex.exec(url); if (a && a[1]) { i = parseInt(a[1]); } a = videoIdsRegex.exec(url); if (a && a[1] && a[1].split("%2C").length > 0 && a[1].split("%2C")[i]) { return a[1].split("%2C")[i]; } } return null; }; ytcenter.utils.replaceTextAsString = function(text, rep) { if (!text) return text; var tmp = ""; var startB = false; var func = ""; var tmpName = ""; var tmpFunc = ""; var inFunc = false; for (var i = 0; i < text.length; i++) { if (text.charAt(i) == "{" && !startB && !inFunc) { startB = true; } else if (text.charAt(i) == "}" && startB) { var t = tmpName; for (var key in rep) { if (rep.hasOwnProperty(key)) { if (key === tmpName) { tmpName = ""; t = rep[key]; break; } } } tmp += t; startB = false; } else if (startB) { if (tmpName == "" && text.charAt(i) == "!") { tmp += "{"; startB = false; } else { tmpName += text.charAt(i); } } else { tmp += text.charAt(i); } } return tmp; }; ytcenter.utils.replaceTextToText = function(text, replacer){ var regex, arr = [], tmp = ""; text = text || ""; for (key in replacer) { if (replacer.hasOwnProperty(key)) { arr.push(ytcenter.utils.escapeRegExp(key)); } } regex = new RegExp(arr.join("|") + "|.", "g"); text.replace(regex, function(matched){ if (replacer[matched]) { if (typeof replacer[matched] === "function") { var a = replacer[matched](); if (typeof a === "string") { tmp += a; } else { con.error("[TextReplace] Unknown type of replacer!"); } } else if (typeof replacer[matched] === "string") { tmp += replacer[matched]; } else if (typeof replacer[matched] === "number") { tmp += replacer[matched]; } else { con.error("[TextReplace] Unknown type of replacer!"); } } else { tmp += matched; } }); return tmp; }; ytcenter.utils.guid = function(){ function S4() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); } return S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4(); }; ytcenter.utils.srtTimeFormat = function(totalSeconds){ var sec_num = Math.floor(totalSeconds), hours = Math.floor(sec_num / 3600), minutes = Math.floor((sec_num - (hours * 3600)) / 60), seconds = sec_num - (hours * 3600) - (minutes * 60), milliseconds = Math.round((totalSeconds - sec_num)*100); if (hours < 10) hours = "0" + hours; if (minutes < 10) minutes = "0" + minutes; if (seconds < 10) seconds = "0" + seconds; if (milliseconds < 100) milliseconds = "0" + milliseconds; if (milliseconds < 10) milliseconds = "0" + milliseconds; return hours + ":" + minutes + ":" + seconds + "," + milliseconds; }; ytcenter.utils.parseXML = function(rawxml){ var doc; if (uw.DOMParser) { var parser = new uw.DOMParser(); doc = parser.parseFromString(rawxml, "text/xml"); } else if (uw.ActiveXObject) { doc = new uw.ActiveXObject("Microsoft.XMLDOM"); doc.async = false; doc.loadXML(rawxml); } else { throw new Error("[XMLParser] Cannot parse XML!"); } return doc; }; ytcenter.utils.getURL = function(url){ var a = document.createElement("a"); a.href = url; return a; }; ytcenter.utils.wrapModule = function(module, tagname){ var a = document.createElement(tagname || "span"); a.appendChild(module.element); return a; }; ytcenter.utils.transformToArray = function(domArray){ var a = [], i; for (i = 0; i < domArray.length; i++) { a.push(domArray[i]); } return a; }; ytcenter.utils.decodeHTML = function(a){ return a.replace(/&([^;]+);/g, function(a, c){ switch (c) { case "amp": return "&"; case "lt": return "<"; case "gt": return ">"; case "quot": return '"'; default: if ("#" == c.charAt(0)) { var d = Number("0" + c.substr(1)); if (!isNaN(d)) return String.fromCharCode(d) } return a } }) }; ytcenter.utils.decode = function(a){ var b = { "&": "&", "<": "<", ">": ">", """: '"' }, c = window.document.createElement("div"); return a.replace(/&([^;\s<&]+);?/g, function(a, e){ var g = b[a]; if (g) return g; if ("#" == e.charAt(0)) { var h = Number("0" + e.substr(1)); (0, window.isNaN)(h) || (g = String.fromCharCode(h)) } g || (c.innerHTML = a + " ", g = c.firstChild.nodeValue.slice(0, -1)); return b[a] = g }) }; ytcenter.utils.encodeRawTag = function(text){ var a = document.createElement("a"), b = document.createElement("div"); a.setAttribute("class", text); b.appendChild(a); return b.innerHTML.substring("<a class=\"".length, b.innerHTML.length - "\"></a>".length); }; ytcenter.utils.decodeRawTag = function(text){ var a = document.createElement("div"); a.innerHTML = "<a class=\"" + text + "\"></a>"; return a.firstChild.getAttribute("class"); }; ytcenter.utils.setterGetterClassCompatible = function(){ try { var a_getter = false, a_setter = false, a_instance, a_confirm = "WORKS"; a_instance = defineLockedProperty({}, "test", function(value){a_setter = value === a_confirm}, function(){a_getter = true;return a_confirm;}); if (a_confirm === a_instance.test) { a_instance.test = a_confirm; if (a_getter && a_setter) return true; } } catch (e) { con.error(e); return false; } return false; }; ytcenter.utils.isNode = function(a){ if (typeof Node === "object") { return a instanceof Node; } else if (a && typeof a === "object" && typeof a.nodeType === "number" && typeof a.nodeName === "string") { return true; } return false; }; ytcenter.utils.escapeRegExp = function(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); }; ytcenter.utils.replaceTextAsString = function(text, rep) { if (!text) return text; var tmp = ""; var startB = false; var func = ""; var tmpName = ""; var tmpFunc = ""; var inFunc = false; for (var i = 0; i < text.length; i++) { if (text.charAt(i) == "{" && !startB && !inFunc) { startB = true; } else if (text.charAt(i) == "}" && startB) { var t = tmpName; for (var key in rep) { if (rep.hasOwnProperty(key)) { if (key === tmpName) { tmpName = ""; t = rep[key]; break; } } } tmp += t; startB = false; } else if (startB) { if (tmpName == "" && text.charAt(i) == "!") { tmp += "{"; startB = false; } else { tmpName += text.charAt(i); } } else { tmp += text.charAt(i); } } return tmp; }; /** This will replace strings in a text with other strings or HTML elements. * replacer : { * "__REPLACEDSTRING__": document.createElement("div"), * "{REPLACESTRING}": "ANOTHER STRING" * } */ ytcenter.utils.replaceText = function(text, replacer){ var frag = document.createDocumentFragment(), regex, arr = [], tmp = ""; for (key in replacer) { if (replacer.hasOwnProperty(key)) { arr.push(ytcenter.utils.escapeRegExp(key)); } } regex = new RegExp(arr.join("|") + "|.", "g"); text.replace(regex, function(matched){ if (replacer[matched]) { if (tmp !== "") { frag.appendChild(document.createTextNode(tmp)); tmp = ""; } if (typeof replacer[matched] === "function") { var a = replacer[matched](); if (typeof a === "string") { frag.appendChild(document.createTextNode(a)); } else if (ytcenter.utils.isNode(a)) { frag.appendChild(a); } else { con.error("[TextReplace] Unknown type of replacer!"); } } else if (typeof replacer[matched] === "string") { frag.appendChild(document.createTextNode(replacer[matched])); } else if (ytcenter.utils.isNode(replacer[matched])) { frag.appendChild(replacer[matched]); } else { con.error("[TextReplace] Unknown type of replacer!"); } } else { tmp += matched; } }); if (tmp !== "") { frag.appendChild(document.createTextNode(tmp)); tmp = ""; } return frag; }; ytcenter.utils._escape_html_entities = [ [" ", "¡", "¢", "£", "¤", "¥", "¦", "§", "¨", "©", "ª", "«", "¬", "­", "®", "¯", "°", "±", "²", "³", "´", "µ", "¶", "·", "¸", "¹", "º", "»", "¼", "½", "¾", "¿", "À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "Þ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ", """, "&", "<", ">", "Œ", "œ", "Š", "š", "Ÿ", "ˆ", "˜", " ", " ", " ", "‌", "‍", "‎", "‏", "–", "—", "‘", "’", "‚", "“", "”", "„", "†", "‡", "‰", "‹", "›", "€", "ƒ", "Α", "Β", "Γ", "Δ", "Ε", "Ζ", "Η", "Θ", "Ι", "Κ", "Λ", "Μ", "Ν", "Ξ", "Ο", "Π", "Ρ", "Σ", "Τ", "Υ", "Φ", "Χ", "Ψ", "Ω", "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "ς", "σ", "τ", "υ", "φ", "χ", "ψ", "ω", "ϑ", "ϒ", "ϖ", "•", "…", "′", "″", "‾", "⁄", "℘", "ℑ", "ℜ", "™", "ℵ", "←", "↑", "→", "↓", "↔", "↵", "⇐", "⇑", "⇒", "⇓", "⇔", "∀", "∂", "∃", "∅", "∇", "∈", "∉", "∋", "∏", "∑", "−", "∗", "√", "∝", "∞", "∠", "∧", "∨", "∩", "∪", "∫", "∴", "∼", "≅", "≈", "≠", "≡", "≤", "≥", "⊂", "⊃", "⊄", "⊆", "⊇", "⊕", "⊗", "⊥", "⋅", "⌈", "⌉", "⌊", "⌋", "⟨", "⟩", "◊", "♠", "♣", "♥", "♦"], [" ", "¡", "¢", "£", "¤", "¥", "¦", "§", "¨", "©", "ª", "«", "¬", "­", "®", "¯", "°", "±", "²", "³", "´", "µ", "¶", "·", "¸", "¹", "º", "»", "¼", "½", "¾", "¿", "À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "Þ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ", """, "&", "<", ">", "Œ", "œ", "Š", "š", "Ÿ", "ˆ", "˜", " ", " ", " ", "‌", "‍", "‎", "‏", "–", "—", "‘", "’", "‚", "“", "”", "„", "†", "‡", "‰", "‹", "›", "€", "ƒ", "Α", "Β", "Γ", "Δ", "Ε", "Ζ", "Η", "Θ", "Ι", "Κ", "Λ", "Μ", "Ν", "Ξ", "Ο", "Π", "Ρ", "Σ", "Τ", "Υ", "Φ", "Χ", "Ψ", "Ω", "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ", "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "ς", "σ", "τ", "υ", "φ", "χ", "ψ", "ω", "ϑ", "ϒ", "ϖ", "•", "…", "′", "″", "‾", "⁄", "℘", "ℑ", "ℜ", "™", "ℵ", "←", "↑", "→", "↓", "↔", "↵", "⇐", "⇑", "⇒", "⇓", "⇔", "∀", "∂", "∃", "∅", "∇", "∈", "∉", "∋", "∏", "∑", "−", "∗", "√", "∝", "∞", "∠", "∧", "∨", "∩", "∪", "∫", "∴", "∼", "≅", "≈", "≠", "≡", "≤", "≥", "⊂", "⊃", "⊄", "⊆", "⊇", "⊕", "⊗", "⊥", "⋅", "⌈", "⌉", "⌊", "⌋", "〈", "〉", "◊", "♠", "♣", "♥", "♦"] ]; ytcenter.utils.escapeXML = function(str){ return ytcenter.utils.replaceArray(str, ["<", ">", "&", "\"", "'"], ["<", ">", "&", """, "'"]); }; ytcenter.utils.unescapeXML = function(str){ return ytcenter.utils.replaceArray(str, ["<", ">", "&", """, "'"], ["<", ">", "&", "\"", "'"]); }; ytcenter.utils.escapeHTML = function(str){ if (str === "") return ""; var i, a = ""; for (i = 0; i < str.length; i++) { switch (str[i]) { case "<": a += "<"; break; case ">": a += ">"; break; case "&": a += "&"; break; case "\"": a += """; break; case "'": a += "'"; break; default: if (str[i] < " " || str[i] > "~") a += "&#" + (str.charCodeAt(i)) + ";"; else a += str[i]; break; } if (str[i] === "<") { a += "<"; } } return a; }; ytcenter.utils.unescapeHTML = function(str){ if (typeof str !== "string" || str === "") return ""; str = ytcenter.utils.replaceArray(str, ytcenter.utils._escape_html_entities[0], ytcenter.utils._escape_html_entities[1]); var i, a = str.match(/&#[0-9]{1,5};/g), b, c; if (!a) return str; for (i = 0; i < a.length; i++) { b = a[i]; c = b.substring(2, b.length - 1); if (c > -32769 && c < 65536) { str = str.replace(b, String.fromCharCode(c)); } else { str = str.replace(b, ""); } } return str; }; ytcenter.utils.replaceArray = function(str, find, replace){ var i; if (find.length !== replace.length) throw "The find & replace array doesn't have the same length!"; for (i = 0; i < find.length; i++) { str = str.replace(new RegExp(find[i], "g"), replace[i]); } return str; }; ytcenter.utils.number1000Formating = function(num){ var i, j = 0, r = [], tmp = ""; num = num + ""; for (i = num.length - 1; i >= 0; i--) { tmp = num[i] + tmp; if (tmp.length === 3) { r.unshift(tmp); tmp = ""; } } if (tmp !== "") r.unshift(tmp); return r.join(","); }; ytcenter.utils.xhr = function(details){ ytcenter.unsafeCall("xhr", [details], null); }; ytcenter.utils.getScrollOffset = function(){ var top = Math.max(document.body.scrollTop, document.documentElement.scrollTop); var left = Math.max(document.body.scrollLeft, document.documentElement.scrollLeft); return {top:top,left:left}; }; ytcenter.utils.addEventListener = (function(){ var listeners = []; ytcenter.unload(function(){ var i; for (i = 0; i < listeners.length; i++) { if (listeners[i].elm.removeEventListener) { listeners[i].elm.removeEventListener(listeners[i].event, listeners[i].callback, listeners[i].useCapture || false); } } listeners = []; }); ytcenter.utils.removeEventListener = function(elm, event, callback, useCapture){ var i; if (elm.removeEventListener) { elm.removeEventListener(event, callback, useCapture || false); } for (i = 0; i < listeners.length; i++) { if (listeners[i].elm === elm && listeners[i].event === event && listeners[i].callback === callback && listeners[i].useCapture === useCapture) { listeners.splice(i, 1); break; } } }; return function(elm, event, callback, useCapture){ if (!elm) return; listeners.push({elm: elm, event: event, callback: callback, useCapture: useCapture}); if (elm.addEventListener) { elm.addEventListener(event, callback, useCapture || false); } else if (elm.attachEvent) { elm.attachEvent("on" + event, callback); } }; })(); ytcenter.utils.getRGB = function(h, s, v){ h = h/360 * 6; s = s/100; v = v/100; var i = Math.floor(h), f = h - i, p = v * (1 - s), q = v * (1 - f * s), t = v * (1 - (1 - f) * s), mod = i % 6, r = [v, q, p, p, t, v][mod], g = [t, v, v, q, p, p][mod], b = [p, p, t, v, v, q][mod]; return {red: r * 255, green: g * 255, blue: b * 255}; }; ytcenter.utils.getHSV = function(r, g, b) { var max = Math.max(r, g, b), min = Math.min(r, g, b); var h, s, v = max; var d = max - min; s = max === 0 ? 0 : d / max; if (max == min) { h = 0; } else { switch (max) { case r: h = (g - b) / d + (g < b ? 6 : 0); break; case g: h = (b - r) / d + 2; break; case b: h = (r - g) / d + 4; break; } h /= 6; } return {hue: h*360, saturation: s*100, value: v/255*100}; }; ytcenter.utils.hsvToHex = function(hue, sat, val){ var rgb = ytcenter.utils.getRGB(hue, sat, val); return ytcenter.utils.colorToHex(rgb.red, rgb.green, rgb.blue); }; ytcenter.utils.colorToHex = function(red, green, blue){ red = Math.round(red); green = Math.round(green); blue = Math.round(blue); if (red > 255) red = 255; if (red < 0) red = 0; if (green > 255) green = 255; if (green < 0) green = 0; if (blue > 255) blue = 255; if (blue < 0) blue = 0; var r = red.toString(16); if (r.length === 1) r = "0" + r; var g = green.toString(16); if (g.length === 1) g = "0" + g; var b = blue.toString(16); if (b.length === 1) b = "0" + b; r = r.toUpperCase(); g = g.toUpperCase(); b = b.toUpperCase(); return "#" + r + g + b; }; ytcenter.utils.hexToColor = function(hex){ if (hex.indexOf("#") === 0) hex = hex.substring(1); var r,g,b; if (hex.length === 6) { r = parseInt(hex.substring(0, 2), 16); g = parseInt(hex.substring(2, 4), 16); b = parseInt(hex.substring(4, 6), 16); } else if (hex.length === 3) { r = parseInt(hex.substring(0, 1) + hex.substring(0, 1), 16); g = parseInt(hex.substring(1, 2) + hex.substring(1, 2), 16); b = parseInt(hex.substring(2, 3) + hex.substring(2, 3), 16); } else { r = 0; g = 0; b = 0; } return {red: r, green: g, blue: b}; }; ytcenter.utils.setKeyword = function(keywords, key, value){ var a = keywords.split(","); for (var i = 0; i < a.length; i++) { if (a[i].split("=")[0] === "key") { if (typeof value === "string") { a[i] = key + "=" + value; } else { a[i] = key; } return a.join(","); } } if (typeof value === "string") { a.push(key + "=" + value); } else { a.push(key); } return a.join(","); }; ytcenter.utils.updateSignatureDecipher = function(){ //ytcenter.utils.updateSignatureDecipher = function(){}; // I'm just cheating a little bit ... if (ytcenter && ytcenter.player && ytcenter.player.config && ytcenter.player.config.assets && ytcenter.player.config.assets.js) { var js = (loc.href.indexOf("https") === 0 ? "https:" : "http:") + ytcenter.player.config.assets.js, regex = /function [a-zA-Z$0-9]+\(a\){a=a\.split\(""\);(.*?)return a\.join\(""\)}/g, regex2 = /function [a-zA-Z$0-9]+\(a\){a=a\.split\(""\);(((a=([a-zA-Z$0-9]+)\(a,([0-9]+)\);)|(a=a\.slice\([0-9]+\);)|(a=a\.reverse\(\);)|(var b=a\[0\];a\[0\]=a\[[0-9]+%a\.length\];a\[[0-9]+\]=b;)))*return a\.join\(""\)}/g; con.log("[updateSignatureDecipher] Contacting " + js); ytcenter.utils.xhr({ method: "GET", url: js, onload: function(response) { var a,i,b,v; if (response.responseText.match(regex2)) { con.log("[updateSignatureDecipher] Using regex 1"); a = regex2.exec(response.responseText)[0].split("{")[1].split("}")[0].split(";"); ytcenter.settings['signatureDecipher'] = []; // Clearing signatureDecipher for (i = 1; i < a.length-1; i++) { b = a[i]; if (b.indexOf("a.slice") !== -1) { // Slice v = b.split("(")[1].split(")")[0]; ytcenter.settings['signatureDecipher'].push({func: "slice", value: parseInt(v)}); } else if (b.indexOf("a.reverse") !== -1) { // Reverse ytcenter.settings['signatureDecipher'].push({func: "reverse", value: null}); } else if ((a[i] + ";" + a[i+1] + ";" + a[i+2]).indexOf("var b=a[0];a[0]=a[") !== -1){ // swapHeadAndPosition v = (a[i] + ";" + a[i+1] + ";" + a[i+2]).split("var b=a[0];a[0]=a[")[1].split("%")[0]; ytcenter.settings['signatureDecipher'].push({func: "swapHeadAndPosition", value: parseInt(v)}); i = i+2; } else { // swapHeadAndPosition (maybe it's deprecated by YouTube) v = b.split("(a,")[1].split(")")[0]; ytcenter.settings['signatureDecipher'].push({func: "swapHeadAndPosition", value: parseInt(v)}); } } } else if (response.responseText.match(regex)) { con.log("[updateSignatureDecipher] Using regex 2"); a = regex.exec(response.responseText)[1]; if (a.match(/a=([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)\(a,([0-9]+)\)/g)) { var commonObject = null; var arr = a.split(";"); var methods = []; var methodValues = []; for (var i = 0, len = arr.length - 1; i < len; i++) { var tokens = /a=([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)\(a,([0-9]+)\)/g.exec(arr[i]); if (commonObject !== tokens[1] && commonObject !== null) { throw "Unknown cipher method!"; } else { commonObject = tokens[1]; } methods.push(tokens[2]); methodValues.push(tokens[3]); } var prefix = "var " + ytcenter.utils.escapeRegExp(commonObject) + "=\\{("; var uniqueMethods = []; var regexMeth = []; for (var i = 0, len = methods.length; i < len; i++) { if (!ytcenter.utils.inArray(uniqueMethods, methods[i])) { uniqueMethods.push(methods[i]); regexMeth.push(ytcenter.utils.escapeRegExp(methods[i])); } } for (var i = 0, len = uniqueMethods.length; i < len; i++) { if (i > 0) prefix += "|"; prefix += "(([a-zA-Z0-9]+):function\\(([a-zA-Z0-9,]+)\\)\\{(.*?)\\}[,]?)"; } prefix += ")\\}"; var regexMethod = new RegExp(prefix, "g").exec(response.responseText); var definedFunctions = new RegExp("([a-zA-Z0-9]+):function\\(([a-zA-Z0-9,]+)\\)\\{(.*?)\\}", "g"); ytcenter.settings['signatureDecipher'] = []; var definedFunction; while (definedFunction = definedFunctions.exec(regexMethod[0])) { ytcenter.settings['signatureDecipher'].push({ func: "function", name: definedFunction[1], value: definedFunction[3] }); } for (var i = 0, len = methods.length; i < len; i++) { ytcenter.settings['signatureDecipher'].push({ func: "call", name: methods[i], value: methodValues[i] }); } } else if (a.match(/([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)\(a,([0-9]+)\)/g)) { var commonObject = null; var arr = a.split(";"); var methods = []; var methodValues = []; for (var i = 0, len = arr.length - 1; i < len; i++) { var tokens = /([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)\(a,([0-9]+)\)/g.exec(arr[i]); if (commonObject !== tokens[1] && commonObject !== null) { throw "Unknown cipher method!"; } else { commonObject = tokens[1]; } methods.push(tokens[2]); methodValues.push(tokens[3]); } var prefix = "var " + ytcenter.utils.escapeRegExp(commonObject) + "=\\{("; var uniqueMethods = []; var regexMeth = []; for (var i = 0, len = methods.length; i < len; i++) { if (!ytcenter.utils.inArray(uniqueMethods, methods[i])) { uniqueMethods.push(methods[i]); regexMeth.push(ytcenter.utils.escapeRegExp(methods[i])); } } for (var i = 0, len = uniqueMethods.length; i < len; i++) { if (i > 0) prefix += "|"; prefix += "(([a-zA-Z0-9]+):function\\(([a-zA-Z0-9,]+)\\)\\{(.*?)\\}[,]?)"; } prefix += ")\\}"; var regexMethod = new RegExp(prefix, "g").exec(response.responseText); var definedFunctions = new RegExp("([a-zA-Z0-9]+):function\\(([a-zA-Z0-9,]+)\\)\\{(.*?)\\}", "g"); ytcenter.settings['signatureDecipher'] = []; var definedFunction; while (definedFunction = definedFunctions.exec(regexMethod[0])) { ytcenter.settings['signatureDecipher'].push({ func: "function", name: definedFunction[1], value: definedFunction[3] + ";return a;" }); } for (var i = 0, len = methods.length; i < len; i++) { ytcenter.settings['signatureDecipher'].push({ func: "call", name: methods[i], value: methodValues[i] }); } } else { ytcenter.settings['signatureDecipher'] = []; // Clearing signatureDecoder ytcenter.settings['signatureDecipher'].push({ func: "code", value: a }); } } else { con.error("[updateSignatureDecipher] Couldn't retrieve the signatureDecipher!"); } ytcenter.events.performEvent("ui-refresh"); ytcenter.saveSettings(); }, onerror: function() { con.error("[SignatureDecipher] Couldn't download data!"); } }); } }; ytcenter.utils.signatureDecipher = function(signatureCipher, decipherRecipe){ function swapHeadAndPosition(array, position) { var head = array[0]; var other = array[position % array.length]; array[0] = other; array[position] = head; return array; } if (!signatureCipher) return ""; var cipherArray = signatureCipher.split(""), i; decipherRecipe = decipherRecipe || ytcenter.settings['signatureDecipher']; var funcMap = {}; for (i = 0; i < decipherRecipe.length; i++) { if (decipherRecipe[i].func === "function") { funcMap[decipherRecipe[i].name] = new Function("a", "b", decipherRecipe[i].value); } else if (decipherRecipe[i].func === "call") { cipherArray = funcMap[decipherRecipe[i].name](cipherArray, decipherRecipe[i].value); } else if (decipherRecipe[i].func === "code") { cipherArray = new Function("a", decipherRecipe[i].value + "return a.join(\"\")")(cipherArray); } else if (decipherRecipe[i].func === "swapHeadAndPosition") { cipherArray = swapHeadAndPosition(cipherArray, decipherRecipe[i].value); } else if (decipherRecipe[i].func === "slice") { cipherArray = cipherArray.slice(decipherRecipe[i].value); } else if (decipherRecipe[i].func === "reverse") { cipherArray = cipherArray.reverse(); } } if (!ytcenter.utils.isArray(cipherArray)) return signatureCipher; return cipherArray.join(""); }; ytcenter.utils.crypt_h = void 0; ytcenter.utils.crypt_l = !0; ytcenter.utils.crypt_p = !1; ytcenter.utils.crypt_Ej = ytcenter.utils.crypt_h; ytcenter.utils.crypt = function(){ try { var a; try { if (ytcenter.utils.crypt_Ej == ytcenter.utils.crypt_h && (ytcenter.utils.crypt_Ej = ytcenter.utils.crypt_p, window.crypto && window.crypto.wx)) { try { a = new Uint8Array(1), window.crypto.wx(a), ytcenter.utils.crypt_Ej = ytcenter.utils.crypt_l } catch (b) { } } } catch (e) { con.error(e); } if (ytcenter.utils.crypt_Ej) { a = Array(16); var c = new Uint8Array(16); window.crypto.getRandomValues(c); for (var d = 0; d < a.length; d++) a[d] = c[d] } else { a = Array(16); for (c = 0; 16 > c; c++) { for (var d = ytcenter.utils.now(), f = 0; f < d % 23; f++) a[c] = Math.random(); a[c] = Math.floor(64 * Math.random()) } } c = []; for (d = 0; d < a.length; d++) c.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"[a[d] & 63]); return c.join(""); } catch (e) { con.error(e); } }; ytcenter.utils.calculateDimensions = function(width, height, player_ratio){ player_ratio = player_ratio || 16/9; var calcWidth, calcHeight; var widthType, heightType; if (width.indexOf("%") !== -1 && width.match(/%$/)) { widthType = "%"; } else { widthType = "px"; } if (height.indexOf("%") !== -1 && height.match(/%$/)) { heightType = "%"; } else { heightType = "px"; } if (widthType === "px") { calcWidth = parseInt(width); } else { calcWidth = width; } if (heightType === "px") { calcHeight = parseInt(height); } else { calcHeight = height; } if (widthType === "px" && heightType === "px") { if (!isNaN(parseInt(width)) && isNaN(parseInt(height))) { calcHeight = Math.round(calcWidth/player_ratio); } else if (isNaN(parseInt(width)) && !isNaN(parseInt(height))) { calcWidth = Math.round(calcHeight*player_ratio); } } return [calcWidth, calcHeight]; }; ytcenter.utils.bindArgument = function(func) { var sargs = Array.prototype.splice.call(arguments, 1, arguments.length); return function() { var args = Array.prototype.slice.call(sargs); Array.prototype.push.apply(args, arguments); return func.apply(null, args); }; }; ytcenter.utils.bind = function(scope, func) { var args = Array.prototype.slice.call(arguments, 2); return function(){ return func.apply(scope, args.concat(Array.prototype.slice.call(arguments))) }; }; ytcenter.utils.oldBind = function(func){ return func.call.apply(func.bind, arguments); }; ytcenter.utils.query = function(key){ if (loc.search.indexOf("?") === 0) { var a = loc.search.substring(1).split("&"); for (var i = 0; i < a.length; i++) { if (decodeURIComponent(a[i].split("=")[0]) === key) { return decodeURIComponent(a[i].split("=")[1]); } } } }; ytcenter.utils.now = Date.now || function () { return +new Date; }; ytcenter.utils.setCookie = function(name, value, domain, path, expires){ domain = domain ? ";domain=" + encodeURIComponent(domain) : ""; path = path ? ";path=" + encodeURIComponent(path) : ""; expires = 0 > expires ? "" : 0 == expires ? ";expires=" + (new Date(1970, 1, 1)).toUTCString() : ";expires=" + (new Date(ytcenter.utils.now() + 1E3 * expires)).toUTCString(); document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + domain + path + expires; }; ytcenter.utils.getCookie = function(key){ return ytcenter.utils.getCookies()[key]; }; ytcenter.utils.getCookies = function(){ function trimLeft(obj){ return obj.replace(/^\s+/, ""); } function trimRight(obj){ return obj.replace(/\s+$/, ""); } function map(obj, callback, thisArg) { for (var i = 0, n = obj.length, a = []; i < n; i++) { if (i in obj) a[i] = callback.call(thisArg, obj[i]); } return a; } var c = document.cookie, v = 0, cookies = {}; if (document.cookie.match(/^\s*\$Version=(?:"1"|1);\s*(.*)/)) { c = RegExp.$1; v = 1; } if (v === 0) { map(c.split(/[,;]/), function(cookie) { var parts = cookie.split(/=/, 2), name = decodeURIComponent(trimLeft(parts[0])), value = parts.length > 1 ? decodeURIComponent(trimRight(parts[1])) : null; cookies[name] = value; }); } else { map(c.match(/(?:^|\s+)([!#$%&'*+\-.0-9A-Z^`a-z|~]+)=([!#$%&'*+\-.0-9A-Z^`a-z|~]*|"(?:[\x20-\x7E\x80\xFF]|\\[\x00-\x7F])*")(?=\s*[,;]|$)/g), function($0, $1) { var name = $0, value = $1.charAt(0) === '"' ? $1.substr(1, -1).replace(/\\(.)/g, "$1") : $1; cookies[name] = value; }); } return cookies; }; ytcenter.utils.assignId = (function(){ var ___count = -1; return function(prefix) { ___count++; var timestamp = (new Date()).getTime(); return (prefix ? prefix : "") + ___count + (timestamp); }; })(); ytcenter.utils.inArrayIndex = function(a, v){ for (var i = 0; i < a.length; i++) { if (a[i] === v) return i; } return -1; }; ytcenter.utils.inArray = function(array, value){ for (var i = 0, len = array.length; i < len; i++) { if (array[i] === value) { return true; } } return false; }; ytcenter.utils.decodeURIArguments = function(uri){ var a = {}; ytcenter.utils.each(uri.split("&"), function(i, item){ var key = decodeURIComponent(item.split("=")[0]); var value = decodeURIComponent(item.split("=")[1]); a[key] = value; }); return a; }; ytcenter.utils.call = function(func, args){ var a = ""; ytcenter.utils.each(args, function(i){ if (i > 0) a += ", "; a += "b[" + i + "]"; }); return new Function("a", "return a(" + a + ")")(func); }; ytcenter.utils.randomString = function(str, len) { var buff = ""; for (var i = 0; i < len; i++) { buff += str[Math.floor(Math.random()*len)]; } return buff; }; ytcenter.utils.insertAfter = function(elm, after){ if (typeof after.parentNode === "undefined") return; if (typeof elm.parentNode !== "undefined") elm.parentNode.removeChild(elm); if (after.parentNode.lastChild === after) { after.parentNode.appendChild(elm); } else { after.parentNode.insertBefore(elm, after.nextSibling); } }; ytcenter.utils.hasChild = function(parent, elm){ var c = parent.children; for (var i = 0; i < c.length; i++) { if (c[i] === elm) return true; if (ytcenter.utils.hasChild(c[i], elm)) return true; } return false; }; ytcenter.utils.toParent = function(elm, className){ while (elm !== document.body && typeof elm !== "undefined") { if (ytcenter.utils.hasClass(elm, className)) return elm; elm = elm.parentNode; } }; ytcenter.utils.isArray = function(arr){ return Object.prototype.toString.call(arr) === "[object Array]"; }; ytcenter.utils.each = function(obj, callback){ if (ytcenter.utils.isArray(obj)) { for (var i = 0; i < obj.length; i++) { if (callback(i, obj[i]) === true) break; } } else { for (var key in obj) { if (obj.hasOwnProperty(key)) { if (callback(key, obj[key]) === true) break; } } } }; ytcenter.utils.mergeArrays = function(){ if (arguments.length <= 0) return []; if (arguments.length === 1) return arguments[0]; var arr = [], i, j; for (i = 0; i < arguments.length; i++) { if (typeof arguments[i] === "undefined") continue; for (j = 0; j < arguments[i].length; j++) { arr.push(arguments[i][j]); } } return arr; } ytcenter.utils.mergeObjects = function(){ if (arguments.length <= 0) return {}; if (arguments.length === 1) return arguments[0]; var _o = arguments[0]; for (var i = 1; i < arguments.length; i++) { if (typeof arguments[i] === "undefined") continue; ytcenter.utils.each(arguments[i], function(key, value){ var type = Object.prototype.toString.call(value); if (_o[key] && (type === "[object Array]" || type === "[object Object]")) { _o[key] = ytcenter.utils.mergeObjects(_o[key], value); } else { _o[key] = value; } }); } return _o; }; ytcenter.utils.cleanClasses = function(elm){ if (typeof elm === "undefined" || typeof elm.className === "undefined") return; var classNames = elm.className.split(" "), i, _new = []; for (i = 0; i < classNames.length; i++) { if (classNames[i] !== "" && !ytcenter.utils.inArray(_new, classNames[i])) { _new.push(classNames[i]); } } elm.className = _new.join(" "); }; ytcenter.utils.hasClass = function(elm, className){ if (typeof elm === "undefined" || typeof elm.className === "undefined") return; var classNames = elm.className.split(" "), i; for (i = 0; i < classNames.length; i++) { if (classNames[i] === className) return true; } return false; }; ytcenter.utils.toggleClass = function(elm, className){ if (typeof elm === "undefined" || typeof elm.className === "undefined") return; if (ytcenter.utils.hasClass(elm, className)) { ytcenter.utils.removeClass(elm, className); } else { ytcenter.utils.addClass(elm, className); } }; ytcenter.utils.addClass = function(elm, className){ if (typeof elm === "undefined" || typeof elm.className === "undefined") return; var classNames = elm.className.split(" "), addClassNames = className.split(" "), _new = [], i, j, found; for (i = 0; i < addClassNames.length; i++) { found = false; for (j = 0; j < classNames.length; j++) { if (addClassNames[i] === classNames[j]) { found = true; break; } } if (!found) { _new.push(addClassNames[i]); } } elm.className += " " + _new.join(" "); ytcenter.utils.cleanClasses(elm); }; ytcenter.utils.removeClass = function(elm, className){ if (typeof elm === "undefined" || typeof elm.className === "undefined") return; var classNames = elm.className.split(" "), remClassNames = className.split(" "), _new = [], i, j, found; for (var i = 0; i < classNames.length; i++) { if (classNames[i] === "") continue; found = false; for (j = 0; j < remClassNames.length; j++) { if (classNames[i] === remClassNames[j]) { found = true; break; } } if (!found) { _new.push(classNames[i]); } } elm.className = _new.join(" "); }; ytcenter.utils.getOffset = function(elm, toElement){ var _x = 0; var _y = 0; while(elm && elm !== toElement && !isNaN(elm.offsetLeft) && !isNaN(elm.offsetTop)) { _x += elm.offsetLeft - elm.scrollLeft; _y += elm.offsetTop - elm.scrollTop; elm = elm.offsetParent; } return { top: _y, left: _x }; }; ytcenter.utils.getOffScreenX = function(elm, border){ border = border || 0; if (ytcenter.utils.getOffset(elm).left - border < 0) { return ytcenter.utils.getOffset(elm).left + border; } else if (ytcenter.utils.getOffset(elm).left + elm.offsetWidth + border > window.innerWidth) { return ytcenter.utils.getOffset(elm).left + elm.offsetWidth + border - window.innerWidth; } else { return 0; } }; ytcenter.utils.getOffScreenY = function(elm, border){ border = border || 0; if (ytcenter.utils.getOffset(elm).top + border < 0) { return ytcenter.utils.getOffset(elm).top - border; } else if (ytcenter.utils.getOffset(elm).top + elm.offsetWidth > window.innerWidth - border) { return ytcenter.utils.getOffset(elm).top + elm.offsetWidth + border - window.innerWidth; } else { return 0; } }; ytcenter.utils.addCSS = function(id, styles, addElement) { function add() { if (oStyle.parentNode) { con.error("[addCSS] Element already added to document."); } else { if (document && document.body) { document.body.appendChild(oStyle); } else if (document && document.head) { document.head.appendChild(oStyle); } else if (document && document.documentElement) { document.documentElement.appendChild(oStyle); } else if (document) { document.appendChild(oStyle); } else { con.error("[addCSS] Couldn't add style to document!"); } } } function remove() { if (isAdded()) { oStyle.parentNode.removeChild(oStyle); } } function isAdded() { return oStyle && oStyle.parentNode; } if (typeof addElement !== "boolean") { addElement = true; } var oStyle = document.createElement("style"); oStyle.setAttribute("id", "ytcenter-styles-" + id); oStyle.setAttribute("type", "text\/css"); oStyle.appendChild(document.createTextNode(styles + "\n//# sourceURL=" + encodeURIComponent("ytcenter/" + id + ".css"))); if (addElement) { add(); } return { add: add, remove: remove, isAdded: isAdded }; }; ytcenter.utils.createElement = function(tagname, options){ options = options || {}; var elm = document.createElement(tagname); ytcenter.utils.each(options, function(key, value){ if (key === "style" && typeof value === "object") { ytcenter.utils.each(value, function(_key, _value){ elm.style[_key] = _value; }); } else if (key === "listeners" && typeof value === "object") { ytcenter.utils.each(value, function(_key, _value){ if (ytcenter.utils.isArray(_value)) { ytcenter.utils.each(_value, function(i, __value){ ytcenter.utils.addEventListener(elm, _key, __value, false); }); } else { ytcenter.utils.addEventListener(elm, _key, _value, false); } }); } else { elm.setAttribute(key, value); } }); return elm; }; ytcenter.utils.objectKeys = function(obj){ if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { con.error("ytcenter.utils.objectKeys called on non-object"); } var result = [], key, i; for (key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { result.push(key); } } if (!({toString: null}).propertyIsEnumerable('toString')) { var dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ], dontEnumsLength = dontEnums.length; for (i = 0; i < dontEnumsLength; i++) { if (Object.prototype.hasOwnProperty.call(obj, dontEnums[i])) { result.push(dontEnums[i]); } } } return result; }; ytcenter.utils.extend = function(what, wit) { var extObj, witKeys = Object.keys(wit); extObj = ytcenter.utils.objectKeys(what).length ? ytcenter.utils.clone(what) : {}; witKeys.forEach(function(key) { Object.defineProperty(extObj, key, Object.getOwnPropertyDescriptor(wit, key)); }); return extObj; } ytcenter.utils.jsonClone = function(obj){ return JSON.parse(JSON.stringify(obj)); }; ytcenter.utils.clone = function(obj){ return ytcenter.utils.extend({}, obj); }; ytcenter.getMutationObserver = function(){ var a; try { a = MutationObserver || uw.MutationObserver || WebKitMutationObserver || uw.WebKitMutationObserver || MozMutationObserver || uw.MozMutationObserver; } catch (e) { try { a = uw.MutationObserver || WebKitMutationObserver || uw.WebKitMutationObserver || MozMutationObserver || uw.MozMutationObserver; } catch (e) { try { a = WebKitMutationObserver || uw.WebKitMutationObserver || MozMutationObserver || uw.MozMutationObserver; } catch (e) { try { a = uw.WebKitMutationObserver || MozMutationObserver || uw.MozMutationObserver; } catch (e) { try { a = MozMutationObserver || uw.MozMutationObserver; } catch (e) { a = uw.MozMutationObserver; } } } } } return a; }; (function(global, propertyName){ function getTargetedGroup(x, y, groups) { var distance = null; var heightGroup = null; for (var i = 0, len = groups.length; i < len; i++) { // Group element var group = groups[i]; // Getting the absolute position of the group element var absolutePosition = utils.getAbsolutePosition(group); /* * The points on the rectangle, which represents the group element. * px is 1 and 2, * py is 1 and 3, * pWidth is 2 and 4, * pHeight is 3 and 4 * 1------------2 * | | * | | * 3------------4 */ var px = absolutePosition.x; var py = absolutePosition.y; var pWidth = absolutePosition.x + group.offsetWidth; var pHeight = absolutePosition.y + group.offsetHeight; // Detecting if the (x, y) point is inside or touches the group element (rectangle) if (x >= px && x <= pWidth && y >= py && y <= pHeight) { return group; } else if (y >= py && y <= pHeight) { var tmpDist = null; if (x < px) { // Left side tmpDist = px - x; } else if (x > pWidth) { // Right side tmpDist = x - pWidth; } else { continue; // This should never happen. } if (distance === null || tmpDist < distance) { heightGroup = group; distance = tmpDist; } } } return heightGroup; } function getRelativeGroupChild(x, y, group) { // The cursor is inside a group element. if (group !== null) { var groupChildren = group.children; // Iterate through every child of group for (var i = 0, len = groupChildren.length; i < len; i++) { var child = groupChildren[i]; // Making sure that an element is not placed beside itself. if (child !== refMoveableElement && child !== refTargetedElement) { // Get the child's absolute position on the page var absolutePosition = utils.getAbsolutePosition(child); // The for loop iterates through the children chronological, which means that // it only needs to look if the x-value of the cursor is before half of the // child element. if (x <= child.offsetWidth/2 + absolutePosition.x && y <= child.offsetHeight + absolutePosition.y) { return child; } } } } // No child was found, return null return null; } function mousemoveListener(e) { if (!mousedown || !moduleEnabled) return; e = e || window.event; // If user is using touch, make sure that it detects the touch instead of mouse. if (e && e.type.indexOf("touch") !== -1 && e.changedTouches && e.changedTouches.length > 0 && e.changedTouches[0]) { e = e.changedTouches[0]; } // The (x, y) coordinate of the mouse cursor on the page var x = e.pageX; var y = e.pageY; // Update the moveable element position refMoveableElement.style.top = (y - (relativeMousePosition.y || 0)) + "px"; refMoveableElement.style.left = (x - (relativeMousePosition.x || 0)) + "px"; // Get the targeted group with the (x, y) coordinate of the cursor var group = getTargetedGroup(x, y, groupElements); if (group) { // Get the relative group child element var child = getRelativeGroupChild(x, y, group); // Make sure that targeted element does have a parent to remove // the element from if (refTargetedElement.parentNode) { refTargetedElement.parentNode.removeChild(refTargetedElement); } if (child) { // A child was found insert the targeted element before said child group.insertBefore(refTargetedElement, child); } else { // A child was not found just append the element to the group group.appendChild(refTargetedElement); } } // Prevent default action if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function mousedownListener(e) { if (mousedown || !moduleEnabled) return; e = e || window.event; var targetedElement = e.target; while (targetedElement) { if (!targetedElement.parentNode) return; // Targeted element not in a container // Is the targeted element a child of groupElements // and if so then we break out of this loop if (utils.inArray(groupElements, targetedElement.parentNode)) { break; } // The desired element is a child to one of the containers. targetedElement = targetedElement.parentNode; } mousedown = true; // Relative position to targeted element var absolutePosition = utils.getAbsolutePosition(targetedElement); relativeMousePosition = { x: e.pageX - absolutePosition.x, y: e.pageY - absolutePosition.y }; // Create the moveable element var moveableElement = createMoveableElement(targetedElement); // Make the targeted element invisible ytcenter.utils.addClass(targetedElement, "placementsystem-target"); //targetedElement.style.visibility = "hidden"; // Store two references for later use refMoveableElement = moveableElement; refTargetedElement = targetedElement; document.body.appendChild(moveableElement); // Add mouseup, mousemove, touchend and touchmove event listener utils.addEventListener(document, "mousemove", mousemoveListener, false); utils.addEventListener(document, "touchmove", mousemoveListener, false); // Prevent default action if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function mouseupListener(e) { if (!mousedown || !moduleEnabled || !refTargetedElement) return; mousedown = false; e = e || window.event; // Make the targeted element visible ytcenter.utils.removeClass(refTargetedElement, "placementsystem-target"); //refTargetedElement.style.visibility = ""; // Remove the moveable element from the DOM refMoveableElement.parentNode.removeChild(refMoveableElement); // Remove relative mouse position relativeMousePosition = null; // Remove stored references refMoveableElement = null; refTargetedElement = null; // Remove mousemove and touchmove event listener utils.removeEventListener(document, "mousemove", mousemoveListener, false); utils.removeEventListener(document, "touchmove", mousemoveListener, false); // Prevent default action if (e && e.preventDefault) { e.preventDefault(); } else { window.event.returnValue = false; } return false; } function setGroupElements(groups) { groupElements = groups; } function setMoveableElementPosition(el, moveableElement) { var absolutePosition = utils.getAbsolutePosition(el); // Give the moveable an absolute position, which will be // on top of the original element. moveableElement.style.position = "absolute"; moveableElement.style.top = absolutePosition.y + "px"; moveableElement.style.left = absolutePosition.x + "px"; moveableElement.style.zIndex = "1999999999999"; } function createMoveableElement(el) { function removeTooltip(el) { // Removes tooltip from element el.title = ""; el.setAttribute("data-button-action", ""); el.setAttribute("data-tooltip-text", ""); ytcenter.utils.removeClass(el, "yt-uix-tooltip"); // Removes tooltip from children var children = el.children; for (var i = 0, len = children.length; i < len; i++) { removeTooltip(children[i]); } } var moveableElement = el.cloneNode(true); // Move the moveable element on top of the targeted element setMoveableElementPosition(el, moveableElement); // Removes tooltip from the moveable element removeTooltip(moveableElement); return moveableElement; } function setEnabled(enabled) { moduleEnabled = enabled; utils.removeEventListener(document, "mousemove", mousemoveListener, false); utils.removeEventListener(document, "touchmove", mousemoveListener, false); utils.removeEventListener(document, "mousedown", mousedownListener, false); utils.removeEventListener(document, "touchstart", mousedownListener, false); utils.removeEventListener(document, "mouseup", mouseupListener, false); utils.removeEventListener(document, "touchend", mouseupListener, false); if (enabled) { utils.addEventListener(document, "mousedown", mousedownListener, false); utils.addEventListener(document, "touchstart", mousedownListener, false); utils.addEventListener(document, "mouseup", mouseupListener, false); utils.addEventListener(document, "touchend", mouseupListener, false); } } // Reference to ytcenter.utils var utils = ytcenter.utils; /** * An array of where the moveable elements can be placed in. * * @property groupElements * @type HTMLElement[] **/ var groupElements = [ ]; // A reference to the moveable and targeted elements for use in mousemove var relativeMousePosition = null; var refMoveableElement = null; var refTargetedElement = null; // Properties var moduleEnabled = false; var mousedown = false; // Throttle the listener as it can be taxing for the users system. mousemoveListener = utils.throttle(mousemoveListener, 50); var exports = {}; exports.setGroupElements = setGroupElements; exports.setEnabled = setEnabled; // Add mousedown, touchstart, mouseup and touchend event listener utils.addEventListener(document, "mousedown", mousedownListener, false); utils.addEventListener(document, "touchstart", mousedownListener, false); utils.addEventListener(document, "mouseup", mouseupListener, false); utils.addEventListener(document, "touchend", mouseupListener, false); global[propertyName] = exports; })(ytcenter, "placementdragdrop"); /** * Dynamic element placement library **/ (function(global, propertyName){ /** * Adding an element to a defined group. * * @param {String} id The id of the group. * @param {HTMLElement} element The element that will be added to the group. **/ function addElement(id, elementId, element) { if (!groups[id]) throw "Group " + id + " has not been created!"; groups[id].children.push({ id: elementId, element: element }); // Append the element to the group element groups[id].element.appendChild(element); } /** * Creating a group. * * @param {String} id The id of the group. * @param {HTMLElement} element The group element. * @param {Object} options The options for the group. **/ function createGroup(id, element, options) { if (groups[id]) throw "Group " + id + " has already been created!"; groups[id] = { element: element, // The container element where the children resides options: options, // The options for that specific group children: [] }; } /** * Returns the unique ID for the given element. * * @param {HTMLElement} element The element to get the element from. * @return {String} The unique ID for the element. **/ function getElementUniqueId(element) { var classes = utils.listClass(element); for (var i = 0, len = classes.length; i < len; i++) { if (classes[i] !== "") { classes[i] = encodeURIComponent(classes[i]); } } if (classes.length > 0) { classes = "." + classes.join("."); if (classes[classes.length - 1] === ".") { classes = classes.substring(0, classes.length - 1); } } else { classes = ""; } var id = element.getAttribute("id"); if (id) { id = "#" + encodeURIComponent(id); } else { id = ""; } var tagName = encodeURIComponent(element.tagName); var uid = null; var parent = element.parentNode && element.parentNode instanceof HTMLElement; if (!id && !classes && parent) { var parentNode = element.parentNode; for (var i = 0, len = parentNode.children.length; i < len; i++) { if (parentNode.children[i] === element) { uid = tagName + "[" + i + "]" break; } } } else { uid = tagName + id + classes; } if (!id && parent) { return getElementUniqueId(element.parentNode) + " " + uid; } else { return uid; } } /** * Returns the HTMLElement with a specific unique ID. * * @param {String} id The unique ID. * @return {HTMLElement} The element with the unique ID. **/ function getElementByUniqueId(uid) { var tokens = uid.split(" "); var element = null; for (var i = 0, len = tokens.length; i < len; i++) { var match = /([a-zA-Z0-9_%\-]+)(\[[0-9]+\])?(\#[a-zA-Z0-9_%\-]+)?((\.[a-zA-Z0-9_%\-]+)*)/g.exec(tokens[i]); var tagName = decodeURIComponent(match[1]); var childIndex = null; if (match[2]) { childIndex = parseInt(match[2].substring(1, match[2].length - 1), 10); } var id = null; if (match[3]) { id = decodeURIComponent(match[3].substring(1)); } var classes = []; if (match[4]) { classes = match[4].substring(1).split("."); } for (var j = 0, lenj = classes.length; j < lenj; j++) { classes[j] = decodeURIComponent(classes[j]); } var doc = document; if (element) { doc = element; } var continues = false; if (id) { element = document.getElementById(id); } else if (classes.length > 0) { var elements = doc.getElementsByClassName(classes.join(" ")); for (var j = 0, lenj = elements.length; j < lenj; j++) { if (elements[j].tagName.toLowerCase() === tagName.toLowerCase()) { element = elements[j]; continues = true; break; } } if (!continues) return null; } else if (typeof childIndex === "number") { var elements = doc.getElementsByTagName(tagName); for (var j = 0, lenj = elements.length; j < lenj; j++) { if (elements[j] && elements[j].parentNode && elements[j].parentNode instanceof HTMLElement && elements[j].parentNode.children[childIndex] === elements[j]) { element = elements[j]; continues = true; break; } } if (!continues) return null; } else { element = doc.getElementsByTagName(tagName)[0]; } if (!element) { return null; } } return element; } function getRegisteredElementUniqueId(el) { for (var key in groups) { if (groups.hasOwnProperty(key)) { var children = groups[key].children; for (var i = 0, len = children.length; i < len; i++) { if (el === children[i].element) { return children[i].id; } } } } return null; } function getRegisteredElementByUniqueId(id) { for (var key in groups) { if (groups.hasOwnProperty(key)) { var children = groups[key].children; for (var i = 0, len = children.length; i < len; i++) { if (id === children[i].id) { return children[i].element; } } } } return null; } function isElementRegistered(el) { for (var id in groups) { if (groups.hasOwnProperty(id)) { if (isElementInGroup(el, id)) { return true; } } } return false; } function isElementInGroup(el, groupId) { //if (!groups[groupId]) throw "Group " + groupId + " does not exist!"; if (!groups[groupId]) return false; var children = groups[groupId].children; for (var i = 0, len = children.length; i < len; i++) { if (children[i].element === el) { return true; } } return false; } function createReferenceList() { var map = {}; for (var key in groups) { if (groups.hasOwnProperty(key)) { var group = groups[key]; var groupElements = []; var el = group.element; if (el && el.children) { var children = el.children; for (var i = 0, len = children.length; i < len; i++) { var child = children[i]; var data = { }; if (isElementRegistered(child)) { data.type = REGISTERED; data.uniqueId = getRegisteredElementUniqueId(child); data.element = child; } else { data.type = NONREGISTERED; data.uniqueId = getElementUniqueId(child); data.element = child; } groupElements.push(data); } } map[key] = groupElements; } } return map; } function getReferencedUniqueId(child, reference) { if (!reference) return null; for (var key in reference) { if (reference.hasOwnProperty(key)) { var group = reference[key]; for (var i = 0, len = group.length; i < len; i++) { if (child === group[i].element) { return group[i].uniqueId; } } } } return null; } function getReferencedElement(id, reference) { if (!reference) return null; for (var key in reference) { if (reference.hasOwnProperty(key)) { var group = reference[key]; for (var i = 0, len = group.length; i < len; i++) { if (id === group[i].uniqueId) { return group[i].element; } } } } return null; } function getSortList(referenceList) { var map = {}; for (var key in groups) { if (groups.hasOwnProperty(key)) { var group = groups[key]; var groupElements = []; var el = group.element; if (el && el.children) { var children = el.children; for (var i = 0, len = children.length; i < len; i++) { var child = children[i]; var data = { }; if (isElementRegistered(child)) { data.type = REGISTERED; data.uniqueId = getRegisteredElementUniqueId(child); } else { data.type = NONREGISTERED; data.uniqueId = getReferencedUniqueId(child, referenceList) || getElementUniqueId(child); } groupElements.push(data); } } map[key] = groupElements; } } return map; } function setSortList(list, referenceList) { utils.each(list, function(groupId, elements){ if (!groups[groupId]) con.warn("Group " + groupId + " does not exist!"); var group = groups[groupId]; for (var i = 0, len = elements.length; i < len; i++) { var element = elements[i]; var el = null; if (element.type === REGISTERED) { el = getRegisteredElementByUniqueId(element.uniqueId); } else if (element.type === NONREGISTERED) { el = getReferencedElement(element.uniqueId, referenceList) || getElementByUniqueId(element.uniqueId); } if (el !== null) { if (el.parentNode) { el.parentNode.removeChild(el); } group.element.appendChild(el); } else { con.warn("Unknown element in settings", element); } } }); } function setMoveable(enabled) { ytcenter.placementdragdrop.setGroupElements(getGroupElements()); ytcenter.placementdragdrop.setEnabled(enabled); } function getGroupElements() { var groupElements = []; for (var key in groups) { if (groups.hasOwnProperty(key)) { groupElements.push(groups[key].element); } } return groupElements; } function clearGroups() { groups = {}; } /* Easier access to ytcenter.utils */ var utils = ytcenter.utils; var REGISTERED = 0; var NONREGISTERED = 1; var groups = {}; var exports = {}; /* Make the API public */ exports.setMoveable = setMoveable; exports.addElement = addElement; exports.createGroup = createGroup; exports.getSortList = getSortList; exports.setSortList = setSortList; exports.createReferenceList = createReferenceList; exports.clearGroups = clearGroups; global[propertyName] = exports; })(ytcenter, "placementsystem"); (function(global, propertyName){ function createOverlay() { var overlay = document.createElement("div"); overlay.className = "element-focus-overlay"; return overlay; } function focus(target, saveFunc, cancelFunc) { var replacementHolder = document.createElement("div"); replacementHolder.style.height = target.offsetHeight + "px"; var targetPos = utils.getAbsolutePosition(target); var targetWidth = target.offsetWidth; var targetHeight = target.offsetHeight; // Eclipse math //var sqrt2 = Math.sqrt(2); //var paddTop = targetHeight/sqrt2 - targetHeight/2 + 10; //var paddLeft = targetWidth/sqrt2 - targetWidth/2 + 10; // Box math var paddTop = 15; var paddLeft = 15; target.parentNode.replaceChild(replacementHolder, target); var wrapper = document.createElement("div"); wrapper.className = "element-focus-wrapper"; wrapper.style.top = (targetPos.y - paddTop) + "px"; wrapper.style.left = (targetPos.x - paddLeft) + "px"; var focusEl = document.createElement("div"); focusEl.className = "element-focus"; focusEl.style.padding = paddTop + "px " + paddLeft + "px"; focusEl.style.width = targetWidth + "px"; wrapper.appendChild(focusEl); var focusContainer = document.createElement("div"); focusContainer.className = "element-focus-container"; focusEl.appendChild(focusContainer); focusContainer.appendChild(target); var btnWrapper = document.createElement("div"); btnWrapper.className = "element-focus-btn-wrapper"; var labelSave = ytcenter.gui.createYouTubeButtonTextLabel("BTN_APPLY"); var btnSave = ytcenter.gui.createYouTubePrimaryButton("", [ labelSave ]); btnSave.addEventListener("click", saveFunc, false); var labelCancel = ytcenter.gui.createYouTubeButtonTextLabel("BTN_CANCEL"); var btnCancel = ytcenter.gui.createYouTubeDefaultButton("", [ labelCancel ]); btnCancel.addEventListener("click", cancelFunc, false); btnWrapper.appendChild(btnSave); btnWrapper.appendChild(btnCancel); wrapper.appendChild(btnWrapper); var overlay = createOverlay(); document.body.appendChild(overlay); document.body.appendChild(wrapper); var oldScroll = ytcenter.utils.scrollTop(); var viewPort = ytcenter.utils.getViewPort(); console.log(oldScroll, viewPort, targetPos); ytcenter.utils.scrollTop(targetPos.y - (viewPort.height - wrapper.offsetHeight)/2); //ytcenter.utils.addClass(document.body, "ytcenter-dialog-active"); return function(){ //ytcenter.utils.removeClass(document.body, "ytcenter-dialog-active"); ytcenter.utils.scrollTop(oldScroll); target.parentNode.removeChild(target); replacementHolder.parentNode.replaceChild(target, replacementHolder); overlay.parentNode.removeChild(overlay); wrapper.parentNode.removeChild(wrapper); }; } var utils = ytcenter.utils; var exports = {}; exports.focus = focus; global[propertyName] = exports; })(ytcenter, "elementfocus"); ytcenter.descriptionTags = (function(){ function addTags(list, tags) { for (var i = 0, len = tags.length; i < len; i++) { var item = document.createElement("li"); item.textContent = tags[i]; list.appendChild(item); } } function addSection(title, tags) { if (addedSections[title]) { addedSections[title].innerHTML = ""; addTags(addedSections[title], tags); return; } var extras = document.getElementById("watch-description-extras"); if (extras) { var list = extras.getElementsByClassName("watch-extras-section"); if (list && list[0]) { var item = document.createElement("li"); item.className = "watch-meta-item yt-uix-expander-body"; var titleElement = document.createElement("h4"); titleElement.className = "title"; titleElement.textContent = ytcenter.language.getLocale(title); ytcenter.events.addEvent("language-refresh", function(){ titleElement.textContent = ytcenter.language.getLocale(title); }); var tagList = document.createElement("ul"); tagList.className = "content watch-info-tag-list"; addedSections[title] = tagList; addTags(tagList, tags); item.appendChild(titleElement); item.appendChild(tagList); elements.push(item); list[0].appendChild(item); } } } function destroy() { for (var i = 0, len = elements.length; i < len; i++) { var element = elements[i]; if (element.parentNode && element.parentNode.removeChild) { element.parentNode.removeChild(element); } } addedSections = {}; elements = []; } var addedSections = {}; var elements = []; var exports = {}; exports.addSection = addSection; exports.destroy = destroy; return exports; })(); ytcenter.language = (function(){ function __setElementText(lang, elm, name, type, replace) { if (type.indexOf("@") === 0) { elm[type.substring(1)] = ytcenter.utils.replaceTextAsString(lang[name], replace); } else { elm.setAttribute(type, ytcenter.utils.replaceTextAsString(lang[name], replace)); } } var db = []; var currentLang = {}; var defaultLang = "en-US"; var exports = {}; /** * Adds an element to the database which will then be updated when the update function is called. * @elm The element which will get the update. * @name The locale name which will be used to update the text. * @type The type of how the element will be manipulated. If there's an @ followed by textContent it will update the textContent or else it's an argument. */ exports.addLocaleElement = function(elm, name, type, replace) { replace = replace || {}; db.push([elm, name, type, replace]); }; exports.getLanguage = function(language){ return ytcenter.languages[language]; }; /** * Gets the locale for the specific locale name. */ exports.getLocale = function(name, language){ if (!currentLang) currentLang = exports.getLanguage(defaultLang); if (typeof language !== "string" && currentLang.hasOwnProperty(name)) { return currentLang[name]; } else if (ytcenter.languages.hasOwnProperty(language)) { return exports.getLanguage(language)[name]; } else { return null; } }; /** * Updates all elements added to the database with the given language. * @lang The array with the specific language data. */ exports.update = function(lang, doNotRecurse){ lang = lang || ytcenter.settings.language; if (lang === "auto") { if (uw.yt && uw.yt.getConfig && uw.yt.getConfig("PAGE_NAME")) { if (uw.yt.config_.FEEDBACK_LOCALE_LANGUAGE && ytcenter.languages.hasOwnProperty(uw.yt.config_.FEEDBACK_LOCALE_LANGUAGE)) { lang = uw.yt.config_.FEEDBACK_LOCALE_LANGUAGE; } else if (uw.yt.config_.SANDBAR_LOCALE && ytcenter.languages.hasOwnProperty(uw.yt.config_.SANDBAR_LOCALE)) { lang = uw.yt.config_.SANDBAR_LOCALE; } else if (uw.yt.config_.HL_LOCALE && ytcenter.languages.hasOwnProperty(uw.yt.config_.HL_LOCALE)) { lang = uw.yt.config_.HL_LOCALE; } else { lang = defaultLang; } } else { lang = defaultLang; if (!doNotRecurse) { con.log("Language set to " + lang + " because it could not be auto-detected yet"); var languageUpdateCounter = 0; var languageUpdateInterval = uw.setInterval((function(){ if (uw.yt && uw.yt.getConfig && uw.yt.getConfig("PAGE_NAME")) { uw.clearInterval(languageUpdateInterval); ytcenter.language.update("auto", true); } else if (++languageUpdateCounter >= 100) { uw.clearInterval(languageUpdateInterval); con.log("YouTube configuration data is inaccessible; giving up on language auto-detection."); } }).bind(this), 500); } else { con.log("Language set to " + lang + " because auto-detection failed unexpectedly"); } } } if (!ytcenter.languages[lang]) lang = defaultLang; currentLang = ytcenter.languages[lang]; for (var i = 0; i < db.length; i++) { __setElementText(currentLang, db[i][0], db[i][1], db[i][2], db[i][3]); } ytcenter.events.performEvent("language-refresh"); //ytcenter.events.performEvent("settings-update"); }; return exports; })(); ytcenter.languages = ytcenter_locales; ytcenter._settings = { videoThumbnailQualityFPS: true, enableComments: true, channelUploadedVideosPlaylist: false, ytOnlyStageMode: false, playerGlowEffectOnPlayer: "both", bufferEnabled: false, bufferSize: 569228273678, embedBufferEnabled: false, embedBufferSize: 569228273678, channelBufferEnabled: false, channelBufferSize: 569228273678, playlistAutoPlay: true, playlistAutoPlayFreeze: false, /* Freeze the playlist auto play so that playlistAutoPlay is not changed when the toggle button has been clicked */ playerGlowEnabled: false, playerGlowPixelInterval: 100, playerGlowRequestAnimationFrame: true, playerGlowUpdateInterval: 20, playerGlowTransition: 0, playerGlowBlur: 15, playerGlowSpread: 5, playerGlowOpacity: 75, playerGlowFactor: 50, playerMultiGlowEffect: true, playerMultiGlowEffectDepth: 10, playerMultiGlowEffectBlockInterval: 5, likeButtonColor: "#000000", likeButtonHoverColor: "#000000", dislikeButtonColor: "#000000", dislikeButtonHoverColor: "#000000", likedButtonColor: "#2793e6", likedButtonHoverColor: "#2793e6", dislikedButtonColor: "#000000", dislikedButtonHoverColor: "#000000", likeButtonOpacity: 60, likeButtonHoverOpacity: 70, dislikeButtonOpacity: 60, dislikeButtonHoverOpacity: 70, likedButtonOpacity: 80, likedButtonHoverOpacity: 100, dislikedButtonOpacity: 80, dislikedButtonHoverOpacity: 100, enable_custom_fexp: false, custom_fexp: "", hideLangAlert: true, staticHeader_scrollToPlayer: false, staticHeader: false, debugConsole: true, // Saves the content of the console for the debug log. gridCollectionPage: true, logoLink: "/", hideRecommendedChannels: false, repeatShowText: true, enableYouTubeShortcuts: true, disableFeedItemActionMenu: false, disableGuideCount: false, YouTubeExperiments: [], headlineTitleExpanded: false, videoThumbnailQualitySeparated: true, embedWriteEmbedMethodReloadDelay: 1000, embedWriteEmbedMethod: "test5", // "standard", "test1", "test2", "test3", "standard+reload", "test1+reload", "test2+reload", "test3+reload", "test4", "test5" fixHTML5Annotations: false, saveErrorStatusTimeout: 5000, saveStatusTimeout: 2000, flexWidthOnChannelPage: true, playerDarkSideBGRetro: false, playerDarkSideBGColor: "#1b1b1b", playerDarkSideBG: false, useSecureProtocol: true, videoThumbnailRatingsBarHeight: 2, sparkbarHeight: 2, sparkbarLikesColor: "#590", sparkbarDislikesColor: "#ccc", commentsPlusLinkRedirectConfirm: true, commentsPlusScrollToCommentAtCollapse: true, commentsPlusRemoveLinks: false, commentsPlusBlacklist: [ { type: "equals", length: 1 }, { type: "repeat", amount: 9 }, { type: "profilelinks", regex: "${username}", attr: "textContent" }, { type: "hashlinks", regex: "fixyoutube", attr: "textContent" } ], commentsPlusWhitelist: [], likeSwitchToTab: "none", // none, share, stats, report, login, ratings-disabled, rental-required, error endOfVideoAutoSwitchToTab: "none", // none, share, stats, report, login, ratings-disabled, rental-required, error //enableYouTubeAutoSwitchToShareTab: false, topScrollPlayerEnabled: false, topScrollPlayerActivated: false, topScrollPlayerExitOnVideoEnd: false, topScrollPlayerEnterOnVideoPlay: false, topScrollPlayerExitOnVideoPause: false, topScrollPlayerTimesToEnter: 1, topScrollPlayerTimesToExit: 0, topScrollPlayerCountIncreaseBefore: true, topScrollPlayerHideScrollbar: false, topScrollPlayerBumpTimer: 2000, topScrollPlayerAnimation: true, topScrollPlayerEnabledOnlyVideoPlaying: true, topScrollPlayerScrollUpToExit: false, debug_settings_playersize: false, debug_settings_buttonPlacement: false, debug_settings_videoThumbnailData: false, debug_settings_commentCountryData: false, debug_settings_watchedVideos: false, debug_settings_notwatchedVideos: false, debug_playervars: false, debug_spf_args: false, signatureDecipher: [], embed_defaultAutoplay: true, hideTicker: true, enableEndscreenAutoplay: false, removeYouTubeTitleSuffix: true, playerPlayingTitleIndicator: false, playerOnlyOneInstancePlaying: true, videoThumbnailAnimationEnabled: true, videoThumbnailAnimationShuffle: false, videoThumbnailAnimationDelay: 1000, videoThumbnailAnimationInterval: 700, videoThumbnailAnimationFallbackInterval: 2000, forcePlayerType: "default", // default, flash, html5, aggressive_flash embed_forcePlayerType: "default", // default, flash, html5, aggressive_flash channel_forcePlayerType: "default", // default, flash, html5, aggressive_flash settingsDialogMode: true, ytExperimentFixedTopbar: false, ytspf: false, videoThumbnailCacheSize: 500, commentCacheSize: 500, watchedVideosIndicator: true, hideWatchedVideos: false, watchedVideos: [], notwatchedVideos: [], watchedVideosLimit: 10000, // Hope this isn't too big. notwatchedVideosLimit: 10000, // Hope this isn't too big. gridSubscriptionsPage: true, compatibilityCheckerForChromeDisable: false, removeRelatedVideosEndscreen: false, enableResize: true, guideMode: "default", // [default, always_open, always_closed] uploaderCountryEnabled: true, uploaderCountryShowFlag: true, uploaderCountryUseNames: true, uploaderCountryPosition: "after_username", // ["before_username", "after_username", "last"] commentCountryData: [], commentCountryEnabled: true, commentCountryShowFlag: true, commentCountryUseNames: true, commentCountryLazyLoad: true, commentCountryButtonLoad: true, commentCountryPosition: "after_username", // ["before_username", "after_username", "last"] videoThumbnailData: [], videoThumbnailQualityBar: true, videoThumbnailQualityPosition: "topleft", videoThumbnailQualityDownloadAt: "hover_thumbnail", videoThumbnailQualityVisible: "always", videoThumbnailRatingsBar: true, videoThumbnailRatingsBarPosition: "bottom", videoThumbnailRatingsBarDownloadAt: "scroll_into_view", videoThumbnailRatingsBarVisible: "always", videoThumbnailRatingsBarLikesColor: "#590", videoThumbnailRatingsBarDislikesColor: "#f00", videoThumbnailRatingsCount: true, videoThumbnailRatingsCountPosition: "bottomleft", videoThumbnailRatingsCountDownloadAt: "scroll_into_view", videoThumbnailRatingsCountVisible: "show_hover", videoThumbnailWatchLaterPosition: "bottomright", videoThumbnailWatchLaterVisible: "show_hover", videoThumbnailTimeCodePosition: "bottomright", videoThumbnailTimeCodeVisible: "hide_hover", dashPlayback: true, embed_dashPlayback: true, channel_dashPlayback: true, language: 'auto', filename: '{title}', fixfilename: false, flexWidthOnPage: true, enableAutoVideoQuality: true, autoVideoQuality: 'hd720', removeAdvertisements: true, preventAutoPlay: false, preventAutoBuffer: false, preventTabAutoPlay: false, preventTabAutoBuffer: false, preventTabPlaylistAutoPlay: false, preventTabPlaylistAutoBuffer: false, preventPlaylistAutoPlay: false, preventPlaylistAutoBuffer: false, scrollToPlayer: true, expandDescription: false, enableAnnotations: true, //enableCaptions: true, // % enableShortcuts: true, autohide: '-1', enableVolume: false, volume: 100, mute: false, enableDownload: true, downloadQuality: 'highres', downloadFormat: 'mp4', downloadAsLinks: true, show3DInDownloadMenu: false, enableRepeat: true, repeatSave: false, autoActivateRepeat: false, mp3Services: '', lightbulbEnable: true, lightbulbBackgroundColor: '#000000', lightbulbBackgroundOpaque: 95, lightbulbClickThrough: false, lightbulbAutoOff: false, flashWMode: 'none', // none, window, direct, opaque, transparent, gpu playerTheme: 'dark', // dark, light playerColor: 'red', // red, white enableUpdateChecker: true, updateCheckerInterval: "0", updateCheckerLastUpdate: 0, channel_enableAutoVideoQuality: true, channel_autoVideoQuality: "medium", channel_autohide: "-1", channel_playerTheme: "dark", channel_playerColor: "red", channel_flashWMode: "none", channel_enableAnnotations: true, channel_preventAutoPlay: false, channel_preventAutoBuffer: true, channel_enableVolume: false, channel_volume: 100, channel_mute: false, channel_experimentalFlashMode: "clone", channel_experimentalHTML5Mode: "none", embed_enabled: true, embed_enableAutoVideoQuality: true, embed_autoVideoQuality: "medium", embed_autohide: "-1", embed_playerTheme: "dark", embed_playerColor: "red", embed_flashWMode: "none", embed_enableAnnotations: true, embed_preventAutoPlay: false, embed_preventAutoBuffer: true, embed_enableVolume: false, embed_volume: 100, embed_mute: false, resizeEnable: true, resizeSave: false, aspectEnable: true, aspectSave: false, aspectValue: "default", repeatShowIcon: true, watch7playerguidehide: false, watch7playerguidealwayshide: false, removeBrandingBanner: true, removeBrandingBackground: true, removeBrandingWatermark: true, fixGuideNotVisible: false, hideFeedbackButton: false, bgcolor: "default", embed_bgcolor: "default", channel_bgcolor: "default", player_wide: false, "resize-default-playersize": "default", "resize-small-button": "default_fit_to_content", "resize-large-button": "default_720", "playerSizeAspect": "16:9", // default, 4:3, 3:2, 5:4, 16:9, 16:10, 24:10 "resize-playersizes": [ { id: "default_small", config: { width: "", height: "", large: false, align: true, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_large", config: { width: "", height: "", large: true, align: true, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_fit_to_content", config: { customName: "Fit to Content", width: "1040px", height: "", large: true, align: true, scrollToPlayer: false, scrollToPlayerButton: false, } }, { id: "default_collapse_player", config: { customName: "Collapse The Player", width: "640px", height: "0px", large: false, align: true, scrollToPlayer: false, scrollToPlayerButton: false, } }, { id: "default_720", config: { customName: "720p", width: "1280px", height: "", large: true, align: false, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_1080", config: { customName: "1080p", width: "1920px", height: "", large: true, align: false, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_70_percent", config: { customName: "70%", width: "70%", height: "", large: true, align: false, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_80_percent", config: { customName: "80%", width: "80%", height: "", large: true, align: false, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_90_percent", config: { customName: "90%", width: "90%", height: "", large: true, align: false, scrollToPlayer: false, scrollToPlayerButton: false } }, { id: "default_100_percent", config: { customName: "Fill", width: "100%", height: "100%", large: true, align: false, scrollToPlayer: true, scrollToPlayerButton: true } } ] }; ytcenter.settings = $Clone(ytcenter._settings); ytcenter.doRepeat = false; ytcenter.html5 = false; ytcenter.html5flash = false; ytcenter.watch7 = true; ytcenter.redirect = function(url, newWindow){ con.log("Redirecting" + (newWindow ? " in new window" : "") + " to " + url); if (typeof newWindow != "undefined") { window.open(ytcenter.utils.replaceTextAsString(url, { title: ytcenter.video.title, videoid: ytcenter.video.id, author: ytcenter.video.author, url: loc.href })); } else { loc.href = ytcenter.utils.replaceTextAsString(url, { title: ytcenter.video.title, videoid: ytcenter.video.id, author: ytcenter.video.author, url: loc.href }); } }; ytcenter.discardElement = function(element){ if (element.parentNode && typeof element.parentNode.removeChild === "function") { element.parentNode.removeChild(element); } }; ytcenter.callback_db = []; if (identifier === 3) { // Firefox Extension self.port.on("xhr onreadystatechange", function(data){ var data = JSON.parse(data); if (ytcenter.callback_db[data.id].onreadystatechange) ytcenter.callback_db[data.id].onreadystatechange({responseText: data.responseText}); }); self.port.on("xhr onload", function(data){ var data = JSON.parse(data); if (ytcenter.callback_db[data.id].onload) ytcenter.callback_db[data.id].onload({responseText: data.responseText}); }); self.port.on("xhr onerror", function(data){ var data = JSON.parse(data); if (ytcenter.callback_db[data.id].onerror) ytcenter.callback_db[data.id].onerror({responseText: data.responseText}); }); self.port.on("load callback", function(data){ data = JSON.parse(data); ytcenter.callback_db[data.id](data.storage); }); self.port.on("save callback", function(data){ data = JSON.parse(data); ytcenter.callback_db[data.id](); }); } ytcenter.storageName = "YouTubeCenterSettings"; ytcenter.loadSettings = function(callback){ if (preloadedSettings) { for (var key in preloadedSettings) { if (preloadedSettings.hasOwnProperty(key)) { ytcenter.settings[key] = preloadedSettings[key]; } } preloadedSettings = undefined; callback && callback(); } ytcenter.unsafeCall("load", [ytcenter.storageName], function(storage){ if (storage === "[object Object]") storage = {}; if (typeof storage === "string") storage = JSON.parse(storage); for (var key in storage) { if (storage.hasOwnProperty(key)) { ytcenter.settings[key] = storage[key]; } } if (callback) callback(); }); }; ytcenter.__settingsLoaded = false; ytcenter.loadSettings(function(){ ytcenter.__settingsLoaded = true; var page = ytcenter.getPage(); if ((ytcenter.settings.forcePlayerType === "aggressive_flash" && page === "watch") || (ytcenter.settings.embed_forcePlayerType === "aggressive_flash" && page === "embed") || (ytcenter.settings.channel_forcePlayerType === "aggressive_flash" && page === "channel")) { // Try to prevent the html5 player from having any effect on the page to increase the load time of the flash player. uw.yt = uw.yt || {}; uw.yt.player = uw.yt.player || {}; uw.yt.player.Application = uw.yt.player.Application || {}; uw.yt.player.Application.create = uw.yt.player.Application.create || null; freeze(uw, "yt.player.Application.create"); } settingsInit(); if ((ytcenter.getPage() === "embed" && ytcenter.settings.embed_enabled) || ytcenter.getPage() !== "embed") { ytcenter.tabEvents.addEventListener("settings", function(settings){ con.log("[Tab Events] Received updated settings from another tab."); var player_wide = ytcenter.settings.player_wide; // We don't want this to be updated. ytcenter.settings = JSON.parse(JSON.stringify(settings)); ytcenter.settings.player_wide = player_wide; ytcenter.language.update(); /*ytcenter.events.performEvent("settings-update"); ytcenter.title.update(); ytcenter.classManagement.applyClasses();*/ }); } }); ytcenter.saveSettings_timeout_obj = null; ytcenter.saveSettings_timeout = 300; ytcenter.saveSettings = (function(){ function save(throttle, callback) { if (typeof throttle !== "boolean") throttle = true; ytcenter.events.performEvent("save"); if (throttle) { throttleStoreSettings(callback); } else { storeSettings(callback); } } function saveComplete(callback) { ytcenter.events.performEvent("save-complete"); throttleAnnounceSettingStored(); // This should not be spammed! var args = Array.prototype.splice.call(arguments, 1, arguments.length); if (typeof callback === "function") callback.apply(null, args); } function storeSettings(callback) { con.log("[Storage] Saving Settings"); ytcenter.unsafeCall("save", [ytcenter.storageName, JSON.stringify(ytcenter.settings)], ytcenter.utils.bind(null, saveComplete, callback)); } function announceSettingStored() { con.log("[Tab Events] Sending new settings to other open tabs."); ytcenter.tabEvents.fireEvent("settings", ytcenter.settings); } var throttleStoreSettings = ytcenter.utils.throttle(storeSettings, 5000); var throttleAnnounceSettingStored = ytcenter.utils.throttle(announceSettingStored, 7500); return save; })(); ytcenter.checkForUpdatesDev = (function(){ var updElement; return function(success, error, disabled){ // We check if this build is a dev build. if (!devbuild) { con.log("[Update] This is not a dev build!"); return; } else { con.log("Checking for updates..."); if (typeof error == "undefined") { error = function(){}; } ytcenter.utils.xhr({ method: "GET", url: "https://raw.github.com/YePpHa/YouTubeCenter/master/devbuild.number", ignoreCache: true, headers: { "Content-Type": "text/plain" }, onload: (function(success){ return function(response){ con.log("Got Update Response"); var buildnumber = -1; if (response && response.responseText) { buildnumber = parseInt(/build\.number=([0-9]+)/m.exec(response.responseText)[1], 10); con.log("[Update] Current dev build #" + buildnumber + ". Your build number #" + devnumber); } else { con.log("Couldn't parse the build number"); } if (buildnumber > devnumber) { con.log("New update available"); if (typeof updElement != "undefined") { ytcenter.discardElement(updElement); } updElement = document.createElement("div"); updElement.className = "yt-alert yt-alert-default yt-alert-warn"; updElement.style.margin = "0 auto"; var ic = document.createElement("div"); ic.className = "yt-alert-icon"; var icon = document.createElement("img"); icon.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; icon.className = "icon master-sprite"; icon.setAttribute("alt", "Alert icon"); ic.appendChild(icon); updElement.appendChild(ic); var c = document.createElement("div"); c.className = "yt-alert-buttons"; var cbtn = document.createElement("button"); cbtn.setAttribute("type", "button"); cbtn.setAttribute("role", "button"); cbtn.setAttribute("onclick", ";return false;"); cbtn.className = "close yt-uix-close yt-uix-button yt-uix-button-close"; ytcenter.utils.addEventListener(cbtn, "click", (function(updElement){ return function(){ ytcenter.utils.addClass(updElement, 'hid'); }; })(updElement)); var cbtnt = document.createElement("span"); cbtnt.className = "yt-uix-button-content"; cbtnt.textContent = "Close "; cbtn.appendChild(cbtnt); c.appendChild(cbtn); updElement.appendChild(c); var cn = document.createElement("div"); cn.className = "yt-alert-content"; var cnt = document.createElement("span"); cnt.className = "yt-alert-vertical-trick"; var cnme = document.createElement("div"); cnme.className = "yt-alert-message"; var f1 = ytcenter.utils.replaceText(ytcenter.language.getLocale("UPDATER_DEV_NEWBUILD"), { "{lb}": function(){ return document.createElement("br"); }, "{url}": function(){ var a = document.createElement("a"); a.href = "https://github.com/YePpHa/YouTubeCenter/wiki/Developer-Version"; a.setAttribute("target", "_blank"); a.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("DEV_BUILD"), { "{n}": document.createTextNode(buildnumber) })); return a; } } ); ytcenter.events.addEvent("language-refresh", function(){ f1 = ytcenter.utils.replaceText(ytcenter.language.getLocale("UPDATER_DEV_NEWBUILD"), { "{lb}": function(){ return document.createElement("br"); }, "{url}": function(){ var a = document.createElement("a"); a.href = "https://github.com/YePpHa/YouTubeCenter/wiki/Developer-Version"; a.setAttribute("target", "_blank"); a.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("DEV_BUILD"), { "{n}": document.createTextNode(buildnumber) })); return a; } } ); cnme.innerHTML = ""; cnme.appendChild(f1); }); cnme.appendChild(f1); cn.appendChild(cnt); cn.appendChild(cnme); updElement.appendChild(cn); document.getElementById("alerts").appendChild(updElement); } else { con.log("No new updates available"); } if (success) { con.log("Calling update callback"); success(response); } }; })(success), onerror: error }); } }; })(); ytcenter.checkForUpdates = (function(){ var updElement; return function(success, error, disabled){ if (devbuild) { con.log("[Update] This is a dev build."); ytcenter.checkForUpdatesDev(success, error, disabled); // This is only called when it's a developer build. return; } // If it's the Chrome/Opera addon and the browser is Opera, or if it's the Firefox addon it will not check for updates! if ((identifier === 1 && (uw.navigator.userAgent.indexOf("Opera") !== -1 || uw.navigator.userAgent.indexOf("OPR/") !== -1)) || identifier === 6 || identifier === 8) { con.log("[UpdateChecker] UpdateChecker has been disabled!"); if (typeof disabled == "function") disabled(); } else { con.log("Checking for updates..."); if (typeof error == "undefined") { error = function(){}; } ytcenter.utils.xhr({ method: "GET", url: "https://yeppha.github.io/downloads/YouTubeCenter.meta.js", headers: { "Content-Type": "text/plain" }, onload: (function(success){ return function(response){ con.log("Got Update Response"); var rev = -1, ver = "-1" if (response && response.responseText) { rev = parseInt(/^\/\/ @updateVersion\s+([0-9]+)$/m.exec(response.responseText)[1], 10); ver = /^\/\/ @version\s+([a-zA-Z0-9.,-_]+)$/m.exec(response.responseText)[1]; } else { con.log("Couldn't parse revision and version from the update page."); } if (rev > ytcenter.revision) { con.log("New update available"); if (typeof updElement != "undefined") { ytcenter.discardElement(updElement); } updElement = document.createElement("div"); updElement.className = "yt-alert yt-alert-default yt-alert-warn"; updElement.style.margin = "0 auto"; var ic = document.createElement("div"); ic.className = "yt-alert-icon"; var icon = document.createElement("img"); icon.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; icon.className = "icon master-sprite"; icon.setAttribute("alt", "Alert icon"); ic.appendChild(icon); updElement.appendChild(ic); var c = document.createElement("div"); c.className = "yt-alert-buttons"; var cbtn = document.createElement("button"); cbtn.setAttribute("type", "button"); cbtn.setAttribute("role", "button"); cbtn.setAttribute("onclick", ";return false;"); cbtn.className = "close yt-uix-close yt-uix-button yt-uix-button-close"; ytcenter.utils.addEventListener(cbtn, "click", (function(updElement){ return function(){ ytcenter.utils.addClass(updElement, 'hid'); }; })(updElement)); var cbtnt = document.createElement("span"); cbtnt.className = "yt-uix-button-content"; cbtnt.textContent = "Close "; cbtn.appendChild(cbtnt); c.appendChild(cbtn); updElement.appendChild(c); var cn = document.createElement("div"); cn.className = "yt-alert-content"; var cnt = document.createElement("span"); cnt.className = "yt-alert-vertical-trick"; var cnme = document.createElement("div"); cnme.className = "yt-alert-message"; var f1 = document.createTextNode(ytcenter.language.getLocale("UPDATE_NOTICE")); ytcenter.language.addLocaleElement(f1, "UPDATE_NOTICE", "@textContent", {}); var f2 = document.createElement("br"); var f3 = document.createTextNode(ytcenter.language.getLocale("UPDATE_INSTALL")); ytcenter.language.addLocaleElement(f3, "UPDATE_INSTALL", "@textContent", {}); var f4 = document.createTextNode(" "); var f5 = document.createElement("a"); if (identifier === 0) { f5.href = "https://yeppha.github.io/downloads/YouTubeCenter.user.js"; } else if (identifier === 1) { f5.href = "https://yeppha.github.io/downloads/YouTubeCenter.crx"; } else if (identifier === 2) { f5.href = "https://yeppha.github.io/downloads/YouTubeCenter.mxaddon"; } else if (identifier === 3) { f5.href = "https://yeppha.github.io/downloads/YouTubeCenter.xpi"; } else if (identifier === 4) { f5.href = "https://yeppha.github.io/downloads/YouTubeCenter.safariextz"; } else if (identifier === 5) { f5.href = "https://yeppha.github.io/downloads/YouTubeCenter.oex"; } f5.setAttribute("target", "_blank"); f5.textContent = "YouTube Center v" + ver; var f6 = document.createTextNode(" "); var f7 = document.createTextNode(ytcenter.language.getLocale("UPDATE_OR")); ytcenter.language.addLocaleElement(f7, "UPDATE_OR", "@textContent", {}); var f8 = document.createTextNode(" "); var f9 = document.createElement("a"); f9.setAttribute("target", "_blank"); if (identifier === 6) { f9.href = "https://addons.mozilla.org/en-us/firefox/addon/youtube-center/"; f9.textContent = "addons.mozilla.org"; } else { f9.href = "https://github.com/YePpHa/YouTubeCenter/wiki"; f9.textContent = "github.com/YePpHa/YouTubeCenter/"; } cnme.appendChild(f1); cnme.appendChild(f2); cnme.appendChild(f3); cnme.appendChild(f4); cnme.appendChild(f5); cnme.appendChild(f6); cnme.appendChild(f7); cnme.appendChild(f8); cnme.appendChild(f9); cn.appendChild(cnt); cn.appendChild(cnme); updElement.appendChild(cn); document.getElementById("alerts").appendChild(updElement); } else { con.log("No new updates available"); } if (success) { con.log("Calling update callback"); success(response); } }; })(success), onerror: error }); } }; })(); ytcenter.mp3services = [ { label: 'SETTINGS_MP3SERVICES_VIDEO2MP3', value: 'http://www.video2mp3.net/index.php?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&hq=0' }, { label: 'SETTINGS_MP3SERVICES_VIDEO2MP3_HQ', value: 'http://www.video2mp3.net/index.php?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&hq=1' }, { label: 'SETTINGS_MP3SERVICES_YOUTUBEINMP3_64', value: 'http://www.youtubeinmp3.com/download.php?youtubeURL=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&quality=64&submit=Download+MP3' }, { label: 'SETTINGS_MP3SERVICES_YOUTUBEINMP3_128', value: 'http://www.youtubeinmp3.com/download.php?youtubeURL=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&quality=128&submit=Download+MP3' }, { label: 'SETTINGS_MP3SERVICES_YOUTUBEINMP3_320', value: 'http://www.youtubeinmp3.com/download.php?youtubeURL=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&quality=320&submit=Download+MP3' }, { label: 'SETTINGS_MP3SERVICES_HDDOWNLOADER_128', value: 'http://www.hddownloader.com/index.php?act=do&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&dldtype=128&outFormat=mp3' }, { label: 'SETTINGS_MP3SERVICES_HDDOWNLOADER_192', value: 'http://www.hddownloader.com/index.php?act=do&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&dldtype=192&outFormat=mp3' }, { label: 'SETTINGS_MP3SERVICES_HDDOWNLOADER_256', value: 'http://www.hddownloader.com/index.php?act=do&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}&dldtype=256&outFormat=mp3' }, { label: 'SETTINGS_MP3SERVICES_YOUTUBEMP3PRO', value: 'http://www.youtubemp3pro.com/#{videoid}' }, { label: 'SETTINGS_MP3SERVICES_YOUTUBEMP3', value: 'http://www.youtube-mp3.org/#v={videoid}' }, { label: 'SETTINGS_MP3SERVICES_SNIPMP3', value: 'http://snipmp3.com/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}' }, { label: 'SETTINGS_MP3SERVICES_CLIPCONVERTER', value: 'http://www.clipconverter.cc/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D{videoid}' } ]; ytcenter.settingsPanel = (function(){ var a = {}, categories = [], subcategories = [], options = []; a.createCategory = function(label){ var id = categories.length; categories.push({ id: id, label: label, enabled: true, visible: true, subcategories: [] }); return a.getCategory(id); }; a.createSubCategory = function(label){ var id = subcategories.length; subcategories.push({ id: id, label: label, enabled: true, visible: true, options: [], listeners: {} }); return a.getSubCategory(id); }; a.createOption = function(defaultSetting, module, label, args, help){ var id = options.length; options.push({ id: id, label: label, args: args, defaultSetting: defaultSetting, module: module, help: help, enabled: true, visible: true, styles: {}, moduleStyles: {}, listeners: {} }); return a.getOption(id); }; a.getCategory = function(id){ if (categories.length <= id || id < 0) throw new Error("[Settings Category] Category with specified id doesn't exist (" + id + ")!"); var cat = categories[id]; return { getId: function(){ return id; }, setVisibility: function(visible){ if (cat.visible === visible) return; cat.visible = visible; if (cat._visible) cat._visible(visible); }, setEnabled: function(enabled){ cat.enabled = enabled; }, addSubCategory: function(subcategory){ cat.subcategories.push(subcategories[subcategory.getId()]); }, select: function(){ if (cat.select) cat.select(); } }; }; a.getSubCategory = function(id){ if (subcategories.length <= id || id < 0) throw new Error("[Settings SubCategory] Category with specified id doesn't exist (" + id + ")!"); var subcat = subcategories[id]; return { getId: function(){ return id; }, setVisibility: function(visible){ if (subcat.visible === visible) return; subcat.visible = visible; if (subcat._visible) subcat._visible(visible); }, setEnabled: function(enabled){ subcat.enabled = enabled; }, addOption: function(option){ subcat.options.push(options[option.getId()]); }, select: function(){ if (subcat.select) subcat.select(); }, addEventListener: function(event, callback){ if (!subcat.listeners[event]) subcat.listeners[event] = []; subcat.listeners[event].push(callback); } }; }; a.getOption = function(id){ if (options.length <= id || id < 0) throw new Error("[Settings Options] Option with specified id doesn't exist (" + id + ")!"); var option = options[id]; return { getId: function(){ return id; }, getLabel: function(){ return option.label; }, getDefaultSetting: function(){ return option.defaultSetting; }, getModule: function(){ return option.module; }, getHelp: function(){ return option.help; }, setVisibility: function(visible){ if (option.visible === visible) return; option.visible = visible; if (option._visible) option._visible(visible); }, setEnabled: function(enabled){ option.enabled = enabled; }, setStyle: function(key, value){ option.styles[key] = value; }, getStyle: function(key){ return option.styles[key]; }, setModuleStyle: function(key, value){ option.moduleStyles[key] = value; }, getModuleStyle: function(key){ return option.moduleStyles[key]; }, addModuleEventListener: function(event, callback, bubble){ if (!option.moduleListeners) option.moduleListeners = []; option.moduleListeners.push([event, callback, bubble]); }, removeModuleEventListener: function(event, callback, bubble){ throw new Error("Not implemented!"); }, addEventListener: function(event, callback, bubble){ if (!option.listeners) option.listeners = {}; if (!option.listeners[event]) option.listeners[event] = []; option.listeners[event].push(callback); }, removeEventListener: function(event, callback, bubble){ if (!option.listeners) return; if (!option.listeners[event]) return; var i; for (i = 0; i < option.listeners[event].length; i++) { if (option.listeners[event][i] === callback) { option.listeners[event].splice(i, 1); return; } } }, getLiveModule: function(){ return option.liveModule; } }; }; a.createOptionsForLayout = function(subcat){ var frag = document.createDocumentFragment(); subcat.options.forEach(function(option){ var optionWrapper = document.createElement("div"), label, module, moduleContainer, labelText, help, replaceHelp, i; optionWrapper.className = "ytcenter-settings-subcat-option" + (option.visible ? "" : " hid"); option._visible = function(visible){ if (visible) { ytcenter.utils.removeClass(optionWrapper, "hid"); } else { ytcenter.utils.addClass(optionWrapper, "hid"); } }; if (option.label && option.label !== "") { labelText = document.createTextNode(ytcenter.language.getLocale(option.label)); ytcenter.language.addLocaleElement(labelText, option.label, "@textContent"); if (option.styles) { ytcenter.utils.each(option.styles, function(key, value){ optionWrapper.style.setProperty(key, value); }); } label = document.createElement("span"); label.className = "ytcenter-settings-option-label"; label.appendChild(labelText); if (option.help && option.help !== "") { help = document.createElement("a"); help.className = "ytcenter-settings-help"; help.setAttribute("target", "_blank"); help.setAttribute("href", option.help); help.appendChild(document.createTextNode('?')); replaceHelp = { "{option}": function() { return ytcenter.language.getLocale(option.label); } }; help.setAttribute("title", ytcenter.utils.replaceTextToText(ytcenter.language.getLocale("SETTINGS_HELP_ABOUT"), replaceHelp)); ytcenter.language.addLocaleElement(help, "SETTINGS_HELP_ABOUT", "title", replaceHelp); label.appendChild(help); } optionWrapper.appendChild(label); } if (option.defaultSetting && !(option.defaultSetting in ytcenter._settings)) { con.warn("[SettingsPanel] An option was registered, which doesn't have a default option (" + option.defaultSetting + ")."); } if (!option.module) { } else { if (!ytcenter.modules[option.module]) throw new Error("[Settings createOptionsForLayout] Option (" + option.id + ", " + option.label + ", " + option.module + ") are using an non existing module!"); moduleContainer = document.createElement("div"); moduleContainer.className = "ytcenter-module-container"; if (!option.label || option.label === "") { moduleContainer.style.width = "100%"; } if (option.moduleStyles) { ytcenter.utils.each(option.moduleStyles, function(key, value){ moduleContainer.style.setProperty(key, value); }); } option.parent = a.getSubCategory(subcat.id); module = ytcenter.modules[option.module](option); option.liveModule = module; moduleContainer.appendChild(module.element); module.bind(function(value){ if (typeof option.defaultSetting !== "undefined" && typeof ytcenter.settings[option.defaultSetting] !== "undefined") { ytcenter.settings[option.defaultSetting] = value; ytcenter.saveSettings(); } //ytcenter.events.performEvent("ui-refresh"); if (option.listeners && option.listeners["update"]) { for (i = 0; i < option.listeners["update"].length; i++) { option.listeners["update"][i](value); } } ytcenter.events.performEvent("settings-update", option.id); }); ytcenter.events.addEvent("settings-update", function(id){ if (module && id !== option.id && option.defaultSetting && ytcenter.settings[option.defaultSetting]) { module.update(ytcenter.settings[option.defaultSetting]); } }); if (module && option.defaultSetting && ytcenter.settings[option.defaultSetting]) { module.update(ytcenter.settings[option.defaultSetting]); } if (option.moduleListeners) { if (module.addEventListener) { for (i = 0; i < option.moduleListeners.length; i++) { module.addEventListener(option.moduleListeners[i][0], option.moduleListeners[i][1], option.moduleListeners[i][2]); } } else { throw new Error(option.module + " do not support listeners!"); } } optionWrapper.appendChild(moduleContainer); } frag.appendChild(optionWrapper); }); return frag; }; a.createLayout = function(){ var frag = document.createDocumentFragment(), categoryList = document.createElement("ul"), subcatList = [], sSelectedList = [], leftPanel = document.createElement("div"), rightPanel = document.createElement("div"), rightPanelContent = document.createElement("div"), productVersion = document.createElement("div"), subcatTop = document.createElement("div"), subcatContent = document.createElement("div"), panelWrapper = document.createElement("div"), categoryHide = false; subcatTop.className = "ytcenter-settings-subcat-header-wrapper"; subcatContent.className = "ytcenter-settings-subcat-content-wrapper"; leftPanel.className = "ytcenter-settings-panel-left clearfix"; rightPanel.className = "ytcenter-settings-panel-right clearfix"; productVersion.className = "ytcenter-settings-version"; if (devbuild) { ytcenter.events.addEvent("language-refresh", function(){ productVersion.innerHTML = ""; productVersion.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("DEV_BUILD"), { "{n}": document.createTextNode(devnumber) })); }); productVersion.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("DEV_BUILD"), { "{n}": document.createTextNode(devnumber) })); } else { productVersion.textContent = "YouTube Center v" + ytcenter.version; } categoryList.className = "ytcenter-settings-category-list"; categories.forEach(function(category){ var li = document.createElement("li"), acat = document.createElement("a"), valign = document.createElement("span"), text = document.createElement("span"), subcatLinkList = [], subcatContentList = [], topheader = document.createElement("div"), topheaderList = document.createElement("ul"), categoryContent = document.createElement("div"), hideContent = false; if (li && !category.visible) li.className = "hid"; sSelectedList.push(acat); acat.setAttribute("onclick", ";return false;"); acat.href = "#"; acat.className = "ytcenter-settings-category-item yt-valign" + (categoryHide || !category.visible ? "" : " ytcenter-selected"); ytcenter.utils.addEventListener(acat, "click", function(e){ category.select(); if (category.subcategories.length > 0 && category.subcategories[0] && category.subcategories[0].select) category.subcategories[0].select(); //ytcenter.events.performEvent("ui-refresh"); e.preventDefault(); e.stopPropagation(); return false; }, false); valign.className = "yt-valign-container"; text.textContent = ytcenter.language.getLocale(category.label); ytcenter.language.addLocaleElement(text, category.label, "@textContent"); valign.appendChild(text); acat.appendChild(valign); li.appendChild(acat); categoryList.appendChild(li); topheaderList.className = "ytcenter-settings-subcat-header clearfix"; category.subcategories.forEach(function(subcat){ var content = document.createElement("div"), liItem = document.createElement("li"), liItemLink = document.createElement("a"), itemTextContent = document.createElement("span"); content.className = "ytcenter-settings-subcat-content" + (hideContent ? " hid" : ""); liItem.className = "clearfix"; liItemLink.className = "yt-uix-button ytcenter-settings-subcat-header-item" + (hideContent ? "" : " ytcenter-selected"); itemTextContent.className = "ytcenter-settings-subcat-header-item-content"; itemTextContent.textContent = ytcenter.language.getLocale(subcat.label); ytcenter.language.addLocaleElement(itemTextContent, subcat.label, "@textContent"); content.appendChild(a.createOptionsForLayout(subcat)); liItemLink.appendChild(itemTextContent); liItem.appendChild(liItemLink); topheaderList.appendChild(liItem); ytcenter.utils.addEventListener(liItemLink, "click", function(e){ subcat.select(); //ytcenter.events.performEvent("ui-refresh"); e.preventDefault(); e.stopPropagation(); return false; }, false); subcatLinkList.push(liItemLink); subcatContentList.push(content); subcat.select = function(){ if (!subcat.visible) return; subcatLinkList.forEach(function(item){ ytcenter.utils.removeClass(item, "ytcenter-selected"); }); subcatContentList.forEach(function(item){ ytcenter.utils.addClass(item, "hid"); }); ytcenter.utils.removeClass(content, "hid"); ytcenter.utils.addClass(liItemLink, "ytcenter-selected"); if (subcat.listeners.click) { subcat.listeners.click.forEach(function(callback){ callback(); }); } }; subcat._visible = function(visible){ if (visible) { try { category.subcategories.forEach(function(subcat2){ if (subcat2.visible && subcat2 !== subcat) { throw "SelectedException"; } }); if (subcat.select) subcat.select(); } catch (e) { if (e !== "SelectedException") throw e; } ytcenter.utils.removeClass(liItem, "hid"); } else { ytcenter.utils.addClass(liItem, "hid"); ytcenter.utils.addClass(content, "hid"); if (ytcenter.utils.hasClass(liItemLink, "ytcenter-selected")) { try { category.subcategories.forEach(function(subcat2){ if (subcat2.visible && subcat2.select) { if (subcat2.select()) throw "SelectedException"; } }); } catch (e) { if (e !== "SelectedException") throw e; } } ytcenter.utils.removeClass(liItemLink, "ytcenter-selected"); } }; categoryContent.appendChild(content); hideContent = true; }); topheader.appendChild(topheaderList); topheader.className = (categoryHide || !category.visible ? "hid" : ""); categoryContent.className = (categoryHide || !category.visible ? "hid" : ""); subcatList.push(topheader); subcatList.push(categoryContent); subcatTop.appendChild(topheader); subcatContent.appendChild(categoryContent); category.select = function(){ if (!category.visible) return false; sSelectedList.forEach(function(item){ ytcenter.utils.removeClass(item, "ytcenter-selected"); }); subcatList.forEach(function(item){ ytcenter.utils.addClass(item, "hid"); }); ytcenter.utils.addClass(acat, "ytcenter-selected"); ytcenter.utils.removeClass(topheader, "hid"); ytcenter.utils.removeClass(categoryContent, "hid"); return true; }; category._visible = function(visible){ if (visible) { ytcenter.utils.removeClass(li, "hid"); } else { ytcenter.utils.addClass(li, "hid"); ytcenter.utils.addClass(topheader, "hid"); ytcenter.utils.addClass(categoryContent, "hid"); if (ytcenter.utils.hasClass(acat, "ytcenter-selected")) { try { categories.forEach(function(category2){ if (category2.visible && category2.select) { if (category2.select()) throw "SelectedException"; } }); } catch (e) { if (e !== "SelectedException") throw e; } } ytcenter.utils.removeClass(acat, "ytcenter-selected"); } }; if (category.visible) categoryHide = true; }); leftPanel.appendChild(categoryList); leftPanel.appendChild(productVersion); rightPanelContent.appendChild(subcatTop); rightPanelContent.appendChild(subcatContent); var statusbar = document.createElement("div"); statusbar.className = "ytcenter-settings-subcat-statusbar-wrapper"; statusbar.textContent = ""; (function(){ var savedTimeout = null, mode = 0; ytcenter.events.addEvent("language-refresh", function(){ if (mode === 0) { statusbar.textContent = ytcenter.language.getLocale("STATUSBAR_SETTINGS_SAVING"); } else if (mode === 1) { statusbar.textContent = ytcenter.language.getLocale("STATUSBAR_SETTINGS_SAVED"); } else if (mode === -1) { statusbar.textContent = ytcenter.language.getLocale("STATUSBAR_SETTINGS_ERROR"); } }); ytcenter.events.addEvent("save", function(){ if (savedTimeout) { uw.clearTimeout(savedTimeout); savedTimeout = null; } mode = 0; statusbar.textContent = ytcenter.language.getLocale("STATUSBAR_SETTINGS_SAVING"); ytcenter.utils.addClass(statusbar, "visible"); }); ytcenter.events.addEvent("save-complete", function(){ mode = 1; statusbar.textContent = ytcenter.language.getLocale("STATUSBAR_SETTINGS_SAVED"); if (savedTimeout) { uw.clearTimeout(savedTimeout); savedTimeout = null; } savedTimeout = uw.setTimeout(function(){ ytcenter.utils.removeClass(statusbar, "visible"); savedTimeout = null; }, ytcenter.settings.saveStatusTimeout); }); ytcenter.events.addEvent("save-error", function(){ mode = -1; statusbar.textContent = ytcenter.language.getLocale("STATUSBAR_SETTINGS_ERROR"); if (savedTimeout) { uw.clearTimeout(savedTimeout); savedTimeout = null; } savedTimeout = uw.setTimeout(function(){ ytcenter.utils.removeClass(statusbar, "visible"); savedTimeout = null; }, ytcenter.settings.saveErrorStatusTimeout); }); })(); rightPanelContent.appendChild(statusbar); rightPanel.appendChild(rightPanelContent); rightPanelContent.className = "ytcenter-settings-panel-right-content"; panelWrapper.className = "ytcenter-settings-content"; panelWrapper.appendChild(leftPanel); panelWrapper.appendChild(rightPanel); frag.appendChild(panelWrapper); return frag; }; a.createDialog = function(){ var dialog = ytcenter.dialog("SETTINGS_TITLE", a.createLayout(), [], "top"), closeButton = document.createElement("div"), closeIcon = document.createElement("img"); closeIcon.className = "close"; closeIcon.setAttribute("src", "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"); closeButton.className = "ytcenter-alert ytcenter-settings-close-button"; closeButton.appendChild(closeIcon); ytcenter.utils.addEventListener(closeButton, "click", function(){ dialog.setVisibility(false); }, false); dialog.getRoot().id = "ytcenter-settings"; dialog.getHeader().appendChild(closeButton); dialog.getHeader().style.margin = "0 -20px 0px"; dialog.getBase().style.overflowY = "scroll"; dialog.getFooter().style.display = "none"; dialog.getContent().className += " clearfix"; return dialog; }; return a; })(); var _settingsInit = false; function settingsInit(){ var cat, subcat, option; if (_settingsInit || !ytcenter.settingsPanel || !ytcenter.__settingsLoaded) return; _settingsInit = true; /* Category:General */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_TAB_GENERAL"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_TAB_GENERAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "language", // defaultSetting "list", // Module "SETTINGS_LANGUAGE", // label { // Args "list": function(){ function sortCompare(a, b) { if (a === "en-US") return -1; if (b === "en-US") return 1; if (ytcenter.languages[a].LANGUAGE < ytcenter.languages[b].LANGUAGE) return -1; if (ytcenter.languages[a].LANGUAGE > ytcenter.languages[b].LANGUAGE) return 1; return 0; } var sortList = []; for (var key in ytcenter.languages) { if (ytcenter.languages.hasOwnProperty(key)) { sortList.push(key); } } sortList.sort(sortCompare); var a = []; a.push({ "label": "LANGUAGE_AUTO", "value": "auto" }); for (var i = 0, len = sortList.length; i < len; i++) { a.push({ "value": sortList[i], "label": (function(key){ return function(){ return ytcenter.languages[key].LANGUAGE; }; })(sortList[i]) }); } return a; }, "listeners": [ { "event": "update", "callback": function(){ ytcenter.language.update(); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Multiple_Languages" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "useSecureProtocol", // defaultSetting "bool", // module "SETTINGS_USESECUREPROTOCOL_LABEL", // label null, // args "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Use_Secure_Protocol" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "removeAdvertisements", // defaultSetting "bool", // module "SETTINGS_REMOVEADVERTISEMENTS_LABEL", // label null, // args "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_Advertisements" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "ytspf", // defaultSetting "bool", // module "SETTINGS_YTSPF", // label null, // args "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-SPF" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "expandDescription", // defaultSetting "bool", // module "SETTINGS_AUTOEXPANDDESCRIPTION_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Expand_Description" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "headlineTitleExpanded", // defaultSetting "bool", // module "SETTINGS_AUTOEXPANDTITLE_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Expand_Title" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channelUploadedVideosPlaylist", // defaultSetting "bool", // module "SETTINGS_CHANNELUPLOADVIDEOSPLAYLIST_LABEL" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "removeYouTubeTitleSuffix", // defaultSetting "bool", // module "SETTINGS_TITLE_REMOVE_YOUTUBE_SUFFIX", // label { "listeners": [ { "event": "click", "callback": function(){ ytcenter.title.update(); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_YouTube_Title_Suffix" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerPlayingTitleIndicator", // defaultSetting "bool", // module "SETTINGS_PLAYER_PLAYING_INDICATOR", // label { "listeners": [ { "event": "click", "callback": function(){ ytcenter.title.update(); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Show_Player_Playing_Icon_In_Title" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerOnlyOneInstancePlaying", // defaultSetting "bool", // module "SETTINGS_PLAYER_ONLY_ONE_INSTANCE_PLAYING", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Only_One_Player_Instance_Playing" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "importexport" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "button", null, { "text": "SETTINGS_RESETSETTINGS_LABEL", "listeners": [ { "event": "click", "callback": function(){ var msgElm = document.createElement("h3"); msgElm.style.fontWeight = "normal"; msgElm.textContent = ytcenter.language.getLocale("SETTINGS_RESETSETTINGS_TEXT"); ytcenter.language.addLocaleElement(msgElm, "SETTINGS_RESETSETTINGS_TEXT", "@textContent"); var dialog = ytcenter.dialog("SETTINGS_RESETSETTINGS_LABEL", msgElm, [ { label: "CONFIRM_CANCEL", primary: false, callback: function(){ dialog.setVisibility(false); } }, { label: "CONFIRM_RESET", primary: true, callback: function(){ ytcenter.settings = ytcenter._settings; ytcenter.saveSettings(false); uw.setTimeout(function(){ loc.reload(); dialog.setVisibility(false); }, 500); } } ]); dialog.setVisibility(true); } } ] } ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_WATCHEDVIDEOS"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "watchedVideosIndicator", // defaultSetting "bool", // module "SETTINGS_WATCHEDVIDEOS_INDICATOR", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Watched_Videos" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "hideWatchedVideos", // defaultSetting "bool", // module "SETTINGS_HIDEWATCHEDVIDEOS", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["hide-watched-videos"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Hide_Watched_Videos" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "button", // module null, { "text": "SETTINGS_WATCHEDVIDEOS_CLEAN_VIDEO_HISTORY", "listeners": [ { "event": "click", "callback": function(){ var msgElm = document.createElement("h3"); msgElm.style.fontWeight = "normal"; msgElm.textContent = ytcenter.language.getLocale("SETTINGS_WATCHEDVIDEOS_CLEAN_VIDEO_HISTORY_CONTENT"); ytcenter.language.addLocaleElement(msgElm, "SETTINGS_WATCHEDVIDEOS_CLEAN_VIDEO_HISTORY_CONTENT", "@textContent"); var dialog = ytcenter.dialog("SETTINGS_WATCHEDVIDEOS_CLEAN_VIDEO_HISTORY", msgElm, [ { label: "CONFIRM_CANCEL", primary: false, callback: function(){ dialog.setVisibility(false); } }, { label: "CONFIRM_CLEAN", primary: true, callback: function(){ ytcenter.settings.watchedVideos = []; ytcenter.settings.notwatchedVideos = []; ytcenter.saveSettings(false, function(){ loc.reload(); dialog.setVisibility(false); }); } } ]); dialog.setVisibility(true); } } ] } ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_LAYOUT"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "flexWidthOnPage", // defaultSetting "bool", // module "SETTINGS_FLEXWIDTHONPAGE_LABEL", // label { // args "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["flex"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Flex_Width_on_Page" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "flexWidthOnChannelPage", // defaultSetting "bool", // module "SETTINGS_FLEXWIDTHONCHANNELPAGE_LABEL", // label { // args "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["flex"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Flex_Width_on_Channel" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "gridSubscriptionsPage", // defaultSetting "bool", // module "SETTINGS_GRIDSUBSCRIPTIONS", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Grid_Subscriptions" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["gridview"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "gridCollectionPage", // defaultSetting "bool", // module "SETTINGS_GRIDCOLLECTIONS", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Grid_Collections" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["gridview"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "hideTicker", // defaultSetting "bool", // module "SETTINGS_HIDE_TICKER", "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Hide_Ticker" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["hide-ticker"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "hideLangAlert", // defaultSetting "bool", // module "SETTINGS_HIDE_LANG_ALERT" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["hide-lang"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "staticHeader", // defaultSetting "bool", // module "SETTINGS_STATIC_HEADER" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["header"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "staticHeader_scrollToPlayer", // defaultSetting "bool", // module "SETTINGS_SCROLLTOPLAYER_LABEL" ); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ opt.setVisibility(ytcenter.settings.staticHeader); }; })(option)); option.setVisibility(ytcenter.settings.staticHeader); subcat.addOption(option); /*option = ytcenter.settingsPanel.createOption( "yonezCleanYT", // defaultSetting "bool", // module "SETTINGS_LAYOUT_YONEZ_CLEAN_YT" ); option.addEventListener("update", function(){ if (ytcenter.settings.yonezCleanYT) { ytcenter.cssElements.yonez.add(); } else { ytcenter.cssElements.yonez.remove(); } }); subcat.addOption(option);*/ /* Category:Player */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_PLAYER"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_TAB_GENERAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "removeRelatedVideosEndscreen", // defaultSetting "bool", // module "SETTINGS_REMOVE_RELATED_VIDEOS_ENDSCREEN", // label { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_Endscreen" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "enableEndscreenAutoplay", // defaultSetting "bool", // module "SETTINGS_ENDSCREEN_AUTOPLAY", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Play_First_Video_in_Endscreen" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likeSwitchToTab", "list", "SETTINGS_SWITCHTOTAB_LIKE", { "list": [ { "value": "none", "label": "SETTINGS_SWITCHTOTAB_NONE" }, { "value": "share", "label": "SETTINGS_SWITCHTOTAB_SHARE" }/*, { "value": "stats", "label": "SETTINGS_SWITCHTOTAB_STATS" }, { "value": "report", "label": "SETTINGS_SWITCHTOTAB_REPORT" }, { "value": "ratings-disabled", "label": "SETTINGS_SWITCHTOTAB_RATINGS_DISABLED" }, { "value": "rental-required", "label": "SETTINGS_SWITCHTOTAB_RENTAL_REQUIRED" }, { "value": "error", "label": "SETTINGS_SWITCHTOTAB_ERROR" }*/ ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Switch_To_Tab_At_Like_of_Video" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "endOfVideoAutoSwitchToTab", "list", "SETTINGS_SWITCHTOTAB_ENDOFVIDEO", { "list": [ { "value": "none", "label": "SETTINGS_SWITCHTOTAB_NONE" }, { "value": "share", "label": "SETTINGS_SWITCHTOTAB_SHARE" }, { "value": "stats", "label": "SETTINGS_SWITCHTOTAB_STATS" }, { "value": "report", "label": "SETTINGS_SWITCHTOTAB_REPORT" }, { "value": "ratings-disabled", "label": "SETTINGS_SWITCHTOTAB_RATINGS_DISABLED" }, { "value": "rental-required", "label": "SETTINGS_SWITCHTOTAB_RENTAL_REQUIRED" }, { "value": "error", "label": "SETTINGS_SWITCHTOTAB_ERROR" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Switch_To_Tab_At_End_of_Video" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dashPlayback", // defaultSetting "bool", // module "SETTINGS_DASHPLAYBACK", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-DASH_Playback" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "forcePlayerType", // defaultSetting "list", // module "SETTINGS_FORCEPLAYERTYPE", { "list": [ { "value": "default", "label": "SETTINGS_FORCEPLAYERTYPE_DEFAULT" }, { "value": "flash", "label": "SETTINGS_FORCEPLAYERTYPE_FLASH" }, { "value": "html5", "label": "SETTINGS_FORCEPLAYERTYPE_HTML5" }, { "value": "aggressive_flash", "label": "SETTINGS_FORCEPLAYERTYPE_AGGRESSIVE_FLASH" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Type" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "autohide", // defaultSetting "list", // module "SETTINGS_AUTOHIDECONTROLBAR_LABEL", { "list": [ { "value": "-1", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_DEFAULT" }, { "value": "0", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_NONE" }, { "value": "1", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_BOTH" }, { "value": "2", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_PROGRESSBAR" }, { "value": "3", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_CONTROLBAR" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.page === "watch") { ytcenter.player.setAutoHide(ytcenter.settings.autohide); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Hide_Bar" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerTheme", // defaultSetting "list", // module "SETTINGS_PLAYERTHEME_LABEL", { "list": [ { "value": "dark", "label": "SETTINGS_PLAYERTHEME_DARK" }, { "value": "light", "label": "SETTINGS_PLAYERTHEME_LIGHT" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.page === "watch") { ytcenter.player.setTheme(ytcenter.settings.playerTheme); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Theme" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerColor", // defaultSetting "list", // module "SETTINGS_PLAYERCOLOR_LABEL", { "list": [ { "value": "red", "label": "SETTINGS_PLAYERCOLOR_RED" }, { "value": "white", "label": "SETTINGS_PLAYERCOLOR_WHITE" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.page === "watch") { ytcenter.player.setProgressColor(ytcenter.settings.playerColor); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Color" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "flashWMode", // defaultSetting "list", // module "SETTINGS_WMODE_LABEL", { "list": [ { "value": "none", "label": "SETTINGS_WMODE_NONE" }, { "value": "window", "label": "SETTINGS_WMODE_WINDOW" }, { "value": "direct", "label": "SETTINGS_WMODE_DIRECT" }, { "value": "opaque", "label": "SETTINGS_WMODE_OPAQUE" }, { "value": "transparent", "label": "SETTINGS_WMODE_TRANSPARENT" }, { "value": "gpu", "label": "SETTINGS_WMODE_GPU" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Flash_WMode" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "enableAnnotations", // defaultSetting "bool", // module "SETTINGS_ENABLEANNOTATIONS_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Annotations" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "bufferEnabled", // defaultSetting "bool", // module "SETTINGS_BUFFER_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Enable_custom_buffer" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "bufferSize", // defaultSetting "rangetext", // module "SETTINGS_BUFFER_SIZE", { "min": 0, /* 0 bytes - I have no idea if this will break something */ "max": 1099511627776, /* 1 TB - Why not... */ "suffix": " B", "text-width": "135px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Custom_buffer_size" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "line" ); subcat.addOption(option); /*option = ytcenter.settingsPanel.createOption( "removeBrandingBanner", // defaultSetting "bool", // module "SETTINGS_BRANDING_BANNER_REMOVE", // label { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_Branding_Banner" ); subcat.addOption(option);*/ /*option = ytcenter.settingsPanel.createOption( "removeBrandingBackground", // defaultSetting "bool", // module "SETTINGS_BRANDING_BACKGROUND_REMOVE", // label { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_Branding_Background" ); subcat.addOption(option);*/ option = ytcenter.settingsPanel.createOption( "removeBrandingWatermark", // defaultSetting "bool", // module "SETTINGS_BRANDING_WATERMARK_REMOVE", // label { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_Branding_Watermark" ); subcat.addOption(option); if (devbuild) { option = ytcenter.settingsPanel.createOption( null, // defaultSetting "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "enable_custom_fexp", // defaultSetting "bool", // module "SETTINGS_ENABLE_CUSTOM_FEXP" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "custom_fexp", // defaultSetting "textfield", // module "SETTINGS_CUSTOM_FEXP" ); subcat.addOption(option); } subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_AUTOPLAY"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "preventAutoPlay", // defaultSetting "bool", // module "SETTINGS_PREVENTAUTOPLAY_LABEL", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_AutoPlay" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventAutoBuffer", // defaultSetting "bool", // module "SETTINGS_PREVENTAUTOBUFFERING_LABEL", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_AutoBuffering" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "newline" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventPlaylistAutoPlay", // defaultSetting "bool", // module "SETTINGS_PLAYLIST_PREVENT_AUTOPLAY", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_Playlist_AutoPlay" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventPlaylistAutoBuffer", // defaultSetting "bool", // module "SETTINGS_PLAYLIST_PREVENT_AUTOBUFFERING", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_Playlist_AutoBuffering" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "newline" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventTabAutoPlay", // defaultSetting "bool", // module "SETTINGS_PREVENTTABAUTOPLAY_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_Tab_AutoPlay" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventTabAutoBuffer", // defaultSetting "bool", // module "SETTINGS_PREVENTTABAUTOBUFFERING_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_Tab_AutoBuffering" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "newline" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventTabPlaylistAutoPlay", // defaultSetting "bool", // module "SETTINGS_PREVENTTABPLAYLISTAUTOPLAY_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_Tab_Playlist_AutoPlay" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "preventTabPlaylistAutoBuffer", // defaultSetting "bool", // module "SETTINGS_PREVENTTABPLAYLISTAUTOBUFFERING_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_Tab_Playlist_AutoBuffering" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "newline" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playlistAutoPlay", // defaultSetting "bool", // module "SETTINGS_PLAYLIST_AUTOPLAY", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Playlist_auto_play" ); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ var module = opt.getLiveModule(); if (module) { module.update(ytcenter.settings.playlistAutoPlay); } }; })(option)); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playlistAutoPlayFreeze", // defaultSetting "bool", // module "SETTINGS_PLAYLIST_AUTOPLAY_FREEZE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Playlist_auto_play_freeze" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_RESOLUTION"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableAutoVideoQuality", // defaultSetting "bool", // module "SETTINGS_ENABLEAUTORESOLUTION_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Auto_Resolution" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "autoVideoQuality", // defaultSetting "list", // module "SETTINGS_AUTORESOLUTION_LABEL", { "list": [ { "value": "highres", "label": "SETTINGS_HIGHRES" }, { "value": "hd1440", "label": "SETTINGS_HD1440" }, { "value": "hd1080", "label": "SETTINGS_HD1080" }, { "value": "hd720", "label": "SETTINGS_HD720" }, { "value": "large", "label": "SETTINGS_LARGE" }, { "value": "medium", "label": "SETTINGS_MEDIUM" }, { "value": "small", "label": "SETTINGS_SMALL" }, { "value": "tiny", "label": "SETTINGS_TINY" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Resolution" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_PLAYERSIZE"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableResize", // defaultSetting "bool", // module "SETTINGS_RESIZE_FEATURE_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Size" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "resize-default-playersize", // defaultSetting "defaultplayersizedropdown", // module "SETTINGS_RESIZE_DEFAULT", { "bind": "resize-playersizes" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Default_Player_Size" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "resize-small-button", // defaultSetting "defaultplayersizedropdown", // module "SETTINGS_RESIZE_SMALL_BUTTON", { "bind": "resize-playersizes" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Small_Resize_Button" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "resize-large-button", // defaultSetting "defaultplayersizedropdown", // module "SETTINGS_RESIZE_LARGE_BUTTON", { "bind": "resize-playersizes" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Large_Resize_Button" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerSizeAspect", // defaultSetting "list", // module "SETTINGS_RESIZE_ASPECT_LABEL", { "list": [ { "value": "default", "label": "SETTINGS_RESIZE_ASPECT_DEFAULT" }, { "value": "4:3", // 1.33333 "label": "SETTINGS_RESIZE_ASPECT_4:3" }, { "value": "3:2", // 1.33333 "label": "SETTINGS_RESIZE_ASPECT_3:2" }, { "value": "5:4", // 1.25 "label": "SETTINGS_RESIZE_ASPECT_5:4" }, { "value": "16:9", // 1.7778 "label": "SETTINGS_RESIZE_ASPECT_16:9" }, { "value": "16:10", // 1.6 "label": "SETTINGS_RESIZE_ASPECT_16:10" }, { "value": "24:10", // 2.4 "label": "SETTINGS_RESIZE_ASPECT_24:10" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.player.setRatio(ytcenter.player.calculateRatio(ytcenter.player.getConfig().args.dash === "1" && ytcenter.player.getConfig().args.adaptive_fmts)); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Aspect" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "ytOnlyStageMode", // defaultSetting "bool", // module "SETTINGS_RESIZE_ONLY_STAGE_MODE", { "listeners" : [ { "event": "click", "callback": function(){ ytcenter.player.resizeUpdater(); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Only_stage_mode" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting null, // module "SETTINGS_RESIZE_LIST", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Size_Editor" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "resize-playersizes", // defaultSetting "resizeItemList" // module ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_VOLUME"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableVolume", // defaultSetting "bool", // module "SETTINGS_VOLUME_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Volume_Control" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "volume", // defaultSetting "rangetext", // module "SETTINGS_VOLUME_LABEL", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Volume-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "mute", // defaultSetting "bool", // module "SETTINGS_MUTE_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Mute" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_SHORTCUTS"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableYouTubeShortcuts", // defaultSetting "bool", // module "SETTINGS_ENABLEYTSHORTCUTS_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_YouTube_Player_Shortcuts" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "enableShortcuts", // defaultSetting "bool", // module "SETTINGS_ENABLESHORTCUTS_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Shortcuts_on_Page" ); subcat.addOption(option); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ opt.setVisibility(ytcenter.settings.enableYouTubeShortcuts); }; })(option)); option.setVisibility(ytcenter.settings.enableYouTubeShortcuts); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_TOPSCROLLPLAYER"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "topScrollPlayerEnabled", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_ENABLED", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Fullscreen_Top_Player" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerActivated", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_ACTIVATED", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Activated_by_Default" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerEnabledOnlyVideoPlaying", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_ONLYVIDEOPLAYING", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Only_when_Video_is_Playing" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerEnterOnVideoPlay", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_ENTERONVIDEOPLAY", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enter_On_Video_Play" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerExitOnVideoPause", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_EXITONVIDEOPAUSE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Exit_On_Video_Pause" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerExitOnVideoEnd", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_EXITONVIDEOEND", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Exit_On_Video_End" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerScrollUpToExit", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_SCROLLUPEXIT", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Scroll_Up_To_Exit_Mode" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerAnimation", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_ANIMATION", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Animations" ); subcat.addOption(option); /*option = ytcenter.settingsPanel.createOption( "topScrollPlayerHideScrollbar", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_HIDESCROLLBAR", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#hide-scrollbar" ); subcat.addOption(option);*/ option = ytcenter.settingsPanel.createOption( "topScrollPlayerCountIncreaseBefore", // defaultSetting "bool", // module "SETTINGS_TOPSCROLLPLAYER_COUNTINCREASEBEFORE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Increase_Counter_by_Scrolling_To_The_Top_of_The_Page" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerTimesToEnter", // defaultSetting "rangetext", // module "SETTINGS_TOPSCROLLPLAYER_TIMESTOENTER", // label { "min": 0, "max": 20 }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Amount_To_Enter" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerTimesToExit", // defaultSetting "rangetext", // module "SETTINGS_TOPSCROLLPLAYER_TIMESTOEXIT", // label { "min": 0, "max": 20 }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Amount_To_Exit" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "topScrollPlayerBumpTimer", // defaultSetting "rangetext", // module "SETTINGS_TOPSCROLLPLAYER_BUMPTIMER", // label { "min": 0, "max": 10000, "suffix": " ms" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Counter_Reset_After" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_PLAYERGLOW"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "playerGlowEnabled", // defaultSetting "bool", // module "SETTINGS_PLAYERGLOW_ENABLED", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Enabled" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setEnabled(ytcenter.settings.playerGlowEnabled); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowFactor", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_FACTOR", // label { "min": 1, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Quality" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("factor", ytcenter.settings.playerGlowFactor); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowPixelInterval", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_PIXEL_INTERVAL", // label { "min": 1, "max": 10000000 }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Pixel_interval" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("pixelInterval", ytcenter.settings.playerGlowPixelInterval); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowRequestAnimationFrame", // defaultSetting "bool", // module "SETTINGS_PLAYERGLOW_USE_REQUEST_ANIMATION_FRAME", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Use_request_animation_frame" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowUpdateInterval", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_UPDATE_INTERVAL", // label { "min": 0, "max": 10000, "suffix": " ms" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Update_interval" ); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ ytcenter.effects.playerGlow.setOption("interval", (ytcenter.settings.playerGlowRequestAnimationFrame ? -1 : ytcenter.settings.playerGlowUpdateInterval)); opt.setVisibility(!ytcenter.settings.playerGlowRequestAnimationFrame); }; })(option)); option.setVisibility(!ytcenter.settings.playerGlowRequestAnimationFrame); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowTransition", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_TRANSITION", // label { "min": 0, "max": 10000, "suffix": " ms" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Transition" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("transition", ytcenter.settings.playerGlowTransition); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowBlur", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_BLUR", // label { "min": 0, "max": 200, "suffix": "px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Blur" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("blur", ytcenter.settings.playerGlowBlur); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowSpread", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_SPREAD", // label { "min": 0, "max": 200, "suffix": "px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Spread" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("spread", ytcenter.settings.playerGlowSpread); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowOpacity", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_OPACITY", // label { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Opacity" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("opacity", ytcenter.settings.playerGlowOpacity/100); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerMultiGlowEffect", // defaultSetting "bool", // module "SETTINGS_PLAYERGLOW_MULTI_ENABLED", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Multi_glow_enabled" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("multiglow", ytcenter.settings.playerMultiGlowEffect); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerMultiGlowEffectDepth", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_MULTI_DEPTH", // label { "min": 1, "max": 500, "suffix": "px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Depth" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("depth", ytcenter.settings.playerMultiGlowEffectDepth); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerMultiGlowEffectBlockInterval", // defaultSetting "rangetext", // module "SETTINGS_PLAYERGLOW_MULTI_BLOCK_INTERVAL", // label { "min": 1, "max": 200, "suffix": "px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Block_interval" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("blockInterval", ytcenter.settings.playerMultiGlowEffectBlockInterval); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerGlowEffectOnPlayer", "list", "SETTINGS_PLAYERGLOW_APPLIED", { "list": [ { "value": "both", "label": "SETTINGS_PLAYERGLOW_LIGHTS_OFF_BOTH" }, { "value": "only-lights-off", "label": "SETTINGS_PLAYERGLOW_LIGHTS_OFF_ONLY_LIGHTS_OFF" }, { "value": "only-without-lights-off", "label": "SETTINGS_PLAYERGLOW_LIGHTS_OFF_ONLY_WITHOUT_LIGHTS_OFF" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Glow_on" ); ytcenter.events.addEvent("settings-update", function(){ ytcenter.effects.playerGlow.setOption("glowEffectOnPlayer", ytcenter.settings.playerGlowEffectOnPlayer); }); subcat.addOption(option); /* Category:External Players */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_EXTERNAL_PLAYERS"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_EMBED"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "embed_enabled", "bool", "SETTINGS_EMBEDS_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Embeds" ); subcat.addOption(option); // Only needed in the developer version for testing. if (devbuild) { option = ytcenter.settingsPanel.createOption( "embedWriteEmbedMethod", "list", "SETTINGS_EMBEDS_WRITEMETHOD", { "list": [ { "value": "standard", "label": "SETTINGS_EMBEDS_WRITEMETHOD_STANDARD" }, { "value": "test1", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST1" }, { "value": "test2", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST2" }, { "value": "test3", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST3" }, { "value": "standard+reload", "label": "SETTINGS_EMBEDS_WRITEMETHOD_STANDARDRELOAD" }, { "value": "test1+reload", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST1RELOAD" }, { "value": "test2+reload", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST2RELOAD" }, { "value": "test3+reload", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST3RELOAD" }, { "value": "test4", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST4" }, { "value": "test5", "label": "SETTINGS_EMBEDS_WRITEMETHOD_TEST5" } ] } ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embedWriteEmbedMethodReloadDelay", "rangetext", "SETTINGS_EMBEDS_WRITEMETHOD_RELOADDELAY", { "min": 0, "max": 10000, "suffix": " ms" } ); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ opt.setVisibility(ytcenter.settings.embedWriteEmbedMethod.indexOf("+reload") !== -1); }; })(option)); option.setVisibility(ytcenter.settings.embedWriteEmbedMethod.indexOf("+reload") !== -1); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); } option = ytcenter.settingsPanel.createOption( "embed_dashPlayback", "bool", "SETTINGS_DASHPLAYBACK", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-DASH_Playback-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_forcePlayerType", "list", "SETTINGS_FORCEPLAYERTYPE", { "list": [ { "value": "default", "label": "SETTINGS_FORCEPLAYERTYPE_DEFAULT" }, { "value": "flash", "label": "SETTINGS_FORCEPLAYERTYPE_FLASH" }, { "value": "html5", "label": "SETTINGS_FORCEPLAYERTYPE_HTML5" }, { "value": "aggressive_flash", "label": "SETTINGS_FORCEPLAYERTYPE_AGGRESSIVE_FLASH" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Type-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_autohide", "list", "SETTINGS_AUTOHIDECONTROLBAR_LABEL", { "list": [ { "value": "-1", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_DEFAULT" }, { "value": "0", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_NONE" }, { "value": "1", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_BOTH" }, { "value": "2", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_PROGRESSBAR" }, { "value": "3", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_CONTROLBAR" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.getPage() === "embed") { ytcenter.player.setAutoHide(ytcenter.settings.embed_autohide); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Hide_Bar-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_playerTheme", "list", "SETTINGS_PLAYERTHEME_LABEL", { "list": [ { "value": "dark", "label": "SETTINGS_PLAYERTHEME_DARK" }, { "value": "light", "label": "SETTINGS_PLAYERTHEME_LIGHT" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.getPage() === "embed") { ytcenter.player.setTheme(ytcenter.settings.embed_playerTheme); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Theme-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_playerColor", "list", "SETTINGS_PLAYERCOLOR_LABEL", { "list": [ { "value": "red", "label": "SETTINGS_PLAYERCOLOR_RED" }, { "value": "white", "label": "SETTINGS_PLAYERCOLOR_WHITE" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.getPage() === "embed") { ytcenter.player.setProgressColor(ytcenter.settings.embed_playerColor); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Color-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_flashWMode", "list", "SETTINGS_WMODE_LABEL", { "list": [ { "value": "none", "label": "SETTINGS_WMODE_NONE" }, { "value": "window", "label": "SETTINGS_WMODE_WINDOW" }, { "value": "direct", "label": "SETTINGS_WMODE_DIRECT" }, { "value": "opaque", "label": "SETTINGS_WMODE_OPAQUE" }, { "value": "transparent", "label": "SETTINGS_WMODE_TRANSPARENT" }, { "value": "gpu", "label": "SETTINGS_WMODE_GPU" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Flash_WMode-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_enableAnnotations", "bool", "SETTINGS_ENABLEANNOTATIONS_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Annotations-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embedBufferEnabled", // defaultSetting "bool", // module "SETTINGS_BUFFER_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Enable_custom_buffer" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embedBufferSize", // defaultSetting "rangetext", // module "SETTINGS_BUFFER_SIZE", { "min": 0, /* 0 bytes - I have no idea if this will break something */ "max": 1099511627776, /* 1 TB - Why not... */ "suffix": " B", "text-width": "135px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Custom_buffer_size" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_enableAutoVideoQuality", "bool", "SETTINGS_ENABLEAUTORESOLUTION_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Auto_Resolution-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_autoVideoQuality", "list", "SETTINGS_AUTORESOLUTION_LABEL", { "list": [ { "value": "highres", "label": "SETTINGS_HIGHRES" }, { "value": "hd1440", "label": "SETTINGS_HD1440" }, { "value": "hd1080", "label": "SETTINGS_HD1080" }, { "value": "hd720", "label": "SETTINGS_HD720" }, { "value": "large", "label": "SETTINGS_LARGE" }, { "value": "medium", "label": "SETTINGS_MEDIUM" }, { "value": "small", "label": "SETTINGS_SMALL" }, { "value": "tiny", "label": "SETTINGS_TINY" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Resolution-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_defaultAutoplay", "bool", "SETTINGS_DEFAULT_AUTOPLAY", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Use_Default_AutoPlay" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_preventAutoPlay", "bool", "SETTINGS_PREVENTAUTOPLAY_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_AutoPlay-2" ); option.setVisibility(!ytcenter.settings.embed_defaultAutoplay); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ opt.setVisibility(!ytcenter.settings.embed_defaultAutoplay); }; })(option)); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_preventAutoBuffer", "bool", "SETTINGS_PREVENTAUTOBUFFERING_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_AutoBuffering-2" ); option.setVisibility(!ytcenter.settings.embed_defaultAutoplay); ytcenter.events.addEvent("settings-update", (function(opt){ return function(){ opt.setVisibility(!ytcenter.settings.embed_defaultAutoplay); }; })(option)); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_enableVolume", "bool", "SETTINGS_VOLUME_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Volume_Control-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_volume", "rangetext", "SETTINGS_VOLUME_LABEL", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Volume-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "embed_mute", "bool", "SETTINGS_MUTE_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Mute-2" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_CHANNEL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "embed_dashPlayback", "bool", "SETTINGS_DASHPLAYBACK", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-DASH_Playback-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_forcePlayerType", "list", "SETTINGS_FORCEPLAYERTYPE", { "list": [ { "value": "default", "label": "SETTINGS_FORCEPLAYERTYPE_DEFAULT" }, { "value": "flash", "label": "SETTINGS_FORCEPLAYERTYPE_FLASH" }, { "value": "html5", "label": "SETTINGS_FORCEPLAYERTYPE_HTML5" }, { "value": "aggressive_flash", "label": "SETTINGS_FORCEPLAYERTYPE_AGGRESSIVE_FLASH" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Type-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_autohide", "list", "SETTINGS_AUTOHIDECONTROLBAR_LABEL", { "list": [ { "value": "-1", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_DEFAULT" }, { "value": "0", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_NONE" }, { "value": "1", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_BOTH" }, { "value": "2", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_PROGRESSBAR" }, { "value": "3", "label": "SETTINGS_AUTOHIDECONTROLBAR_LIST_CONTROLBAR" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.getPage() === "embed") { ytcenter.player.setAutoHide(ytcenter.settings.channel_autohide); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Hide_Bar-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_playerTheme", "list", "SETTINGS_PLAYERTHEME_LABEL", { "list": [ { "value": "dark", "label": "SETTINGS_PLAYERTHEME_DARK" }, { "value": "light", "label": "SETTINGS_PLAYERTHEME_LIGHT" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.getPage() === "embed") { ytcenter.player.setTheme(ytcenter.settings.channel_playerTheme); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Theme-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_playerColor", "list", "SETTINGS_PLAYERCOLOR_LABEL", { "list": [ { "value": "red", "label": "SETTINGS_PLAYERCOLOR_RED" }, { "value": "white", "label": "SETTINGS_PLAYERCOLOR_WHITE" } ], "listeners" : [ { "event": "update", "callback": function(){ if (ytcenter.getPage() === "embed") { ytcenter.player.setProgressColor(ytcenter.settings.channel_playerColor); } } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Player_Color-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_flashWMode", "list", "SETTINGS_WMODE_LABEL", { "list": [ { "value": "none", "label": "SETTINGS_WMODE_NONE" }, { "value": "window", "label": "SETTINGS_WMODE_WINDOW" }, { "value": "direct", "label": "SETTINGS_WMODE_DIRECT" }, { "value": "opaque", "label": "SETTINGS_WMODE_OPAQUE" }, { "value": "transparent", "label": "SETTINGS_WMODE_TRANSPARENT" }, { "value": "gpu", "label": "SETTINGS_WMODE_GPU" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Flash_WMode-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_enableAnnotations", "bool", "SETTINGS_ENABLEANNOTATIONS_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Annotations-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channelBufferEnabled", // defaultSetting "bool", // module "SETTINGS_BUFFER_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Enable_custom_buffer" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channelBufferSize", // defaultSetting "rangetext", // module "SETTINGS_BUFFER_SIZE", { "min": 0, /* 0 bytes - I have no idea if this will break something */ "max": 1099511627776, /* 1 TB - Why not... */ "suffix": " B", "text-width": "135px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Custom_buffer_size" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_enableAutoVideoQuality", "bool", "SETTINGS_ENABLEAUTORESOLUTION_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Auto_Resolution-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_autoVideoQuality", "list", "SETTINGS_AUTORESOLUTION_LABEL", { "list": [ { "value": "highres", "label": "SETTINGS_HIGHRES" }, { "value": "hd1440", "label": "SETTINGS_HD1440" }, { "value": "hd1080", "label": "SETTINGS_HD1080" }, { "value": "hd720", "label": "SETTINGS_HD720" }, { "value": "large", "label": "SETTINGS_LARGE" }, { "value": "medium", "label": "SETTINGS_MEDIUM" }, { "value": "small", "label": "SETTINGS_SMALL" }, { "value": "tiny", "label": "SETTINGS_TINY" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Resolution-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_preventAutoPlay", "bool", "SETTINGS_PREVENTAUTOPLAY_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_AutoPlay-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_preventAutoBuffer", "bool", "SETTINGS_PREVENTAUTOBUFFERING_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Prevent_AutoBuffering-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_enableVolume", "bool", "SETTINGS_VOLUME_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Volume_Control-3" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_volume", "rangetext", "SETTINGS_VOLUME_LABEL", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Volume-4" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "channel_mute", "bool", "SETTINGS_MUTE_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Mute-3" ); subcat.addOption(option); /* Category:Download */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_DOWNLOAD"); if (identifier === 8) cat.setVisibility(false); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_TAB_GENERAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "downloadQuality", "list", "SETTINGS_DOWNLOADQUALITY_LABEL", { "list": [ { "value": "highres", "label": "SETTINGS_HIGHRES" }, { "value": "hd1440", "label": "SETTINGS_HD1440" }, { "value": "hd1080", "label": "SETTINGS_HD1080" }, { "value": "hd720", "label": "SETTINGS_HD720" }, { "value": "large", "label": "SETTINGS_LARGE" }, { "value": "medium", "label": "SETTINGS_MEDIUM" }, { "value": "small", "label": "SETTINGS_SMALL" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Quality" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "downloadFormat", "list", "SETTINGS_DOWNLOADFORMAT_LABEL", { "list": [ { "value": "mp4", "label": "SETTINGS_DOWNLOADFORMAT_LIST_MP4" }, { "value": "webm", "label": "SETTINGS_DOWNLOADFORMAT_LIST_WEBM" }, { "value": "flv", "label": "SETTINGS_DOWNLOADFORMAT_LIST_FLV" }, { "value": "3gp", "label": "SETTINGS_DOWNLOADFORMAT_LIST_3GP" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Format" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "downloadAsLinks", "bool", "SETTINGS_DOWNLOADASLINKS_LABEL", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Download_as_links" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "show3DInDownloadMenu", "bool", "SETTINGS_SHOW3DINDOWNLOADMENU_LABEL", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Show_3D_in_Download_Menu" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "filename", "textfield", "SETTINGS_FILENAME_LABEL", { "listeners": [ { "event": "change", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Filename" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "fixfilename", "bool", "SETTINGS_FIXDOWNLOADFILENAME_LABEL", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Remove_NonAlphanumeric_Characters" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_MP3SERVICES"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "mp3Services", "multilist", "SETTINGS_MP3SERVICES_LABEL", { "list": ytcenter.mp3services, "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-MP3_Services" ); option.setModuleStyle("display", "block"); subcat.addOption(option); /* Category:Repeat */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_REPEAT"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_TAB_GENERAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "autoActivateRepeat", "bool", "SETTINGS_AUTOACTIVATEREPEAT_LABEL", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Auto_Activate_Repeat" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "repeatShowIcon", "bool", "SETTINGS_REPEAT_SHOW_ICON", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Show_Icon" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "repeatShowText", "bool", "SETTINGS_REPEAT_SHOW_TEXT", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Show_Text" ); subcat.addOption(option); /* Category:UI */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_UI"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_TAB_GENERAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "guideMode", "list", "SETTINGS_GUIDEMODE", { "list": [ { "value": "default", "label": "SETTINGS_GUIDEMODE_DEFAULT" }, { "value": "always_open", "label": "SETTINGS_GUIDEMODE_ALWAYS_OPEN" }, { "value": "always_closed", "label": "SETTINGS_GUIDEMODE_ALWAYS_CLOSED" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Guide_Mode" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "watch7playerguidealwayshide", "bool", "SETTINGS_GUIDE_ALWAYS_HIDE", { "listeners": [ { "event": "click", "callback": function(){ /*ytcenter.guide.hidden = ytcenter.settings.watch7playerguidealwayshide; ytcenter.guide.update();*/ ytcenter.player._updateResize(); ytcenter.classManagement.updateClassesByGroup(["hide-guide"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Always_Hide_The_Guide" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "watch7playerguidehide", "bool", "SETTINGS_WATCH7_PLAYER_GUIDE_HIDE", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.player._updateResize(); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Hide_Guide_When_Resizing" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "disableGuideCount", "bool", "SETTINGS_HIDE_GUIDE_COUNT", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["hide-guide-count"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Hide_Guide_Count" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line", null ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "logoLink", "textfield", "SETTINGS_LOGO_LINK", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.updateLogoLink(); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-YouTube_Logo_Link" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "disableFeedItemActionMenu", "bool", "SETTINGS_HIDE_FEED_ITEM_ACTION_MENU", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["hide-feed-item-action-menu"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Hide_Feed_Item_Action_Menu_Button" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "hideRecommendedChannels", "bool", "SETTINGS_HIDE_RECOMMENDED_CHANNELS", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["hide-recommended-channels"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Hide_Recommended_Channels" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line", null ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerDarkSideBG", "bool", "SETTINGS_PLAYER_DARK_SIDE", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["darkside"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Dark_Player_Background" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerDarkSideBGRetro", "bool", "SETTINGS_PLAYER_DARK_SIDE_RETRO", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Dark_player_background_retro" ); var playerDarkSideBGRetroOption = option; subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "playerDarkSideBGColor", "colorpicker", "SETTINGS_PLAYER_DARK_SIDE_COLOR", { "presetColors": ["#1b1b1b", "#444444"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["darkside"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Dark_Player_Background_Color" ); var playerDarkSideBGColorOption = option; playerDarkSideBGRetroOption.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["darkside"]); playerDarkSideBGColorOption.setVisibility(!ytcenter.settings.playerDarkSideBGRetro); }); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["darkside"]); }); if (ytcenter.settings.playerDarkSideBGRetro) option.setVisibility(false); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "line", null ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "uploaderCountryEnabled", // defaultSetting "bool", // module "SETTINGS_UPLOADER_COUNTRY_FLAG_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Country_Flag_for_Uploader" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "uploaderCountryShowFlag", // defaultSetting "bool", // module "SETTINGS_UPLOADER_COUNTRY_FLAG_SHOW_FLAG", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Show_Country_Flag" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "uploaderCountryUseNames", // defaultSetting "bool", // module "SETTINGS_UPLOADER_COUNTRY_FLAG_USE_NAME", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Use_Country_Names" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "uploaderCountryPosition", // defaultSetting "list", // module "SETTINGS_UPLOADER_COUNTRY_FLAG_POSITION", // label { "list": [ { "value": "before_username", "label": "SETTINGS_UPLOADER_COUNTRY_FLAG_POSITION_BEFORE_USERNAME" }, { "value": "after_username", "label": "SETTINGS_UPLOADER_COUNTRY_FLAG_POSITION_AFTER_USERNAME" }, { "value": "last", "label": "SETTINGS_UPLOADER_COUNTRY_FLAG_POSITION_LAST" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Flag_Country_Position" ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_LIKEDISLIKEBUTTON"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "likeButtonColor", "colorpicker", "SETTINGS_LIKEBUTTON_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["likebuttoncolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Like_button_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likebuttoncolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likeButtonHoverColor", "colorpicker", "SETTINGS_LIKEBUTTON_HOVER_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["likebuttonhovercolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Like_button_hover_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likebuttonhovercolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likeButtonOpacity", "rangetext", "SETTINGS_LIKEBUTTON_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Like_button_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likebuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likeButtonHoverOpacity", "rangetext", "SETTINGS_LIKEBUTTON_HOVER_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Like_button_hover_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likebuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikeButtonColor", "colorpicker", "SETTINGS_DISLIKEBUTTON_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["dislikebuttoncolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Dislike_button_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikebuttoncolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikeButtonHoverColor", "colorpicker", "SETTINGS_DISLIKEBUTTON_HOVER_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["dislikebuttonhovercolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Dislike_button_hover_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikebuttonhovercolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikeButtonOpacity", "rangetext", "SETTINGS_DISLIKEBUTTON_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Dislike_button_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikebuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikeButtonHoverOpacity", "rangetext", "SETTINGS_DISLIKEBUTTON_HOVER_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Dislike_button_hover_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikebuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likedButtonColor", "colorpicker", "SETTINGS_LIKEDBUTTON_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["likedbuttoncolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Liked_button_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likedbuttoncolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likedButtonHoverColor", "colorpicker", "SETTINGS_LIKEDBUTTON_HOVER_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["likedbuttonhovercolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Liked_button_hover_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likedbuttonhovercolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likedButtonOpacity", "rangetext", "SETTINGS_LIKEDBUTTON_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Liked_button_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likedbuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "likedButtonHoverOpacity", "rangetext", "SETTINGS_LIKEDBUTTON_HOVER_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Liked_button_hover_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["likedbuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikedButtonColor", "colorpicker", "SETTINGS_DISLIKEDBUTTON_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["dislikedbuttoncolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Disliked_button_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikedbuttoncolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikedButtonHoverColor", "colorpicker", "SETTINGS_DISLIKEDBUTTON_HOVER_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff", "#000"], "listeners": [ { "event": "click", "callback": function(){ ytcenter.classManagement.updateClassesByGroup(["dislikedbuttonhovercolor"]); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Disliked_button_hover_color" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikedbuttonhovercolor"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikedButtonOpacity", "rangetext", "SETTINGS_DISLIKEDBUTTON_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Disliked_button_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikedbuttonopacity"]); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "dislikedButtonHoverOpacity", "rangetext", "SETTINGS_DISLIKEDBUTTON_HOVER_OPACITY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Disliked_button_hover_opacity" ); option.addEventListener("update", function(){ ytcenter.classManagement.updateClassesByGroup(["dislikedbuttonopacity"]); }); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_RATINGBAR"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "sparkbarLikesColor", // defaultSetting "colorpicker", // module "SETTINGS_SPARKBAR_LIKES_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff"] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Rating_Bar_Likes_Color" ); option.addEventListener("update", function(){ var wvi = document.getElementById("watch7-views-info"), sl = document.getElementsByClassName("video-extras-sparkbar-likes"); if (sl && sl.length > 0 && sl[0]) { sl[0].style.background = ytcenter.settings.sparkbarLikesColor; } }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "sparkbarDislikesColor", // defaultSetting "colorpicker", // module "SETTINGS_SPARKBAR_DISLIKES_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff"] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Rating_Bar_Dislikes_Color" ); option.addEventListener("update", function(){ var wvi = document.getElementById("watch7-views-info"), sd = document.getElementsByClassName("video-extras-sparkbar-dislikes"); if (sd && sd.length > 0 && sd[0]) { sd[0].style.background = ytcenter.settings.sparkbarDislikesColor; } }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "sparkbarHeight", // defaultSetting "rangetext", // module "SETTINGS_SPARKBAR_HEIGHT", // label { "min": 1, "max": 100, "suffix": "px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Height" ); option.addEventListener("update", function(){ var wvi = document.getElementById("watch7-views-info"), sl = document.getElementsByClassName("video-extras-sparkbar-likes"), sd = document.getElementsByClassName("video-extras-sparkbar-dislikes"); if (sl && sd && sl.length > 0 && sd.length > 0 && sl[0] && sd[0]) { sl[0].style.height = ytcenter.settings.sparkbarHeight + "px"; sd[0].style.height = ytcenter.settings.sparkbarHeight + "px"; sd[0].parentNode.style.height = ytcenter.settings.sparkbarHeight + "px"; } }); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_PLACEMENT"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableDownload", "bool", "SETTINGS_ENABLEDOWNLOAD_LABEL", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Placement" ); if (identifier === 8) option.setVisibility(false); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "enableRepeat", "bool", "SETTINGS_ENABLEREPEAT_LABEL", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Placement" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "lightbulbEnable", "bool", "SETTINGS_LIGHTBULB_ENABLE", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Placement" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "resizeEnable", "bool", "SETTINGS_RESIZE_ENABLE", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Placement" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "aspectEnable", "bool", "SETTINGS_ASPECT_ENABLE", { "listeners": [ { "event": "click", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Placement" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "newline" ); option.setVisibility(ytcenter.getPage() === "watch"); ytcenter.events.addEvent("ui-refresh", function(){ this.setVisibility(ytcenter.getPage() === "watch"); }.bind(option)); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "button", null, { "text": "SETTINGS_PLACEMENTSYSTEM_MOVEELEMENTS_LABEL" } ); var placementsystemToggler = false; var focus = null; option.addModuleEventListener("click", function placementToggleFunction(){ function save() { // Retrive the changed sort list and update the settings accordingly. var sortList = ytcenter.placementsystem.getSortList(ytcenter.placementsystem.placementGroupsReferenceList); //ytcenter.placementsystem.setSortList(sortList); ytcenter.settings.placementGroups = sortList; ytcenter.saveSettings(); placementToggleFunction(); } function cancel() { ytcenter.placementsystem.setSortList(ytcenter.settings.placementGroups, ytcenter.placementsystem.placementGroupsReferenceList); placementToggleFunction(); } placementsystemToggler = !placementsystemToggler; if (focus !== null) { focus(); focus = null; } ytcenter.placementsystem.setMoveable(placementsystemToggler); if (placementsystemToggler) { ytcenter.utils.addClass(document.body, "ytcenter-placementsystem-activated"); ytcenter.settingsPanelDialog.setVisibility(false); ytcenter.cssElements.elementFocus.add(); focus = ytcenter.elementfocus.focus(document.getElementById("watch8-action-buttons"), save, cancel); } else { ytcenter.cssElements.elementFocus.remove(); ytcenter.utils.removeClass(document.body, "ytcenter-placementsystem-activated"); ytcenter.settingsPanelDialog.setVisibility(true); } }); option.setVisibility(ytcenter.getPage() === "watch"); ytcenter.events.addEvent("ui-refresh", function(){ this.setVisibility(ytcenter.getPage() === "watch"); }.bind(option)); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "textContent", null, { "textlocale": "SETTINGS_PLACEMENTSYSTEM_MOVEELEMENTS_INSTRUCTIONS", "styles": { "margin-left": "20px" } } ); option.setVisibility(ytcenter.getPage() === "watch"); ytcenter.events.addEvent("ui-refresh", function(){ this.setVisibility(ytcenter.getPage() === "watch"); }.bind(option)); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_LIGHTSOFF"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "lightbulbAutoOff", // defaultSetting "bool", // module "SETTINGS_LIGHTBULB_AUTO", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Lights_Off" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "lightbulbClickThrough", // defaultSetting "bool", // module "SETTINGS_LIGHTBULB_CLICK_THROUGH", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Click_Through" ); option.addEventListener("update", function(){ ytcenter.tmp.lightoffwarning(); }); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "lightbulbBackgroundColor", // defaultSetting "colorpicker", // module "SETTINGS_LIGHTBULB_COLOR", { "presetColors": ["#000", "#fff", "#590", "#ccc", "#f00", "#2793e6", "#ff8f00"] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Light_Off_Color" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "lightbulbBackgroundOpaque", // defaultSetting "rangetext", // module "SETTINGS_LIGHTBULB_TRANSPARENCY", { "min": 0, "max": 100, "suffix": "%" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Light_Off_Opacity" ); subcat.addOption(option); (function(opt){ option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module null, { "textlocale": "SETTINGS_LIGHTBULB_WARNING", "styles": { "color": "#ff0000" } } ); if (ytcenter.settings.lightbulbBackgroundOpaque > 90 && ytcenter.settings.lightbulbClickThrough) { option.setVisibility(true); } else { option.setVisibility(false); } opt.addEventListener("update", (function(o){ ytcenter.tmp = ytcenter.tmp || {}; ytcenter.tmp.lightoffwarning = function(){ if (ytcenter.settings.lightbulbBackgroundOpaque > 90 && ytcenter.settings.lightbulbClickThrough) { o.setVisibility(true); } else { o.setVisibility(false); } }; return ytcenter.tmp.lightoffwarning; })(option), false); subcat.addOption(option); })(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_VIDEO_THUMBNAIL"); cat.addSubCategory(subcat); // Animation option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module "SETTINGS_THUMBNAIL_ANIMATION", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Animation" ); option.setStyle("font-weight", "bold"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailAnimationEnabled", // defaultSetting "bool", // module "SETTINGS_THUMBNAIL_ANIMATION_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Animation" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailAnimationShuffle", // defaultSetting "bool", // module "SETTINGS_THUMBNAIL_ANIMATION_SHUFFLE", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Shuffle" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailAnimationDelay", // defaultSetting "rangetext", // module "SETTINGS_THUMBNAIL_ANIMATION_DELAY", // label { "min": 250, "max": 5250, "suffix": " ms" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Delay" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailAnimationInterval", // defaultSetting "rangetext", // module "SETTINGS_THUMBNAIL_ANIMATION_INTERVAL", // label { "min": 0, "max": 5000, "suffix": " ms" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Interval" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailAnimationFallbackInterval", // defaultSetting "rangetext", // module "SETTINGS_THUMBNAIL_ANIMATION_FALLBACK_INTERVAL", // label { "min": 0, "max": 5000, "suffix": " ms" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Fallback_Interval" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); // Quality option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module "SETTINGS_THUMBVIDEO_QUALITY", // label null, // args "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Quality-2" // help ); option.setStyle("font-weight", "bold"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailQualityBar", // defaultSetting "bool", // module "SETTINGS_THUMBVIDEO_QUALITY_ENABLE" // label ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailQualitySeparated", // defaultSetting "bool", // module "SETTINGS_THUMBVIDEO_QUALITY_DASHNONDASHSEPARATED", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Separate_DASH_and_nonDASH_formats" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailQualityFPS", // defaultSetting "bool", // module "SETTINGS_THUMBVIDEO_QUALITY_FPS" // label ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailQualityPosition", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_POSITION", // label { // args "list": [ { "value": "topleft", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPLEFT" }, { "value": "topright", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPRIGHT" }, { "value": "bottomleft", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMLEFT" }, { "value": "bottomright", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMRIGHT" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailQualityDownloadAt", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_DOWNLOAD", // label { // args "list": [ { "value": "page_start", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_ONSTART" }, { "value": "scroll_into_view", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_INVIEW" }, { "value": "hover_thumbnail", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_ONHOVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailQualityVisible", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_VISIBLE", // label { // args "list": [ { "value": "always", "label": "SETTINGS_THUMBVIDEO_ALWAYSVISIBLE" }, { "value": "show_hover", "label": "SETTINGS_THUMBVIDEO_SHOWONHOVER" }, { "value": "hide_hover", "label": "SETTINGS_THUMBVIDEO_HIDEONHOVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); // Rating bar option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module "SETTINGS_THUMBVIDEO_RATING_BAR", // label null, // args "https://github.com/YePpHa/YouTubeCenter/wiki/Features#rating-bar" // help ); option.setStyle("font-weight", "bold"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBar", // defaultSetting "bool", // module "SETTINGS_THUMBVIDEO_RATING_BAR_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Rating_Bar-2" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBarPosition", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_POSITION", // label { // args "list": [ { "value": "top", "label": "SETTINGS_THUMBVIDEO_POSITION_TOP" }, { "value": "bottom", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOM" }, { "value": "left", "label": "SETTINGS_THUMBVIDEO_POSITION_LEFT" }, { "value": "right", "label": "SETTINGS_THUMBVIDEO_POSITION_RIGHT" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBarDownloadAt", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_DOWNLOAD", // label { // args "list": [ { "value": "page_start", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_ONSTART" }, { "value": "scroll_into_view", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_INVIEW" }, { "value": "hover_thumbnail", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_ONHOVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBarVisible", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_VISIBLE", // label { // args "list": [ { "value": "always", "label": "SETTINGS_THUMBVIDEO_ALWAYSVISIBLE" }, { "value": "show_hover", "label": "SETTINGS_THUMBVIDEO_SHOWONHOVER" }, { "value": "hide_hover", "label": "SETTINGS_THUMBVIDEO_HIDEONHOVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBarLikesColor", // defaultSetting "colorpicker", // module "SETTINGS_THUMBNAIL_SPARKBAR_LIKES_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff"] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Likes_Color" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBarDislikesColor", // defaultSetting "colorpicker", // module "SETTINGS_THUMBNAIL_SPARKBAR_DISLIKES_COLOR", { "presetColors": ["#590", "#ccc", "#f00", "#2793e6", "#ff8f00", "#fff"] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Disikes_Color" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsBarHeight", // defaultSetting "rangetext", // module "SETTINGS_SPARKBAR_HEIGHT", // label { "min": 1, "max": 100, "suffix": "px" }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Height-2" ); option.setStyle("margin-left", "12px"); subcat.addOption(option); // Rating count option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module "SETTINGS_THUMBVIDEO_RATING_COUNT", // label null, // args "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Rating_Count" // help ); option.setStyle("font-weight", "bold"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsCount", // defaultSetting "bool", // module "SETTINGS_THUMBVIDEO_RATING_COUNT_ENABLE" // label ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsCountPosition", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_POSITION", // label { // args "list": [ { "value": "topleft", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPLEFT" }, { "value": "topright", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPRIGHT" }, { "value": "bottomleft", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMLEFT" }, { "value": "bottomright", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMRIGHT" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsCountDownloadAt", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_DOWNLOAD", // label { // args "list": [ { "value": "page_start", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_ONSTART" }, { "value": "scroll_into_view", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_INVIEW" }, { "value": "hover_thumbnail", "label": "SETTINGS_THUMBVIDEO_DOWNLOAD_ONHOVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailRatingsCountVisible", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_VISIBLE", // label { // args "list": [ { "value": "always", "label": "SETTINGS_THUMBVIDEO_ALWAYSVISIBLE" }, { "value": "show_hover", "label": "SETTINGS_THUMBVIDEO_SHOWONHOVER" }, { "value": "hide_hover", "label": "SETTINGS_THUMBVIDEO_HIDEONHOVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); // Watch later button option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module "SETTINGS_THUMBVIDEO_WATCH_LATER", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Watch_Later_Button" ); option.setStyle("font-weight", "bold"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailWatchLaterPosition", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_POSITION", // label { "list": [ { "value": "topleft", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPLEFT" }, { "value": "topright", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPRIGHT" }, { "value": "bottomleft", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMLEFT" }, { "value": "bottomright", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMRIGHT" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailWatchLaterVisible", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_VISIBLE", // label { // args "list": [ { "value": "always", "label": "SETTINGS_THUMBVIDEO_ALWAYSVISIBLE" }, { "value": "show_hover", "label": "SETTINGS_THUMBVIDEO_SHOWONHOVER" }, { "value": "hide_hover", "label": "SETTINGS_THUMBVIDEO_HIDEONHOVER" }, { "value": "never", "label": "SETTINGS_THUMBVIDEO_NEVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); // Time code option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module "SETTINGS_THUMBVIDEO_TIME_CODE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Time_Code" ); option.setStyle("font-weight", "bold"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailTimeCodePosition", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_POSITION", // label { // args "list": [ { "value": "topleft", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPLEFT" }, { "value": "topright", "label": "SETTINGS_THUMBVIDEO_POSITION_TOPRIGHT" }, { "value": "bottomleft", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMLEFT" }, { "value": "bottomright", "label": "SETTINGS_THUMBVIDEO_POSITION_BOTTOMRIGHT" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "videoThumbnailTimeCodeVisible", // defaultSetting "list", // module "SETTINGS_THUMBVIDEO_VISIBLE", // label { // args "list": [ { "value": "always", "label": "SETTINGS_THUMBVIDEO_ALWAYSVISIBLE" }, { "value": "show_hover", "label": "SETTINGS_THUMBVIDEO_SHOWONHOVER" }, { "value": "hide_hover", "label": "SETTINGS_THUMBVIDEO_HIDEONHOVER" }, { "value": "never", "label": "SETTINGS_THUMBVIDEO_NEVER" } ], "listeners": [ { "event": "update", "callback": function(){ ytcenter.events.performEvent("ui-refresh"); } } ] } ); option.setStyle("margin-left", "12px"); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_COMMENTS"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableComments", "bool", "SETTINGS_COMMENTS_ENABLE" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "commentCountryEnabled", // defaultSetting "bool", // module "SETTINGS_COMMENTS_COUNTRY_ENABLE", // label null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Country_For_Comments" // help ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "commentCountryShowFlag", // defaultSetting "bool", // module "SETTINGS_COMMENTS_COUNTRY_SHOW_FLAG", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Show_Country_Flag-2" // label ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "commentCountryUseNames", // defaultSetting "bool", // module "SETTINGS_COMMENTS_COUNTRY_USE_NAME", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Use_Country_Names-2" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "commentCountryLazyLoad", // defaultSetting "bool", // module "SETTINGS_COMMENTS_COUNTRY_LAZY_LOAD", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Lazy_Load" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "commentCountryButtonLoad", // defaultSetting "bool", // module "SETTINGS_COMMENTS_COUNTRY_BUTTON_LOAD", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#Load_by_button" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "commentCountryPosition", // defaultSetting "list", // module "SETTINGS_COMMENTS_COUNTRY_POSITION", // label { "list": [ { "value": "before_username", "label": "SETTINGS_COMMENTS_COUNTRY_POSITION_BEFORE_USERNAME" }, { "value": "after_username", "label": "SETTINGS_COMMENTS_COUNTRY_POSITION_AFTER_USERNAME" }, { "value": "last", "label": "SETTINGS_COMMENTS_COUNTRY_POSITION_LAST" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Comment_Country_Position" ); subcat.addOption(option); /* Not needed as of now subcat = ytcenter.settingsPanel.createSubCategory("Subscriptions"); cat.addSubCategory(subcat); */ /* Category:Update */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_UPDATE"); if (!devbuild) { if ((identifier === 1 && (uw.navigator.userAgent.indexOf("Opera") !== -1 || uw.navigator.userAgent.indexOf("OPR/") !== -1)) || identifier === 6 || identifier === 8) { cat.setVisibility(false); } ytcenter.events.addEvent("ui-refresh", function(){ if ((identifier === 1 && (uw.navigator.userAgent.indexOf("Opera") !== -1 || uw.navigator.userAgent.indexOf("OPR/") !== -1)) || identifier === 6 || identifier === 8) { this.setVisibility(false); } else { this.setVisibility(true); } }.bind(cat)); } subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_TAB_GENERAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "enableUpdateChecker", "bool", "SETTINGS_UPDATE_ENABLE", null, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Enable_Update_Checker" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( "updateCheckerInterval", "list", "SETTINGS_UPDATE_INTERVAL", { "list": [ { "value": "0", "label": "SETTINGS_UPDATE_INTERVAL_ALWAYS" }, { "value": "1", "label": "SETTINGS_UPDATE_INTERVAL_EVERYHOUR" }, { "value": "2", "label": "SETTINGS_UPDATE_INTERVAL_EVERY2HOUR" }, { "value": "12", "label": "SETTINGS_UPDATE_INTERVAL_EVERY12HOUR" }, { "value": "24", "label": "SETTINGS_UPDATE_INTERVAL_EVERYDAY" }, { "value": "48", "label": "SETTINGS_UPDATE_INTERVAL_EVERY2DAY" }, { "value": "168", "label": "SETTINGS_UPDATE_INTERVAL_EVERYWEEK" }, { "value": "336", "label": "SETTINGS_UPDATE_INTERVAL_EVERY2WEEK" }, { "value": "720", "label": "SETTINGS_UPDATE_INTERVAL_EVERYMONTH" } ] }, "https://github.com/YePpHa/YouTubeCenter/wiki/Features#wiki-Update_Interval" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, "button", null, { "text": "SETTINGS_UPDATE_CHECKFORNEWUPDATES", "listeners": [ { "event": "click", "callback": function(){ this.textContent = ytcenter.language.getLocale("SETTINGS_UPDATE_CHECKINGFORNEWUPDATES"); this.disabled = true; ytcenter.checkForUpdates((function(self){ return function(){ self.textContent = ytcenter.language.getLocale("SETTINGS_UPDATE_CHECKFORNEWUPDATESSUCCESS"); self.disabled = false; }; })(this), (function(self){ return function(){ self.textContent = ytcenter.language.getLocale("SETTINGS_UPDATE_CHECKINGFORNEWUPDATESERROR"); self.disabled = false; }; })(this), (function(self){ return function(){ self.textContent = ytcenter.language.getLocale("SETTINGS_UPDATE_CHECKINGFORNEWUPDATESDISABLED"); self.disabled = true; }; })(this)); } } ] } ); subcat.addOption(option); /* DISABLED until implemented subcat = ytcenter.settingsPanel.createSubCategory("Channel"); cat.addSubCategory(subcat); */ /* Category:Debug */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_DEBUG"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_LOG"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "debugConsole", // defaultSetting "bool", // module "SETTINGS_DEBUG_CONSOLE" ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textarea", null, { "styles": { "width": "100%", "height": "130px", "background-color": "#fff", "border": "1px solid #ccc" } } ); subcat.addOption(option); subcat.addEventListener("click", (function(opt){ return function(){ con.log("[Debug] Loading debug log..."); var module = opt.getLiveModule(); if (module) { module.setText(ytcenter.language.getLocale("SETTINGS_DEBUG_LOADING")); uw.setTimeout(function(){ module.setText(ytcenter.getDebug()); module.selectAll(); }, 100); } }; })(option)); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "button", null, { "text": "SETTINGS_DEBUG_CREATEGIST", "listeners": [ { "event": "click", "callback": function() { var content = document.createElement("div"); var data = { "description": null, "public": true, "files": { "debug.txt": { "content": ytcenter.getDebug() } } }; if (devbuild) { data.description = "YouTube Center v" + devnumber + " Debug Info"; } else { data.description = "YouTube Center ".concat(ytcenter.version, "-", ytcenter.revision, " Debug Info"); } var text = document.createElement("p"); text.appendChild(document.createTextNode(ytcenter.language.getLocale("GIST_TEXT"))); text.setAttribute("style", "margin-bottom: 10px"); content.appendChild(text); var gistURL = document.createElement("input"); gistURL.setAttribute("type", "text"); gistURL.setAttribute("class", "yt-uix-form-input-text"); gistURL.setAttribute("value", ytcenter.language.getLocale("GIST_LOADING")); gistURL.setAttribute("readonly", "readonly"); ytcenter.utils.addEventListener(gistURL, "focus", function() { this.select(); }, false); content.appendChild(gistURL); ytcenter.dialog("GIST_TITLE", content).setVisibility(true); ytcenter.utils.xhr({ method: "POST", url: "https://api.github.com/gists", headers: { "Content-Type": "application/x-www-form-urlencoded" }, data: JSON.stringify(data), contentType: "application/x-www-form-urlencoded", // Firefox Addon content: JSON.stringify(data), // Firefox Addon onload: function(response) { var details = JSON.parse(response.responseText); gistURL.value = details.html_url; } }); } } ] } ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_EXPERIMENTS"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( "YouTubeExperiments", // defaultSetting "layoutExperiments" ); subcat.addEventListener("click", (function(opt){ return function(){ var module = opt.getLiveModule(); if (module && !module.hasLoadedOnce()) { module.loadExperiments(); } }; })(option)); subcat.addOption(option); //subcat = ytcenter.settingsPanel.createSubCategory("Options"); cat.addSubCategory(subcat); /* Category:Share DISABLED until I implement it*/ /*cat = ytcenter.settingsPanel.createCategory("Share"); subcat = ytcenter.settingsPanel.createSubCategory("Share"); cat.addSubCategory(subcat); */ /* Category:Donate */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_DONATE"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_DONATE"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module null, // label { "textlocale": "SETTINGS_DONATE_TEXT", "replace": { "{wiki-donate}": function(){ var a = document.createElement("a"); a.setAttribute("target", "_blank"); a.setAttribute("href", "https://github.com/YePpHa/YouTubeCenter/wiki/Donate"); a.textContent = ytcenter.language.getLocale("SETTINGS_DONATE_WIKI"); ytcenter.language.addLocaleElement(a, "SETTINGS_DONATE_WIKI", "@textContent"); return a; } } } ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_PAYPAL"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "textContent", // module null, // label { "textlocale": "SETTINGS_DONATE_PAYPAL_TEXT2", "replace": { "{page-link}": function(){ var a = document.createElement("a"); a.setAttribute("target", "_blank"); a.setAttribute("href", "https://dl.dropboxusercontent.com/u/13162258/YouTube%20Center/support/PayPal.html"); a.textContent = ytcenter.language.getLocale("SETTINGS_DONATE_PAYPAL_LINK2"); ytcenter.language.addLocaleElement(a, "SETTINGS_DONATE_PAYPAL_LINK2", "@textContent"); return a; } } } ); subcat.addOption(option); /* Category:About */ cat = ytcenter.settingsPanel.createCategory("SETTINGS_CAT_ABOUT"); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_ABOUT"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "aboutText", // module null // label ); subcat.addOption(option); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "link", // module null, // label { "titleLocale": "SETTINGS_ABOUT_LINKS", "links": [ {text: "Wiki", url: "https://github.com/YePpHa/YouTubeCenter/wiki"}, {text: "Facebook", url: "https://www.facebook.com/YouTubeCenter"}, {text: "Google+", url: "https://plus.google.com/111275247987213661483/posts"}, {text: "Firefox", url: "https://addons.mozilla.org/en-us/firefox/addon/youtube-center/"}, {text: "Opera", url: "https://addons.opera.com/en/extensions/details/youtube-center/"}, {text: "Maxthon", url: "http://extension.maxthon.com/detail/index.php?view_id=1201"}, {text: "Github", url: "https://github.com/YePpHa/YouTubeCenter/"} ] } ); subcat.addOption(option); subcat = ytcenter.settingsPanel.createSubCategory("SETTINGS_SUBCAT_TRANSLATORS"); cat.addSubCategory(subcat); option = ytcenter.settingsPanel.createOption( null, // defaultSetting "translators", // module null, // label { // args "translators": { "ar-BH": [ { name: "alihill381" } ], "bg-BG": [ { name: "Mani Farone" } ], "ca-ES": [ { name: "Joan Alemany" }, { name: "Raül Cambeiro" } ], "cs-CZ": [ { name: "Petr Vostřel", url: "http://petr.vostrel.cz/" }, { name: "R3gi", url: "mailto:regiprogi@gmail.com" } ], "da-DK": [ { name: "Lasse Olsen" }, { name: "Jeppe Rune Mortensen", url: "https://github.com/YePpHa/" } ], "de-DE": [ { name: "Simon Artmann" }, { name: "Sven \"Hidden\" W" } ], "en-US": [], "es-ES": [ { name: "Roxz" } ], "fa-IR": [], "fr-FR": [ { name: "ThePoivron", url: "http://www.twitter.com/DaPavron" } ], "he-IL": [ { name: "baryoni" } ], "hu-HU": [ { name: "Eugenox" }, { name: "Mateus" } ], "it-IT": [ { name: "Pietro De Nicolao" } ], "ja-JP": [ { name: "Lightning-Natto" } ], "ko-KR": [ { name: "Hyeongi Min", url: "https://www.facebook.com/MxAiNM" }, { name: "U Bless", url: "http://userscripts.org/users/ubless" } ], "no-NO": [ { name: "master3395", url: "https://www.youtube.com/user/master33951" }, { name: "Mathias Solheim", url: "http://mathias.ocdevelopment.net/" } ], "nl-NL": [ { name: "Marijn Roes" } ], "pl-PL": [ { name: "Piotr" }, { name: "kasper93" }, { name: "Piter432" } ], "pt-BR": [ { name: "Thiago R. M. Pereira" }, { name: "José Junior" }, { name: "Igor Rückert" } ], "pt-PT": [ { name: "Rafael Damasceno", url: "http://userscripts.org/users/264457" }, { name: "João P. Moutinho Barbosa" } ], "ro-RO": [ { name: "BlueMe", url: "http://www.itinerary.ro/" } ], "ru-RU": [ { name: "KDASOFT", url: "http://kdasoft.narod.ru/" } ], "sk-SK": [ { name: "ja1som" } ], "sv-SE": [ { name: "Christian Eriksson" } ], "tr-TR": [ { name: "Ismail Aksu" } ], "uk-UA": [ { name: "SPIDER-T1" }, { name: "Petro Lomaka", url: "https://plus.google.com/103266219992558963899/" } ], "vi-VN": [ { name: "Tuấn Phạm" } ], "zh-CN": [ { name: "雅丶涵", url: "http://www.baidu.com/p/%E9%9B%85%E4%B8%B6%E6%B6%B5" }, { name: "MatrixGT" } ], "zh-TW": [ { name: "泰熊" } ] } } ); subcat.addOption(option); }; settingsInit(); ytcenter.video = {}; uw.ytcenter._video = ytcenter.video; ytcenter.video.format = [ { type: 'video/mp4', name: 'SETTINGS_DOWNLOADFORMAT_LIST_MP4', key: 'mp4' }, { type: 'video/webm', name: 'SETTINGS_DOWNLOADFORMAT_LIST_WEBM', key: 'webm' }, { type: 'video/x-flv', name: 'SETTINGS_DOWNLOADFORMAT_LIST_FLV', key: 'flv' }, { type: 'video/3gpp', name: 'SETTINGS_DOWNLOADFORMAT_LIST_3GP', key: '3gp' }, { type: 'audio/mp4', name: 'SETTINGS_DOWNLOADFORMAT_LIST_AUDIO', key: 'm4a', help: 'https://github.com/YePpHa/YouTubeCenter/wiki/Download:Audio' } ]; ytcenter.video.resolutions = { 'tiny': '144p', 'small': '240p', 'medium': '360p', 'large': '480p', 'hd720': '720p', 'hd1080': '1080p', 'hd1440': '1440p', 'highres': 'Original' }; ytcenter.video.id = ""; ytcenter.video.title = ""; ytcenter.video.author = ""; ytcenter.video.channelname = ""; ytcenter.video._channel = {}; ytcenter.video.mimetypes = [ { mimetype: "video/webm", extension: ".webm" }, { mimetype: "video/x-flv", extension: ".flv" }, { mimetype: "video/mp4", extension: ".mp4" }, { mimetype: "video/3gpp", extension: ".3gp" }, { mimetype: "audio/mp4", extension: ".m4a" }, { mimetype: "audio/mp4", extension: ".m4a" } ]; ytcenter.video.getFilenameExtension = function(stream){ if (!stream || !stream.type || stream.type.indexOf(";") === -1) return ""; var mt = stream.type.split(";")[0], i; for (i = 0; i < ytcenter.video.mimetypes.length; i++) { if (ytcenter.video.mimetypes[i].mimetype === mt) return ytcenter.video.mimetypes[i].extension; } return ""; }; ytcenter.video.removeNonAlphanumericCharacters = function(text){ if (ytcenter.settings.fixfilename) { var buffer = ""; for (var i = 0, len = text.length; i < len; i++) { if (text.charAt(i).match(/[0-9a-zA-Z ]/i)) { buffer += text.charAt(i); } } return buffer; } else { return text; } }; ytcenter.video.getFilename = function(stream){ if (stream == null) return ""; var duration = 0; var pubtimestamp = 0, pubsecs = 0, pubmins = 0, pubhours = 0, pubdays = 0, pubmonth = 0, pubyear = 0; var nowtimestamp = 0, nowsecs = 0, nowmins = 0, nowhours = 0, nowdays = 0, nowmonth = 0, nowyear = 0; var durmin = 0; var dursec = 0; try { duration = ytcenter.player.getConfig().args.length_seconds; durmin = Math.floor(duration/60); dursec = duration - durmin*60; } catch (e) { duration = 0; durmin = 0; dursec = 0; } try { pubtimestamp = Math.floor(ytcenter.video.published.getTime()/1000); pubsecs = ytcenter.video.published.getSeconds(); pubmins = ytcenter.video.published.getMinutes(); pubhours = ytcenter.video.published.getHours(); pubdays = ytcenter.video.published.getDate(); pubmonth = ytcenter.video.published.getMonth() + 1; pubyear = ytcenter.video.published.getFullYear(); } catch (e) { pubtimestamp = 0; pubsecs = 0; pubmins = 0; pubhours = 0; pubdays = 0; pubmonth = 0; pubyear = 0; } try { var now = new Date(); nowtimestamp = Math.floor(now.getTime()/1000); nowsecs = now.getSeconds(); nowmins = now.getMinutes(); nowhours = now.getHours(); nowdays = now.getDate(); nowmonth = now.getMonth() + 1; nowyear = now.getFullYear(); } catch (e) { con.error(e); nowtimestamp = 0; nowsecs = 0; nowmins = 0; nowhours = 0; nowdays = 0; nowmonth = 0; nowyear = 0; } var filename = ytcenter.utils.replaceTextAsString(ytcenter.settings.filename, { title: ytcenter.video.removeNonAlphanumericCharacters(ytcenter.video.title), videoid: ytcenter.video.id, author: ytcenter.video.removeNonAlphanumericCharacters(ytcenter.video.author), channelname: ytcenter.video.removeNonAlphanumericCharacters(ytcenter.video.channelname), resolution: (ytcenter.video.resolutions.hasOwnProperty(stream.quality) ? ytcenter.video.resolutions[stream.quality] : ''), itag: stream.itag, dimension: (stream.dimension ? stream.dimension : stream.size), bitrate: stream.bitrate, width: (stream.dimension ? stream.dimension.split("x")[0] : (stream.size ? stream.size.split("x")[0] : 0)), height: (stream.dimension ? stream.dimension.split("x")[1] : (stream.size ? stream.size.split("x")[1] : 0)), format: (function(){ for (var i = 0; i < ytcenter.video.format.length; i++) { if (stream.type.indexOf(ytcenter.video.format[i].type) == 0) { return ytcenter.language.getLocale(ytcenter.video.format[i].name); } } return ""; })(), quality: stream.quality, type: stream.type, dur: duration, durmins: ytcenter.utils.prefixText(durmin, "0", 2), dursecs: ytcenter.utils.prefixText(dursec, "0", 2), nowtimestamp: nowtimestamp, nowsecs: ytcenter.utils.prefixText(nowsecs, "0", 2), nowmins: ytcenter.utils.prefixText(nowmins, "0", 2), nowhours: ytcenter.utils.prefixText(nowhours, "0", 2), nowdays: ytcenter.utils.prefixText(nowdays, "0", 2), nowmonth: ytcenter.utils.prefixText(nowmonth, "0", 2), nowyear: nowyear, pubtimestamp: pubtimestamp, pubsecs: ytcenter.utils.prefixText(pubsecs, "0", 2), pubmins: ytcenter.utils.prefixText(pubmins, "0", 2), pubhours: ytcenter.utils.prefixText(pubhours, "0", 2), pubdays: ytcenter.utils.prefixText(pubdays, "0", 2), pubmonth: ytcenter.utils.prefixText(pubmonth, "0", 2), pubyear: pubyear }); // Removing illegal characters for filename for OS if (uw.navigator.appVersion.toLowerCase().indexOf("win") != -1) { filename = filename.replace(new RegExp('[\\\\/:|]+', 'g'), "-"); filename = filename.replace(new RegExp('["*?<>]+', 'g'), "_"); } else if (uw.navigator.appVersion.toLowerCase().indexOf("mac") != -1) { filename = filename.replace(new RegExp('^\\.'), "_"); filename = filename.replace(":", "-"); } else if (uw.navigator.appVersion.toLowerCase().indexOf("linux") != -1) { filename = filename.replace(new RegExp('[/\0]+', 'g'), "-"); } return filename; }; ytcenter.video.filename = function(stream){ if (stream == null) return ""; return stream.url + "&title=" + encodeURIComponent(ytcenter.video.getFilename(stream)); }; ytcenter.video.downloadLink = function(stream){ return ytcenter.video.filename(stream) + "&cpn=" + encodeURIComponent(ytcenter.utils.crypt()) + (stream.s || stream.sig ? "&signature=" + encodeURIComponent(stream.sig || ytcenter.utils.signatureDecipher(stream.s)) : ""); }; ytcenter.video.download = (function(){ var _download_iframe = null; return function(itag){ con.log("Downloading format " + itag + "..."); var stream = null; for (var i = 0; i < ytcenter.video.streams.length; i++) { if (ytcenter.video.streams[i].itag === itag && typeof ytcenter.video.streams[i].url != "undefined") { stream = ytcenter.video.streams[i]; break; } } if (stream) { if (!_download_iframe) { // Initalize iframe if it doesn't exist _download_iframe = document.createElement("iframe"); _download_iframe.style.position = "absolute"; _download_iframe.style.top = "-1000px"; _download_iframe.style.left = "-1000px"; _download_iframe.style.width = "1px"; _download_iframe.style.height = "1px"; document.body.appendChild(_download_iframe); } _download_iframe.setAttribute("src", ytcenter.video.downloadLink(stream)); } else { con.log("Format (" + itag + ") not found and therefore couldn't start downloading"); throw "Stream (" + itag + ") not found!"; } }; })(); ytcenter.video.streams = []; ytcenter.site = {}; ytcenter.site.removeAdvertisement = function(cfg){ cfg = cfg || ytcenter.player.getConfig(); var _ads = [ "supported_without_ads", "ad3_module", "adsense_video_doc_id", "allowed_ads", "baseUrl", "cafe_experiment_id", "afv_inslate_ad_tag", "advideo", "ad_device", "ad_channel_code_instream", "ad_channel_code_overlay", "ad_eurl", "ad_flags", "ad_host", "ad_host_tier", "ad_logging_flag", "ad_preroll", "ad_slots", "ad_tag", "ad_video_pub_id", "aftv", "afv", "afv_ad_tag", "afv_instream_max", "afv_ad_tag_restricted_to_instream", "afv_video_min_cpm", "dynamic_allocation_ad_tag", "pyv_ad_channels", "max_dynamic_allocation_ad_tag_length", "midroll_freqcap", "invideo", "instream", "pyv_in_related_cafe_experiment_id" ]; for (var i = 0; i < _ads.length; i++) { try { delete cfg.args[_ads[i]]; } catch (e) { con.error(e); } } try { if (cfg.args.csi_page_type) { con.log("Chaning csi_page_type from " + cfg.args.csi_page_type + " to watch, watch7"); if (ytcenter.watch7) { if (ytcenter.html5) { cfg.args.csi_page_type = "watch, watch7_html5"; } else { cfg.args.csi_page_type = "watch, watch7"; } } else { cfg.args.csi_page_type = "watch"; } } } catch (e) { con.error(e); } try { if (document.getElementById("watch-channel-brand-div")) { ytcenter.discardElement(document.getElementById("watch-channel-brand-div")); } } catch (e) { con.error(e); } try { var adBadges = ytcenter.utils.toArray(document.getElementsByClassName("yt-badge-ad")); for (var i = 0, len = adBadges.length; i < len; i++) { var parent = adBadges; while ((parent = parent.parentNode) !== null) { if (parent.tagName === "LI") { parent.parentNode.removeChild(parent); break; } } } } catch (e) { con.error(e); } return cfg; }; ytcenter.user = {}; ytcenter.user.callChannelFeed = function(username, callback){ ytcenter.utils.xhr({ method: "GET", url: 'https://gdata.youtube.com/feeds/api/channels?q=' + encodeURIComponent("\"" + username + "\"") + '&start-index=1&max-results=1&v=2&alt=json', headers: { "Content-Type": "text/plain" }, onload: function(response){ if (response.responseText) { var j = JSON.parse(response.responseText); if (j.feed && j.feed.entry && j.feed.entry.length > 0) { callback.apply(j.feed.entry[0]); } } } }); }; ytcenter.gridview = (function(){ function getFeed() { return document.getElementById("feed") || document.getElementById("browse-items-primary"); } function getIndividualFeed(feed) { if (feed && feed.children && feed.children.length > 0 && feed.children[0]) { return feed.children[0]; } return null; } function getFeedName(feed) { var individualFeed = getIndividualFeed(feed); if (individualFeed && individualFeed.getAttribute) { return individualFeed.getAttribute("data-feed-name"); } return null; } function getFeedType(feed) { var individualFeed = getIndividualFeed(feed), type = null; if (individualFeed && individualFeed.getAttribute) { type = individualFeed.getAttribute("data-feed-type"); } return type; } function getFeedItems(feed) { var items = []; if (feed && feed.getElementsByClassName) { var feedContainer = feed.getElementsByClassName("feed-item-container"); for (var i = 0, len = feedContainer.length; i < len; i++) { items.push(parseFeedItem(feedContainer[i])); } } return items; } function parseFeedItem(item) { var details = {}, aElm = item.getElementsByTagName("a"); if (aElm && aElm[0] && aElm[0].getAttribute) { var images = aElm[0].getElementsByTagName("img"); details.channelURL = aElm[0].getAttribute("href"); if (images && images.length > 0 && images[0] && images[0].getAttribute) { details.channelName = images[0].getAttribute("alt"); } } else { details.channelURL = null; details.channelName = null; } details.wrapper = item; details.metadata = item.getElementsByClassName("yt-lockup-meta")[0]; details.channelVerified = (item.getElementsByClassName("yt-user-name-icon-verified").length > 0); details.bubbleContainer = item.getElementsByClassName("feed-author-bubble-container")[0]; details.bubbleElement = item.getElementsByClassName("feed-author-bubble")[0]; if (item.getElementsByClassName("yt-user-name").length > 0) { details.usernameElement = item.getElementsByClassName("yt-user-name")[0]; details.ownerElement = details.usernameElement.parentNode; details.ownerElementListItem = (details.ownerElement.tagName === "LI"); details.usernamePrefixNode = null; if (details.usernameElement.previousSibling && details.usernameElement.previousSibling.nodeType === 3) { details.usernamePrefixNode = details.usernameElement.previousSibling; } } else { details.usernameElement = null; details.ownerElement = null; details.usernamePrefixNode = null; } return details; } function createOwnerElement(details) { var b = details.bubbleElement.cloneNode(false); b.textContent = details.channelName; b.className = b.className.replace("feed-author-bubble", ""); return b; } function isEnabled(feed) { feed = feed || getFeed(); return (loc.pathname.indexOf("/feed/subscriptions") === 0 && ytcenter.settings.gridSubscriptionsPage) || (getFeedType(feed) === "collection" && ytcenter.settings.gridCollectionPage); } function delayedUpdate() { con.log("[GridView] delayedUpdate called..."); if (loc.pathname.indexOf("/feed/") === 0) { var feed = getFeed(), observer = ytcenter.mutation.observe(feed, { childList: true, subtree: true }, function(){ con.log("[GridView] Mutation Observed... disconnecting!"); update(); observer.disconnect(); }); } } function update() { if (loc.pathname.indexOf("/feed/") === 0) { var feed = getFeed(); if (isEnabled(feed)) { var items = getFeedItems(feed); var ownerElm = null; var ownerWrapper = null; var details = null; for (var i = 0; i < items.length; i++) { details = items[i]; if (!ytcenter.utils.inArray(feedItems, details.wrapper)) { feedItems.push(details.wrapper); if (details.ownerElement) { ownerElm = details.ownerElement.cloneNode(true); if (details.ownerElementListItem) { details.ownerElement.parentNode.removeChild(details.ownerElement); } if (details.usernamePrefixNode) { ownerElm.removeChild(ownerElm.firstChild); } } else { ownerElm = createOwnerElement(items[i]); } ownerWrapper = document.createElement("div"); ownerWrapper.className = "ytcenter-grid-subscriptions-username"; var ownerElmChildren = null; if (details.ownerElementListItem) { var frag = document.createDocumentFragment(); ownerElmChildren = ytcenter.utils.toArray(ownerElm.children); var j; for (j = 0; j < ownerElmChildren.length; j++) { frag.appendChild(ownerElmChildren[j]); } ownerElm = frag; } ownerWrapper.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("SUBSCRIPTIONSGRID_BY_USERNAME"), {"{username}": ownerElm})); ytcenter.events.addEvent("language-refresh", (function(oW, oE, oEC){ return function(){ if (oEC) { var frag = document.createDocumentFragment(); var j; for (j = 0; j < oEC.length; j++) { frag.appendChild(oEC[j]); } oE = frag; } oW.innerHTML = ""; oW.appendChild(ytcenter.utils.replaceText(ytcenter.language.getLocale("SUBSCRIPTIONSGRID_BY_USERNAME"), {"{username}": oE})); }; })(ownerWrapper, ownerElm, ownerElmChildren)); details.ownerWrapper = ownerWrapper; details.metadata.parentNode.insertBefore(ownerWrapper, details.metadata); } } } } } var feedItems = []; return { update: update, delayedUpdate: delayedUpdate, isEnabled: isEnabled }; })(); ytcenter.playlistAutoPlay = (function(){ /* We want the toggle button */ function getToggleAutoPlayButton() { var playlist = document.getElementById("watch-appbar-playlist"); if (playlist) { var playlistToggleButton = playlist.getElementsByClassName("toggle-autoplay"); if (playlistToggleButton && playlistToggleButton.length > 0 && playlistToggleButton[0]) { playlistToggleButton = playlistToggleButton[0]; } else { playlistToggleButton = null; } return playlistToggleButton; } return null; } function setInitialAutoPlayState(state) { var playlist = document.getElementById("watch-appbar-playlist"); if (playlist) { var content = playlist.getElementsByClassName("playlist-header-content"); if (content.length > 0 && content[0]) { content[0].setAttribute("data-initial-autoplay-state", (state ? "true" : "false")); content[0].setAttribute("initial-autoplay-state", (state ? "true" : "false")); } } toggled = state; } function onToggleButtonClick() { toggled = !toggled; if (ytcenter.settings.playlistAutoPlayFreeze) return; ytcenter.settings.playlistAutoPlay = toggled; ytcenter.saveSettings(); ytcenter.events.performEvent("settings-update"); } function init() { if (ytcenter.playlist) { setInitialAutoPlayState(ytcenter.settings.playlistAutoPlay); var toggleButton = getToggleAutoPlayButton(); if (toggleButton) { ytcenter.utils.addEventListener(toggleButton, "click", onToggleButtonClick, false); } initState(); } } function initState() { var playlist = document.getElementById("watch-appbar-playlist"); if (playlist) { var toggleAutoplayButton = getToggleAutoPlayButton(); if (toggleAutoplayButton) { if (toggled) { ytcenter.utils.addClass(toggleAutoplayButton, "yt-uix-button-toggled"); } else { ytcenter.utils.removeClass(toggleAutoplayButton, "yt-uix-button-toggled"); } toggleAutoplayButton.setAttribute("data-button-toggle", (toggled ? "true" : "false")); } else { toggleAutoplayButton = document.createElement("button"); toggleAutoplayButton.className = "yt-uix-button yt-uix-button-size-default yt-uix-button-player-controls yt-uix-button-empty yt-uix-button-has-icon toggle-autoplay yt-uix-button-opacity yt-uix-tooltip yt-uix-tooltip" + (toggled ? " yt-uix-button-toggled" : ""); toggleAutoplayButton.setAttribute("type", "button"); toggleAutoplayButton.setAttribute("onclick", ";return false;"); toggleAutoplayButton.setAttribute("title", uw.yt.msgs_.YTP_AUTOPLAY); toggleAutoplayButton.setAttribute("data-button-toggle", (toggled ? "true" : "false")); toggleAutoplayButton.addEventListener("click", onToggleButtonClick, false); var iconWrapper = document.createElement("span"); iconWrapper.className = "yt-uix-button-icon-wrapper"; var icon = document.createElement("img"); icon.className = "yt-uix-button-icon yt-uix-button-icon-watch-appbar-autoplay yt-sprite"; icon.setAttribute("src", "//s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif"); icon.setAttribute("title", uw.yt.msgs_.YTP_AUTOPLAY); iconWrapper.appendChild(icon); toggleAutoplayButton.appendChild(iconWrapper); var controls = playlist.getElementsByClassName("playlist-nav-controls"); controls && controls[0] && controls[0].appendChild && controls[0].appendChild(toggleAutoplayButton); } if (uw.yt && uw.yt.www && uw.yt.www.watch && uw.yt.www.watch.lists && uw.yt.www.watch.lists.getState) { if (uw.yt.www.watch.lists.getState !== getState) { getStateFunction = uw.yt.www.watch.lists.getState; uw.yt.www.watch.lists.getState = getState; } } else { con.log("[Playlist] getState not found!"); setTimeout(initState, 1000); } } } function getState() { var state = getStateFunction(); state.autoPlay = toggled; return state; } var getStateFunction = null; var timer = null; var toggled = false; return { init: init }; })(); ytcenter.player = {}; ytcenter.player.setPlaybackState = (function(){ function updateState(state, s) { con.log("[Player:setPlaybackState] Preferred state: " + state + ", current state: " + s); var api = ytcenter.player.getAPI(); var muted = false; if (s === 1) { if (state === 0) { api.mute(); api.stopVideo(); !ytcenter.settings.mute && api.isMuted && api.unMute(); } else if (state === 1) { api.playVideo(); } else if (state === 2) { api.mute(); api.pauseVideo(); !ytcenter.settings.mute && api.isMuted && api.unMute(); } ytcenter.player.listeners.removeEventListener("onStateChange", listener); if (!ytcenter.html5) { setState.preferredState = null; } } else if (s <= 0 && state === 2) { api.mute(); api.playVideo(); api.pauseVideo(); !ytcenter.settings.mute && api.isMuted && api.unMute(); ytcenter.player.listeners.removeEventListener("onStateChange", listener); if (!ytcenter.html5) { setState.preferredState = null; } } if (ytcenter.html5) { ytcenter.utils.asyncCall(function(){ var newState = api.getPlayerState(); if (newState !== state && (newState !== -1 && newState !== 5) && typeof newState === "number") { updateState(state, newState); } else { setState.preferredState = null; } }); } } function setState(state) { setState.preferredState = state; var api = ytcenter.player.getAPI(); con.log("[Player:setPlaybackState] State is changed to " + state); if (listener !== null) { ytcenter.player.listeners.removeEventListener("onStateChange", listener); } listener = ytcenter.utils.bindArgument(updateState, state); ytcenter.player.listeners.addEventListener("onStateChange", listener); updateState(state, api.getPlayerState()); } var listener = null; setState.preferredState = null; return setState; })(); ytcenter.player.setQuality = (function(){ function stateChange(vq, state) { api = ytcenter.player.getAPI(); if (api) { if (state === 1 && step === 0) { step = 1; api.setPlaybackQuality(vq); api.seekTo(api.getCurrentTime()); api.pauseVideo(); } else if (state === 2 && step === 1) { step = 2; api.setPlaybackQuality(vq); api.seekTo(api.getCurrentTime()); api.playVideo(); } else if (state === 1 && step === 2) { step = -1; api.setPlaybackQuality(vq); api.seekTo(api.getCurrentTime()); removeStateListener(); } } } function addStateListener(vq) { listener = ytcenter.utils.bindArgument(stateChange, vq); ytcenter.player.listeners.addEventListener("onStateChange", listener); addedListener = true; } function removeStateListener(vq) { ytcenter.player.listeners.removeEventListener("onStateChange", listener); listener = null; addedListener = false; } function reloadQuality(vq) { api = ytcenter.player.getAPI(); /* Forcing the quality */ step = 0; /* Starting the hack */ if (!addedListener) { addStateListener(); } /* Checking if the player is already playing the video. If that's the case then execute the stateChange with state set to 1 */ if (api.getPlayerState() === 1) { stateChange(vq, 1); } } function setQuality(vq) { api = ytcenter.player.getAPI(); if (api && typeof api.setPlaybackQuality === "function") { con.log("[Player:SetQuality] Setting quality to " + vq); api.setPlaybackQuality(vq); /* Setting the preferred quality. */ //reloadQuality(vq); } else { con.log("[Player:SetQuality] API not ready!"); } } var addedListener = false; var listener = null; var step = -1; var api = null; return setQuality; })(); ytcenter.player.isPreventAutoPlay = function(){ var notFocused = document && document.hasFocus && typeof document.hasFocus === "function" && !document.hasFocus(), preventAutoPlay = false, autoPlay = false; if (ytcenter.page === "watch") { autoPlay = ytcenter.settings.preventAutoPlay; } else if (ytcenter.page === "embed") { autoPlay = ytcenter.settings.embed_preventAutoPlay; } else if (ytcenter.page === "channel") { autoPlay = ytcenter.settings.channel_preventAutoPlay; } if (ytcenter.page === "watch" && notFocused && ((ytcenter.playlist && ytcenter.settings.preventTabPlaylistAutoPlay) || (!ytcenter.playlist && ytcenter.settings.preventTabAutoPlay))) { preventAutoPlay = true; } else { if (ytcenter.playlist && ytcenter.page === "watch") { preventAutoPlay = ytcenter.settings.preventPlaylistAutoPlay; } else { preventAutoPlay = autoPlay; } } return preventAutoPlay; }; ytcenter.player.isPreventAutoBuffering = function(){ var notFocused = document && document.hasFocus && typeof document.hasFocus === "function" && !document.hasFocus(), preventAutoBuffering = false, autoBuffering = false; if (ytcenter.page === "watch") { autoBuffering = ytcenter.settings.preventAutoBuffer; } else if (ytcenter.page === "embed") { autoBuffering = ytcenter.settings.embed_preventAutoBuffer; } else if (ytcenter.page === "channel") { autoBuffering = ytcenter.settings.channel_preventAutoBuffer; } if (ytcenter.page === "watch" && notFocused && ((ytcenter.playlist && ytcenter.settings.preventTabPlaylistAutoBuffer) || (!ytcenter.playlist && ytcenter.settings.preventTabAutoBuffer))) { preventAutoBuffering = true; } else { if (ytcenter.playlist && ytcenter.page === "watch") { preventAutoBuffering = ytcenter.settings.preventPlaylistAutoBuffer; } else { preventAutoBuffering = autoBuffering; } } return preventAutoBuffering; }; ytcenter.player.darkside = function(){ var player = document.getElementById("player"); var playlistTray = document.getElementById("playlist-tray"); var theaterBackground = document.getElementById("theater-background"); if (!theaterBackground && player) { theaterBackground = document.createElement("div"); theaterBackground.setAttribute("id", "theater-background"); player.insertBefore(theaterBackground, player.children[0]); } if (ytcenter.getPage() === "watch" && ytcenter.player.getCurrentPlayerSize().large) { if (ytcenter.settings.playerDarkSideBG) { if (theaterBackground && !ytcenter.settings.playerDarkSideBGRetro) { theaterBackground.style.backgroundColor = ytcenter.settings.playerDarkSideBGColor; } if (playlistTray) { playlistTray.style.top = "-" + ytcenter.player.getCurrentPlayerSize().playerHeight + "px"; } return true; } } if (theaterBackground) { theaterBackground.style.backgroundColor = ""; } if (playlistTray) { playlistTray.style.top = ""; } return false; }; ytcenter.player.network = {}; ytcenter.player.network.pause = function(){ con.log("[Tab Event] Calling player.pauseVideo();"); ytcenter.tabEvents.fireEvent("player", "pauseVideo"); }; ytcenter.player.setPlaybackQuality = function(preferredQuality){ function recall(vq){ if (vq === 1) { ytcenter.player.listeners.removeEventListener("onStateChange", recall); ytcenter.player.setPlaybackQuality(preferredQuality); } } var api = ytcenter.player.getAPI(), config = ytcenter.player.getConfig(); if (config && config.args) { config.args.vq = preferredQuality; } if (!api) { ytcenter.player.listeners.addEventListener("onStateChange", recall); } else { /*if (api.getPlaybackQuality() === preferredQuality && preferredQuality !== "small") api.setPlaybackQuality("small"); else if (api.getPlaybackQuality() === preferredQuality && preferredQuality !== "medium") api.setPlaybackQuality("medium");*/ ytcenter.player.setQuality(preferredQuality); } }; ytcenter.player.config = {}; ytcenter.player.cpn = ytcenter.utils.crypt(); ytcenter.player.getVideoDataRequest = function(){ /* Making sure that the require configuration is available */ if (uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_CONFIG) ytcenter.player.config = uw.yt.config_.PLAYER_CONFIG; if (!ytcenter.player.config || !ytcenter.player.config.args) ytcenter.player.config = ytcenter.player.getRawPlayerConfig(); var emvid = loc.pathname.match(/\/embed\/([0-9a-zA-Z_-]+)/); if (emvid && emvid.length > 1 && emvid[1]) emvid = emvid[1]; /* Creating URL */ var a = { html5: (ytcenter.player.config && ytcenter.player.config.html5 ? "1" : "0"), video_id: ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.video_id || emvid, cpn: ytcenter.player.cpn, eurl: loc.href, ps: null, el: "embedded", hl: (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.hl ? ytcenter.player.config.args.hl : null), sts: 15973, c: "web", cver: (ytcenter.player.config.html5 ? "html5" : "flash") }, b = [], k; if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.list) { a.list = ytcenter.player.config.args.list; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.cr) { a.cr = ytcenter.player.config.args.cr; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.access_token) { a.access_token = ytcenter.player.config.args.access_token; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.adformat) { a.adformat = ytcenter.player.config.args.adformat; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.iv_load_policy) { a.iv_load_policy = ytcenter.player.config.args.iv_load_policy; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.autoplay) { a.autoplay = ytcenter.player.config.args.autoplay; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.mdx) { a.mdx = ytcenter.player.config.args.mdx; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.utpsa) { a.utpsa = ytcenter.player.config.args.utpsa; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.is_fling) { a.is_fling = ytcenter.player.config.args.is_fling; } if (window.clientWidth) { a.width = window.clientWidth; } if (window.clientHeight) { a.width = window.clientHeight; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.ypc_preview) { a.ypc_preview = ytcenter.player.config.args.ypc_preview; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.splay) { a.splay = ytcenter.player.config.args.splay; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.content_v) { a.content_v = ytcenter.player.config.args.content_v; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.livemonitor) { a.livemonitor = ytcenter.player.config.args.livemonitor; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.authuser) { a.authuser = ytcenter.player.config.args.authuser; } if (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.pageid) { a.pageid = ytcenter.player.config.args.pageid; } for (k in a) { if (a.hasOwnProperty(k)) { if (a[k] !== null) { b.push(encodeURIComponent(k) + "=" + encodeURIComponent(a[k])); } } } return ytcenter.utils.getLocationOrigin() + "/get_video_info?" + b.join("&"); }; ytcenter.player.isLiveStream = function(){ return (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.live_playback === 1); }; ytcenter.player.isOnDemandStream = function(){ return (ytcenter.player.config && ytcenter.player.config.args && ytcenter.player.config.args.ypc_module && ytcenter.player.config.args.ypc_vid); }; ytcenter.player.getRawPlayerConfig = function(){ function loadMethod1() { try { var a = document.body.innerHTML; a = a.split("<script>var ytplayer = ytplayer || {};ytplayer.config = {"); if (!a || !a[1]) return null; a = a[1]; a = a.split("};"); if (!a || !a[0]) return null; a = a[0]; a = JSON.parse("{" + a + "}"); return a; } catch (e) { con.error(e); return null; } } function loadMethod2() { var a; try { a = document.body.innerHTML; a = a.split("'PLAYER_CONFIG': "); if (!a || !a[1]) return null; a = a[1]; a = a.split(");"); if (!a || !a[0]) return null; a = a[0]; a = JSON.parse(a); return a; } catch (e) { con.error(e, a); return null; } } function loadMethod3() { var a; try { a = document.body.innerHTML; a = a.split("var videoPlayer = new yt.player.Application('p', "); if (!a || !a[1]) return null; a = a[1]; a = a.split(");"); if (!a || !a[0]) return null; a = a[0]; a = JSON.parse(a); return a; } catch (e) { con.error(e, a); return null; } } function loadMethod4() { var a; try { a = document.body.innerHTML; a = a.split("flashvars=\""); if (!a || !a[1]) return null; a = a[1]; a = a.split("\" "); if (!a || !a[0]) return null; a = a[0].replace(/&/g, "&"); a = {args: ytcenter.utils.urlComponentToObject(a)}; return a; } catch (e) { con.error(e, a); return null; } } var _a = null, page = ytcenter.getPage(); if (!_a && ytcenter.feather && page === "watch") _a = loadMethod3(); if (!_a && ytcenter.feather && page === "watch") _a = loadMethod4(); if (!_a && uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_CONFIG) _a = uw.yt.config_.PLAYER_CONFIG; if (!_a && document && document.body && document.body.innerHTML && document.body.innerHTML.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ") !== -1) _a = loadMethod1(); if (!_a && document && document.body && document.body.innerHTML && document.body.innerHTML.indexOf("'PLAYER_CONFIG': ") !== -1) _a = loadMethod2(); if (_a) return _a; return {}; }; ytcenter.player.parseRVS = function(rvs){ var a = [], b = rvs.split(","), c, d, e, i, j; for (i = 0; i < b.length; i++) { c = {}; d = b[i].split("&"); for (j = 0; j < d.length; j++) { e = d[j].split("="); c[unescape(e[0])] = unescape(e[1]); } a.push(c); } return a; }; ytcenter.player.stringifyRVS = function(rvs){ var sb = "", i, key, j; for (i = 0; i < rvs.length; i++) { if (i > 0) sb += ","; j = 0; for (key in rvs[i]) { if (rvs[i].hasOwnProperty(key)) { if (j > 0) sb += "&"; sb += escape(key) + "=" + escape(rvs[i][key]); j++; } } } return sb; }; ytcenter.player.shortcuts = function(){ con.log("Adding player shortcuts to document"); ytcenter.utils.addEventListener(document, "keydown", function(e){ e = e || window.event; if (ytcenter.settings.enableYouTubeShortcuts && ytcenter.settings.enableShortcuts && ytcenter.getPage() === "watch" && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey) { if (document.activeElement.tagName.toLowerCase() === "input" || document.activeElement.tagName.toLowerCase() === "textarea" || document.activeElement.tagName.toLowerCase() === "object" || document.activeElement.tagName.toLowerCase() === "embed" || document.activeElement.tagName.toLowerCase() === "button") return; if (document.activeElement.id === "movie_player" && ytcenter.utils.hasClass(document.activeElement, "html5-video-player")) return; if (ytcenter.utils.isParent(document.getElementById("movie_player"), document.activeElement)) return; var player = ytcenter.player.getAPI(); switch (e.keyCode) { case 32: // Space if (player.getPlayerState() == 1) { player.pauseVideo(); } else { player.playVideo(); } break; case 37: // Left Arrow player.seekTo(player.getCurrentTime()-5, true); break; case 39: // Right Arrow player.seekTo(player.getCurrentTime()+5, true); break; case 35: // End player.seekTo(player.getDuration(), true); break; case 36: // Home player.seekTo(0, true); break; case 48: // 0 player.seekTo(0, true); break; case 49: // 1 player.seekTo(0.1*player.getDuration(), true); break; case 50: // 2 player.seekTo(0.2*player.getDuration(), true); break; case 51: // 3 player.seekTo(0.3*player.getDuration(), true); break; case 52: // 4 player.seekTo(0.4*player.getDuration(), true); break; case 53: // 5 player.seekTo(0.5*player.getDuration(), true); break; case 54: // 6 player.seekTo(0.6*player.getDuration(), true); break; case 55: // 7 player.seekTo(0.7*player.getDuration(), true); break; case 56: // 8 player.seekTo(0.8*player.getDuration(), true); break; case 57: // 9 player.seekTo(0.9*player.getDuration(), true); break; default: return; } e.preventDefault(); } }, false); }; ytcenter.player.config = ytcenter.player.config || {}; // Never set this variable directly! ytcenter.player.setConfig = function(config){ ytcenter.player.config = config; }; ytcenter.player.updateConfig = function(page, config){ if (!config || !config.args) return; var api = ytcenter.player.getAPI(); con.log("[Config Update] Updating as page " + page); if (page === "watch") { ytcenter.effects.playerGlow.update(); uw.setTimeout(ytcenter.effects.playerGlow.update, 1000); // Make sure that the player glow got the state update ytcenter.player.updateResize(); if (ytcenter.settings.enableAutoVideoQuality) { ytcenter.player.setQuality(ytcenter.player.getQuality(ytcenter.settings.autoVideoQuality, ytcenter.video.streams, (config.args.dash === "1" && config.args.adaptive_fmts ? true : false))); } if (api.getVolume && api.getVolume() !== ytcenter.settings.volume && ytcenter.settings.enableVolume) { if (ytcenter.settings.volume < 0) { ytcenter.settings.volume = 0; } else if (ytcenter.settings.volume > 100) { ytcenter.settings.volume = 100; } api.setVolume(ytcenter.settings.volume); } if (ytcenter.settings.mute && api.isMuted && !api.isMuted()) { api.mute(); } else if (!ytcenter.settings.mute && api.isMuted && api.isMuted()) { api.unMute(); } ytcenter.playlist = false; try { if (document.getElementById("watch7-playlist-data") || loc.search.indexOf("list=") !== -1) { ytcenter.playlist = true; } } catch (e) { con.error(e); } // Prevent Auto Play/Buffering if (document && document.hasFocus && typeof document.hasFocus === "function" && !document.hasFocus() && ((!ytcenter.playlist && (ytcenter.settings.preventTabAutoBuffer || ytcenter.settings.preventTabAutoPlay)) || (ytcenter.playlist && (ytcenter.settings.preventTabPlaylistAutoBuffer || ytcenter.settings.preventTabPlaylistAutoPlay)))) { if (ytcenter.playlist) { if (ytcenter.settings.preventTabPlaylistAutoBuffer) { if (ytcenter.html5) { ytcenter.player.setPlaybackState(0); } } else if (ytcenter.settings.preventTabPlaylistAutoPlay) { ytcenter.player.setPlaybackState(2); } } else { if (ytcenter.settings.preventTabAutoBuffer) { if (ytcenter.html5) { ytcenter.player.setPlaybackState(0); } } else if (ytcenter.settings.preventTabAutoPlay) { ytcenter.player.setPlaybackState(2); } } } else { if (ytcenter.playlist) { if (ytcenter.settings.preventPlaylistAutoBuffer) { if (ytcenter.html5) { ytcenter.player.setPlaybackState(0); } } else if (ytcenter.settings.preventPlaylistAutoPlay) { ytcenter.player.setPlaybackState(2); } } else { if (ytcenter.settings.preventAutoBuffer) { if (ytcenter.html5) { ytcenter.player.setPlaybackState(0); } } else if (ytcenter.settings.preventAutoPlay) { ytcenter.player.setPlaybackState(2); } } } } else if (page === "channel") { if (ytcenter.settings.channel_enableVolume) { if (ytcenter.settings.channel_volume < 0) { ytcenter.settings.channel_volume = 0; } else if (ytcenter.settings.channel_volume > 100) { ytcenter.settings.channel_volume = 100; } if (api.setVolume) { api.setVolume(ytcenter.settings.channel_volume); } } if (ytcenter.settings.channel_mute && api.mute) { api.mute(); } else if (!ytcenter.settings.channel_mute && api.unMute) { api.unMute(); } if (ytcenter.settings.channel_preventAutoBuffer) { ytcenter.player.setPlaybackState(0); } else if (ytcenter.settings.channel_preventAutoPlay) { ytcenter.player.setPlaybackState(2); } else { ytcenter.player.setPlaybackState(1); } if (api.getPlaybackQuality() !== config.args.vq) { if (config.args.vq === "auto") { config.args.vq = ytcenter.settings.channel_autoVideoQuality; } con.log("[Player Update] Quality => " + config.args.vq); ytcenter.player.setQuality(config.args.vq); } } else if (page === "embed") { if (ytcenter.settings.embed_enableVolume) { if (ytcenter.settings.embed_volume < 0) { ytcenter.settings.embed_volume = 0; } else if (ytcenter.settings.embed_volume > 100) { ytcenter.settings.embed_volume = 100; } if (api.setVolume) { api.setVolume(ytcenter.settings.embed_volume); } } try { if (ytcenter.settings.embed_mute) { api.mute(); } else if (!ytcenter.settings.embed_mute) { api.unMute(); } } catch (e) { con.error(e); } if (!ytcenter.settings.embed_defaultAutoplay) { if (ytcenter.settings.embed_preventAutoBuffer) { var played = false; ytcenter.player.listeners.addEventListener("onStateChange", function(s){ if (s !== 1 || played) return; played = true; if (api.getPlaybackQuality() !== ytcenter.settings.embed_autoVideoQuality) { if (config.args.vq === "auto") { config.args.vq = ytcenter.settings.embed_autoVideoQuality; } con.log("Setting playback quality from " + api.getPlaybackQuality() + " to " + ytcenter.settings.embed_autoVideoQuality); ytcenter.player.setPlaybackQuality(config.args.vq); } }); } else if (ytcenter.settings.embed_preventAutoPlay) { api.playVideo(); api.pauseVideo(); uw.setTimeout(function(){ if (api.getPlaybackQuality() !== ytcenter.settings.embed_autoVideoQuality) { if (config.args.vq === "auto") { config.args.vq = ytcenter.settings.embed_autoVideoQuality; } con.log("Setting playback quality from " + api.getPlaybackQuality() + " to " + ytcenter.settings.embed_autoVideoQuality); ytcenter.player.setPlaybackQuality(config.args.vq); } }, 600); } else { ytcenter.player.listeners.addEventListener("onStateChange", function(s){ if (s !== 1 || played) return; played = true; if (api.getPlaybackQuality() !== ytcenter.settings.embed_autoVideoQuality) { if (config.args.vq === "auto") { config.args.vq = ytcenter.settings.embed_autoVideoQuality; } con.log("Setting playback quality from " + api.getPlaybackQuality() + " to " + ytcenter.settings.embed_autoVideoQuality); ytcenter.player.setPlaybackQuality(config.args.vq); } }); api.playVideo(); } } else if (loc.search.indexOf("ytcenter-autoplay=1") !== -1) { ytcenter.player.listeners.addEventListener("onStateChange", function(s){ if (s !== 1 || played) return; played = true; if (api.getPlaybackQuality() !== ytcenter.settings.embed_autoVideoQuality) { if (config.args.vq === "auto") { config.args.vq = ytcenter.settings.embed_autoVideoQuality; } con.log("Setting playback quality from " + api.getPlaybackQuality() + " to " + ytcenter.settings.embed_autoVideoQuality); ytcenter.player.setPlaybackQuality(config.args.vq); } }); api.playVideo(); } if (api.getPlaybackQuality() !== ytcenter.settings.embed_autoVideoQuality) { if (config.args.vq === "auto") { config.args.vq = ytcenter.settings.embed_autoVideoQuality; } con.log("Setting playback quality from " + api.getPlaybackQuality() + " to " + ytcenter.settings.embed_autoVideoQuality); ytcenter.player.setPlaybackQuality(config.args.vq); } } }; ytcenter.player.calculateRatio = function(dash, predefinedAspect){ var i, a; /*predefinedAspect = predefinedAspect || ytcenter.settings['aspectValue']; // Checking if the ratio is predefined if (predefinedAspect && predefinedAspect.indexOf("=") !== -1) { a = predefinedAspect.split("=")[1]; if (a.indexOf(":") !== -1) { a = a.split(":"); a = parseInt(a[0])/parseInt(a[1]); if (!isNaN(a)) return a; } }*/ predefinedAspect = predefinedAspect || ytcenter.settings['playerSizeAspect']; // Checking if the ratio is predefined if (predefinedAspect && predefinedAspect !== "default") { a = predefinedAspect; if (a.indexOf(":") !== -1) { a = a.split(":"); a = parseInt(a[0])/parseInt(a[1]); if (!isNaN(a)) return a; } } // Calculating the aspect ratio... if (dash) { for (i = 0; i < ytcenter.video.streams.length; i++) { if (ytcenter.video.streams[i].size) { a = ytcenter.video.streams[i].size.split("x"); break; } } } else { for (i = 0; i < ytcenter.video.streams.length; i++) { if (ytcenter.video.streams[i].dimension) { a = ytcenter.video.streams[i].dimension.split("x"); break; } } } if (a) { a = parseInt(a[0])/parseInt(a[1]); if (isNaN(a)) return 16/9; return a; } else { return 16/9; } }; ytcenter.player.experiments = (function(){ function add(exp, config) { var cfg = getConfig(config); if (!has(exp, config)) { cfg.args.fexp += "," + exp; } } function remove(exp, config) { var cfg = getConfig(config); if (cfg && cfg.args && cfg.args.fexp) { var e = cfg.args.fexp.split(","), i, a = []; for (i = 0; i < e.length; i++) { if (exp !== e[i]) { a.push(e[i]); } } cfg.args.fexp = a.join(","); } } function has(exp, config) { var cfg = getConfig(config); if (cfg && cfg.args && typeof cfg.fexp === "string") { var e = cfg.args.fexp.split(","), i, a = []; for (i = 0; i < e.length; i++) { if (exp === e[i]) { return true; } } } return false; } function clear(config) { var cfg = getConfig(config); if (cfg && cfg.args) { cfg.args.fexp = ""; } } function getConfig(config) { return config || ytcenter.player.config.args; } return { add: add, remove: remove, has: has, clear: clear }; })(); ytcenter.player.modifyConfig = function(page, config){ if (page !== "watch" && page !== "embed" && page !== "channel") return config; if (loc.href.indexOf(".youtube.com/embed/") !== -1 && !ytcenter.settings.embed_enabled) return config; if (!config) config = {}; if (!config.args) config.args = {}; con.log("[Player modifyConfig] => " + page); if (document.getElementById("upsell-video")) { var swf_config = JSON.parse(document.getElementById("upsell-video").getAttribute("data-swf-config").replace(/&/g, "&").replace(/"/g, "\"")); config = swf_config; } if (loc.hash.indexOf("t=") !== -1) { var hashObject = ytcenter.utils.urlComponentToObject(loc.hash.substring(1)), value = null, matches = null, i; if (typeof hashObject.t !== "undefined") { if (matches = hashObject.t.match(/^([0-9]+m)|([0-9]+s)$/g)) { value = 0; for (i = 0; i < matches.length; i++) { if (matches[i].indexOf("s") === matches[i].length - 1) { value += parseInt(matches[i], 10); } else if (matches[i].indexOf("m") === matches[i].length - 1) { value += parseInt(matches[i], 10) * 60; } else if (matches[i].indexOf("h") === matches[i].length - 1) { value += parseInt(matches[i], 10) * 60 * 60; } } } else { value = parseInt(hashObject.t, 10); } } if (value !== null) { config.args.start = value; } } if (config && config.args && ((config.args.url_encoded_fmt_stream_map && config.args.fmt_list) || config.args.adaptive_fmts)) { var streams = ytcenter.parseStreams(config.args); ytcenter.video.streams = streams; try { if (ytcenter.video && ytcenter.video.streams && ytcenter.video.streams[0] && ytcenter.video.streams[0].s) { ytcenter.utils.updateSignatureDecipher(); // Only Updating the signature decoder when it's needed! } } catch (e) { con.error("[updateSignatureDecipher] Error,", e); } ytcenter.unsafe.video = {}; ytcenter.unsafe.video.streams = ytcenter.video.streams; ytcenter.video.id = config.args.video_id; ytcenter.video.title = config.args.title; } config.args.ytcenter = 1; config.args.enablejsapi = 1; config.args.jsapicallback = "ytcenter.player.onReady"; if (ytcenter.getPage() === "watch") { ytcenter.descriptionTags.addSection("DESCRIPTIONTAG_KEYWORDS", config.args.keywords.split(",")); ytcenter.descriptionTags.addSection("DESCRIPTIONTAG_FPS", ytcenter.player.getFPSArray(ytcenter.video.streams)); if (ytcenter.settings.bufferEnabled) { config.args.tsp_buffer = ytcenter.settings.bufferSize; } if (ytcenter.settings.enable_custom_fexp) { config.args.fexp = ytcenter.settings.custom_fexp; } else { // Why did I not think about looking at the YouTube experiments before??? The most simple solution to the issue with the annotations' size and position for the HTML5 player. //ytcenter.player.experiments.clear(config); ytcenter.player.experiments.remove("931983", config); // YouTube will probably change this in a few months.. again. ytcenter.player.experiments.remove("931972", config); } if (!config.args.video_id) { config.args.video_id = ytcenter.utils.query("v"); } if (ytcenter.settings.enableYouTubeShortcuts) { config.args.disablekb = 0; } else { config.args.disablekb = 1; } if ((ytcenter.settings.forcePlayerType === "flash" || ytcenter.settings.forcePlayerType === "aggressive_flash") && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = false; ytcenter.player.setPlayerType("flash"); } else if (ytcenter.settings.forcePlayerType === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = true; delete config.args.ad3_module; config.args.allow_html5_ads = 1; config.args.html5_sdk_version = "3.1"; ytcenter.player.setPlayerType("html5"); } } else if (ytcenter.getPage() === "embed") { if (ytcenter.settings.embedBufferEnabled) { config.args.tsp_buffer = ytcenter.settings.embedBufferSize; } if ((ytcenter.settings.embed_forcePlayerType === "flash" || ytcenter.settings.embed_forcePlayerType === "aggressive_flash") && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = false; config.args.html5_sdk_version = "0"; ytcenter.player.setPlayerType("flash"); } else if (ytcenter.settings.embed_forcePlayerType === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = true; delete config.args.ad3_module; config.args.allow_html5_ads = 1; config.args.html5_sdk_version = "3.1"; ytcenter.player.setPlayerType("html5"); } } else if (ytcenter.getPage() === "channel") { if (ytcenter.settings.channelBufferEnabled) { config.args.tsp_buffer = ytcenter.settings.channelBufferSize; } if ((ytcenter.settings.channel_forcePlayerType === "flash" || ytcenter.settings.channel_forcePlayerType === "aggressive_flash") && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = false; config.args.html5_sdk_version = "0"; ytcenter.player.setPlayerType("flash"); } else if (ytcenter.settings.channel_forcePlayerType === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = true; delete config.args.ad3_module; config.args.allow_html5_ads = 1; config.args.html5_sdk_version = "3.1"; ytcenter.player.setPlayerType("html5"); } } if (config.html5) ytcenter.html5 = true; else ytcenter.html5 = false; con.log("[Player Type] " + (ytcenter.html5 ? "HTML5" : "Flash")); if (ytcenter.settings.removeRelatedVideosEndscreen) { delete config.args.endscreen_module; delete config.args.rvs; } if (ytcenter.settings.enableResize) config.args.player_wide = ytcenter.settings.player_wide ? "1" : "0"; if (page === "watch") { var ___callback = function(response){ try { var txt = response.responseText; if (txt) { txt = txt.split("<published>"); if (txt && txt.length > 1) { txt = txt[1].split("</published>"); if (txt && txt.length > 0) { txt = txt[0]; ytcenter.video.published = new Date(txt); } } } } catch (e) { con.error(e); } //ytcenter.events.performEvent("ui-refresh"); }; if (config.args.video_id) { ytcenter.utils.xhr({ method: "GET", url: "https://gdata.youtube.com/feeds/api/videos/" + config.args.video_id + "?v=2", headers: { "Content-Type": "text/plain" }, onerror: ___callback, onload: ___callback }); } if (ytcenter.settings.dashPlayback && config.args.adaptive_fmts) { config.args.dash = "1"; } else { config.args.dash = "0"; config.args.dashmpd = ""; } if (ytcenter.settings.enableAutoVideoQuality) { // This does not work with the HTML5 player anymore. config.args.vq = ytcenter.player.getQuality(ytcenter.settings.autoVideoQuality, streams, (config.args.dash === "1" && config.args.adaptive_fmts ? true : false)); config.args.suggestedQuality = config.args.vq; var vqDim = ytcenter.player.getQualityDimension(config.args.vq); if (vqDim) config.args.video_container_override = vqDim; } if (config.args.dash === "1" && config.args.adaptive_fmts) { ytcenter.player.setRatio(ytcenter.player.calculateRatio(true)); } else { ytcenter.player.setRatio(ytcenter.player.calculateRatio(false)); } if (ytcenter.settings.removeAdvertisements) { config = ytcenter.site.removeAdvertisement(config); } if (ytcenter.settings.removeBrandingWatermark) { delete config.args.watermark; delete config.args.interstitial; } if (ytcenter.settings.aspectValue !== "none" && ytcenter.settings.aspectValue !== "default" && ytcenter.settings.aspectValue.indexOf("yt:") === 0) { con.log("Chaning aspect to " + ytcenter.settings.aspectValue); config.args.keywords = ytcenter.settings.aspectValue; } else if (ytcenter.settings.aspectValue !== "default") { con.log("Chaning aspect to none"); config.args.keywords = ""; } else { con.log("Keeping the aspect"); } if ((ytcenter.settings.forcePlayerType === "flash" || ytcenter.settings.forcePlayerType === "aggressive_flash")) { config.html5 = false; } else if (ytcenter.settings.forcePlayerType === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = true; delete config.args.ad3_module; } if (ytcenter.settings.enableAnnotations) { config.args.iv_load_policy = 1; } else { config.args.iv_load_policy = 3; } if (typeof ytcenter.settings.autohide != "undefined" && ytcenter.settings.autohide !== "-1") { config.args.autohide = ytcenter.settings.autohide; } if (ytcenter.settings.bgcolor === "none") { config.args.keywords = ytcenter.utils.setKeyword(config.args.keywords, "yt:bgcolor", "#000000"); } else if (ytcenter.settings.bgcolor !== "default" && ytcenter.settings.bgcolor.indexOf("#") === 0) { config.args.keywords = ytcenter.utils.setKeyword(config.args.keywords, "yt:bgcolor", ytcenter.settings.bgcolor); } ytcenter.playlist = false; try { if (document.getElementById("watch7-playlist-data") || loc.search.indexOf("list=") !== -1) { ytcenter.playlist = true; } } catch (e) { con.error(e); } con.log("[Playlist] " + (ytcenter.playlist ? "Enabled" : "Disabled")); if (document && document.hasFocus && typeof document.hasFocus === "function" && !document.hasFocus() && ((!ytcenter.playlist && (ytcenter.settings.preventTabAutoBuffer || ytcenter.settings.preventTabAutoPlay)) || (ytcenter.playlist && (ytcenter.settings.preventTabPlaylistAutoBuffer || ytcenter.settings.preventTabPlaylistAutoPlay)))) { config.args.autoplay = "0"; } else { if (ytcenter.playlist) { if (ytcenter.settings.preventPlaylistAutoBuffer || ytcenter.settings.preventPlaylistAutoPlay) { config.args.autoplay = "0"; } else { config.args.autoplay = "1"; } } else { if (ytcenter.settings.preventAutoBuffer || ytcenter.settings.preventAutoPlay) { config.args.autoplay = "0"; } else { config.args.autoplay = "1"; } } } config.args.theme = ytcenter.settings.playerTheme; config.args.color = ytcenter.settings.playerColor; ytcenter.player.setTheme(ytcenter.settings.playerTheme); ytcenter.player.setProgressColor(ytcenter.settings.playerColor); ytcenter.player.setAutoHide(ytcenter.settings.autohide); if (config.args.rvs) { var rvs = ytcenter.player.parseRVS(config.args.rvs), i; if (ytcenter.settings.enableEndscreenAutoplay && ytcenter.settings.removeRelatedVideosEndscreen) { if (rvs.length > 0) { rvs[0].endscreen_autoplay = 1; for (i = 1; i < rvs.length; i++) { if (typeof rvs[i].endscreen_autoplay !== "undefined") { delete rvs[i].endscreen_autoplay; } } } config.args.rvs = ytcenter.player.stringifyRVS(rvs); } else { if (rvs.length > 0) { for (i = 0; i < rvs.length; i++) { if (typeof rvs[i].endscreen_autoplay !== "undefined") { delete rvs[i].endscreen_autoplay; } } } config.args.rvs = ytcenter.player.stringifyRVS(rvs); } } } else if (page === "embed") { if (ytcenter.settings.embed_forcePlayerType === "flash" || ytcenter.settings.embed_forcePlayerType === "aggressive_flash") { config.html5 = false; } else if (ytcenter.settings.embed_forcePlayerType === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = true; delete config.args.ad3_module; } if (ytcenter.settings.removeAdvertisements) { config = ytcenter.site.removeAdvertisement(config); } if (ytcenter.settings.embed_dashPlayback) { config.args.dash = "1"; } else { config.args.dash = "0"; config.args.dashmpd = ""; } if (ytcenter.settings.embed_enableAutoVideoQuality) { var vq = ytcenter.player.getQuality(ytcenter.settings.embed_autoVideoQuality, streams, (config.args.dash === "1" && config.args.adaptive_fmts ? true : false)); config.args.vq = vq; config.args.suggestedQuality = vq; var vqDim = ytcenter.player.getQualityDimension(vq); if (vqDim) config.args.video_container_override = vqDim; } if (!ytcenter.settings.embed_enableAnnotations) { config.args.iv_load_policy = 3; } else { config.args.iv_load_policy = 1; } if (typeof ytcenter.settings.embed_autohide !== "undefined" && ytcenter.settings.embed_autohide !== "-1") { config.args.autohide = ytcenter.settings.embed_autohide; } if (!ytcenter.settings.embed_defaultAutoplay) config.args.autoplay = "0"; config.args.theme = ytcenter.settings.embed_playerTheme; config.args.color = ytcenter.settings.embed_playerColor; ytcenter.player.setTheme(ytcenter.settings.playerTheme); ytcenter.player.setProgressColor(ytcenter.settings.playerColor); ytcenter.player.setAutoHide(ytcenter.settings.embed_autohide); if (ytcenter.settings.embed_bgcolor === "none") { config.args.keywords = ytcenter.utils.setKeyword(config.args.keywords, "yt:bgcolor", ""); } else if (ytcenter.settings.embed_bgcolor !== "default" && ytcenter.settings.embed_bgcolor.indexOf("#") === 0) { config.args.keywords = ytcenter.utils.setKeyword(config.args.keywords, "yt:bgcolor", ytcenter.settings.embed_bgcolor); } } else if (page === "channel") { if (ytcenter.settings.channel_forcePlayerType === "flash" || ytcenter.settings.channel_forcePlayerType === "aggressive_flash") { config.html5 = false; } else if (ytcenter.settings.channel_forcePlayerType === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()) { config.html5 = true; delete config.args.ad3_module; } if (ytcenter.settings.channel_dashPlayback) { config.args.dash = "1"; } else { config.args.dash = "0"; config.args.dashmpd = ""; } if (ytcenter.settings.channel_enableAutoVideoQuality) { var vq = ytcenter.player.getQuality(ytcenter.settings.channel_autoVideoQuality, streams, (config.args.dash === "1" && config.args.adaptive_fmts ? true : false)); config.args.vq = vq; config.args.suggestedQuality = vq; var vqDim = ytcenter.player.getQualityDimension(vq); if (vqDim) config.args.video_container_override = vqDim; } if (ytcenter.settings.removeAdvertisements) { config = ytcenter.site.removeAdvertisement(config); } if (!ytcenter.settings.channel_enableAnnotations) { config.args.iv_load_policy = 3; } else { config.args.iv_load_policy = 1; } if (typeof ytcenter.settings.channel_autohide != "undefined" && ytcenter.settings.channel_autohide !== "-1") { config.args.autohide = ytcenter.settings.channel_autohide; } /*if (ytcenter.settings.embed_defaultAutoplay) { if (loc.search.indexOf("ytcenter-autoplay=1") !== -1) { config.args.autoplay = "1"; } else { config.args.autoplay = "0"; } } else { config.args.autoplay = (ytcenter.settings.embed_preventAutoBuffer ? "0" : "1"); }*/ config.args.autoplay = "0"; config.args.theme = ytcenter.settings.channel_playerTheme; config.args.color = ytcenter.settings.channel_playerColor; ytcenter.player.setTheme(ytcenter.settings.playerTheme); ytcenter.player.setProgressColor(ytcenter.settings.playerColor); ytcenter.player.setAutoHide(ytcenter.settings.channel_autohide); config.args.enablejsapi = "1"; if (ytcenter.settings.channel_bgcolor === "none") { config.args.keywords = ytcenter.utils.setKeyword(config.args.keywords, "yt:bgcolor", "#000000"); } else if (ytcenter.settings.channel_bgcolor !== "default" && ytcenter.settings.channel_bgcolor.indexOf("#") === 0) { config.args.keywords = ytcenter.utils.setKeyword(config.args.keywords, "yt:bgcolor", ytcenter.settings.channel_bgcolor); } if (document.getElementById("upsell-video")) { document.getElementById("upsell-video").setAttribute("data-swf-config", JSON.stringify(config).replace(/&/g, "&").replace(/"/g, """)); } } return config; }; ytcenter.player.getAPI = function(){ if (loc.pathname.indexOf("/embed/") === 0 && uw.yt && uw.yt.player && uw.yt.player.getPlayerByElement) { return uw.yt.player.getPlayerByElement(document.getElementById("player")); } if (ytcenter.player.__getAPI && ytcenter.player.__getAPI.addEventListener) { return ytcenter.player.__getAPI; // Note: Never use yt.player.embed function to fetch the API. Just catch the API through onYouTubePlayerReady. } else { var player = document.getElementById("movie_player"); var api = ytcenter.player.__getAPI || { }; if (player && player.getApiInterface) { var apiInterface = player.getApiInterface(); for (var i = 0, len = apiInterface.length; i < len; i++) { api[apiInterface[i]] = ytcenter.utils.funcBind(player, player[apiInterface[i]]); } } return api; } }; ytcenter.player.setPlayerWide = function(center){ ytcenter.settings.player_wide = (center ? true : false); ytcenter.utils.setCookie("wide", (center ? "1" : "0"), null, "/", 3600*60*24*30); ytcenter.saveSettings(); }; ytcenter.player.toggleLights = function(){ if (ytcenter.player.isLightOff) { ytcenter.player.turnLightOn(); } else { ytcenter.player.turnLightOff(); } }; ytcenter.player.turnLightOn = function(){}; ytcenter.player.isLightOff = false; ytcenter.player.turnLightOff = (function(){ var lightElement; return function(){ if (!lightElement) { lightElement = document.createElement("div"); lightElement.className = "ytcenter-lights-off-overlay hid"; lightElement.style.background = ytcenter.settings.lightbulbBackgroundColor; lightElement.style.opacity = ytcenter.settings.lightbulbBackgroundOpaque/100; lightElement.style.filter = "alpha(opacity=" + ytcenter.settings.lightbulbBackgroundOpaque + ")"; ytcenter.utils.addEventListener(lightElement, "click", function(){ if (!ytcenter.settings["lightbulbClickThrough"]) ytcenter.player.turnLightOn(); }, false); ytcenter.player.turnLightOn = function(){ ytcenter.utils.addClass(lightElement, "hid"); ytcenter.utils.removeClass(document.body, "ytcenter-lights-off"); ytcenter.player.isLightOff = false; ytcenter.effects.playerGlow.update(); }; document.body.appendChild(lightElement); } // Updating background color and opacity. lightElement.style.background = ytcenter.settings.lightbulbBackgroundColor; lightElement.style.opacity = ytcenter.settings.lightbulbBackgroundOpaque/100; lightElement.style.filter = "alpha(opacity=" + ytcenter.settings.lightbulbBackgroundOpaque + ")"; ytcenter.utils.addClass(document.body, "ytcenter-lights-off"); ytcenter.utils.removeClass(lightElement, "hid"); ytcenter.player.isLightOff = true; ytcenter.effects.playerGlow.update(); }; })(); ytcenter.player.checkHTML5Support = function(){ var v = document.createElement("video"); if (v && !v.canPlayType) { return false; } var mp4 = v.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"'); var webm = v.canPlayType('video/webm; codecs="vp8.0, vorbis"'); var found = false; for (var i = 0; i < ytcenter.video.streams.length; i++) { if (mp4 && ytcenter.video.streams[i].type.indexOf("video/mp4;") === 0) { found = true; break; } else if (webm && ytcenter.video.streams[i].type.indexOf("video/webm;") === 0) { found = true; break; } } return found; }; ytcenter.player.setYTConfig = function(config){ if (uw.yt && uw.yt.setConfig) uw.yt.setConfig(config); }; ytcenter.player.getYTConfig = function(config){ uw.yt.getConfig(config); }; ytcenter.player.getConfig = function(){ return ytcenter.player.config; }; ytcenter.player.getPlayerId = (function(){ function verify() { var n = -1; ytcenter.utils.each(uw, function(key, value){ if (key.indexOf("ytPlayer") !== 0) return; // || key.indexOf(("player" + i), key.length - ("player" + i).length) !== -1 var __n = key.substr(key.lastIndexOf("player") + "player".length); if (!/^\d+$/.test(__n)) return; var _n = parseInt(__n); if (_n > n) n = _n; }); if (n > -1) verified = n; } var verified = 1; return function(){ verify(); return "player" + verified; }; })(); ytcenter.player.getReference = (function(){ return function(playerid){ ytcenter.player.reference = ytcenter.player.reference || {}; if (playerid) { ytcenter.player.reference.playerId = playerid; } //ytcenter.player.reference.api = ytcenter.player.getAPI(); if (ytcenter.page === "embed") { ytcenter.referenceMethod = "embed"; if (document.getElementById("video-player")) { ytcenter.player.reference.target = document.getElementById("video-player"); } else if (!ytcenter.html5 && document.getElementsByTagName("embed").length > 0) { ytcenter.player.reference.target = document.getElementsByTagName("embed")[0]; } ytcenter.player.reference.config = ytcenter.player.getConfig(); } else if (ytcenter.page === "channel") { ytcenter.referenceMethod = "channel"; if (document.getElementById("movie_player")) { ytcenter.player.reference.target = document.getElementById("movie_player"); } else if (!ytcenter.html5 && document.getElementsByTagName("embed").length > 0) { ytcenter.player.reference.target = document.getElementsByTagName("embed")[0]; } ytcenter.player.reference.config = ytcenter.player.getConfig(); } else { if (uw && uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_REFERENCE) { ytcenter.referenceMethod = "PLAYER REFERENCE"; ytcenter.player.reference.api = uw.yt.config_.PLAYER_REFERENCE; ytcenter.player.reference.target = document.getElementById("movie_player") || document.getElementById("embed")[0]; ytcenter.player.reference.onReadyCalled = true; } else if (document.getElementById("movie_player") || document.getElementsByTagName("embed").length > 0) { ytcenter.referenceMethod = "binding"; ytcenter.player.reference.target = document.getElementById("movie_player") || document.getElementById("embed")[0]; ytcenter.player.reference.onReadyCalled = true; } ytcenter.player.reference.html5 = ytcenter.html5; } return ytcenter.player.reference; }; })(); ytcenter.player.listeners = (function(){ // Get the YouTube listener for the passed event. function getYouTubeListener(event) { var ytEvent = "ytPlayer" + event + "player" + getPlayerId(); return ytListeners[ytEvent]; } // The latest player id registered in the global window. function getNewestPlayerId() { var id = 1; var uid = null; var i = null; ytcenter.utils.each(uw, function(key, value){ if (key.indexOf("ytPlayer") !== -1) { var match = key.match(/player([0-9]+)$/); var uidMatch = key.match(/player_uid_([0-9]+)_([0-9]+)$/); if (uidMatch) { uid = parseInt(uidMatch[1], 10); i = parseInt(uidMatch[2], 10); if (i > id) { id = i; } } else if (match) { i = parseInt(match[1], 10); if (i > id) { id = i; } } } }); return [uid, id]; } function ytListenerContainerSetter(event, func) { var ytEvent = "ytPlayer" + event + "player" + getPlayerId(); ytListeners[ytEvent] = func; } function ytListenerContainerGetter(event, func) { return ytcenter.utils.funcBind(null, callListener, event, 1); } /* Origin argument * If origin is equal to 0 then the origin is directly from the player (only YouTube Center's listeners get executed if override is false). * If origin is equal to 1 then the origin is from the global listeners (both YouTube's and YouTube Center's listeners get executed). */ function callListener(event, origin) { function generateThisObject() { return { getOriginalListener: ytcenter.utils.funcBind(null, getYouTubeListener, event) }; } var ytEvent = "ytPlayer" + event + "player" + getPlayerId(); var args = Array.prototype.slice.call(arguments, 2); var returnVal = null; ytcenter.player._update_onYouTubeReady = true; // The listener got called therefore the player is here. if (enabled && origin === 0 && (!events.hasOwnProperty(event) || (events.hasOwnProperty(event) && !events[event].override))) { /* Override is false and the origin is from the player; call the YouTube Center listeners */ if (events.hasOwnProperty(event)) { for (var i = 0, len = events[event].listeners.length; i < len; i++) { returnVal = events[event].listeners[i].apply(null, args); } } } else if (enabled && origin === 1) { if (events.hasOwnProperty(event) && events[event].override) { /* Override is true and the origin is from the global window; call the YouTube Center listeners */ for (var i = 0, len = events[event].listeners.length; i < len; i++) { events[event].listeners[i].apply(generateThisObject(), args); } con.log("[Player Listener] Event " + event + " was called with", args); } else if (ytListeners[ytEvent]) { if (apiNotAvailable) { /* API is not available therefore call YouTube Center listeners as YouTube listener is called */ for (var i = 0, len = events[event].listeners.length; i < len; i++) { returnVal = events[event].listeners[i].apply(null, args); } } /* Override is false and the origin is from the global window; call the YouTube listener */ returnVal = ytListeners[ytEvent].apply(uw, args); con.log("[Player Listener] Event " + event + " was called with", args); } } else if (!enabled) { /* Everything is disabled; call the YouTube listener */ returnVal = ytListeners[ytEvent].apply(uw, args); } return returnVal; } function addPlayerListener() { var api = ytcenter.player.getAPI(); var event; if (api && api.addEventListener) { apiNotAvailable = false; for (event in events) { if (events.hasOwnProperty(event)) { playerListener[event] = ytcenter.utils.funcBind(null, callListener, event, 0); api.addEventListener(event, playerListener[event]); } } } else { apiNotAvailable = true; con.error("[Player Listener] Player API is not available!"); } } function setupGlobalListeners() { if (globalListenersInitialized) return; // Make sure that this function is only called once. globalListenersInitialized = true; for (var event in events) { if (events.hasOwnProperty(event)) { var ytEvent = "ytPlayer" + event + "player" + getPlayerId(); if (uw[ytEvent]) { ytListeners[ytEvent] = uw[ytEvent]; } defineLockedProperty(uw, ytEvent, ytcenter.utils.funcBind(null, ytListenerContainerSetter, event), ytcenter.utils.funcBind(null, ytListenerContainerGetter, event) ); } } } function getPlayerId() { if (ytcenter.utils.isArray(playerId)) { return "_uid_" + playerId[0] + "_" + playerId[1]; } else { return playerId; } } function setup() { if (enabled) return; con.log("[Player Listener] Has begun the setup..."); var api = ytcenter.player.getAPI(); playerId = getNewestPlayerId(); enabled = true; // Indicate that the it's active. // Add the listeners normally to the player addPlayerListener(); // Replace the global listeners with custom listeners in case the override property is set to true setupGlobalListeners(); } function addEventListener(event, listener) { if (!events.hasOwnProperty(event)) return; removeEventListener(event, listener); // Make sure that there is only one instance of the listener registered. events[event].listeners.push(listener); } function removeEventListener(event, listener) { if (!events.hasOwnProperty(event)) return; for (var i = 0, len = events[event].listeners.length; i < len; i++) { if (events[event].listeners[i] === listener) { return events[event].listeners.splice(i, 1); } } } function setOverride(event, override) { if (!events.hasOwnProperty(event)) return; events[event].override = !!override; } function unloadPlayerListeners() { var api = ytcenter.player.getAPI(); var event; if (api && api.removeEventListener) { for (event in events) { if (events.hasOwnProperty(event)) { api.removeEventListener(event, playerListener[event]); delete playerListener[event]; } } } else { con.error("[Player Listener] Player API is not available!"); } } function unload() { unloadPlayerListeners(); enabled = false; apiNotAvailable = true; } function fireEvent(event) { var args = Array.prototype.slice.call(arguments, 1); callListener.apply(this, [event, 1].concat(args)); } var playerId = 1; var ytListeners = {}; var playerListener = {}; // Reference for unload var enabled = false; var globalListenersInitialized = false; var apiNotAvailable = true; var events = { "onApiChange": { override: false, listeners: [] }, "onCueRangeEnter": { override: false, listeners: [] }, "onCueRangeExit": { override: false, listeners: [] }, "onError": { override: false, listeners: [] }, "onNavigate": { override: false, listeners: [] }, "onPlaybackQualityChange": { override: false, listeners: [] }, "onStateChange": { override: false, listeners: [] }, "onTabOrderChange": { override: false, listeners: [] }, "onVolumeChange": { override: false, listeners: [] }, "onAdStart": { override: false, listeners: [] }, "onReady": { override: false, listeners: [] }, "RATE_SENTIMENT": { override: false, listeners: [] }, "SHARE_CLICKED": { override: false, listeners: [] }, "SIZE_CLICKED": { override: false, listeners: [] }, "WATCH_LATER": { override: false, listeners: [] }, "WATCH_LATER_VIDEO_ADDED": { override: false, listeners: [] }, "WATCH_LATER_VIDEO_REMOVED": { override: false, listeners: [] }, "SUBSCRIBE": { override: false, listeners: [] }, "UNSUBSCRIBE": { override: false, listeners: [] }, "AdvertiserVideoView": { override: false, listeners: [] }, "captionschanged": { override: false, listeners: [] }, "onRemoteReceiverSelected": { override: false, listeners: [] }, "onFullscreenChange": { override: false, listeners: [] } }; return { addEventListener: addEventListener, removeEventListener: removeEventListener, fireEvent: fireEvent, setOverride: setOverride, setup: setup, dispose: unload }; })(); ytcenter.player.setAutoHide = function(autohide){ if (!ytcenter.html5 || autohide === "-1") return; con.log("[HTML5 Player] Setting autohide to " + autohide); var target = ytcenter.player.getReference().target; if (target) { ytcenter.utils.removeClass(target, "ytcenter-autohide-both ytcenter-autohide-controlbar ytcenter-autohide-progressbar ytcenter-autohide-none autohide-controlbar autominimize-controls-aspect autohide-controls-fullscreenonly autohide-controls hide-controls-when-cued autominimize-progress-bar autominimize-progress-bar-fullscreenonly autohide-controlbar-fullscreenonly"); if (autohide === "0") { // None ytcenter.utils.addClass(target, "ytcenter-autohide-none autohide-controls-fullscreenonly autominimize-progress-bar-fullscreenonly"); } else if (autohide === "1") { // Both ytcenter.utils.addClass(target, "ytcenter-autohide-both autominimize-progress-bar autohide-controls hide-controls-when-cued"); } else if (autohide === "2") { // Progressbar ytcenter.utils.addClass(target, "ytcenter-autohide-progressbar autominimize-progress-bar autominimize-controls-aspect autohide-controls-fullscreenonly"); } else if (autohide === "3") { // Controlbar ytcenter.utils.addClass(target, "ytcenter-autohide-controlbar autohide-controlbar autohide-controls-fullscreenonly autominimize-progress-bar"); } ytcenter.events.performEvent("resize-update"); } }; ytcenter.player.setTheme = function(theme){ if (!ytcenter.html5) return; con.log("[HTML5 Player] Setting player theme to " + theme); var light = "light-theme", dark = "dark-theme", target = document.getElementById("movie_player"); if (target) { if (theme === "dark") { ytcenter.utils.removeClass(target, light); ytcenter.utils.addClass(target, dark); } else if (theme === "light") { ytcenter.utils.removeClass(target, dark); ytcenter.utils.addClass(target, light); } } }; ytcenter.player.setProgressColor = function(color){ if (!ytcenter.html5) return; con.log("[HTML5 Player] Setting player progress color to " + color); var white = "white", red = "red", els = document.getElementsByClassName("html5-progress-bar"), i; for (i = 0; i < els.length; i++) { if (color === "red") { ytcenter.utils.removeClass(els[i], white); ytcenter.utils.addClass(els[i], red); } else if (color === "white") { ytcenter.utils.removeClass(els[i], red); ytcenter.utils.addClass(els[i], white); } } ytcenter.classManagement.applyClasses(); }; ytcenter.player.aspect = function(option){ var config = ytcenter.player.getConfig(); config.args.keywords = option; con.log("Keywords changed to " + config.args.keywords); var api = ytcenter.player.getAPI(); var muted = api.isMuted(); var volume = api.getVolume(); var rate = api.getPlaybackRate(); var quality = api.getPlaybackQuality(); var time = api.getCurrentTime(); var state = api.getPlayerState(); var dur = api.getDuration(); if (state === 0) { time = dur + 60; } var __c = function(s){ if (s !== 1) return; ytcenter.player.listeners.removeEventListener("onStateChange", __c); con.log("Setting player option to last player"); if (state === -1) { api.stopVideo(); } else if (state === 2) { api.pauseVideo(); api.seekTo(time); } else { api.seekTo(time); } api.setVolume(volume); if (muted) { api.mute(muted); } api.setPlaybackRate(rate); ytcenter.player.setQuality(quality); con.log("Made a live refresh"); }; ytcenter.player.listeners.addEventListener("onStateChange", __c); api.loadVideoByPlayerVars(ytcenter.player.getConfig().args); if (config.args.dash === "1" && config.args.adaptive_fmts) { ytcenter.player.setRatio(ytcenter.player.calculateRatio(true, option)); } else { ytcenter.player.setRatio(ytcenter.player.calculateRatio(false, option)); } ytcenter.player.resizeUpdater && ytcenter.player.resizeUpdater(); }; ytcenter.player.currentResizeId; ytcenter.player.resizeCallback = []; ytcenter.player.updateResize = (function(){ function scrollToPlayer() { if (!ytcenter.settings.enableResize) return; var scrollElm = (document.getElementById("player-api-legacy") || document.getElementById("player-api")); if (ytcenter.settings.staticHeader) { scrollElm.scrollIntoView(true); } else { var posY = 0, mp = document.getElementById("masthead-positioner"); while (scrollElm != null) { posY += scrollElm.offsetTop; scrollElm = scrollElm.offsetParent; } ytcenter.utils.scrollTop(posY - mp.offsetHeight); } } var scrollToPlayerButtonArrow, scrollToPlayerButton = null; var getSizeById = function(id) { var sizes = ytcenter.settings["resize-playersizes"]; for (var i = 0; i < sizes.length; i++) { if (id === sizes[i].id) { return sizes[i]; } } return { id: "default", config: { align: true, height: "", large: false, scrollToPlayer: false, scrollToPlayerButton: false, width: "" } }; } var updatescrollToPlayerButtonPosition = function(){ if (!ytcenter.settings.enableResize) return; var appbar = document.getElementById("appbar-onebar-upload-group"); if (appbar && !scrollToPlayerButton.parentNode) { appbar.insertBefore(scrollToPlayerButton, appbar.children[0]); } }; var updatescrollToPlayerButtonVisibility = function(){ if (!ytcenter.settings.enableResize) { scrollToPlayerButton.style.display = "none"; return; } try { scrollToPlayerButton.style.bottom = ""; scrollToPlayerButton.style.right = ""; scrollToPlayerButton.style.position = ""; var _s = getSizeById(ytcenter.player.currentResizeId); if (_s.config.scrollToPlayerButton) { scrollToPlayerButton.style.display = "inline-block"; } else { scrollToPlayerButton.style.display = "none"; } var appbar = document.getElementById("appbar-onebar-upload-group"); if (appbar && !scrollToPlayerButton.parentNode) { appbar.insertBefore(scrollToPlayerButton, appbar.children[0]); } } catch (e) { con.error(e); } }; ytcenter.player.updateResize_updatePosition = updatescrollToPlayerButtonPosition; ytcenter.player.updateResize_updateVisibility = updatescrollToPlayerButtonVisibility; scrollToPlayerButtonArrow = document.createElement("img"); scrollToPlayerButtonArrow.className = "yt-uix-button-arrow"; scrollToPlayerButtonArrow.src = "//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif"; scrollToPlayerButtonArrow.alt = ""; scrollToPlayerButtonArrow.setAttribute("alt", ""); scrollToPlayerButtonArrow.style.marginLeft = "0"; scrollToPlayerButtonArrow.style.marginRight = "0"; scrollToPlayerButtonArrow.style.display = "inline-block"; scrollToPlayerButton = ytcenter.gui.createYouTubeDefaultButton("SCROLL_TOOLTIP", [scrollToPlayerButtonArrow]); scrollToPlayerButton.className = "yt-uix-button yt-uix-button-default yt-uix-button-size-default yt-uix-button-has-icon yt-uix-button-empty flip yt-uix-tooltip "; scrollToPlayerButton.style.display = "inline-block"; scrollToPlayerButton.style.position = "absolute"; ytcenter.utils.addEventListener(scrollToPlayerButton, "click", function(){ scrollToPlayer(); }, false); return function(){ if (!ytcenter.settings.enableResize) return; var _s = getSizeById(ytcenter.player.currentResizeId); ytcenter.player.resize(_s); if (_s.config.scrollToPlayer && ytcenter.getPage() === "watch" && ((ytcenter.settings.topScrollPlayerEnabled && !ytcenter.settings.topScrollPlayerActivated) || !ytcenter.settings.topScrollPlayerEnabled)) { scrollToPlayer(); } updatescrollToPlayerButtonVisibility(); updatescrollToPlayerButtonPosition(); }; })(); ytcenter.player.isPlayerAligned = function(){ function getSizeById(id) { var sizes = ytcenter.settings["resize-playersizes"]; for (var i = 0; i < sizes.length; i++) { if (id === sizes[i].id) { return sizes[i]; } } return { id: "default", config: { align: true, height: "", large: false, scrollToPlayer: false, scrollToPlayerButton: false, width: "" } }; } if (ytcenter.settings["resize-default-playersize"] === "default") { ytcenter.player.currentResizeId = (ytcenter.settings.player_wide ? ytcenter.settings["resize-large-button"] : ytcenter.settings["resize-small-button"]); } else { ytcenter.player.currentResizeId = ytcenter.settings['resize-default-playersize']; } var playerSize = getSizeById(ytcenter.player.currentResizeId); return playerSize.config.align; }; ytcenter.player.setPlayerSize = function(config){ for (var i = 0; i < ytcenter.settings["resize-playersizes"].length; i++) { if (ytcenter.settings["resize-playersizes"][i].id === config.id) { ytcenter.settings["resize-playersizes"][i] = config; break; } } }; ytcenter.player.getPlayerSize = function(id){ for (var i = 0; i < ytcenter.settings["resize-playersizes"].length; i++) { if (ytcenter.settings["resize-playersizes"][i].id === id) { return ytcenter.settings["resize-playersizes"][i]; } } // default return { id: "default", config: { align: true, height: "", large: false, scrollToPlayer: false, scrollToPlayerButton: false, width: "" } }; }; ytcenter.player.resize = (function(){ var lastResizeId; ytcenter.player.resizeUpdater = function(){ if (!ytcenter.settings.enableResize) return; ytcenter.player.resize(ytcenter.player.getPlayerSize(lastResizeId)); ytcenter.player.updateResize_updateVisibility(); ytcenter.playersResize_updatePosition(); }; ytcenter.player.isSelectedPlayerSizeById = function(id){ if (!ytcenter.settings.enableResize) return; try { if (lastResizeId === id) return true; } catch (e) {} return false; }; var exports_timeout; return function(item){ if (!ytcenter.settings.enableResize) return; if (typeof item !== "undefined") lastResizeId = item.id; if (typeof lastResizeId === "undefined") return; uw.clearTimeout(exports_timeout); // Generate the player size name. var dim = ytcenter.utils.calculateDimensions(item.config.width, item.config.height); var sizeName = null; if (typeof item.config.customName !== "undefined" && item.config.customName !== "") { sizeName = item.config.customName; } else if (isNaN(parseInt(item.config.width)) && isNaN(parseInt(item.config.height))) { sizeName = (item.config.large ? ytcenter.language.getLocale("SETTINGS_RESIZE_LARGE") : ytcenter.language.getLocale("SETTINGS_RESIZE_SMALL")); } else { sizeName = dim[0] + "×" + dim[1]; } // Setting the data attributes to the html tag. document.documentElement.setAttribute("data-ytc-player-size-id", item.id); document.documentElement.setAttribute("data-ytc-player-size-name", sizeName); ytcenter.player._resize(item.config.width, item.config.height, item.config.large, item.config.align); ytcenter.player.updateResize_updateVisibility(); ytcenter.player.updateResize_updatePosition(); ytcenter.utils.each(ytcenter.player.resizeCallback, function(i, func){ func(); }); }; })(); ytcenter.player.ratio = 16/9; ytcenter.player.setRatio = function(ratio){ con.log("[Player Ratio] Player ratio set to " + ratio); ytcenter.player.ratio = ratio; }; ytcenter.player._resize = (function(){ var _width = ""; var _height = ""; var _large = true; var _align = true; var _playlist_toggled = false; var _playerHeight = 0; var player_ratio = 16/9; var playerBarHeight = 30; var playerBarHeightNone = 0; var playerBarHeightProgress = 3; var playerBarHeightBoth = 35; var maxInsidePlayerWidth = 1040; var minInsidePlayerWidth = 1003; var minSmallPlayer = 640; var maxWatchNonStageWidth0 = 1254; var maxWatchNonStageWidth1 = 1254; var maxWatchNonStageWidth2 = 1360; var maxWatchNonStageWidth3 = 1680; var maxWatchStageWidth0 = 1680; var maxWatchNonStagePlayerWidth0 = 854; var maxWatchNonStagePlayerWidth1 = 854; var maxWatchNonStagePlayerWidth2 = 960; var maxWatchNonStagePlayerWidth3 = 1280; var maxWatchStagePlayerWidth0 = 1280; ytcenter.player._updateResize = function(){ if (!ytcenter.settings.enableResize || ytcenter.getPage() !== "watch") return; ytcenter.player._resize(_width, _height, _large, _align); ytcenter.player.updateResize_updateVisibility(); ytcenter.player.updateResize_updatePosition(); }; ytcenter.player.getCurrentPlayerSize = function(){ return { width: _width, height: _height, large: _large, align: _align, playerHeight: _playerHeight }; }; ytcenter.events.addEvent("ui-refresh", function(){ if (!ytcenter.settings.enableResize) return; ytcenter.player._resize(_width, _height, _large, _align); }); ytcenter.events.addEvent("resize-update", function(){ if (!ytcenter.settings.enableResize) return; ytcenter.player._resize(_width, _height, _large, _align); }); ytcenter.utils.addEventListener(window, "resize", (function(){ var timer = null; return function(){ if (!ytcenter.settings.enableResize) return; if (timer !== null) uw.clearTimeout(timer); timer = uw.setTimeout(function(){ ytcenter.events.performEvent("resize-update"); }, 100); }; })(), false); return function(width, height, large, align){ if (!ytcenter.settings.enableResize) return; if (ytcenter.getPage() !== "watch") return; var innerWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var innerHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; var clientWidth = document.documentElement.clientWidth || window.innerWidth || document.body.clientWidth; var clientHeight = document.documentElement.clientHeight || window.innerHeight || document.body.clientHeight; var page = document.getElementById("page"); var player = document.getElementById("player-legacy") || document.getElementById("player"); if (ytcenter.settings.ytOnlyStageMode) { if (large) { ytcenter.utils.addClass(page, "watch-stage-mode"); ytcenter.utils.removeClass(page, "watch-non-stage-mode"); } else { ytcenter.utils.addClass(page, "watch-non-stage-mode"); ytcenter.utils.removeClass(page, "watch-stage-mode"); } } else { ytcenter.utils.removeClass(page, "watch-stage-mode watch-non-stage-mode"); } var isWatchNonStage101 = ytcenter.utils.hasClass(document.body, "appbar-flexwatch") && 1294 <= innerWidth && 680 <= innerHeight; var isWatchNonStage102 = ytcenter.utils.hasClass(document.body, "appbar-flexwatch-mini") && 1294 <= innerWidth && 630 <= innerHeight; var isWatchNonStage201 = ytcenter.utils.hasClass(document.body, "appbar-flexwatch-540") && 1400 <= innerWidth && 740 <= innerHeight; var isWatchNonStage202 = ytcenter.utils.hasClass(document.body, "appbar-flexwatch-540-mini") && 1400 <= innerWidth && 690 <= innerHeight; var isWatchNonStage301 = ytcenter.utils.hasClass(document.body, "appbar-flexwatch") && 1720 <= innerWidth && 920 <= innerHeight; var isWatchNonStage302 = ytcenter.utils.hasClass(document.body, "appbar-flexwatch-720-mini") && 1720 <= innerWidth && 920 <= innerHeight; var isWatchStage = ytcenter.utils.hasClass(page, "watch-stage-mode"); var isWatchNonStage = ytcenter.utils.hasClass(page, "watch-non-stage-mode"); var isWatchStage0 = 1320 <= innerWidth && 870 <= innerHeight && isWatchStage && large; var isWatchNonStage0 = 1294 <= innerWidth && 630 <= innerHeight && isWatchNonStage && !large; var isWatchNonStage1 = (isWatchNonStage101 || isWatchNonStage102) && isWatchNonStage && !large; var isWatchNonStage2 = (isWatchNonStage201 || isWatchNonStage202) && isWatchNonStage && !large; var isWatchNonStage3 = (isWatchNonStage301 || isWatchNonStage302) && isWatchNonStage && !large; width = width || ""; height = height || ""; if (typeof large !== "boolean") large = false; if (typeof align !== "boolean") align = false; _width = width; _height = height; _large = large; _align = align; if (ytcenter.player.darkside()) { ytcenter.utils.addClass(document.body, "ytcenter-player-darkside-bg"); } else { ytcenter.utils.removeClass(document.body, "ytcenter-player-darkside-bg"); } // Class Assignment var wc = document.getElementById("watch7-container"); if (wc) { if (large) { ytcenter.utils.addClass(wc, "watch-wide"); } else { ytcenter.utils.removeClass(wc, "watch-wide"); } } if (player) { if (large) { ytcenter.utils.addClass(player, "watch-medium"); if (!_playlist_toggled) { ytcenter.utils.addClass(player, "watch-playlist-collapsed"); } } else { ytcenter.utils.removeClass(player, "watch-medium"); if (ytcenter.utils.hasClass(player, "watch-playlist-collapsed")) { _playlist_toggled = false; } else { _playlist_toggled = true; } ytcenter.utils.removeClass(player, "watch-playlist-collapsed"); } } if (align) { ytcenter.utils.addClass(document.body, "ytcenter-resize-aligned"); ytcenter.utils.removeClass(document.body, "ytcenter-resize-disaligned"); } else { ytcenter.utils.removeClass(document.body, "ytcenter-resize-aligned"); ytcenter.utils.addClass(document.body, "ytcenter-resize-disaligned"); } // Settings the sizes for small and large. If width and height is undefined var stageSize = isNaN(parseInt(width)) && isNaN(parseInt(height)); if (stageSize) { if (isWatchStage0) { width = maxWatchStagePlayerWidth0 + "px"; } else if (isWatchNonStage3) { width = maxWatchNonStagePlayerWidth3 + "px"; } else if (isWatchNonStage2) { width = maxWatchNonStagePlayerWidth2 + "px"; } else if (isWatchNonStage1) { width = maxWatchNonStagePlayerWidth1 + "px"; } else if (isWatchNonStage0) { width = maxWatchNonStagePlayerWidth0 + "px"; } else { width = large ? "854px" : "640px"; } height = ""; } var pbh = 0; var _pbh = 0; var pbh_changed = false; var autohide = ytcenter.settings.autohide; if (ytcenter.html5) { if (ytcenter.player.ratio < 1.35 && autohide === "-1") { autohide = "3" } } else { if (ytcenter.player.config && ytcenter.player.config.args && (typeof ytcenter.player.config.args.autohide === "string" || typeof ytcenter.player.config.args.autohide === "number")) { autohide = ytcenter.player.config.args.autohide; } else { autohide = "3"; } } if (autohide === "0") { pbh = playerBarHeightBoth; _pbh = playerBarHeightBoth; } else if (autohide === "1") { pbh = playerBarHeightNone; _pbh = playerBarHeightNone; } else if (autohide === "2") { pbh = playerBarHeight; _pbh = playerBarHeight; } else if (autohide === "3") { pbh = playerBarHeightProgress; _pbh = playerBarHeightProgress; } else { pbh = playerBarHeight; _pbh = playerBarHeight; } var calcWidth, calcHeight, calcedWidth = false, calcedHeight = false; if (width.match(/%$/) && width.length > 1) { calcWidth = parseInt(width)/100*clientWidth; } else if (width.length > 1) { calcWidth = parseInt(width); } if (height.match(/%$/) && height.length > 1) { var mp = document.getElementById("masthead-positioner"); calcHeight = parseInt(height)/100*clientHeight; if (mp && !ytcenter.settings.staticHeader) { calcHeight -= mp.offsetHeight || mp.clientHeight; } pbh = 0; pbh_changed = true; } else if (height.length > 1) { calcHeight = parseInt(height); } if (!isNaN(calcWidth) && isNaN(calcHeight) && !calcedHeight) { calcedHeight = true; if (ytcenter.player.ratio !== 0) calcHeight = Math.round(calcWidth/ytcenter.player.ratio); else calcHeight = calcWidth; } else if (isNaN(calcWidth) && !isNaN(calcHeight) && !calcedWidth) { calcedWidth = true; if (height.indexOf("%") !== -1 && height.match(/%$/) && height !== "%") { calcWidth = Math.round((calcHeight - _pbh)*ytcenter.player.ratio); } else { calcWidth = Math.round(calcHeight*ytcenter.player.ratio); } } if (!isNaN(calcWidth) && align && large) { var ratio = calcWidth/calcHeight; var maxWidth = Math.min(calcWidth, maxInsidePlayerWidth); var minWidth = Math.min(calcWidth, minInsidePlayerWidth); if (clientWidth > maxWidth) { calcWidth = maxWidth; } else if (clientWidth < minWidth) { calcWidth = minWidth; } else { calcWidth = clientWidth; } if (!isNaN(calcHeight) && typeof calcHeight === "number") { if (ratio !== 0 && isFinite(ratio)) { calcHeight = Math.round(calcWidth/ratio); } } else { if (ytcenter.player.ratio !== 0) { calcHeight = Math.round(calcWidth/ytcenter.player.ratio); } else { calcHeight = calcWidth; } } } if (isNaN(calcWidth)) calcWidth = 0; if (isNaN(calcHeight)) calcHeight = 0; // Player Dimension var sidebar = document.getElementById("watch7-sidebar"), playerAPI = document.getElementById("player-api-legacy") || document.getElementById("player-api"), theaterBackground = document.getElementById("theater-background"), content = document.getElementById("watch7-main-container"), contentMain = document.getElementById("watch7-main"), playlist = document.getElementById("watch7-playlist-tray-container"), playerWidth = Math.round(calcWidth), playerHeight = Math.round(calcHeight + pbh), playlist_el = document.getElementById("playlist-legacy") || document.getElementById("playlist"); if (stageSize && (isWatchStage0 || isWatchNonStage3 || isWatchNonStage2 || isWatchNonStage1 || isWatchNonStage0)) { var maxWidth = minSmallPlayer; var minWidth = minSmallPlayer; if (isWatchStage0) { maxWidth = maxWatchStagePlayerWidth0; } else if (isWatchNonStage3) { maxWidth = maxWatchNonStagePlayerWidth3; } else if (isWatchNonStage2) { maxWidth = maxWatchNonStagePlayerWidth2; } else if (isWatchNonStage1) { maxWidth = maxWatchNonStagePlayerWidth1; } else if (isWatchNonStage0) { maxWidth = maxWatchNonStagePlayerWidth0; } if (clientWidth > maxWidth) { calcWidth = maxWidth; } else { calcWidth = minWidth; } if (ytcenter.player.ratio !== 0) { calcHeight = Math.round(calcWidth/ytcenter.player.ratio); } else { calcHeight = calcWidth; } } if (player && player.className && player.className.indexOf("watch-multicamera") !== -1 && !ytcenter.html5) { playerHeight = playerHeight + 80; } if (theaterBackground) { theaterBackground.style.height = playerHeight + "px"; } document.documentElement.setAttribute("data-ytc-player-size-width", width); // The width of the player as given by the player size document.documentElement.setAttribute("data-ytc-player-size-height", height); // The height of the player as given by the player size document.documentElement.setAttribute("data-ytc-player-size-calc-width", playerWidth); // The calculated width of the player in pixels. document.documentElement.setAttribute("data-ytc-player-size-calc-height", playerHeight); // The calculated height of the player in pixels. document.documentElement.setAttribute("data-ytc-player-size-large", large); // Whether the player is regarded as a large (or medium) sized player by YouTube. document.documentElement.setAttribute("data-ytc-player-size-aligned", align); // Whether the player should be aligned with the content element (description, comments, recommended videos and etc). /* Handle the YouTube player size classes (YouTube Center doesn't differentiate between watch-medium and watch-large as the difference is only the size of the player and that is handled by YouTube Center). */ ytcenter.utils.removeClass(player, "watch-small watch-medium watch-large"); if (player) { if (large) { ytcenter.utils.addClass(player, "watch-large"); player.style.marginTop = "10px"; } else { ytcenter.utils.addClass(player, "watch-small"); player.style.marginTop = ""; } } if (playlist_el) { playlist_el.style.width = (large ? (align && playerWidth < maxInsidePlayerWidth ? maxInsidePlayerWidth : playerWidth) : maxInsidePlayerWidth) + "px"; if (large) { playlist_el.style.width = "auto"; playlist_el.style.minWidth = "1003px"; playlist_el.style.maxWidth = "1040px"; } else { playlist_el.style.minWidth = ""; playlist_el.style.maxWidth = ""; } } if (player) { player.style.position = ""; player.style.left = ""; player.style.marginBottom = ""; if (playerAPI) { playerAPI.style.cssFloat = ""; } if (large && isWatchStage0 && stageSize) { player.style.width = "auto"; player.style.minWidth = minInsidePlayerWidth + "px"; player.style.maxWidth = maxWatchStageWidth0 + "px"; } else if (!large && stageSize) { player.style.width = "auto"; player.style.minWidth = minInsidePlayerWidth + "px"; if (isWatchNonStage3) { player.style.maxWidth = maxWatchNonStageWidth3 + "px"; } else if (isWatchNonStage2) { player.style.maxWidth = maxWatchNonStageWidth2 + "px"; } else if (isWatchNonStage1) { player.style.maxWidth = maxWatchNonStageWidth1 + "px"; } else if (isWatchNonStage0) { player.style.maxWidth = maxWatchNonStageWidth0 + "px"; } else { player.style.maxWidth = maxInsidePlayerWidth + "px"; } } else if (align) { player.style.maxWidth = maxInsidePlayerWidth + "px"; player.style.minWidth = minInsidePlayerWidth + "px"; player.style.width = "auto"; if (playerAPI) { playerAPI.style.cssFloat = "left"; } } else { player.style.maxWidth = ""; player.style.minWidth = ""; player.style.width = (large ? playerWidth + "px" : "auto"); } if (large) { player.style.setProperty("margin-bottom", "28px", "important"); } if (playerAPI) { playerAPI.style.width = playerWidth + "px"; playerAPI.style.height = playerHeight + "px"; _playerHeight = playerHeight; } } // Sidebar if (sidebar) { if (!large && !document.getElementById("watch7-playlist-data")) { var mt = calcHeight + pbh + (document.getElementById("watch7-creator-bar") ? 48 : 0); if (ytcenter.utils.hasClass(document.getElementById("watch7-container"), "watch-branded-banner") && !ytcenter.settings.removeBrandingBanner) mt += 70; sidebar.style.top = "-" + mt + "px"; } else { sidebar.style.top = ""; } } // Playlist if (playlist) { var playlistElement = document.getElementById("watch7-playlist-data"), playlistBar, __playlistWidth = Math.round(calcWidth), __playlistRealWidth = __playlistWidth*0.5; if (__playlistRealWidth < 275) __playlistRealWidth = 275; else if (__playlistRealWidth > 400) __playlistRealWidth = 400; playlist.style.width = (large ? __playlistRealWidth + "px" : "auto"); playlist.style.height = Math.round(calcHeight - (large ? (playerBarHeight - pbh) - 3 : -pbh)) + "px"; if (playlistElement) playlistBar = playlistElement.children[0]; if (playlistBar && playlistBar.children[0] && playlistBar.children[1]) { playlistBar.style.width = (large ? __playlistWidth : maxInsidePlayerWidth) + "px"; playlistBar.children[0].style.width = ((large ? __playlistWidth - __playlistRealWidth : __playlistWidth)) + "px"; playlistBar.children[1].style.width = (large ? "auto" : (maxInsidePlayerWidth - __playlistWidth) + "px"); } if (document.getElementById("playlist-tray") || document.getElementById("playlist-tray-legacy")) { (document.getElementById("playlist-tray") || document.getElementById("playlist-tray-legacy")).style.width = (large ? __playlistWidth : maxInsidePlayerWidth) + "px"; } playlist.style.right = "0"; playlist.style.left = "auto"; } // Player if (playerAPI) { if (width !== "" || height !== "") { playerAPI.style.width = Math.round(calcWidth) + "px"; playerAPI.style.height = Math.round(calcHeight + pbh + (player.className.indexOf("watch-multicamera") !== -1 && !ytcenter.html5 ? 80 : 0)) + "px"; _playerHeight = Math.round(calcHeight + pbh + (player.className.indexOf("watch-multicamera") !== -1 && !ytcenter.html5 ? 80 : 0)); } else { playerAPI.style.width = ""; playerAPI.style.height = ""; document.getElementById("playlist-tray").style.top = ""; } if (calcWidth > maxInsidePlayerWidth) { playerAPI.style.margin = ""; if (align) { playerAPI.style.marginLeft = ""; } else { var wvOffset = $GetOffset(player); var mLeft = Math.round(-(calcWidth - maxInsidePlayerWidth)/2); if (-mLeft > wvOffset[0]) mLeft = -wvOffset[0]; playerAPI.style.marginLeft = mLeft + "px"; } } else { playerAPI.style.marginLeft = ""; playerAPI.style.margin = ""; } if (width === "100%") { playerAPI.style.setProperty("margin-left", "0px", "important"); playerAPI.style.setProperty("margin-right", "0px", "important"); } else { playerAPI.style.marginLeft = ""; playerAPI.style.marginRight = ""; } } var playlistElement = document.getElementById("watch7-playlist-data"), playlistBar; if (playlistElement) playlistBar = playlistElement.children[0]; if (playlistBar && playlistBar.children[0] && playlistBar.children[1]) { playlistBar.style.width = (large ? __playlistWidth : maxInsidePlayerWidth) + "px"; playlistBar.children[0].style.width = ((large ? __playlistWidth - __playlistRealWidth : __playlistWidth)) + "px"; playlistBar.children[1].style.width = (large ? "auto" : (maxInsidePlayerWidth - __playlistWidth) + "px"); var playlistTrayContainer = document.getElementById("watch7-playlist-tray-container"); if (playlistTrayContainer) { var __h = Math.round(calcHeight - (large ? (playerBarHeight - pbh) - 3 : -pbh)); playlistTrayContainer.style.height = __h + "px"; var playlistTray = document.getElementById("watch7-playlist-tray"); if (playlistTray) { playlistTray.style.height = Math.round(__h - (large ? 0 : 27)) + "px"; } playlistTrayContainer.style.width = (large ? __playlistRealWidth : maxInsidePlayerWidth - __playlistWidth) + "px"; if (large) { playlistTrayContainer.style.left = (large ? __playlistWidth - __playlistRealWidth : __playlistWidth) + "px"; } else { playlistTrayContainer.style.left = ""; } var playlistTrayPositioning = document.getElementById("watch7-playlist-tray-positioning"); if (playlistTrayPositioning) { playlistTrayPositioning.style.width = __playlistWidth + "px"; if (align) { playlistTrayPositioning.style.margin = ""; } else { playlistTrayPositioning.style.margin = "0 auto"; } } } } if (!align || !large) { uw.setTimeout(function(){ var player = document.getElementById("player"); player.style.left = ""; }, 0); } }; })(); ytcenter.player.getFPSArray = function(streams){ var arr = []; for (var i = 0, len = streams.length; i < len; i++) { var localFPS = parseInt(streams[i].fps || "30", 10); if (!ytcenter.utils.inArray(arr, localFPS)) { arr.push(localFPS); } } return arr.sort(function(a, b){ return b - a; }); }; ytcenter.player.getHighestFPS = function(streams){ var fps = -1; for (var i = 0, len = streams.length; i < len; i++) { var localfps = parseInt(streams[i].fps || "30", 10); if (fps < localfps) { fps = localfps; } } return fps; }; ytcenter.player.getBestStream = function(streams, dash){ var i, stream = null, vqIndex = ytcenter.player.qualities.length - 1, _vq, _vqIndex, currFPS = -1; for (i = 0; i < streams.length; i++) { if ((dash === 1 && !streams[i].dash) || (dash === 0 && streams[i].dash)) continue; if (streams[i].dash && streams[i].size) { _vq = ytcenter.player.convertDimensionToQuality(streams[i].size); } else if (!streams[i].dash && streams[i].quality) { _vq = streams[i].quality; } var fps = parseInt(streams[i].fps || "30", 10); _vqIndex = $ArrayIndexOf(ytcenter.player.qualities, _vq); if (_vqIndex < vqIndex || (_vqIndex === vqIndex && currFPS < fps)) { stream = streams[i]; vqIndex = _vqIndex; currFPS = fps; } } if (!stream && dash !== -1) return ytcenter.player.getBestStream(streams, -1); return stream; }; ytcenter.player.getHighestStreamQuality = function(streams, dash){ var i, stream = streams[0], stream_dim, tmp_dim; if (!stream) return null; if (stream.dimension && stream.dimension.indexOf("x") !== -1) { stream_dim = stream.dimension.split("x"); stream_dim[0] = parseInt(stream_dim[0], 10); stream_dim[1] = parseInt(stream_dim[1], 10); } else if (stream.size && stream.size.indexOf("x") !== -1) { stream_dim = stream.size.split("x"); stream_dim[0] = parseInt(stream_dim[0], 10); stream_dim[1] = parseInt(stream_dim[1], 10); } else { stream_dim = [0, 0]; } for (i = 1; i < streams.length; i++) { if (!streams[i].dimension && !streams[i].size) continue; if (dash === 0) { if (stream.dash) { stream = streams[i]; continue; } if (streams[i].dash) continue; } else if (dash === 1) { if (!stream.dash) { stream = streams[i]; continue; } if (!streams[i].dash) continue; } if (streams[i].dimension && streams[i].dimension.indexOf("x") !== -1) { tmp_dim = streams[i].dimension.split("x"); tmp_dim[0] = parseInt(tmp_dim[0]); tmp_dim[1] = parseInt(tmp_dim[1]); if (stream_dim[1] < tmp_dim[1]) { stream_dim = tmp_dim; stream = streams[i]; } } else if (streams[i].size && streams[i].size.indexOf("x") !== -1) { tmp_dim = streams[i].size.split("x"); tmp_dim[0] = parseInt(tmp_dim[0]); tmp_dim[1] = parseInt(tmp_dim[1]); if (stream_dim[1] < tmp_dim[1]) { stream_dim = tmp_dim; stream = streams[i]; } } } return stream; }; ytcenter.player.getQualityByDimensionHTML5 = function(width, height) { var qualityList = ["auto", "highres", "hd1440", "hd1080", "hd720", "large", "medium", "small", "tiny"], tabel = { auto: [0, 0], tiny: [256, 144], light: [426, 240], small: [426, 240], medium: [640, 360], large: [854, 480], hd720: [1280, 720], hd1080: [1920, 1080], hd1440: [2560, 1440], highres: [3840, 2160] }, quality = "tiny", i, q; for (i = 2; i < qualityList.length; i++) { q = tabel[qualityList[i]]; if (width > q[0] && height >= q[1] || width >= q[0] && height > q[1]) { return qualityList[i - 1]; } } return quality } ytcenter.player.getQualityByDimension = function(width, height) { if (height > 1728 || width > 3072) { return "highres"; } if (height > 1152 || width > 2048) { return "hd1440"; } if (height > 720 || width > 1280) { return "hd1080"; } if (height > 480 || width > 854) { return "hd720"; } if (height > 360 || width > 640) { return "large"; } if (height > 240 || width > 427) { return "medium"; } if (height > 144 || width > 256) { return "small"; } return "tiny"; } ytcenter.player.convertDimensionToQuality = function(size){ if (!size) return "auto"; size = size.split("x"); return ytcenter.player.getQualityByDimension(size[0], size[1]); }; ytcenter.player.convertDimensionToQualityHTML5 = function(size){ if (!size) return "auto"; size = size.split("x"); return ytcenter.player.getQualityByDimensionHTML5(size[0], size[1]); }; ytcenter.player.qualities = ["highres", "hd1440", "hd1080", "hd720", "large", "medium", "small", "tiny", "auto"]; ytcenter.player.qualityDimensions = ["3840x2160", "2560x1440", "1920x1080", "1280x720", "854x480", "640x360", "640x360"]; ytcenter.player.getQualityDimension = function(vq){ if (vq === "auto") return null; var i = 0; for (i = 0; i < ytcenter.player.qualities.length; i++) { if (ytcenter.player.qualities[i] === vq) { return ytcenter.player.qualityDimensions[i]; } } return null; }; ytcenter.player.getQuality = function(vq, streams, dash){ var _vq = "auto", priority = ['auto', 'tiny', 'small', 'medium', 'large', 'hd720', 'hd1080', 'hd1440', 'highres'], a = document.createElement("video"), cpt = a && a.canPlayType, currentIndex = 0, quality, qualityIndex, preferedIndex; if (typeof streams === "undefined") return _vq; if (typeof dash === "undefined") { if (ytcenter.getPage() === "watch") { dash = ytcenter.settings.dashPlayback; } else if (ytcenter.getPage() === "embed") { dash = ytcenter.settings.embed_dashPlayback; } else if (ytcenter.getPage() === "channel") { dash = ytcenter.settings.channel_dashPlayback; } } if (ytcenter.html5 && !cpt) { con.log("[getQuality] The HTML5 player is not supported by this browser!"); return _vq; } for (var i = 0; i < streams.length; i++) { if (!streams[i]) continue; // This stream doesn't exist... if (ytcenter.html5 && !a.canPlayType(streams[i].type.split(";")[0]).replace(/no/, '')) continue; // Browser doesn't support this format if (dash && (!streams[i].dash || !streams[i].size)) continue; if (!dash && streams[i].dash) continue; if (dash) { if (ytcenter.html5) { quality = ytcenter.player.convertDimensionToQualityHTML5(streams[i].size); } else { quality = ytcenter.player.convertDimensionToQuality(streams[i].size); } } else { quality = streams[i].quality; } qualityIndex = $ArrayIndexOf(priority, quality); preferedIndex = $ArrayIndexOf(priority, vq); if (qualityIndex <= preferedIndex && qualityIndex > currentIndex) { _vq = quality; currentIndex = qualityIndex; } } con.log("[Player:getQuality] Most preferred available quality: " + _vq); return _vq; }; ytcenter.player.parseThumbnailStream = function(specs){ var parts = specs.split("|"), baseURL = parts[0], levels = [], i, a, b; for (i = 1; i < parts.length; i++) { a = parts[i].split("#"); b = { width: parseInt(a[0]), height: parseInt(a[1]), frames: parseInt(a[2]), columns: parseInt(a[3]), rows: parseInt(a[4]), interval: parseInt(a[5]), urlPattern: a[6], signature: a[7] }; b.numMosaics = Math.ceil(b.frames / (b.rows * b.columns)); b.getMosaic = (function(c){ return function(frame){ return Math.floor(frame/(c.rows*c.columns)); }; })(b); b.getURLS = (function(c, index){ return function(){ var arr = [], j; for (j = 0; j < c.numMosaics; j++) { arr.push(baseURL.replace("$L", index).replace("$N", c.urlPattern).replace("$M", j) + "?sigh=" + c.signature); } return arr; }; })(b, i - 1); b.getRect = (function(c){ return function(frame, maxDim){ if (frame < 0 || (c.frames && frame >= c.frames)) return null; var scale = 1, a = frame % (c.rows * c.columns), _x, x, _y, y, width = c.width - 2, height = c.height, iw, ih; if (maxDim && width > 0 && height > 0) { if (maxDim.width > 0 && maxDim.height > 0) scale = Math.min(maxDim.width/width, maxDim.height/height); else if (maxDim.width === 0) scale = maxDim.height/height; else if (maxDim.height === 0) scale = maxDim.width/width; } _x = (c.width * (a % c.columns)); x = _x*scale; _y = (c.height * Math.floor(a / c.rows)); y = _y*scale; width = width*scale, height = height*scale, iw = c.width*c.columns*scale ih = c.height*c.rows*scale; return { x: Math.round(x), y: Math.round(y), _x: Math.round(_x), _y: Math.round(_y), width: Math.round(width), height: Math.round(height), imageWidth: Math.round(iw), imageHeight: Math.round(ih) }; }; })(b); b.getURL = (function(c, index){ return function(frame){ return baseURL.replace("$L", index).replace("$N", c.urlPattern).replace("$M", c.getMosaic(frame)) + "?sigh=" + c.signature; }; })(b, i - 1); levels.push(b); } return { baseURL: baseURL, levels: levels }; }; ytcenter.player._original_update = undefined; ytcenter.player._appliedBefore = false; ytcenter.player._onPlayerLoadedBefore = false; ytcenter.player.setPlayerType = function(type){ function setType(api, type) { var playerType = null; if (api && typeof api.getPlayerType === "function" && (playerType = api.getPlayerType()) === type) { con.log("[Player:setPlayerType] Type is already " + type + "!"); return; } con.log("[Player:setPlayerType] Setting player type from " + playerType + " to " + type); if (api && typeof api.writePlayer === "function") { api.writePlayer(type); } } con.log("[Player:setPlayerType] Requesting player type change to " + type); try { if (type !== "html5" && type !== "flash") { con.error("[Player:setPlayerType] Invalid type: " + type); return; } if (ytcenter.player.isLiveStream()) { con.log("[Player:setPlayerType] Is disabled on live streams!"); return; } if (ytcenter.player.isOnDemandStream()) { con.log("[Player:setPlayerType] Is disabled on live streams!"); return; } var api = ytcenter.player.getAPI(); if (api) { setType(api, type); } else { var called = false; var cb = function(api){ if (!api || called) return; called = true; if (type === "flash") ytcenter.player.disableHTML5Tick(); setType(api, type); }; con.log("[Player:setPlayerType] API isn't ready!"); if (type === "flash") ytcenter.player.disableHTML5(); //ytcenter.utils.addClass(document.body, "ytcenter-disable-html5"); ytcenter.player.listeners.addEventListener("onReady", cb); } } catch (e) { con.error(e); } }; ytcenter.player.disableHTML5Tick = function(){ if (ytcenter.player.disableHTML5_timeout) { uw.clearTimeout(ytcenter.player.disableHTML5_timeout); ytcenter.player.disableHTML5_timeout = null; } ytcenter.utils.removeClass(document.body, "ytcenter-disable-html5"); }; ytcenter.player.disableHTML5_timeout = null; ytcenter.player.disableHTML5 = function(){ var a = document.getElementsByClassName("video-stream"); if (a.length > 0 && a[0]) //a[0].pause(); // Slower aproach, but will not throw errors (we want the faster method). a[0].src = ""; // this can cause YouTube to throw errors, but we're doing it anyway. ytcenter.utils.addClass(document.body, "ytcenter-disable-html5"); if (ytcenter.player.disableHTML5_timeout) { uw.clearTimeout(ytcenter.player.disableHTML5_timeout); ytcenter.player.disableHTML5_timeout = null; } ytcenter.player.disableHTML5_timeout = uw.setTimeout(function(){ ytcenter.utils.removeClass(document.body, "ytcenter-disable-html5"); }, 2000); }; ytcenter.player.updateFlashvars = function(player, config){ if (!config || !config.args || !player) return; var flashvars = "", key; for (key in config.args) { if (config.args.hasOwnProperty(key) && key !== "__exposedProps__") { if (flashvars !== "") flashvars += "&"; flashvars += encodeURIComponent(key) + "=" + encodeURIComponent(config.args[key]); } } player.setAttribute("flashvars", flashvars); }; ytcenter.player.isHTML5 = function(){ var movie_player = document.getElementById("movie_player"), cfg = ytcenter.player.getConfig(), api = ytcenter.player.getAPI(); var isHTML5 = (movie_player && movie_player.tagName === "DIV") || cfg.html5 || (api && api.getPlayerType && api.getPlayerType() === "html5"); return isHTML5; }; ytcenter.player.updated = false; ytcenter.player.update = function(config){ if (ytcenter.getPage() === "watch" && !config.args.url_encoded_fmt_stream_map && !config.args.adaptive_fmts && config.args.live_playback !== 1) { config = ytcenter.player.modifyConfig("watch", ytcenter.player.getRawPlayerConfig()); ytcenter.player.setConfig(config); } if (ytcenter.player.isHTML5() || ytcenter.player.updated) return; try { var player = document.getElementById("movie_player") || document.getElementById("player1"), clone; con.log("[Player Update] Checking if player exist!"); if ((player && player.tagName.toLowerCase() == "embed") || ytcenter.player._update_onYouTubeReady) { ytcenter.player.updated = false; ytcenter.player.updateFlashvars(player, config); if (ytcenter.getPage() === "watch") { if (ytcenter.settings.flashWMode !== "none") { player.setAttribute("wmode", ytcenter.settings.flashWMode); } } else if (ytcenter.getPage() === "embed") { if (ytcenter.settings.embed_flashWMode !== "none") { player.setAttribute("wmode", ytcenter.settings.embed_flashWMode); } } else if (ytcenter.getPage() === "channel") { if (ytcenter.settings.channel_flashWMode !== "none") { player.setAttribute("wmode", ytcenter.settings.channel_flashWMode); } } clone = player.cloneNode(true); clone.style.display = ""; player.style.display = "none"; player.src = ""; player.parentNode.replaceChild(clone, player); player = clone; con.log("[Player Update] Player has been cloned and replaced!"); } else { //uw.setTimeout(function(){ ytcenter.player.update(config); }, 100); } } catch (e) { con.error(e); } }; ytcenter.effects = {}; ytcenter.effects.playerGlow = (function(){ function inCorrectMode() { return (glowEffectOnPlayer === "both" || (ytcenter.player.isLightOff && glowEffectOnPlayer === "only-lights-off") || (!ytcenter.player.isLightOff && glowEffectOnPlayer === "only-without-lights-off")); } function playerStateChange(s) { state = s; if (state === 1 && enabled && inCorrectMode()) { stopPlaying(); onPlaying(); } else { stopPlaying(); } } function update() { var api = ytcenter.player.getAPI(); if (api && typeof api.getPlayerState === "function") { playerStateChange(api.getPlayerState()); } } function getPlayerAPIElement() { return document.getElementById("player-api"); } function getPlayerWrapperOverlay() { return document.getElementById("movie_player") || document.getElementById("player-api") || document.getElementById("player"); } function getPlayerWrapper() { return document.getElementById("player-api") || document.getElementById("player") || document.getElementById("movie_player"); } function getCorrectPlayerElement() { return ((glowEffectOnPlayer === "both" || glowEffectOnPlayer === "only-lights-off") ? playerElementOverlay : playerElement); } function onPlaying() { html5Player = ytcenter.utils.getHTML5Player(); playerElement = getPlayerWrapper(); playerElementOverlay = getPlayerWrapperOverlay(); correctPlayerElement = getCorrectPlayerElement(); playerAPIElement = getPlayerAPIElement(); if (playerAPIElement && (glowEffectOnPlayer === "both" || glowEffectOnPlayer === "only-lights-off")) { playerAPIElement.style.overflow = "visible"; } if (!container.parentNode) { playerAPIElement.appendChild(container); } con.log("[Player Glow] In correct mode? " + inCorrectMode()); /* We want to make sure that the html5 player exist */ if (html5Player && enabled && inCorrectMode()) { allowGlowUpdate = true; /* Let's get this running */ onRequestGlow(); } } function stopPlaying() { /* Remove the glow if the player was unstartet or ended (we don't need to do this if it's only paused) */ if (state < 1 || !inCorrectMode()) { if (!playerElement) playerElement = getPlayerWrapper(); // Make sure that the player wrapper is referenced so that the glow can be removed. if (!playerElementOverlay) playerElementOverlay = getPlayerWrapperOverlay(); // Make sure that the player wrapper is referenced so that the glow can be removed. if (!correctPlayerElement) correctPlayerElement = getCorrectPlayerElement(); if (!playerAPIElement) playerAPIElement = getPlayerAPIElement(); // Make sure that the player wrapper is referenced so that the glow can be removed. if (playerAPIElement && (glowEffectOnPlayer === "both" || glowEffectOnPlayer === "only-lights-off")) { playerAPIElement.style.overflow = ""; } removeMultiGlow(); removeGlow(); } else if (state === 1) { if (!playerElement) playerElement = getPlayerWrapper(); // Make sure that the player wrapper is referenced so that the glow can be removed. if (!playerElementOverlay) playerElementOverlay = getPlayerWrapperOverlay(); // Make sure that the player wrapper is referenced so that the glow can be removed. if (!correctPlayerElement) correctPlayerElement = getCorrectPlayerElement(); if (!playerAPIElement) playerAPIElement = getPlayerAPIElement(); // Make sure that the player wrapper is referenced so that the glow can be removed. if (playerAPIElement && (glowEffectOnPlayer === "both" || glowEffectOnPlayer === "only-lights-off")) { playerAPIElement.style.overflow = ""; } removeMultiGlow(); removeGlow(); } /* We don't need the references */ html5Player = null; playerElement = null; playerElementOverlay = null; correctPlayerElement = null; playerAPIElement = null; if (timeoutId) { uw.clearTimeout(timeoutId); timeoutId = null; } if (requestFrameId) { cancelFrame(requestFrameId); requestFrameId = null; } allowGlowUpdate = false; } function onRequestGlow(now) { if (state !== 1) return; var w = widthF; var h = heightF; /* Resize the canvas to the video */ width = html5Player.clientWidth || html5Player.offsetWidth; height = html5Player.clientHeight || html5Player.offsetHeight; container.style.width = width + "px"; container.style.height = height + "px"; /* Factor the size down of the canvas to increase the performance */ widthF = canvas.width = width*factor; heightF = canvas.height = height*factor; if (widthF === 0 || heightF === 0) return; /* Calculate the amount of pixels used */ if (w !== widthF || h !== heightF) { totalPixels = widthF*heightF; pixelCount = Math.floor(totalPixels/pixelInterval); clearGlowCache(); } /* Handle the delta time */ now = now || ytcenter.utils.now(); lastTimestamp = lastTimestamp || now; var dt = (now - lastTimestamp)/1000; lastTimestamp = now; if (multiglow) { removeGlow(); var blocks = calculateBlocks(width, height); /* Draw the video frame onto the canvas */ drawVideoOnCanvas(); /* Get the frame data (Unescapable bottleneck) */ var imageData = ctx.getImageData(0, 0, widthF, heightF); /* Get the data reference */ var data = imageData.data; for (var i = 0, len = blocks.length; i < len; i++) { applyGlowOnBlock(i, blocks[i], data, blur, spread, opacity); } } else { removeMultiGlow(); /* We want the average color */ color = getAverageColor(dt, color); /* Apply the new rgb values to the glow */ applyGlow(color, blur, spread, opacity); } if (allowGlowUpdate) { /* We really want to run this again to change the color of the glow for the next frame */ if (interval >= 0) { timeoutId = uw.setTimeout(onRequestGlow, interval); } else { requestFrameId = reqFrame(onRequestGlow); } } } function clearGlowCache() { blockCache = []; for (var i = 0, len = blockGlowCache.length; i < len; i++) { if (blockGlowCache[i].parentNode) { blockGlowCache[i].parentNode.removeChild(blockGlowCache[i]); } } blockGlowCache = []; } function drawVideoOnCanvas() { /* Write video data to canvas */ ctx.drawImage(html5Player, 0, 0, widthF, heightF); } function calculateBlock(x, y, width, height) { if (blockCache[x] && blockCache[x][y]) { return blockCache[x][y]; } var block = []; for (var i = 0, len = width*height; i < len; i++) { block.push([x + i%width, y + Math.floor(i/width)]); } if (!blockCache[x]) blockCache[x] = []; blockCache[x][y] = block; return block; } function calculateBlocks() { var blocks = []; var corners = depth/blockInterval; corners = 0; /* Top */ for (var i = 0, len = width/blockInterval - corners; i < len; i++) { var pos = { x: i*blockInterval, y: 0, width: blockInterval, height: depth }; if (pos.x + pos.width > width) { pos.width = width - pos.x; } pos.xF = Math.floor(pos.x*factor); pos.yF = Math.floor(pos.y*factor); pos.widthF = Math.floor(pos.width*factor); pos.heightF = Math.floor(pos.height*factor); pos.data = calculateBlock(pos.xF, pos.yF, pos.widthF, pos.heightF); blocks.push(pos); } /* Bottom */ for (var i = corners, len = width/blockInterval; i < len; i++) { var pos = { x: i*blockInterval, y: height - depth, width: blockInterval, height: depth }; if (pos.x + pos.width > width) { pos.width = width - pos.x; } pos.xF = Math.floor(pos.x*factor); pos.yF = Math.floor(pos.y*factor); pos.widthF = Math.floor(pos.width*factor); pos.heightF = Math.floor(pos.height*factor); pos.data = calculateBlock(pos.xF, pos.yF, pos.widthF, pos.heightF); blocks.push(pos); } /* Left */ for (var i = corners, len = height/blockInterval; i < len; i++) { var pos = { x: 0, y: i*blockInterval, width: depth, height: blockInterval }; if (pos.y + pos.height > height) { pos.height = height - pos.y; } pos.xF = Math.floor(pos.x*factor); pos.yF = Math.floor(pos.y*factor); pos.widthF = Math.floor(pos.width*factor); pos.heightF = Math.floor(pos.height*factor); pos.data = calculateBlock(pos.xF, pos.yF, pos.widthF, pos.heightF); blocks.push(pos); } /* Right */ for (var i = 0, len = height/blockInterval - corners; i < len; i++) { var pos = { x: width - depth, y: i*blockInterval, width: depth, height: blockInterval }; if (pos.y + pos.height > height) { pos.height = height - pos.y; } pos.xF = Math.floor(pos.x*factor); pos.yF = Math.floor(pos.y*factor); pos.widthF = Math.floor(pos.width*factor); pos.heightF = Math.floor(pos.height*factor); pos.data = calculateBlock(pos.xF, pos.yF, pos.widthF, pos.heightF); blocks.push(pos); } return blocks; } function getAverageColorForBlock(pixels, data) { var minx = -1; var miny = -1; var maxx = -1; var maxy = -1; for (var i = 0, len = pixels.length; i < len; i++) { if (pixels[i][0] < minx || minx === -1) { minx = pixels[i][0]; } if (pixels[i][0] > maxx || maxx === -1) { maxx = pixels[i][0]; } if (pixels[i][1] < miny || miny === -1) { miny = pixels[i][1]; } if (pixels[i][1] > maxy || maxy === -1) { maxy = pixels[i][1]; } } /* Prepare variables for the loop */ var r = 0, g = 0, b = 0, idx, i = pixels.length - 1; var pixelCount = Math.floor(pixels.length/pixelInterval); /* Loop through every pixel */ while (i > 0) { idx = Math.floor(pixels[i][0] + pixels[i][1]*widthF) << 2; r += data[idx]; g += data[idx + 1]; b += data[idx + 2]; i -= pixelInterval; } /* We are dividing by a variable that could be 0 */ if (pixelCount > 0) { /* Average the color */ r = Math.floor(r/pixelCount); g = Math.floor(g/pixelCount); b = Math.floor(b/pixelCount); } /* Make sure that the rgb color doesn't go under 0 or over 255 */ if (r < 0) r = 0; if (r > 255) r = 255; if (g < 0) g = 0; if (g > 255) g = 255; if (b < 0) b = 0; if (b > 255) b = 255; return { r: r, g: g, b: b }; } function getAverageColor(dt, lastColor) { drawVideoOnCanvas(); /* Get the frame data (Unescapable bottleneck) */ var imageData = ctx.getImageData(0, 0, widthF, heightF); /* Get the data reference */ var data = imageData.data; /* Prepare variables for the loop */ var i, r = 0, g = 0, b = 0; /* Loop through every pixel */ for (i = 0; i < totalPixels; i += pixelInterval) { idx = i << 2; r += data[idx]; g += data[idx + 1]; b += data[idx + 2]; } /* We are dividing by a variable that could be 0 */ if (pixelCount > 0) { /* Average the color */ r = Math.floor(r/pixelCount); g = Math.floor(g/pixelCount); b = Math.floor(b/pixelCount); } if (lastColor && transition > 0) { /* Make sure that it can't transition past the destination */ var dest = Math.min(dt/transition, 1); /* Transition from color to another */ r = lastColor.r + (r - lastColor.r)*dest; g = lastColor.g + (g - lastColor.g)*dest; b = lastColor.b + (b - lastColor.b)*dest; } /* Make sure that the rgb color doesn't go under 0 or over 255 */ if (r < 0) r = 0; if (r > 255) r = 255; if (g < 0) g = 0; if (g > 255) g = 255; if (b < 0) b = 0; if (b > 255) b = 255; return { r: r, g: g, b: b }; } function applyGlowOnBlock(i, block, data, blur, radius, opacity) { var color = getAverageColorForBlock(block.data, data); var el; if (blockGlowCache[i]) { el = blockGlowCache[i]; } else { el = document.createElement("div"); el.className = "gpu"; el.style.position = "absolute"; el.style.top = block.y + "px"; el.style.left = block.x + "px"; el.style.width = block.width + "px"; el.style.height = block.height + "px"; el.style.zIndex = (i%2 ? "52" : "53"); container.appendChild(el); blockGlowCache[i] = el; } var value = "0px 0px " + blur + "px " + radius + "px rgba(" + Math.floor(color.r) + ", " + Math.floor(color.g) + ", " + Math.floor(color.b) + ", " + opacity + ")"; el.style.setProperty("-webkit-box-shadow", value); el.style.setProperty("-moz-box-shadow", value); el.style.setProperty("box-shadow", value); } function applyGlow(color, blur, radius, opacity) { var value = "0px 0px " + blur + "px " + radius + "px rgba(" + Math.floor(color.r) + ", " + Math.floor(color.g) + ", " + Math.floor(color.b) + ", " + opacity + ")"; correctPlayerElement.style.setProperty("-webkit-box-shadow", value); correctPlayerElement.style.setProperty("-moz-box-shadow", value); correctPlayerElement.style.setProperty("box-shadow", value); } function removeGlow(){ playerElement.style.setProperty("-webkit-box-shadow", ""); playerElement.style.setProperty("-moz-box-shadow", ""); playerElement.style.setProperty("box-shadow", ""); playerElementOverlay.style.setProperty("-webkit-box-shadow", ""); playerElementOverlay.style.setProperty("-moz-box-shadow", ""); playerElementOverlay.style.setProperty("box-shadow", ""); } function removeMultiGlow() { if (container.parentNode) { container.parentNode.removeChild(container); } } function setEnabled(e) { enabled = !!e; update(); } function setOption(key, value) { switch (key) { case "pixelInterval": pixelInterval = value; if (pixelInterval <= 0) pixelInterval = 1; totalPixels = width * height; pixelCount = Math.floor(totalPixels/pixelInterval); break; case "interval": interval = value; break; case "transition": transition = value; break; case "blur": blur = value; break; case "spread": spread = value; break; case "opacity": opacity = value; break; case "glowEffectOnPlayer": glowEffectOnPlayer = value; break; case "multiglow": multiglow = value; break; case "depth": depth = value; break; case "blockInterval": blockInterval = value; break; case "factor": factor = value/100; break; } update(); } var reqFrame = uw.requestAnimationFrame || uw.mozRequestAnimationFrame || uw.webkitRequestAnimationFrame || uw.msRequestAnimationFrame; var cancelFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame; var timeoutId = null; var requestFrameId = null; var enabled = false; var width, height; var factor = 0.5; var widthF, heightF; // Factored var state = -1; var canvas = document.createElement("canvas"); var ctx = canvas.getContext("2d"); ctx.webkitImageSmoothingEnabled = false; ctx.mozImageSmoothingEnabled = false; ctx.msImageSmoothingEnabled = false; ctx.oImageSmoothingEnabled = false; ctx.imageSmoothingEnabled = false; var pixelCount = null; var totalPixels = null; var blockGlowCache = []; var blockCache = []; var container = document.createElement("div"); container.style.position = "absolute"; container.style.top = "0"; container.style.left = "0"; var html5Player = null; var playerElement = null; var playerElementOverlay = null; var correctPlayerElement = null; var playerAPIElement = null; var color = null; var lastTimestamp = null; /* Options */ var pixelInterval = 100000; /* Iterate every nth pixel instead of every single pixel */ var interval = -1; /* If interval is -1 it will use requestAnimationFrame instead of setTimeout */ var transition = 0; /* The transition time in seconds */ var blur = 15; var spread = 5; var opacity = .75; var glowEffectOnPlayer = "both"; var multiglow = true; var depth = 10; var blockInterval = 40; var allowGlowUpdate = false; ytcenter.player.listeners.addEventListener("onStateChange", playerStateChange); return { setEnabled: setEnabled, setOption: setOption, update: update }; })(); ytcenter.parseStreams = function(playerConfig){ if (playerConfig.url_encoded_fmt_stream_map === "") return []; var parser1 = function(f){ var a, r = []; try { var a = f.split(","); for (var i = 0; i < a.length; i++) { var b = a[i].split("/"); var itag = b.shift(); var dimension = b.shift(); var minMajorFlashVersion = b.shift(); var minMinorFlashVersion = b.shift(); var revisionVersion = b.shift(); r.push({ itag: itag, dimension: dimension, flashVersion: { minMajor: minMajorFlashVersion, minMinor: minMinorFlashVersion, revision: revisionVersion } }); } } catch (e) { con.error("[parseStreams] Error =>"); con.error(e); } return r; }; var parser2 = function(u){ var a, b = []; try { a = u.split(","); for (var i = 0; i < a.length; i++) { var c = {}; var d = a[i].split("&"); for (var j = 0; j < d.length; j++) { var e = d[j].split("="); c[e[0]] = unescape(e[1]); if (e[0] === "type") c[e[0]] = c[e[0]].replace(/\+/g, " "); } b.push(c); } } catch (e) { con.error("[parseStreams] Error =>"); con.error(e); } return b; }; var parser3 = function(u){ if (!u) return []; var a = u.split(","); var b = []; for (var i = 0; i < a.length; i++) { var c = {}; var d = a[i].split("&"); for (var j = 0; j < d.length; j++) { var e = d[j].split("="); c[e[0]] = unescape(e[1]); if (e[0] === "type") c[e[0]] = c[e[0]].replace(/\+/g, " "); } b.push(c); } return b; }; var fmt = parser1(playerConfig.fmt_list); var streams = parser2(playerConfig.url_encoded_fmt_stream_map); var adaptive_fmts = parser3(playerConfig.adaptive_fmts); var a = [], i; for (i = 0; i < streams.length; i++) { var fl = null; for (var j = 0; j < fmt.length; j++) { if (streams[i].itag !== fmt[j].itag) continue; fl = fmt[j]; break; } streams[i].dash = false; if (fl == null) { a.push(streams[i]); } else { var coll = streams[i]; coll.dimension = fl.dimension; coll.flashVersion = fl.flashVersion; a.push(coll); } } for (i = 0; i < adaptive_fmts.length; i++) { adaptive_fmts[i].dash = true; a.push(adaptive_fmts[i]); } return a; }; ytcenter.classManagement = {}; ytcenter.classManagement.applyClassesExceptElement = function(el, url){ if (ytcenter.page === "embed") return; if (url) url = ytcenter.utils.getURL(url); else url = loc; var i; for (i = 0; i < ytcenter.classManagement.db.length; i++) { if (ytcenter.classManagement.db[i].element() && ytcenter.classManagement.db[i].element() !== el) { if (ytcenter.classManagement.db[i].condition(url)) ytcenter.utils.addClass(ytcenter.classManagement.db[i].element(), ytcenter.classManagement.db[i].className); else ytcenter.utils.removeClass(ytcenter.classManagement.db[i].element(), ytcenter.classManagement.db[i].className); } else if (!ytcenter.classManagement.db[i].element()) { //con.warn("[Element Class Management] Element does not exist!", ytcenter.classManagement.db[i]); } } }; ytcenter.classManagement.applyClassesForElement = function(el, url){ var i, elm; if (ytcenter.page === "embed") return; if (url) url = ytcenter.utils.getURL(url); else url = loc; for (i = 0; i < ytcenter.classManagement.db.length; i++) { elm = ytcenter.classManagement.db[i].element(); if (elm === el) { if (ytcenter.classManagement.db[i].condition(url)) { ytcenter.utils.addClass(elm, ytcenter.classManagement.db[i].className); } else { ytcenter.utils.removeClass(elm, ytcenter.classManagement.db[i].className); } } } }; ytcenter.classManagement.applyClasses = function(url){ if (ytcenter.page === "embed") return; if (url) url = ytcenter.utils.getURL(url); else url = loc; var i; for (i = 0; i < ytcenter.classManagement.db.length; i++) { if (ytcenter.classManagement.db[i].element()) { if (ytcenter.classManagement.db[i].condition(url)) ytcenter.utils.addClass(ytcenter.classManagement.db[i].element(), ytcenter.classManagement.db[i].className); else ytcenter.utils.removeClass(ytcenter.classManagement.db[i].element(), ytcenter.classManagement.db[i].className); } else { //con.warn("[Element Class Management] Element does not exist!", ytcenter.classManagement.db[i]); } } }; ytcenter.classManagement.getClassesForElementById = function(id, url){ if (ytcenter.page === "embed") return; if (url) url = ytcenter.utils.getURL(url); else url = loc; var i, a = []; for (i = 0; i < ytcenter.classManagement.db.length; i++) { if (ytcenter.classManagement.db[i].element()) { if (ytcenter.classManagement.db[i].element().getAttribute("id") === id && ytcenter.classManagement.db[i].condition(url)) a.push(ytcenter.classManagement.db[i].className); } else { //con.warn("[Element Class Management] Element does not exist!", ytcenter.classManagement.db[i]); } } return a.join(" "); }; ytcenter.classManagement.getClassesForElementByTagName = function(tagname, url){ if (ytcenter.page === "embed") return; if (url) url = ytcenter.utils.getURL(url); else url = loc; var i, a = []; for (i = 0; i < ytcenter.classManagement.db.length; i++) { if (ytcenter.classManagement.db[i].element()) { if (ytcenter.classManagement.db[i].element().tagName === tagname && ytcenter.classManagement.db[i].condition(url)) a.push(ytcenter.classManagement.db[i].className); } else { //con.warn("[Element Class Management] Element does not exist!", ytcenter.classManagement.db[i]); } } return a.join(" "); }; ytcenter.classManagement.updateClassesByGroup = function(groups, url) { function isGroup(a, b) { var i, j; if (a.length === 1 && b.length === 1) { return a[0] === b[0]; } else if (a.length === 1 && b.length > 1) { for (i = 0; i < b.length; i++) { if (a[0] === b[i]) { return true; } } } else if (a.length > 1 && b.length === 1) { for (i = 0; i < a.length; i++) { if (a[i] === b[0]) { return true; } } } else if (a.length > 1 && b.length > 1) { for (i = 0; i < a.length; i++) { for (j = 0; j < b.length; j++) { if (a[i] === b[j]) { return true; } } } } return false; } var i, j, k, elm = null; if (ytcenter.page === "embed") return; url = url || ytcenter.utils.getURL(url); if (!ytcenter.utils.isArray(groups)) { groups = [groups]; } for (i = 0; i < ytcenter.classManagement.db.length; i++) { if (isGroup(groups, ytcenter.classManagement.db[i].groups)) { elm = ytcenter.classManagement.db[i].element(); if (elm) { if (ytcenter.classManagement.db[i].condition(url)) { ytcenter.utils.addClass(elm, ytcenter.classManagement.db[i].className); } else { ytcenter.utils.removeClass(elm, ytcenter.classManagement.db[i].className); } } } } }; ytcenter.classManagement.db = [ {element: function(){return document.getElementById("page");}, className: "watch-stage-mode", condition: function(){return false;}, groups: ["init", "page", "page-center"]}, // We have our own theatre mode {element: function(){return document.getElementById("player");}, className: "", condition: function(loc){ if (ytcenter.settings.removeBrandingBackground) { var p = document.getElementById("player"); p.style.backgroundImage = ""; p.style.backgroundColor = ""; } return false; }, groups: ["player-branding"]}, {element: function(){return document.getElementById("page");}, className: "", condition: function(loc){ document.getElementById("page").style.setProperty("padding-left", ""); }, groups: ["page-center", "page"]}, {element: function(){return document.body;}, className: "white", condition: function(loc){ var p = ytcenter.getPage(); if (p === "watch") { return ytcenter.html5 && ytcenter.settings.playerColor === "white"; } else if (p === "embed") { return ytcenter.html5 && ytcenter.settings.embed_playerColor === "white"; } else if (p === "channel") { return ytcenter.html5 && ytcenter.settings.channel_playerColor === "white"; } return false; }, groups: ["player-color"]}, {element: function(){return document.getElementById("watch-like");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.likeButtonColor); ytcenter.utils.tintImage(ytcenter.icon.likebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-likebutton-color", "#watch-like:not(.yt-uix-button-toggled) .yt-uix-button-icon-watch-like { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-like:not(.yt-uix-button-toggled) .yt-uix-button-content { color: " + ytcenter.settings.likeButtonColor + "!important; }"); }); }, groups: ["likebuttoncolor", "page"]}, {element: function(){return document.getElementById("watch-dislike");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.dislikeButtonColor); ytcenter.utils.tintImage(ytcenter.icon.dislikebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-dislikebutton-color", "#watch-dislike:not(.yt-uix-button-toggled) .yt-uix-button-icon-watch-dislike { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-dislike:not(.yt-uix-button-toggled) .yt-uix-button-content { color: " + ytcenter.settings.dislikeButtonColor + "!important; }"); }); }, groups: ["dislikebuttoncolor", "page"]}, {element: function(){return document.getElementById("watch-like");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.likeButtonHoverColor); ytcenter.utils.tintImage(ytcenter.icon.likebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-likebutton-hover-color", "#watch-like:not(.yt-uix-button-toggled):hover .yt-uix-button-icon-watch-like { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-like:not(.yt-uix-button-toggled):hover .yt-uix-button-content { color: " + ytcenter.settings.likeButtonHoverColor + "!important; }"); }); }, groups: ["likebuttonhovercolor", "page"]}, {element: function(){return document.getElementById("watch-dislike");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.dislikeButtonHoverColor); ytcenter.utils.tintImage(ytcenter.icon.dislikebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-dislikebutton-hover-color", "#watch-dislike:not(.yt-uix-button-toggled):hover .yt-uix-button-icon-watch-dislike { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-dislike:not(.yt-uix-button-toggled):hover .yt-uix-button-content { color: " + ytcenter.settings.dislikeButtonHoverColor + "!important; }"); }); }, groups: ["dislikebuttonhovercolor", "page"]}, {element: function(){return document.getElementById("watch-like");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.likedButtonColor); ytcenter.utils.tintImage(ytcenter.icon.likebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-likedbutton-color", "#watch-like.yt-uix-button-toggled .yt-uix-button-icon-watch-like { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-like.yt-uix-button-toggled .yt-uix-button-content { color: " + ytcenter.settings.likedButtonColor + "!important; }"); }); }, groups: ["likedbuttoncolor", "page"]}, {element: function(){return document.getElementById("watch-dislike");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.dislikedButtonColor); ytcenter.utils.tintImage(ytcenter.icon.dislikebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-dislikedbutton-color", "#watch-dislike.yt-uix-button-toggled .yt-uix-button-icon-watch-dislike { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-dislike.yt-uix-button-toggled .yt-uix-button-content { color: " + ytcenter.settings.dislikedButtonColor + "!important; }"); }); }, groups: ["dislikedbuttoncolor", "page"]}, {element: function(){return document.getElementById("watch-like");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.likedButtonHoverColor); ytcenter.utils.tintImage(ytcenter.icon.likebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-likedbutton-hover-color", "#watch-like.yt-uix-button-toggled:hover .yt-uix-button-icon-watch-like { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-like.yt-uix-button-toggled:hover .yt-uix-button-content { color: " + ytcenter.settings.likedButtonHoverColor + "!important; }"); }); }, groups: ["likedbuttonhovercolor", "page"]}, {element: function(){return document.getElementById("watch-dislike");}, className: "", condition: function(loc){ var color = ytcenter.utils.hexToColor(ytcenter.settings.dislikedButtonHoverColor); ytcenter.utils.tintImage(ytcenter.icon.dislikebuttonicon, { r: color.red, g: color.green, b: color.blue, a: 1 }, function(canvas){ ytcenter.utils.setCustomCSS("ytcenter-dislikedbutton-hover-color", "#watch-dislike.yt-uix-button-toggled:hover .yt-uix-button-icon-watch-dislike { background: url(" + canvas.toDataURL("image/png") + ") no-repeat!important; } #watch-dislike.yt-uix-button-toggled:hover .yt-uix-button-content { color: " + ytcenter.settings.dislikedButtonHoverColor + "!important; }"); }); }, groups: ["dislikedbuttonhovercolor", "page"]}, {element: function(){return document.getElementById("watch-like");}, className: "", condition: function(loc){ var opacity = ytcenter.settings.likeButtonOpacity; var opacityHover = ytcenter.settings.likeButtonHoverOpacity; var filter = "none"; var filterHover = "none"; if (opacity < 100 && opacity >= 0) { filter = "alpha(opacity=" + opacity + ")"; } if (opacityHover < 100 && opacityHover >= 0) { filterHover = "alpha(opacity=" + opacityHover + ")"; } ytcenter.utils.setCustomCSS("ytcenter-likebutton-opacity", "#watch-like:not(.yt-uix-button-toggled) { opacity: " + (opacity/100) + "; filter: " + filter + "; }"); ytcenter.utils.setCustomCSS("ytcenter-likebutton-hover-opacity", "#watch-like:not(.yt-uix-button-toggled):hover { opacity: " + (opacityHover/100) + "; filter: " + filterHover + "; }"); }, groups: ["likebuttonopacity", "page"]}, {element: function(){return document.getElementById("watch-dislike");}, className: "", condition: function(loc){ var opacity = ytcenter.settings.dislikeButtonOpacity; var opacityHover = ytcenter.settings.dislikeButtonHoverOpacity; var filter = "none"; var filterHover = "none"; if (opacity < 100 && opacity >= 0) { filter = "alpha(opacity=" + opacity + ")"; } if (opacityHover < 100 && opacityHover >= 0) { filterHover = "alpha(opacity=" + opacityHover + ")"; } ytcenter.utils.setCustomCSS("ytcenter-dislikebutton-opacity", "#watch-dislike:not(.yt-uix-button-toggled) { opacity: " + (opacity/100) + "; filter: " + filter + "; }"); ytcenter.utils.setCustomCSS("ytcenter-dislikebutton-hover-opacity", "#watch-dislike:not(.yt-uix-button-toggled):hover { opacity: " + (opacityHover/100) + "; filter: " + filterHover + "; }"); }, groups: ["dislikebuttonopacity", "page"]}, {element: function(){return document.getElementById("watch-like");}, className: "", condition: function(loc){ var opacity = ytcenter.settings.likedButtonOpacity; var opacityHover = ytcenter.settings.likedButtonHoverOpacity; var filter = "none"; var filterHover = "none"; if (opacity < 100 && opacity >= 0) { filter = "alpha(opacity=" + opacity + ")"; } if (opacityHover < 100 && opacityHover >= 0) { filterHover = "alpha(opacity=" + opacityHover + ")"; } ytcenter.utils.setCustomCSS("ytcenter-likebutton-opacity", "#watch-like:.yt-uix-button-toggled { opacity: " + (opacity/100) + "; filter: " + filter + "; }"); ytcenter.utils.setCustomCSS("ytcenter-likebutton-hover-opacity", "#watch-like:.yt-uix-button-toggled:hover { opacity: " + (opacityHover/100) + "; filter: " + filterHover + "; }"); }, groups: ["likedbuttonopacity", "page"]}, {element: function(){return document.getElementById("watch-dislike");}, className: "", condition: function(loc){ var opacity = ytcenter.settings.dislikedButtonOpacity; var opacityHover = ytcenter.settings.dislikedButtonHoverOpacity; var filter = "none"; var filterHover = "none"; if (opacity < 100 && opacity >= 0) { filter = "alpha(opacity=" + opacity + ")"; } if (opacityHover < 100 && opacityHover >= 0) { filterHover = "alpha(opacity=" + opacityHover + ")"; } ytcenter.utils.setCustomCSS("ytcenter-dislikebutton-opacity", "#watch-dislike.yt-uix-button-toggled { opacity: " + (opacity/100) + "; filter: " + filter + "; }"); ytcenter.utils.setCustomCSS("ytcenter-dislikebutton-hover-opacity", "#watch-dislike.yt-uix-button-toggled:hover { opacity: " + (opacityHover/100) + "; filter: " + filterHover + "; }"); }, groups: ["dislikedbuttonopacity", "page"]}, {element: function(){return document.body;}, className: "ytcenter-player-darkside-bg", condition: function(loc){ return ytcenter.player.darkside(); }, groups: ["darkside", "page"]}, {groups: ["hide-recommended-channels"], element: function(){return document.body;}, className: "ytcenter-hide-recommended-channels", condition: function(loc){return ytcenter.settings.hideRecommendedChannels;}}, {groups: ["hide-feed-item-action-menu"], element: function(){return document.body;}, className: "ytcenter-hide-feed-item-action-menu", condition: function(loc){return ytcenter.settings.disableFeedItemActionMenu;}}, {groups: ["hide-guide-count"], element: function(){return document.body;}, className: "ytcenter-hide-guide-count", condition: function(loc){return ytcenter.settings.disableGuideCount;}}, {groups: ["darkside"], element: function(){return document.body;}, className: "ytcenter-player-darkside-bg-retro", condition: function(loc){return (ytcenter.getPage() === "watch" && ytcenter.player.getCurrentPlayerSize().large && ytcenter.settings.playerDarkSideBG && ytcenter.settings.playerDarkSideBGRetro);}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-pos-topleft", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterPosition === "topleft";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-pos-topright", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterPosition === "topright";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-pos-bottomleft", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterPosition === "bottomleft";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-pos-bottomright", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterPosition === "bottomright";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-visible-always", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterVisible === "always";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-visible-show_hover", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterVisible === "show_hover";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-visible-hide_hover", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterVisible === "hide_hover";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-watchlater-visible-never", condition: function(loc){return ytcenter.settings.videoThumbnailWatchLaterVisible === "never";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-pos-topleft", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodePosition === "topleft";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-pos-topright", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodePosition === "topright";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-pos-bottomleft", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodePosition === "bottomleft";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-pos-bottomright", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodePosition === "bottomright";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-visible-always", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodeVisible === "always";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-visible-show_hover", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodeVisible === "show_hover";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-visible-hide_hover", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodeVisible === "hide_hover";}}, {groups: ["thumbnail"], element: function(){return document.body;}, className: "ytcenter-thumbnail-timecode-visible-never", condition: function(loc){return ytcenter.settings.videoThumbnailTimeCodeVisible === "never";}}, {groups: ["hide-ticker", "page"], element: function(){return document.body;}, className: "ytcenter-ticker-hidden", condition: function(loc){ if (ytcenter.settings["hideTicker"]) { ytcenter.utils.removeClass("sitewide-ticker-visible", document.body); return true; } else { return false; } }}, {groups: ["hide-lang", "page"], element: function(){return document.body;}, className: "hide-lang-alert", condition: function(loc){ return ytcenter.settings["hideLangAlert"]; }}, {groups: ["player-endscreen"], element: function(){return document.body;}, className: "ytcenter-disable-endscreen", condition: function(loc){return loc.pathname === "/watch" && ytcenter.settings["removeRelatedVideosEndscreen"];}}, {groups: ["lightsoff"], element: function(){return document.body;}, className: "ytcenter-lights-off-click-through", condition: function(loc){return ytcenter.settings["lightbulbClickThrough"];}}, {groups: ["hide-watched-videos", "page"], element: function(){return document.body;}, className: "ytcenter-hide-watched-videos", condition: function(loc){return ytcenter.gridview.isEnabled() && loc.pathname.indexOf("/feed/watch_later") !== 0 && ytcenter.settings.hideWatchedVideos;}}, {groups: ["gridview", "page"], element: function(){return document.body;}, className: "ytcenter-gridview", condition: function(loc){return ytcenter.gridview.isEnabled();}}, {groups: ["flex"], element: function(){return document.getElementById("page");}, className: "no-flex", condition: function(loc){return !ytcenter.settings.flexWidthOnPage && loc.pathname !== "/watch";}}, {groups: ["lightsoff"], element: function(){return document.body;}, className: "ytcenter-lights-off", condition: function(loc){return ytcenter.player.isLightOff;}}, {groups: ["ads"], element: function(){return document.getElementById("watch-video-extra");}, className: "hid", condition: function(loc){return ytcenter.settings.removeAdvertisements;}}, {groups: ["flex", "page"], element: function(){return document.body;}, className: "flex-width-enabled", condition: function(loc){var p = ytcenter.getPage();return ((ytcenter.settings.flexWidthOnPage && loc.pathname !== "/watch" && p !== "channel") || (ytcenter.settings.flexWidthOnChannelPage && p === "channel"))}}, {groups: ["player-branding"], element: function(){return document.body;}, className: "ytcenter-branding-remove-banner", condition: function(loc){return ytcenter.settings.removeBrandingBanner;}}, {groups: ["player-branding"], element: function(){return document.body;}, className: "ytcenter-branding-remove-background", condition: function(loc){return ytcenter.settings.removeBrandingBackground;}}, {groups: ["ads"], element: function(){return document.body;}, className: "ytcenter-remove-ads-page", condition: function(loc){return ytcenter.settings.removeAdvertisements;}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-not-watch", condition: function(loc){return loc.pathname !== "/watch";}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-search", condition: function(loc){return loc.pathname === "/results";}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-watch", condition: function(loc){return loc.pathname === "/watch";}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-home", condition: function(loc){return loc.pathname === "/";}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-feed", condition: function(loc){return loc.pathname.indexOf("/feed/") === 0 || loc.pathname === "/";}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-subscriptions", condition: function(loc){return loc.pathname.indexOf("/feed/subscriptions") === 0;}}, {groups: ["page"], element: function(){return document.body;}, className: "ytcenter-site-channel", condition: function(){return ytcenter.getPage() === "channel";}}, {groups: ["header", "page"], element: function(){return document.body;}, className: "static-header", condition: function(){return ytcenter.settings.staticHeader;}}, {groups: ["player-resize", "page"], element: function(){return document.body;}, className: "ytcenter-non-resize", condition: function(loc){return loc.pathname === "/watch" && !ytcenter.settings.enableResize;}} ]; ytcenter.intelligentFeed = (function(){ var exports = {}, observer, config = { attributes: true }, feed; ytcenter.unload(function(){ if (observer) { observer.disconnect(); observer = null; } }); exports.getFeeds = function(){ return document.getElementsByClassName("feed-item-main"); }; exports.getItems = function(feed){ return feed.getElementsByClassName("yt-uix-shelfslider-item"); }; exports.getShelfWrappers = function(feed){ return feed.getElementsByClassName("shelf-wrapper"); }; exports.getShelves = function(feed){ return feed.getElementsByClassName("yt-uix-shelfslider-list"); }; exports.getFeedCollapsedContainer = function(feed){ return feed.getElementsByClassName("feed-item-collapsed-container"); }; exports.getCollapsedItems = function(feed){ return feed.getElementsByClassName("feed-item-collapsed-items"); }; exports.getShowMoreButton = function(feed){ var a = feed.getElementsByClassName("feed-item-expander-button"); if (a && a.length > 0 && a[0]) return a[0]; return null; }; exports.setup = function(){ exports.dispose(); con.log("[Intelligent Feeds] Setting up!"); var shelf, items, i, j, shelfWrappers, collapsedItem, feedCollapsedContainer, showMoreButton; feed = exports.getFeeds(); for (i = 0; i < feed.length; i++) { items = exports.getItems(feed[i]); shelf = exports.getShelves(feed[i]); shelfWrappers = exports.getShelfWrappers(feed[i]); collapsedItem = exports.getCollapsedItems(feed[i]); feedCollapsedContainer = exports.getFeedCollapsedContainer(feed[i]); showMoreButton = exports.getShowMoreButton(feed[i]); if (items && items.length > 0 && shelf && shelf.length > 0 && shelf[0] && shelfWrappers && shelfWrappers.length > 0 && feedCollapsedContainer && feedCollapsedContainer.length > 0 && feedCollapsedContainer[0]) { ytcenter.utils.addClass(feed[i], "ytcenter-intelligentfeed ytcenter-intelligentfeed-minimized"); con.log("[Intelligent Feeds] There are " + items.length + " items and " + shelf.length + " shelves!"); shelf = shelf[0]; for (j = 0; j < items.length; j++) { shelf.appendChild(items[j]); } if (showMoreButton) { showMoreButton.setAttribute("data-original-textContent", showMoreButton.textContent); showMoreButton.textContent = showMoreButton.textContent.replace(/( [0-9]+)|([0-9]+ )|([0-9]+)/, ""); } observer = ytcenter.mutation.observe(feedCollapsedContainer[0], config, function(mutations){ mutations.forEach(function(mutation){ if (mutation.type === "attributes" && mutation.attributeName === "class") { if (ytcenter.utils.hasClass(mutation.target, "expanded")) { ytcenter.utils.removeClass(mutation.target.parentNode.parentNode, "ytcenter-intelligentfeed-minimized"); } else if (ytcenter.utils.hasClass(mutation.target, "collapsed")) { ytcenter.utils.addClass(mutation.target.parentNode.parentNode, "ytcenter-intelligentfeed-minimized"); } } }); }); } } }; exports.dispose = function(){ if (observer) observer.disconnect(); observer = null; if (feed) { var shelves, items, i, j, k, frag, _items, showMoreButton; for (i = 0; i < feed.length; i++) { if (ytcenter.utils.hasClass(feed[i], "ytcenter-intelligentfeed")) { shelves = exports.getShelves(feed[i]); items = exports.getItems(feed[i]); showMoreButton = exports.getShowMoreButton(feed[i]); frag = []; _items = []; con.log("[Intelligent Feeds] Reordering " + items.length + " items to " + shelves.length + " shelves!"); for (j = 0; j < items.length; j++) { var n = Math.floor(j/(items.length/shelves.length)); if (!_items[n]) _items[n] = []; _items[n].push(items[j]); } for (j = 0; j < _items.length; j++) { for (k = 0; k < _items[j].length; k++) { shelves[j].appendChild(_items[j][k]); } } if (showMoreButton) { showMoreButton.textContent = showMoreButton.getAttribute("data-original-textContent"); showMoreButton.removeAttribute("data-original-textContent"); } ytcenter.utils.removeClass(feed[i], "ytcenter-intelligentfeed ytcenter-intelligentfeed-minimized"); } } } }; return exports; })(); ytcenter.guideMode = (function(){ function clickListener() { clicked = true; } function updateGuide() { if (ytcenter.getPage() !== "watch") return; if (ytcenter.settings.guideMode === "always_open") { ytcenter.utils.removeClass(document.getElementById("guide-main"), "collapsed"); document.getElementById("guide-main").children[1].style.display = "block"; document.getElementById("guide-main").children[1].style.height = "auto"; } else if (ytcenter.settings.guideMode === "always_closed") { ytcenter.utils.addClass(document.getElementById("guide-main"), "collapsed"); document.getElementById("guide-main").children[1].style.display = "none"; document.getElementById("guide-main").children[1].style.height = "auto"; } } var timer, observer, observer2, clicked = false, main_guide, guide_container, guideToggle, config = { attributes: true, attributeOldValue: true }, confi2 = { childList: true, subtree: true }; ytcenter.unload(function(){ if (observer) { observer.disconnect(); observer = null; } if (observer2) { observer2.disconnect(); observer2 = null; } }); return { setup: function(){ con.log("[Guide] Configurating the state updater!"); if (observer) { observer.disconnect(); observer = null; } if (observer2) { observer2.disconnect(); observer2 = null; } guideToggle = document.getElementsByClassName("guide-module-toggle")[0]; if (guideToggle) ytcenter.utils.removeEventListener(guideToggle, "click", clickListener, false); if (ytcenter.settings.guideMode !== "default") { if (document.getElementById("guide")) { observer2 = ytcenter.mutation.observe(document.getElementById("guide"), confi2, function(mutations){ mutations.forEach(function(mutation){ if (ytcenter.utils.inArray(mutation.removedNodes, guide_container)) { con.log("[Guide] Main Guide has been removed"); main_guide = document.getElementById("guide-main"); guide_container = document.getElementById("guide-container"); if (main_guide) { if (observer) observer.disconnect(); observer = ytcenter.mutation.observe(main_guide, config, function(mutations){ mutations.forEach(function(mutation){ if (mutation.type === "attributes" && mutation.attributeName === "class" && ((mutation.oldValue.indexOf("collapsed") !== -1) !== (mutation.target.className.indexOf("collapsed") !== -1))) { con.log("[Guide] Mutations...", mutation.oldValue.indexOf("collapsed") !== -1, mutation.target.className.indexOf("collapsed") !== -1, ytcenter.settings.guideMode); if (mutation.oldValue.indexOf("collapsed") === -1 && ytcenter.settings.guideMode === "always_closed") return; if (mutation.oldValue.indexOf("collapsed") !== -1 && ytcenter.settings.guideMode === "always_open") return; con.log("[Guide] Updating State!"); uw.clearTimeout(timer); if (clicked) { clicked = false; return; } timer = uw.setTimeout(function(){ updateGuide(); }, 500); } }); }); } if (guideToggle) ytcenter.utils.removeEventListener(guideToggle, "click", clickListener, false); guideToggle = document.getElementsByClassName("guide-module-toggle")[0]; if (guideToggle) ytcenter.utils.addEventListener(guideToggle, "click", clickListener, false); if (clicked) { clicked = false; return; } updateGuide(); } else { con.log("[Guide] Main Guide is still intact"); } }); }); } main_guide = document.getElementById("guide-main"); guide_container = document.getElementById("guide-container"); if (main_guide) { ytcenter.mutation.observe(main_guide, config, function(mutations){ mutations.forEach(function(mutation){ if (mutation.type === "attributes" && mutation.attributeName === "class" && ((mutation.oldValue.indexOf("collapsed") !== -1) !== (mutation.target.className.indexOf("collapsed") !== -1))) { con.log("[Guide] Mutations...", mutation.oldValue.indexOf("collapsed") !== -1, mutation.target.className.indexOf("collapsed") !== -1, ytcenter.settings.guideMode); if (mutation.oldValue.indexOf("collapsed") === -1 && ytcenter.settings.guideMode === "always_closed") return; if (mutation.oldValue.indexOf("collapsed") !== -1 && ytcenter.settings.guideMode === "always_open") return; con.log("[Guide] Updating State!"); uw.clearTimeout(timer); if (clicked) { clicked = false; return; } timer = uw.setTimeout(function(){ updateGuide(); }, 500); } }); }); } if (guideToggle) ytcenter.utils.addEventListener(guideToggle, "click", clickListener, false); } updateGuide(); } }; })(); ytcenter.events.addEvent("ui-refresh", function(){ if (ytcenter.settings.removeBrandingBanner) { ytcenter.utils.addClass(document.body, "ytcenter-branding-remove-banner"); } else { ytcenter.utils.removeClass(document.body, "ytcenter-branding-remove-banner"); } if (ytcenter.settings.removeBrandingBackground) { ytcenter.utils.addClass(document.body, "ytcenter-branding-remove-background"); } else { ytcenter.utils.removeClass(document.body, "ytcenter-branding-remove-background"); } ytcenter.classManagement.updateClassesByGroup(["player-branding"]); }); ytcenter.cssElements = {}; ytcenter.unsafeInit = function(){ // Settings made public ytcenter.unsafe.injected = injected; ytcenter.unsafe.settings = ytcenter.unsafe.settings || {}; ytcenter.unsafe.getDebug = ytcenter.utils.oldBind(function(){ return ytcenter.getDebug(); }, ytcenter.unsafe); ytcenter.unsafe.updateSignatureDecipher = ytcenter.utils.oldBind(function(){ uw.postMessage("YouTubeCenter" + JSON.stringify({ type: "updateSignatureDecipher" }), (loc.href.indexOf("http://") === 0 ? "http://www.youtube.com" : "https://www.youtube.com")); }, ytcenter.unsafe); ytcenter.unsafe.settings.setOption = ytcenter.utils.oldBind(function(key, value){ ytcenter.settings[key] = value; ytcenter.events.performEvent("settings-update"); uw.postMessage("YouTubeCenter" + JSON.stringify({ type: "saveSettings" }), (loc.href.indexOf("http://") === 0 ? "http://www.youtube.com" : "https://www.youtube.com")); }, ytcenter.unsafe.settings); ytcenter.unsafe.settings.getOption = ytcenter.utils.oldBind(function(key){ return ytcenter.settings[key]; }, ytcenter.unsafe.settings); ytcenter.unsafe.settings.getOptions = ytcenter.utils.oldBind(function(){ return ytcenter.settings; }, ytcenter.unsafe.settings); ytcenter.unsafe.settings.removeOption = ytcenter.utils.oldBind(function(key){ delete ytcenter.settings[key]; ytcenter.events.performEvent("settings-update"); uw.postMessage("YouTubeCenter" + JSON.stringify({ type: "saveSettings" }), (loc.href.indexOf("http://") === 0 ? "http://www.youtube.com" : "https://www.youtube.com")); }, ytcenter.unsafe.settings); ytcenter.unsafe.settings.listOptions = ytcenter.utils.oldBind(function(){ var keys = []; for (var key in ytcenter.settings) { if (ytcenter.settings.hasOwnProperty(key)) keys.push(key); } return keys; }, ytcenter.unsafe.settings); ytcenter.unsafe.settings.reload = ytcenter.utils.oldBind(function(){ uw.postMessage("YouTubeCenter" + JSON.stringify({ type: "loadSettings" }), (loc.href.indexOf("http://") === 0 ? "http://www.youtube.com" : "https://www.youtube.com")); }, ytcenter.unsafe.settings); ytcenter.utils.addEventListener(uw, "message", function(e){ if (e.origin !== "http://www.youtube.com" && e.origin !== "https://www.youtube.com") return; if (!e || !e.data) return; // Checking if data is present if (typeof e.data !== "string") return; // Checking if the object is a string. if (!e.data.indexOf || e.data.indexOf("YouTubeCenter") !== 0) return; // Checking if the token is present at the start of the string var d = JSON.parse(e.data.substring(13)); if (d.type === "saveSettings") { ytcenter.saveSettings(); } else if (d.type === "loadSettings") { ytcenter.loadSettings(); } else if (d.type === "updateSignatureDecipher") { ytcenter.utils.updateSignatureDecipher(); } if (typeof d.callback === "function") { var n = d.callback.split("."), a = uw, i; for (i = 0; o < n.length; i++) { a = a[n[i]]; } a(); } }, false); }; ytcenter._config_registered = false; (function(){ // Hijacks the ytplayer global variable. try { if (uw.ytplayer && uw.ytplayer.config) { ytcenter._config_registered = true; con.log("[Player Config Global] Player configuration already registered by YouTube."); if (uw.ytplayer.config.html5) { con.log("[Player] HTML5 configuration detected"); } // Make sure that modify config is applied to the player configuration. ytcenter.player.setConfig(ytcenter.utils.mergeObjects(uw.ytplayer.config || {}, ytcenter.player.config || {})); } if (uw.ytplayer && uw.ytplayer.config && uw.ytplayer.config.loaded) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.ytplayer.config)); ytcenter.player.disablePlayerUpdate = false; } else if (uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_CONFIG && uw.yt.config_.PLAYER_CONFIG.loaded) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.yt.config_.PLAYER_CONFIG)); ytcenter.player.disablePlayerUpdate = false; } if (uw.ytplayer && uw.ytplayer.config && uw.ytplayer.config.args) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.ytplayer.config)); ytcenter.player.disablePlayerUpdate = false; } else if (uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_CONFIG && uw.yt.config_.PLAYER_CONFIG.args) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.yt.config_.PLAYER_CONFIG)); ytcenter.player.disablePlayerUpdate = false; } if (ytcenter.utils.setterGetterClassCompatible()) { ytcenter.player.disablePlayerUpdate = false; uw.ytplayer = new PlayerConfig(function(config){ con.log("[External] Setting player configruation."); if (config) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), config)); if (ytcenter.player.config.html5) ytcenter.player.disablePlayerUpdate = true; } else { ytcenter.player.setConfig(config); } }, function(){ if (ytcenter.feather) { ytcenter.player.config = ytcenter.player.modifyConfig("watch", ytcenter.player.getRawPlayerConfig()); } return ytcenter.player.config; }); } else { con.log("[PlayerConfig Hijacker] Setter Getter Method not suppoted!"); if (uw.ytplayer && uw.ytplayer.config) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.ytplayer.config)); } else if (uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_CONFIG) { ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.yt.config_.PLAYER_CONFIG)); } ytcenter.player.disablePlayerUpdate = false; } } catch (e) { con.error(e); if (uw && uw.ytplayer && uw.ytplayer.config) ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.ytplayer.config)); else if (uw.yt && uw.yt.config_ && uw.yt.config_.PLAYER_CONFIG) ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), uw.yt.config_.PLAYER_CONFIG)); ytcenter.player.disablePlayerUpdate = false; } ytcenter.pageReadinessListener.waitfor = function(){ return ytcenter.__settingsLoaded; }; ytcenter.pageReadinessListener.addEventListener("headerInitialized", function(page){ if (ytcenter.settings.useSecureProtocol && page !== "comments") { if (loc.href.indexOf("http://") === 0) { loc.replace(loc.href.replace(/^http/, "https")); return; } } ytcenter.spf.setEnabled(ytcenter.settings.ytspf); ytcenter.unsafeInit(); ytcenter.language.update(); /* We don't want to add everything. So only the neccessary stuff is added. */ if (page === "comments") { ytcenter.cssElements.flags = ytcenter.utils.addCSS("flags", ytcenter.css.flags); return; } if (page === "embed" && !ytcenter.settings.embed_enabled) { ytcenter.embed._writeEmbed(); return; } if (page === "embed" && ytcenter.utils.inArray(loc.search.substring(1).split("&"), "autoplay=1")) { loc.search = loc.search.replace("autoplay=1", "ytcenter-autoplay=1"); } if (page === "watch" && document && document.head && document.head.getElementsByTagName) { var links = document.head.getElementsByTagName("link"); if (links && links.length > 0 && links[0] && links[0].className && links[0].className.indexOf("www-feather") === 0) { con.log("[Feather] Feather layout detected!"); ytcenter.feather = true; } } if (ytcenter.feather) { /*var obj = uw && uw.yt || {}, pobj = uw && uw.yt && uw.yt.player || {}, app = ytcenter.utils.oldBind(function(id, config){ ytcenter.player.setConfig(ytcenter.player.modifyConfig("watch", config)); return oApp(id, ytcenter.player.getConfig()); }), oApp = uw && uw.yt && uw.yt.player && uw.yt.player.Application || null; defineLockedProperty(pobj, "Application", ytcenter.utils.oldBind(function(o){ con.log("[Feather] Setting Application."); oApp = o; }), ytcenter.utils.oldBind(function(){ con.log("[Feather] Application has been requested."); return app; })); defineLockedProperty(obj, "player", ytcenter.utils.oldBind(function(o){ var key; for (key in o) { if (o.hasOwnProperty(key)) { pobj[key] = o[key]; } } }), ytcenter.utils.oldBind(function(){ return pobj; })); defineLockedProperty(uw, "yt", ytcenter.utils.oldBind(function(o){ var key; for (key in o) { if (o.hasOwnProperty(key)) { obj[key] = o[key]; } } }), ytcenter.utils.oldBind(function(){ return obj; }));*/ ytcenter.cssElements.feather = ytcenter.utils.addCSS("feather", ytcenter.css.feather); } if (ytcenter.getPage() !== "embed") { ytcenter.cssElements.general = ytcenter.utils.addCSS("general", ytcenter.css.general); ytcenter.cssElements.flags = ytcenter.utils.addCSS("flags", ytcenter.css.flags); ytcenter.cssElements.html5player = ytcenter.utils.addCSS("html5player", ytcenter.css.html5player); ytcenter.cssElements.gridview = ytcenter.utils.addCSS("gridview", ytcenter.css.gridview); ytcenter.cssElements.images = ytcenter.utils.addCSS("images", ytcenter.css.images); ytcenter.cssElements.dialog = ytcenter.utils.addCSS("dialog", ytcenter.css.dialog); ytcenter.cssElements.scrollbar = ytcenter.utils.addCSS("scrollbar", ytcenter.css.scrollbar); ytcenter.cssElements.list = ytcenter.utils.addCSS("list", ytcenter.css.list); ytcenter.cssElements.confirmbox = ytcenter.utils.addCSS("confirmbox", ytcenter.css.confirmbox); ytcenter.cssElements.panel = ytcenter.utils.addCSS("panel", ytcenter.css.panel); ytcenter.cssElements.resize = ytcenter.utils.addCSS("resize", ytcenter.css.resize, ytcenter.settings.enableResize); ytcenter.cssElements.resizePanel = ytcenter.utils.addCSS("resizePanel", ytcenter.css.resizePanel); ytcenter.cssElements.modules = ytcenter.utils.addCSS("modules", ytcenter.css.modules); ytcenter.cssElements.settings = ytcenter.utils.addCSS("settings", ytcenter.css.settings); //ytcenter.cssElements.centering = ytcenter.utils.addCSS("centering", ytcenter.css.centering, false); ytcenter.cssElements.topbar = ytcenter.utils.addCSS("topbar", ytcenter.css.topbar); ytcenter.cssElements.player = ytcenter.utils.addCSS("player", ytcenter.css.player); ytcenter.cssElements.darkside = ytcenter.utils.addCSS("darkside", ytcenter.css.darkside); ytcenter.cssElements.elementFocus = ytcenter.utils.addCSS("element-focus", ytcenter.css.elementFocus, false); //ytcenter.cssElements.yonez = ytcenter.utils.addCSS("yonez", ytcenter.css.yonez, ytcenter.settings.yonezCleanYT); try { ytcenter.unsafe.openSettings = ytcenter.utils.oldBind(function(){ if (!ytcenter.settingsPanelDialog) ytcenter.settingsPanelDialog = ytcenter.settingsPanel.createDialog(); ytcenter.settingsPanelDialog.setVisibility(true); }); ytcenter.unsafeCall("GM_registerMenuCommand", [ytcenter.language.getLocale("BUTTON_SETTINGS_LABEL")], ytcenter.unsafe.openSettings); /*if (typeof GM_registerMenuCommand === "function") { GM_registerMenuCommand(ytcenter.language.getLocale("BUTTON_SETTINGS_LABEL"), ytcenter.unsafe.openSettings); }*/ } catch (e) { con.error(e); } } else { ytcenter.cssElements.embed = ytcenter.utils.addCSS("embed", ytcenter.css.embed); } /*****START OF SAVEAS AND BLOB IMPLEMENTATION*****/ /* Blob.js * A Blob implementation. * 2013-06-20 * * By Eli Grey, http://eligrey.com * By Devin Samarin, https://github.com/eboyjr * License: X11/MIT * See LICENSE.md */ /*http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js*/ /* FileSaver.js * A saveAs() FileSaver implementation. * 2013-01-23 * * By Eli Grey, http://eligrey.com * License: X11/MIT * See LICENSE.md */ /*http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js*/ /* The reason this is obfuscated is because IE crashes when using IE7Pro to run YouTube Center. * I think that it has something to do with the javascript parser IE7Pro are using. * The source code of the injected obfuscated part can be found on: * https://github.com/YePpHa/YouTubeCenter/tree/master/obfuscated/io.js * ------ * Tool used: http://www.jsobfuscate.com/index.php * Encoding: Normal * Fast Decode: enabled * Special Characters disabled * --- * Result replaced \\ with \\\\ and " with \". */ ytcenter.inject("eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\\\b'+e(c)+'\\\\b','g'),k[c])}}return p}('v=v||{};v.R=v.R||{};(4(I,v){o{v.R.B=B}q(e){}8(J B!==\"4\"||J k===\"2c\")8(J B===\"4\"&&J K!==\"2c\")I.k=K;j v.R.B=(4(6){\"1W 2l\";d Z=(4(){d a=t;o{a=6.Z||6.2d||6.1A||6.17}q(e){o{a=6.2d||6.1A||6.17}q(e){o{a=6.1A||6.17}q(e){o{a=6.17}q(e){}}}}f a})()||(4(6){d 1l=4(P){f 2P.S.1r.T(P).2Q(/^\\\\[P\\\\s(.*)\\\\]$/)[1]},1n=4 Z(){g.7=[]},A=4(7,c,w){g.7=7;g.1F=7.p;g.c=c;g.w=w},1f=1n.S,19=A.S,1d=6.1d,1s=4(c){g.1I=g[g.l=c]},1v=(\"2m 2V 22 2n 2W \"+\"31 30 2Z\").1M(\" \"),1h=1v.p,H=6.k||6.K||6,1k=H.11,1i=H.1u,k=H,1a=6.1a,1b=6.1b,1z=6.1z,Y=6.Y;A.2b=19.2b=14;1C(1h--){1s.S[1v[1h]]=1h+1}8(!H.11){k=6.k={}}k.11=4(b){d c=b.c,N;8(c===Q){c=\"2q/2z-2t\"}8(b 1c A){N=\"7:\"+c;8(b.w===\"1g\"){f N+\";1g,\"+b.7}j 8(b.w===\"2h\"){f N+\",\"+2i(b.7)}8(1a){f N+\";1g,\"+1a(b.7)}j{f N+\",\"+2o(b.7)}}j 8(1k){f 1k.T(H,b)}};k.1u=4(1m){8(1m.2D(0,5)!==\"7:\"&&1i){1i.T(H,1m)}};1f.1X=4(7){d E=g.7;8(Y&&(7 1c 1z||7 1c Y)){d 1q=\"\",1o=C Y(7),i=0,29=1o.p;20(;i<29;i++){1q+=2H.2M(1o[i])}E.x(1q)}j 8(1l(7)===\"B\"||1l(7)===\"2K\"){8(1d){d 2g=C 1d;E.x(2g.32(7))}j{2r C 1s(\"2n\")}}j 8(7 1c A){8(7.w===\"1g\"&&1b){E.x(1b(7.7))}j 8(7.w===\"2h\"){E.x(2i(7.7))}j 8(7.w===\"21\"){E.x(7.7)}}j{8(J 7!==\"2u\"){7+=\"\"}E.x(3r(2o(7)))}};1f.1U=4(c){8(!1w.p){c=Q}f C A(g.7.3i(\"\"),c,\"21\")};1f.1r=4(){f\"[P Z]\"};19.L=4(1Y,1T,c){d 1t=1w.p;8(1t<3){c=Q}f C A(g.7.L(1Y,1t>1?1T:g.7.p),c,g.w)};19.1r=4(){f\"[P B]\"};f 1n}(6));f 4(12,1x){d c=1x?(1x.c||\"\"):\"\";d 1y=C Z();8(12){20(d i=0,23=12.p;i<23;i++){1y.1X(12[i])}}f 1y.1U(c)}}(I));v.R.13=(I&&I.13)||(18&&18.1V&&18.1V.2B(18))||(4(6){\"1W 2l\";d 1B=6.3n,1p=4(){d a;o{a=6.k||6.K||6}q(e){o{a=6.k||6.K||6}q(e){o{a=6.K||6}q(e){o{a=6}q(e){}}}}f a},k=1p(),10=1B.3m(\"3k://3a.2I.3d/3e/3h\",\"a\"),2w=!6.3g&&\"V\"3b 10,1Q=4(2s){d n=1B.34(\"36\");n.37(\"1Q\",14,t,6,0,0,0,0,0,t,t,t,t,0,Q);2s.38(n)},16=6.3j,1E=6.3s||16||6.3p,2x=4(F){(6.3q||6.3l)(4(){2r F},0)},15=\"2q/2z-2t\",1H=0,M=[],2e=4(){d i=M.p;1C(i--){d r=M[i];8(J r===\"2u\"){k.1u(r)}j{r.26()}}M.p=0},1e=4(9,U,n){U=[].33(U);d i=U.p;1C(i--){d 1j=9[\"1L\"+U[i]];8(J 1j===\"4\"){o{1j.T(9,n||9)}q(F){2x(F)}}}},1G=4(b,l){d 9=g,c=b.c,1O=t,m,W,1P=4(){d m=1p().11(b);M.x(m);f m},1S=4(){1e(9,\"1Z 25 1K 24\".1M(\" \"))},y=4(){8(1O||!m){m=1P(b)}8(W){W.2p.1N=m}j{2O.2X(m,\"2S\")}9.u=9.G;1S()},z=4(2v){f 4(){8(9.u!==9.G){f 2v.2T(g,1w)}}},1R={2k:14,3c:t},L;9.u=9.2f;8(!l){l=\"V\"}8(2w){m=1P(b);10.1N=m;10.V=l;1Q(10);9.u=9.G;1S();f}8(6.2G&&c&&c!==15){L=b.L||b.2L;b=L.T(b,0,b.1F,15);1O=14}8(16&&l!==\"V\"){l+=\".V\"}8(c===15||16){W=6}8(!1E){y();f}1H+=b.1F;1E(6.2J,1H,z(4(2y){2y.2U.2N(\"3o\",1R,z(4(1J){d 1D=4(){1J.2j(l,1R,z(4(r){r.39(z(4(D){D.2a=4(n){W.2p.1N=r.3f();M.x(r);9.u=9.G;1e(9,\"24\",n)};D.27=4(){d X=D.X;8(X.1I!==X.22){y()}};\"1Z 25 1K O\".1M(\" \").35(4(n){D[\"1L\"+n]=9[\"1L\"+n]});D.1K(b);9.O=4(){D.O();9.u=9.G};9.u=9.28}),y)}),y)};1J.2j(l,{2k:t},z(4(r){r.26();1D()}),z(4(F){8(F.1I===F.2m){1D()}j{y()}}))}),y)}),y)},h=1G.S,13=4(b,l){f C 1G(b,l)};h.O=4(){d 9=g;9.u=9.G;1e(9,\"O\")};h.u=h.2f=0;h.28=1;h.G=2;h.X=h.2A=h.2C=h.2F=h.2E=h.27=h.2a=Q;6.2Y(\"2R\",2e,t);f 13}(I))})(I,v);',62,215,'||||function||view|data|if|filesaver||blob|type|var||return|this|FS_proto||else|URL|name|object_url|event|try|length|catch|file||false|readyState|ytcenter|encoding|push|fs_error|abortable|FakeBlob|Blob|new|writer|bb|ex|DONE|real_URL|self|typeof|webkitURL|slice|deletion_queue|data_URI_header|abort|object|null|io|prototype|call|event_types|download|target_view|error|Uint8Array|BlobBuilder|save_link|createObjectURL|blobParts|saveAs|true|force_saveable_type|webkit_req_fs|MSBlobBuilder|navigator|FB_proto|btoa|atob|instanceof|FileReaderSync|dispatch|FBB_proto|base64|file_ex_code|real_revoke_object_URL|listener|real_create_object_URL|get_class|object_URL|FakeBlobBuilder|buf|get_URL|str|toString|FileException|args|revokeObjectURL|file_ex_codes|arguments|options|builder|ArrayBuffer|MozBlobBuilder|doc|while|save|req_fs|size|FileSaver|fs_min_size|code|dir|write|on|split|href|blob_changed|get_object_url|click|create_if_not_found|dispatch_all|end|getBlob|msSaveOrOpenBlob|use|append|start|writestart|for|raw|ABORT_ERR|len|writeend|progress|remove|onerror|WRITING|buf_len|onwriteend|fake|undefined|WebKitBlobBuilder|process_deletion_queue|INIT|fr|URI|decodeURIComponent|getFile|create|strict|NOT_FOUND_ERR|NOT_READABLE_ERR|encodeURIComponent|location|application|throw|node|stream|string|func|can_use_save_link|throw_outside|fs|octet|onwritestart|bind|onprogress|substring|onabort|onwrite|chrome|String|w3|TEMPORARY|File|webkitSlice|fromCharCode|getDirectory|window|Object|match|unload|_blank|apply|root|SECURITY_ERR|ENCODING_ERR|open|addEventListener|SYNTAX_ERR|INVALID_STATE_ERR|NO_MODIFICATION_ALLOWED_ERR|readAsBinaryString|concat|createEvent|forEach|MouseEvents|initMouseEvent|dispatchEvent|createWriter|www|in|exclusive|org|1999|toURL|externalHost|xhtml|join|webkitRequestFileSystem|http|setTimeout|createElementNS|document|saved|mozRequestFileSystem|setImmediate|unescape|requestFileSystem'.split('|'),0,{}))"); /*****END OF SAVEAS AND BLOB IMPLEMENTATION*****/ }); ytcenter.pageReadinessListener.addEventListener("bodyInitialized", function(page){ if (ytcenter.feather) { var dir = document.body.getAttribute("dir"); ytcenter.utils.addClass(document.body, dir); ytcenter.ltr = (dir === "ltr"); /*** Add a separate section for this! ytcenter.utils.live.add("click", "button.yt-uix-button", function(e){ var el = null, i; for (i = 0; i < this.children.length; i++) { if (this.children[i].className.indexOf("yt-uix-button-menu") !== -1) { el = this.children[i]; break; } } });*/ } else if (!ytcenter.utils.hasClass(document.body, "ltr")) { ytcenter.ltr = false; } if (page === "comments") return; // We don't need to do anything here. if (page === "embed" && !ytcenter.settings.embed_enabled) return; ytcenter.mutation.observe(document.getElementById("page"), { attributes: true }, ytcenter.player._updateResize); if (ytcenter._config_registered) { // Re-creating the player to ensure that the correct fexp is applied correctly. if (uw && uw.yt && uw.yt.player && uw.yt.player.Application && typeof uw.yt.player.Application.create === "function") { ytcenter.player.setConfig(ytcenter.player.modifyConfig(page, ytcenter.player.getConfig())); uw.yt.player.Application.create("player-api", ytcenter.player.getConfig()); } } ytcenter.classManagement.applyClassesForElement(document.body); if (loc.href.indexOf(".youtube.com/embed/") === -1) { ytcenter.utils.live.add("click", "body.ytcenter-gridview #feed .feed-container button.feed-load-more", ytcenter.gridview.delayedUpdate); if (!ytcenter.welcome.hasBeenLaunched()) ytcenter.welcome.setVisibility(true); } ytcenter.updateLogoLink(); if (loc.pathname !== "/watch") ytcenter.player.turnLightOn(); else if (ytcenter.settings.lightbulbAutoOff) ytcenter.player.turnLightOff(); ytcenter.player.shortcuts(); if (document.getElementById("page") && ytcenter.utils.hasClass(document.getElementById("page"), "channel") && document.getElementById("content") && document.getElementById("content").children.length > 0 && ytcenter.utils.hasClass(document.getElementById("content").children[0], "branded-page-v2-container") && ytcenter.utils.hasClass(document.getElementById("content").children[0], "branded-page-v2-flex-width")) { document.body.className += " ytcenter-channelv2"; } }); ytcenter.pageSetup = function(){ var page = ytcenter.getPage(); ytcenter.channelPlaylistLinks.update(); if (page === "watch") { if (!ytcenter.settings.enableComments) { ytcenter.commentsLoader.setup(); } ytcenter.playlistAutoPlay.init(); ytcenter.effects.playerGlow.setOption("pixelInterval", ytcenter.settings.playerGlowPixelInterval); ytcenter.effects.playerGlow.setOption("factor", ytcenter.settings.playerGlowFactor); ytcenter.effects.playerGlow.setOption("glowEffectOnPlayer", ytcenter.settings.playerGlowEffectOnPlayer); ytcenter.effects.playerGlow.setOption("interval", (ytcenter.settings.playerGlowRequestAnimationFrame ? -1 : ytcenter.settings.playerGlowUpdateInterval)); ytcenter.effects.playerGlow.setOption("transition", ytcenter.settings.playerGlowTransition/1000); ytcenter.effects.playerGlow.setOption("blur", ytcenter.settings.playerGlowBlur); ytcenter.effects.playerGlow.setOption("spread", ytcenter.settings.playerGlowSpread); ytcenter.effects.playerGlow.setOption("opacity", ytcenter.settings.playerGlowOpacity/100); ytcenter.effects.playerGlow.setOption("multiglow", ytcenter.settings.playerMultiGlowEffect); ytcenter.effects.playerGlow.setOption("depth", ytcenter.settings.playerMultiGlowEffectDepth); ytcenter.effects.playerGlow.setOption("blockInterval", ytcenter.settings.playerMultiGlowEffectBlockInterval); ytcenter.effects.playerGlow.setEnabled(ytcenter.settings.playerGlowEnabled); var description = document.getElementById("action-panel-details"); var headline = document.getElementById("watch7-headline"); if (description && ytcenter.settings.expandDescription) { ytcenter.utils.removeClass(description, "yt-uix-expander-collapsed"); } if (headline && ytcenter.settings.headlineTitleExpanded) { ytcenter.utils.removeClass(headline, "yt-uix-expander-collapsed"); } } ytcenter.gridview.update(); if (page !== "embed") { ytcenter.title.init(); ytcenter.topScrollPlayer.setup(); ytcenter.topScrollPlayer.setEnabled(ytcenter.getPage() === "watch" && ytcenter.settings.topScrollPlayerEnabled); } var page_element = document.getElementById("page"); if (page_element && page === "watch" && ytcenter.settings.staticHeader_scrollToPlayer && ytcenter.settings.staticHeader) { ytcenter.utils.scrollTop(ytcenter.utils.getScrollPosition(page_element).y/2); } /* A simple Webkit hack, which will fix the horizontal scroll bar from appearing */ if (document.body.className.indexOf("webkit") !== -1) { var guideButton = document.getElementById("appbar-guide-button"), _timer = null; ytcenter.utils.addEventListener(guideButton, "click", function(){ function startTimer() { ytcenter.utils.cssFix(pageElm); _timer = uw.setInterval(function(){ if (count > 3) { stopTimer(); } ytcenter.utils.cssFix(pageElm); count++; }, 300); } function stopTimer() { if (_timer) { uw.clearInterval(_timer); _timer = null; } } var pageElm = document.getElementById("page"), count = 0; stopTimer(); startTimer(); }, false); } if (page === "embed") return; // We don't want the embed page to do these things. // UI ytcenter.classManagement.applyClassesExceptElement(document.body); try { ytcenter.thumbnail.setup(); ytcenter.domEvents.setup(); } catch (e) { con.error(e); } if (page === "feed_what_to_watch") { ytcenter.intelligentFeed.setup(); } if (ytcenter.settings["resize-default-playersize"] === "default") { ytcenter.player.currentResizeId = (ytcenter.settings.player_wide ? ytcenter.settings["resize-large-button"] : ytcenter.settings["resize-small-button"]); ytcenter.player.updateResize(); } else { ytcenter.player.currentResizeId = ytcenter.settings['resize-default-playersize']; ytcenter.player.updateResize(); } var id, config; if (page === "watch") { ytcenter.uploaderFlag.init(); ytcenter.page = "watch"; var wvi = document.getElementById("watch7-views-info"), sl = document.getElementsByClassName("video-extras-sparkbar-likes"), sd = document.getElementsByClassName("video-extras-sparkbar-dislikes"); if (sl && sd && sl.length > 0 && sd.length > 0 && sl[0] && sd[0]) { sl[0].style.background = ytcenter.settings.sparkbarLikesColor; sl[0].style.height = ytcenter.settings.sparkbarHeight + "px"; sd[0].style.background = ytcenter.settings.sparkbarDislikesColor; sd[0].style.height = ytcenter.settings.sparkbarHeight + "px"; sd[0].parentNode.style.height = ytcenter.settings.sparkbarHeight + "px"; } ytcenter.playlist = false; if (document.getElementById("watch7-playlist-data") || (loc && loc.search && typeof loc.search.indexOf === "function" && loc.search.indexOf("list=") !== -1)) { ytcenter.playlist = true; } var userHeader = document.getElementById("watch7-user-header"); var userName = document.getElementsByClassName("yt-user-name"); if (userName && userName.length > 1 && userName[1] && userName[1].textContent) { ytcenter.video.author = userName[1].textContent; } else if (userName && userName.length > 0 && userName[0] && userName[0].textContent) { ytcenter.video.author = userName[0].textContent; } if (ytcenter.video.author) { ytcenter.user.callChannelFeed(ytcenter.video.author, function(){ ytcenter.video._channel = this; ytcenter.video.channelname = this.title['$t']; }); } } else if (page === "channel") { ytcenter.page = "channel"; if (document.body.innerHTML.indexOf("data-video-id=\"") !== -1) { id = document.body.innerHTML.match(/data-video-id=\"(.*?)\"/)[1]; } else if (document.body.innerHTML.indexOf("/v/") !== -1) { id = document.body.innerHTML.match(/\/v\/([0-9a-zA-Z_-]+)/)[1]; } else if (document.body.innerHTML.indexOf("\/v\/") !== -1) { id = document.body.innerHTML.match(/\\\/v\\\/([0-9a-zA-Z_-]+)/)[1]; } if (id) { var url = ytcenter.utils.getLocationOrigin() + "/get_video_info?html5=0&cver=html5&dash=" + (ytcenter.settings.channel_dashPlayback ? "1" : "0") + "&video_id=" + id + "&eurl=" + encodeURIComponent(loc.href); con.log("Contacting: " + url); ytcenter.utils.xhr({ method: "GET", url: url, headers: { "Content-Type": "text/plain" }, onload: function(response){ try { if (response.responseText) { var o = {}; var s = response.responseText.split("&"); for (var i = 0; i < s.length; i++) { var ss = s[i].split("="); o[ss[0]] = decodeURIComponent(ss[1]); } ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), {args: o})); config = ytcenter.player.config; ytcenter.player.update(config); if (ytcenter.player.config.updateConfig) { ytcenter.player.updateConfig(ytcenter.getPage(), ytcenter.player.config); } } } catch (e) { con.error(response.responseText); con.error(e); } }, onerror: function(){ ytcenter.video.streams = []; } }); } } else if (page === "search") { ytcenter.page = "search"; } else { ytcenter.page = "normal"; } if (page === "watch") { ytcenter.actionPanel.setup(); ytcenter.player.setYTConfig({ "SHARE_ON_VIDEO_END": false }); ytcenter.player.setConfig(ytcenter.player.modifyConfig("watch", uw.ytplayer.config)); ytcenter.player.update(ytcenter.player.config); ytcenter.videoHistory.addVideo(ytcenter.player.config.args.video_id); } // Initialize the placement system if (page === "watch") { // Clear groups ytcenter.placementsystem.clearGroups(); var watch8ActionButtons = document.getElementById("watch8-action-buttons"); var watch8SecondaryActions = document.getElementById("watch8-secondary-actions"); var watch8SentimentActions = document.getElementById("watch8-sentiment-actions"); var ytcenterGroup = document.createElement("div"); ytcenterGroup.setAttribute("id", "watch8-ytcenter-buttons"); var userHeader = document.getElementById("watch7-user-header"); if (watch8ActionButtons) { if (watch8ActionButtons.children.length > 0) { watch8ActionButtons.insertBefore(ytcenterGroup, watch8ActionButtons.children[0]); } else { watch8ActionButtons.appendChild(ytcenterGroup); } } else if (userHeader && userHeader.nextElementSibling) { userHeader.parentNode.insertBefore(ytcenterGroup, userHeader.nextElementSibling); } else if (userHeader) { userHeader.parentNode.appendChild(ytcenterGroup); } else if (watch8ActionButtons) { watch8ActionButtons.parentNode.insertBefore(ytcenterGroup, watch8ActionButtons); } // Add the YouTube Center group ytcenter.placementsystem.createGroup("ytcenter", ytcenterGroup, {}); // Add the watch8-action-buttons group if (watch8SecondaryActions) { ytcenter.placementsystem.createGroup("watch8-secondary-actions", watch8SecondaryActions, {}); } // Add the watch8-sentiment-actions group if (watch8ActionButtons) { ytcenter.placementsystem.createGroup("watch8-sentiment-actions", watch8SentimentActions, {}); } // Creating buttons, which will be added to the ytcenter group $CreateDownloadButton(); $CreateRepeatButton(); $CreateLightButton(); $CreateAspectButton(); $CreateResizeButton(); var referenceList = ytcenter.placementsystem.createReferenceList(); ytcenter.placementsystem.placementGroupsReferenceList = referenceList; if (ytcenter.settings.placementGroups) { ytcenter.placementsystem.setSortList(ytcenter.settings.placementGroups, referenceList); } else { ytcenter.settings.placementGroups = ytcenter.placementsystem.getSortList(referenceList); } } }; ytcenter.pageReadinessListener.addEventListener("bodyInteractive", function(){ var page = ytcenter.getPage(); if (page === "embed" && !ytcenter.settings.embed_enabled) return; /* Only need to handle the Google+ comments */ if (page === "comments") { ytcenter.commentsPlus.setup(); return; } ytcenter.unsafe.subtitles = ytcenter.subtitles; ytcenter.pageSetup(); yt = uw.yt; if (page === "embed") { ytcenter.player.listeners.setup(); } ytcenter.player.onYouTubePlayerReady = function(api){ if (!ytcenter.player.config) return; /* Running other onYouTubePlayerReady callbacks */ if (ytcenter.onYouTubePlayerReady) { var i; for (i = 0; i < ytcenter.onYouTubePlayerReady.length; i++) { ytcenter.onYouTubePlayerReady[i].apply(uw, arguments); } ytcenter.onYouTubePlayerReady = []; } ytcenter.classManagement.applyClassesForElement(); if (typeof api === "object") { ytcenter.player.__getAPI = api; api = ytcenter.player.getAPI(); ytcenter.html5 = (api && typeof api.getPlayerType === "function" && api.getPlayerType() === "html5" && !ytcenter.player.isLiveStream() && !ytcenter.player.isOnDemandStream()); ytcenter.player._update_onYouTubeReady = true; if (!ytcenter.html5) { if (uw && uw.yt && uw.yt.player && uw.yt.player.utils && uw.yt.player.utils.VideoTagPool && uw.yt.player.utils.VideoTagPool.instance_ && uw.yt.player.utils.VideoTagPool.instance_.g && ytcenter.utils.isArray(uw.yt.player.utils.VideoTagPool.instance_.g)) { for (var i = 0, len = uw.yt.player.utils.VideoTagPool.instance_.g.length; i < len; i++) { yt.player.utils.VideoTagPool.instance_.g[i].src = ""; yt.player.utils.VideoTagPool.instance_.g[i].pause && yt.player.utils.VideoTagPool.instance_.g[i].pause(); if (yt.player.utils.VideoTagPool.instance_.g[i].parentNode) { yt.player.utils.VideoTagPool.instance_.g[i].parentNode.removeChild(yt.player.utils.VideoTagPool.instance_.g[i]); } uw.yt.player.utils.VideoTagPool.instance_.g.splice(i, 1); i--; len--; } } } ytcenter.player.listeners.dispose(); ytcenter.player.listeners.setup(); if (ytcenter.getPage() === "channel") { if (ytcenter.player.config && ytcenter.player.config.args) { ytcenter.player.updateConfig(ytcenter.getPage(), ytcenter.player.config); } else { if (ytcenter.player.config === null) ytcenter.player.config = {}; ytcenter.player.config.updateConfig = true; } } else { if (ytcenter.getPage() === "watch") { if (ytcenter.player.config) { try { ytcenter.player.updateConfig(loc.href, ytcenter.player.modifyConfig(ytcenter.getPage(loc.href), ytcenter.player.config)); ytcenter.videoHistory.addVideo(ytcenter.player.config.args.video_id); } catch (e) { con.error(e); } } ytcenter.topScrollPlayer.setEnabled(ytcenter.settings.topScrollPlayerEnabled); } else if (ytcenter.getPage() === "embed") { var lis = function(state){ if (state === -1) return; ytcenter.player.updateConfig(ytcenter.getPage(), ytcenter.player.config); if (state === 1 || state === 2 || state === 3) ytcenter.player.listeners.removeEventListener("onStateChange", lis); }; ytcenter.player.listeners.addEventListener("onStateChange", lis); ytcenter.player.updateConfig(ytcenter.getPage(), ytcenter.player.config); } ytcenter.tabEvents.addEventListener("player", function(playerFunction){ var api = ytcenter.player.getAPI(); if (!api && api[playerFunction]) { con.error("[Tab Events] Player API \"" + playerFunction + "\" not found!"); } else { api[playerFunction].apply(api, Array.prototype.slice.call(arguments, 1)); } }); con.log("[onYouTubePlayerReady] => updateConfig"); ytcenter.player.updateConfig(ytcenter.getPage(), ytcenter.player.config); ytcenter.classManagement.applyClasses(); } } }; var apiChangedEnabled = true; ytcenter.player.listeners.addEventListener("onApiChange", function(){ /*if (!apiChangedEnabled) { ytcenter.player.updateConfig(ytcenter.getPage(), ytcenter.player.config); apiChangedEnabled = true; } var api = ytcenter.player.getAPI(); if (api && api.getUpdatedConfigurationData) { var newData = api.getUpdatedConfigurationData(); con.log(newData); ytcenter.player.setConfig(ytcenter.player.modifyConfig(ytcenter.getPage(), newData)); apiChangedEnabled = false; var cfg = ytcenter.player.config; con.log(cfg); if (ytcenter.topScrollPlayer.isActive()) { ytcenter.topScrollPlayer.setRedirectURL("/watch?v=" + encodeURIComponent(cfg.args.video_id) + "&list=" + encodeURIComponent(cfg.args.list)); } if (api.loadNewVideoConfig) { api.loadNewVideoConfig(cfg); } else if (api.loadVideoByPlayerVars) { api.loadVideoByPlayerVars(cfg.args); } }*/ }); ytcenter.player.listeners.addEventListener("onReady", function(api){ var config = ytcenter.player.getConfig(); if (ytcenter.settings.enableAutoVideoQuality) { ytcenter.player.setQuality(ytcenter.player.getQuality(ytcenter.settings.autoVideoQuality, ytcenter.video.streams, (config.args.dash === "1" && config.args.adaptive_fmts ? true : false))); } }); ytcenter.unsafe.player = ytcenter.unsafe.player || {}; ytcenter.unsafe.player.setAspect = ytcenter.player.aspect; ytcenter.unsafe.player.getAPI = ytcenter.utils.oldBind(ytcenter.player.getAPI, ytcenter.unsafe); ytcenter.unsafe.player.onReady = ytcenter.utils.oldBind(ytcenter.player.onYouTubePlayerReady, ytcenter.unsafe); ytcenter.unsafe.player.parseThumbnailStream = ytcenter.player.parseThumbnailStream; ytcenter.unsafe.player.showMeMyThumbnailStream = function(index){ var a = ytcenter.player.parseThumbnailStream(ytcenter.player.config.args.storyboard_spec), b = a.levels[(typeof index === "number" && index > 0 && index < a.levels.length ? index : a.levels.length) - 1], elm = document.createElement("div"), pic = document.createElement("div"), box = {width: 1280, height: 720}, rect = b.getRect(0, box), i = 0; pic.style.width = rect.width + "px"; pic.style.height = rect.height + "px"; pic.style.backgroundImage = "URL(" + b.getURL(0) + ")"; pic.style.backgroundSize = rect.imageWidth + "px " + rect.imageHeight + "px"; pic.style.backgroundPosition = rect.x + "px " + -rect.y + "px"; ytcenter.utils.addEventListener(document.body, "keyup", function(e){ if (e.keyCode === 37) { i--; } else if (e.keyCode === 39) { i++; } if (b.frames <= i) i = 0; if (i < 0) i = b.frames - 1; rect = b.getRect(i, box); pic.style.backgroundImage = "URL(" + b.getURL(i) + ")"; pic.style.backgroundPosition = -rect.x + "px " + -rect.y + "px"; }, false); elm.appendChild(pic); ytcenter.dialog(null, elm).setVisibility(true); }; if (typeof uw.onYouTubePlayerReady === "function") { if (!ytcenter.onYouTubePlayerReady) ytcenter.onYouTubePlayerReady = []; ytcenter.onYouTubePlayerReady.push(uw.onYouTubePlayerReady); } defineLockedProperty(uw, "onYouTubePlayerReady", function(func){ con.log("[onYouTubePlayerReady] Something is trying to set onYouTubePlayerReady to something else."); if (typeof func !== "function") return; if (!ytcenter.onYouTubePlayerReady) ytcenter.onYouTubePlayerReady = []; ytcenter.onYouTubePlayerReady.push(func); }, function(){ return ytcenter.player.onYouTubePlayerReady; }); /* bodyInteractive should only be used for the UI, use the other listeners for player configuration */ ytcenter.player.listeners.addEventListener("onReady", function(){ var api = null, state = null; if (ytcenter.player.getAPI) api = ytcenter.player.getAPI(); if (api && api.getPlayerState) state = ytcenter.player.getAPI().getPlayerState(); if (state === 1 && ytcenter.settings.playerOnlyOneInstancePlaying && !ytcenter.player.isPreventAutoBuffering() && !ytcenter.player.isPreventAutoPlay()) { if ((ytcenter.getPage() === "embed" && ytcenter.settings.embed_enabled) || ytcenter.getPage() !== "embed") { ytcenter.player.network.pause(); } } }); ytcenter.player.listeners.addEventListener("onStateChange", function(state){ if (ytcenter.player.setPlaybackState.preferredState !== null) state = ytcenter.player.setPlaybackState.preferredState; if (state === 1 && ytcenter.settings.playerOnlyOneInstancePlaying) { if ((ytcenter.getPage() === "embed" && ytcenter.settings.embed_enabled) || ytcenter.getPage() !== "embed") { ytcenter.player.network.pause(); } } }); if (page === "embed") { /* I've moved ytcenter.embed.load to be executed when the page has completely loaded */ //@embed return; } $CreateSettingsUI(); $UpdateChecker(); ytcenter.player.listeners.addEventListener("onAdStart", function(type){ if (type === "PREROLL") { if (ytcenter.getPage() === "watch") { if (ytcenter.playlist) { if (ytcenter.settings.preventPlaylistAutoPlay) { ytcenter.player.getAPI().mute(); ytcenter.player.getAPI().pauseVideo(); !ytcenter.settings.mute && ytcenter.player.getAPI().isMuted && ytcenter.player.getAPI().unMute(); } } else { if (ytcenter.settings.preventAutoPlay) { ytcenter.player.getAPI().mute(); ytcenter.player.getAPI().pauseVideo(); !ytcenter.settings.mute && ytcenter.player.getAPI().isMuted && ytcenter.player.getAPI().unMute(); } } } else if (ytcenter.getPage() === "channel") { if (ytcenter.settings.channel_preventAutoPlay) { ytcenter.player.getAPI().mute(); ytcenter.player.getAPI().pauseVideo(); !ytcenter.settings.channel_mute && ytcenter.player.getAPI().isMuted && ytcenter.player.getAPI().unMute(); } } else if (ytcenter.getPage() === "embed") { if (ytcenter.settings.embed_preventAutoPlay) { ytcenter.player.getAPI().mute(); ytcenter.player.getAPI().pauseVideo(); !ytcenter.settings.embed_mute && ytcenter.player.getAPI().isMuted && ytcenter.player.getAPI().unMute(); } } } }); ytcenter.player.listeners.addEventListener("onReady", function(){ var api, state; if (ytcenter.player.getAPI) api = ytcenter.player.getAPI(); if (api && api.getPlayerState) state = ytcenter.player.getAPI().getPlayerState(); if (state === 1) { ytcenter.title.addPlayIcon(); } else { ytcenter.title.removePlayIcon(); } ytcenter.title.update(); }); var tmpFixRepeatAtEnd = false; ytcenter.player.listeners.addEventListener("onStateChange", function(state, b){ if (state === 1) { ytcenter.title.addPlayIcon(); } else { ytcenter.title.removePlayIcon(); } ytcenter.title.update(); if (ytcenter.doRepeat && ytcenter.settings.enableRepeat && state === 0) { if (ytcenter.settings.tempFixRepeat) { ytcenter.player.getAPI().stopVideo(); } ytcenter.player.getAPI().playVideo(); } if (ytcenter.settings.endOfVideoAutoSwitchToTab !== "none" && state === 0) { ytcenter.actionPanel.switchTo(ytcenter.settings.endOfVideoAutoSwitchToTab); } }); ytcenter.player.listeners.setOverride("SIZE_CLICKED", true); ytcenter.player.listeners.addEventListener("SIZE_CLICKED", function(large){ function getSizeById(id) { var sizes = ytcenter.settings["resize-playersizes"]; for (var i = 0; i < sizes.length; i++) { if (id === sizes[i].id) { return sizes[i]; } } return { id: "default", config: { align: true, height: "", large: false, scrollToPlayer: false, scrollToPlayerButton: false, width: "" } }; } if (ytcenter.settings.enableResize) { con.log("[Player Resize] Setting to " + (large ? "large" : "small") + "!"); if (large) { ytcenter.player.setPlayerWide(true); ytcenter.player.currentResizeId = ytcenter.settings['resize-large-button']; ytcenter.player.updateResize(); } else { ytcenter.player.setPlayerWide(false); ytcenter.player.currentResizeId = ytcenter.settings['resize-small-button']; ytcenter.player.updateResize(); } } else { this.getOriginalListener()(large); } }); /*if (ytcenter.feather) { var flashvars = document.getElementById("movie_player").getAttribute("flashvars").split("&"), args, i; for (i = 0; i < flashvars.length; i++) { args[decodeURIComponent(flashvars.split("=")[0])] = decodeURIComponent(flashvars.split("=")[0]); ytcenter.player.setConfig({args: args}); } }*/ if (loc.hash === "#ytcenter.settings.open") { ytcenter.unsafe.openSettings(); } }); ytcenter.pageReadinessListener.addEventListener("bodyComplete", function(page){ if (page === "embed" && !ytcenter.settings.embed_enabled) return; if (page === "comments") { ytcenter.domEvents.ready(); } if (page === "embed") { ytcenter.embed.load(); } else { ytcenter.guideMode.setup(); } ytcenter.spf.setEnabled(ytcenter.settings.ytspf); ytcenter.classManagement.applyClassesForElement(document.body); if (loc.hash === "#ytcenter.settings.open") { loc.hash = "#!"; } }); ytcenter.spf.addEventListener("request", function(e) { var detail = e.detail; ytcenter.player.setConfig(null); ytcenter.descriptionTags.destroy(); }); ytcenter.spf.addEventListener("process", function(e) { var detail = e.detail; if (detail && detail.response && detail.response.title) { ytcenter.title.originalTitle = detail.response.title; ytcenter.title.update(); } }); ytcenter.spf.addEventListener("partprocess", function(e) { var detail = e.detail; var url = detail.url; if (detail && detail.part) { var part = detail.part; if (part.title) { ytcenter.title.originalTitle = part.title; ytcenter.title.update(); } var swfcfg = null; if (part.swfcfg) { swfcfg = part.swfcfg; } else if (part.data && part.data.swfcfg) { swfcfg = part.data.swfcfg; } if (swfcfg) { /*swfcfg = ytcenter.player.modifyConfig(ytcenter.getPage(url), swfcfg); ytcenter.player.setConfig(swfcfg);*/ if (swfcfg.args && swfcfg.args.video_id) { ytcenter.videoHistory.addVideo(swfcfg.args.video_id); } } if (part.attr && part.attr.body && part.attr.body.class) { part.attr.body.class += " " + ytcenter.classManagement.getClassesForElementByTagName("body", url); } } }); ytcenter.spf.addEventListener("done", function(e) { var detail = e.detail; var url = detail.url; ytcenter.classManagement.applyClasses(url); ytcenter.pageSetup(); /* Removing leftover tooltips */ a = ytcenter.utils.transformToArray(document.getElementsByClassName("yt-uix-tooltip-tip")); for (i = 0; i < a.length; i++) { if (a[i] && a[i].parentNode === document.body) { con.log("[Tooltip Cleanup] Removed tooltip with id #" + a[i].id.replace("yt-uix-tooltip", "")); document.body.removeChild(a[i]); } } if (ytcenter.player.getConfig() !== null) { setTimeout(function(){ con.debug("[IssueTmpFix] Player not loading correct video."); var api = ytcenter.player.getAPI(); api.loadVideoByPlayerVars(ytcenter.player.getConfig().args); ytcenter.player.onYouTubePlayerReady(api); }, 1000); } }); ytcenter.pageReadinessListener.setup(); })(); }; // Utils function bind(scope, func) { var args = Array.prototype.slice.call(arguments, 2); return function(){ return func.apply(scope, args.concat(Array.prototype.slice.call(arguments))) }; } function map(obj, callback, thisArg) { for (var i = 0, n = obj.length, a = []; i < n; i++) { if (i in obj) a[i] = callback.call(thisArg, obj[i]); } return a; } function trimLeft(obj){ return obj.replace(/^\s+/, ""); } function trimRight(obj){ return obj.replace(/\s+$/, ""); } function setCookie(name, value, domain, path, expires) { domain = domain ? ";domain=" + encodeURIComponent(domain) : ""; path = path ? ";path=" + encodeURIComponent(path) : ""; expires = 0 > expires ? "" : 0 == expires ? ";expires=" + (new Date(1970, 1, 1)).toUTCString() : ";expires=" + (new Date(now() + 1E3 * expires)).toUTCString(); document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + domain + path + expires; } function getCookie(key) { return getCookies()[key]; } function getCookies() { var c = document.cookie, v = 0, cookies = {}; if (document.cookie.match(/^\s*\$Version=(?:"1"|1);\s*(.*)/)) { c = RegExp.$1; v = 1; } if (v === 0) { map(c.split(/[,;]/), function(cookie) { var parts = cookie.split(/=/, 2), name = decodeURIComponent(trimLeft(parts[0])), value = parts.length > 1 ? decodeURIComponent(trimRight(parts[1])) : null; cookies[name] = value; }); } else { map(c.match(/(?:^|\s+)([!#$%&'*+\-.0-9A-Z^`a-z|~]+)=([!#$%&'*+\-.0-9A-Z^`a-z|~]*|"(?:[\x20-\x7E\x80\xFF]|\\[\x00-\x7F])*")(?=\s*[,;]|$)/g), function($0, $1) { var name = $0, value = $1.charAt(0) === '"' ? $1.substr(1, -1).replace(/\\(.)/g, "$1") : $1; cookies[name] = value; }); } return cookies; } var now = Date.now || function () { return +new Date; }; // Support var support = (function(){ function localStorageTest() { try { localStorage.setItem(mod, mod); localStorage.removeItem(mod); return true; } catch (e) { return false; } } function customEvent() { try { var e = document.createEvent('CustomEvent'); if (e && typeof e.initCustomEvent === "function") { e.initCustomEvent(mod, true, true, { mod: mod }); return true; } return false; } catch (e) { return false; } } var mod = "support.test"; return { localStorage: localStorageTest(), Greasemonkey: (typeof GM_setValue !== "undefined" && (typeof GM_setValue.toString === "undefined" || GM_setValue.toString().indexOf("not supported") === -1)), Adguard: (typeof AdguardSettings === "object"), cloneInto: (typeof cloneInto === "function"), CustomEvent: customEvent() }; })(); // Chrome API function chrome_save(id, key, data) { if (typeof data !== "string") data = JSON.stringify(data); if (chrome && chrome.storage && chrome.storage.local) { var storage = chrome.storage.local; var details = {}; details[key] = data; storage.set(details); } else { console.warn("[Chrome] Chrome extension API is not present!"); setTimeout(function(){ defaultSave(id, key, data); }, 7); } } function chrome_load(id, key) { if (chrome && chrome.storage && chrome.storage.local) { var storage = chrome.storage.local; var value = null; if ((value = localStorage.getItem(key) || null) !== null) { console.log("[Chrome] Moving settings from old method to new method for " + key); var details = {}; details[key] = value; storage.set(details); localStorage.removeItem(key); callUnsafeWindow(id, value); } else { storage.get(key, function(result) { var res = {}; if (key in result) { res = result[key]; } callUnsafeWindow(id, res); }); } } else { console.warn("[Chrome] Chrome extension API is not present!"); setTimeout(function(){ defaultLoad(id, key); }, 7); } } // Safari API function safariMessageListener(e) { if (!e || !e.message) return; // Checking if data is present if (typeof e.message !== "string") return; // Checking if the object is a string. if (!e.message.indexOf || e.message.indexOf("{") !== 0) return; var d = JSON.parse(e.message); if (d.level !== "safe") { return; } if (e.name === "call") { var args = [d.id].concat(d.arguments); callUnsafeWindow.apply(null, args); } } // Opera API function operaMessageListener(e) { if (!e || !e.data) return; // Checking if data is present if (typeof e.data !== "string") return; // Checking if the object is a string. if (!e.data.indexOf || e.data.indexOf("{") !== 0) return; var d = JSON.parse(e.data); if (d.level !== "safe") { return; } callUnsafeWindow.apply(null, [d.id].concat(d.arguments)); } // Firefox API function onFirefoxEvent() { callUnsafeWindow.apply(null, arguments); } // General function callUnsafeWindow(id) { if (typeof id === "number" || typeof id === "string") { if (support.CustomEvent) { callUnsafeWindowEvent.apply(null, arguments); } else { callUnsafeWindowMessage.apply(null, arguments); } } } function callUnsafeWindowMessage(id) { if (typeof id === "number" || typeof id === "string") { var args = Array.prototype.slice.call(arguments, 1); window.postMessage(JSON.stringify({ level: "safe", id: id, arguments: args }), "*"); } } function callUnsafeWindowEvent(id) { if (typeof id === "number" || typeof id === "string") { var args = Array.prototype.slice.call(arguments, 1); var detail = { id: id, arguments: args }; // Firefox 30 or newer /*if (support.cloneInto) { detail = cloneInto(detail, document.defaultView); }*/ var e = document.createEvent("CustomEvent"); e.initCustomEvent("ytc-page-call", true, true, JSON.stringify(detail)); document.documentElement.dispatchEvent(e); } } function eventListener(e) { var detail = JSON.parse(e.detail); if (0 === 4) { // Safari safari.self.tab.dispatchMessage("call", e.detail); // Redirect event to the extension } else if (0 === 5) { // Opera opera.extension.postMessage(e.detail); // Redirect event to the extension } else { setTimeout(function(){ handleMethods(detail); }, 0); } if (e && typeof e.stopPropagation === "function") e.stopPropagation(); } function messageListener(e) { if (!e || !e.data) return; // Checking if data is present if (typeof e.data !== "string") return; // Checking if the object is a string. if (!e.data.indexOf || e.data.indexOf("{") !== 0) return; var d = JSON.parse(e.data); if (d.level !== "unsafe") { return; } if (0 === 4) { // Safari safari.self.tab.dispatchMessage("call", e.data); // Redirect message to the extension } else if (0 === 5) { // Opera opera.extension.postMessage(e.data); // Redirect message to the extension } else { handleMethods(d); } } function handleMethods(data) { switch (data.method) { case "xhr": xhr(data.arguments[0]); break; case "save": save(data.id, data.arguments[0], data.arguments[1]); break; case "load": load(data.id, data.arguments[0]); break; case "firefox_addWindowListener": addWindowListener(bind(null, callUnsafeWindow, data.id)); break; case "firefox_windowLinkerFireRegisteredEvent": windowLinkerFireRegisteredEvent.apply(null, data.arguments); break; case "GM_registerMenuCommand": if (support.Greasemonkey) { setTimeout(function(){ GM_registerMenuCommand(data.arguments[0], bind(null, callUnsafeWindow, data.id)); }, 7); } break; default: console.log("Unknown method: " + method + ", with data:", data); } } function adguard_xhr_getURL(details) { var encodeHeaders = function (headers) { if (typeof headers == "object") { var result = ""; for (header in headers) result += encodeURIComponent(header) + ":" + encodeURIComponent(headers[header]) + ","; return result.slice(0, -1) } if (typeof headers == "string") return encodeURIComponent(headers); return null }; var url = (settings.testDomain ? settings.testDomain : utils.getHostWithProtocol()) + settings.apiurl + settings.apiType + "?type=gm-xml-http-request"; var urlData = {}; urlData.url = encodeURIComponent(details.url || ""); urlData.data = encodeURIComponent(details.data || ""); urlData.headers = encodeHeaders(details.headers || ""); urlData.method = encodeURIComponent(details.method || ""); urlData.overridemimetype = encodeURIComponent(details.overridemimetype || ""); urlData.user = encodeURIComponent(details.user || ""); urlData.password = encodeURIComponent(details.password || ""); var prepareURL = []; for (var key in urlData) { if (urlData.hasOwnProperty(key)) { prepareURL.push(key + "=" + urlData[key]); } } url += "&" + prepareURL.join("&"); return url; } function adguard_xhr(details) { var xmlhttp; if (typeof XMLHttpRequest !== "undefined") { xmlhttp = new XMLHttpRequest(); } else if (typeof opera !== "undefined" && typeof opera.XMLHttpRequest !== "undefined") { xmlhttp = new opera.XMLHttpRequest(); } else { details["onerror"](responseState); return; } xmlhttp.onreadystatechange = function(){ var responseState = { responseXML: '', responseText: (xmlhttp.readyState == 4 ? xmlhttp.responseText : ''), readyState: xmlhttp.readyState, responseHeaders: (xmlhttp.readyState == 4 ? xmlhttp.getAllResponseHeaders() : ''), status: (xmlhttp.readyState == 4 ? xmlhttp.status : 0), statusText: (xmlhttp.readyState == 4 ? xmlhttp.statusText : ''), finalUrl: (xmlhttp.readyState == 4 ? xmlhttp.finalUrl : '') }; if (details["onreadystatechange"]) { details["onreadystatechange"](responseState); } if (xmlhttp.readyState == 4) { if (details["onload"] && xmlhttp.status >= 200 && xmlhttp.status < 300) { details["onload"](responseState); } if (details["onerror"] && (xmlhttp.status < 200 || xmlhttp.status >= 300)) { details["onerror"](responseState); } } }; try { xmlhttp.open(details.method, adguard_xhr_getURL(details)); } catch (e) { details["onerror"](); } if (details.headers) { for (var prop in details.headers) { xmlhttp.setRequestHeader(prop, details.headers[prop]); } } xmlhttp.send((typeof(details.data) !== 'undefined') ? details.data : null); } function xhr(details) { createCallableDetails(details); if (0 === 6) { // Firefox request(details); } else if (support.Greasemonkey) { setTimeout(function(){ GM_xmlhttpRequest(details); }, 7); } else { var xmlhttp; if (typeof XMLHttpRequest != "undefined") { xmlhttp = new XMLHttpRequest(); } else if (typeof opera != "undefined" && typeof opera.XMLHttpRequest != "undefined") { xmlhttp = new opera.XMLHttpRequest(); } else { details["onerror"](responseState); } xmlhttp.onreadystatechange = function(){ var responseState = { responseXML: '', responseText: (xmlhttp.readyState == 4 ? xmlhttp.responseText : ''), readyState: xmlhttp.readyState, responseHeaders: (xmlhttp.readyState == 4 ? xmlhttp.getAllResponseHeaders() : ''), status: (xmlhttp.readyState == 4 ? xmlhttp.status : 0), statusText: (xmlhttp.readyState == 4 ? xmlhttp.statusText : ''), finalUrl: (xmlhttp.readyState == 4 ? xmlhttp.finalUrl : '') }; if (details["onreadystatechange"]) { details["onreadystatechange"](responseState); } if (xmlhttp.readyState == 4) { if (details["onload"] && xmlhttp.status >= 200 && xmlhttp.status < 300) { details["onload"](responseState); } if (details["onerror"] && (xmlhttp.status < 200 || xmlhttp.status >= 300)) { details["onerror"](responseState); } } }; try { xmlhttp.open(details.method, details.url); } catch(e) { details["onerror"](); } if (details.headers) { for (var prop in details.headers) { xmlhttp.setRequestHeader(prop, details.headers[prop]); } } xmlhttp.send((typeof(details.data) !== 'undefined') ? details.data : null); } } function createCallableDetails(details) { var callback = ["abort", "error", "load", "progress", "readystatechange", "timeout"]; for (var i = 0, len = callback.length; i < len; i++) { var on = details["on" + callback[i]]; if (typeof on === "number") { details["on" + callback[i]] = bind(null, callUnsafeWindow, on); } } } function save(id, key, data) { if (typeof data !== "string") data = JSON.stringify(data); if (0 === 1 || 0 === 8) { chrome_save(id, key, data); } else if (0 === 2) { callUnsafeWindow(id, window.external.mxGetRuntime().storage.setConfig(key, data)); } else if (0 === 6) { callUnsafeWindow(id, storage_setValue(key, data)); } else { setTimeout(function(){ defaultSave(id, key, data); }, 7); } } function defaultSave(id, key, data) { if (support.Greasemonkey) { callUnsafeWindow(id, GM_setValue(key, data)); } else if (support.localStorage) { callUnsafeWindow(id, localStorage.setItem(key, data)); } else { callUnsafeWindow(id, setCookie(key, data, null, "/", 86400000000)); } } function load(id, key) { if (0 === 1 || 0 === 8) { chrome_load(id, key); } else if (0 === 2) { callUnsafeWindow(id, window.external.mxGetRuntime().storage.getConfig(key) || "{}"); } else if (0 === 6) { callUnsafeWindow(id, storage_getValue(key) || "{}"); } else { setTimeout(function() { defaultLoad(id, key); }, 7); } } function defaultLoad(id, key) { if (support.Greasemonkey) { callUnsafeWindow(id, GM_getValue(key) || "{}"); } else if (support.localStorage) { callUnsafeWindow(id, localStorage.getItem(key) || "{}"); } else { callUnsafeWindow(id, getCookie(key) || "{}"); } } function windowUnload() { window.removeEventListener("message", messageListener, false); window.removeEventListener("unload", windowUnload, false); if (0 === 4) { // Safari safari.self.removeEventListener("message", safariMessageListener, false); } else if (0 === 5) { // Opera opera.extension.onmessage = null; } } function isDomainAllowed(domains) { var domain = document.domain; for (var i = 0, len = domains.length; i < len; i++) { if (domain === domains[i]) { return true; } } return false; } function initListeners() { if (support.CustomEvent) { window.addEventListener("ytc-content-call", eventListener, false); } else { window.addEventListener("message", messageListener, false); } window.addEventListener("unload", windowUnload, false); if (0 === 4) { // Safari safari.self.addEventListener("message", safariMessageListener, false); } else if (0 === 5) { // Opera opera.extension.onmessage = operaMessageListener; } } var domains = ["www.youtube.com", "youtube.com", "apis.google.com", "plus.googleapis.com"]; if (isDomainAllowed(domains)) { // Let's do a check to see if YouTube Center should run. console.log("Domain registered " + document.domain + "."); initListeners(); inject(main_function); } else { throw "Domain " + document.domain + " not allowed!"; } })();