/*
The MIT License (MIT)
Copyright (c) 2013-2014 Zimny Lech
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 off
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.
*/
// DESCRIPTION: CyTube Plus - JavaScript and CSS library for CyTube channels enhancements
// CURRENT VERSION: 4.5
// DATE OF MODIFICATION: 2014-08-29
// PROJECT URL: https://github.com/zimny-lech/CyTube-Plus
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// INSTALLATION NOTES:
// 0. Choose simple or custom installation (simple one has ready-to-use library with limited functionality).
// SIMPLE INSTALLATION: use 'https://dl.dropboxusercontent.com/s/2uks4pif8mx2qab/main-ready.js' as default URL
// go to -> 3.
// CUSTOM INSTALLATION: go to -> 1.
// 1. Configure this library according to your wishes (see configuration sections below).
// 2. Save customized library to your file hosting (e.g. Dropbox) or to your own server.
// WARNING! You must be able to access .js file directly (browser's URL must contain .js extension, not .php etc.).
// WARNING FOR DROPBOX USERS! Always use 'dl.dropboxusercontent.com' URL instead of 'www.dropbox.com' URL.
// 3. Enter your JS file location into 'External Javascript' field in 'Channel Settings' modal window.
// 4. Enter library CSS file location into 'External CSS' field in 'Channel Settings' modal window.
// NOTE: use default 'https://dl.dropboxusercontent.com/s/180y5d6mvlu8kd8/main.css' URL,
// or copy it to your own location.
// 5. Congratulations, your have just installed CyTube Plus!
// Need detailed options explanations? Go to https://github.com/zimny-lech/CyTube-Plus/wiki/FAQ
// Problems? Something doesn't work? Go to https://github.com/zimny-lech/CyTube-Plus/wiki/Troubleshooting
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CONFIGURE BELOW BEFORE INSTALLING IF YOU WANT TO CUSTOMIZE THIS LIBRARY
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* ----- STARTING CONFIGURATION - USER INTERFACE (UI) ----- */
// CONFIGURATION NOTES:
// In this section you can immediately enable and disable each option (set '1' to enable, '0' to disable)
// Every option marked as [&] requires additional configuration (see other sections below)
// WARNING! apostrophe sign (') in all text/html values must be prepend with "\" sign (e.g. "don\'t")
// FILTERS INSTALLATION: open 'Channel Settings' modal window, go to 'Edit' -> 'Chat Filters',
// click 'Prepare fonts filters' button, and import
// If you need more explanations, go to https://github.com/zimny-lech/CyTube-Plus/wiki/FAQ
UI_DefaultSynchtube = 1; // default old Synchtube layout (player and playlist on the left)
UI_Favicon = 1; // [&] channel favicon
UI_MiniLogo = 1; // [&] small channel logo/avatar in the top navbar
UI_ChannelName = 1; // [&] channel custom brand name
UI_HeaderDropMenu = 1; // [&] additional header dropdown menu
UI_RemoveLayoutMenu = 1; // removing 'Layout' menu from the header
UI_MOTDAutoLogo = 0; // [&] big channel logo inserted into MOTD
UI_MOTDTabs = 0; // [&] switchable MOTD tabs application for homepage-like channel header
UI_MOTDDelete = 0; // deleting previous MOTD after accepting/loading script
UI_RulesBtn = 0; // [&] button displaying channel rules
UI_AttentionBar = 0; // [&] imageboard-style attention bar (requires external application)
UI_ChannelAnnouncement = 0; // [&] additional custom channel announcement
UI_FullTitleBar = 1; // full-width video title bar
UI_ProgressBar = 1; // YouTube/Dailymotion progress bar
// [ REQUIRE: UI_FullTitleBar enabled ]
UI_TitleIcon = 1; // [&] full-width title bar icon
// [ REQUIRE: UI_FullTitleBar enabled ]
UI_TitleBarDescription = 1; // [&] custom title bar description (default "Currently Playing:")
UI_JoinText = 1; // [&] chat message after user joining
UI_LeaveText = 1; // [&] chat message after user leaving
UI_UserCommands = 1; // [&] additional commands in the chat window
UI_UserMarks = 0; // [&] special signs/avatars before every message for defined users
UI_Squavatars = 0; // automatic squavatars (2-colored square avatars) before every message
// [ REQUIRE: UI_UserMarks enabled ]
UI_UsernameMark = 1; // [&] custom mark after username (default ":")
UI_MessagesSuffix = 0; // [&] text added to random chat messages
UI_CustomPingSound = 1; // [&] custom sound for chat notifications
UI_SoundFilters = 0; // [&] chat sounds played after sending certain words
UI_ChatSpeak = 1; // text speaking after '!say' and '!mow' commands (english and polish)
UI_IndependentEmotes = 0; // [&] additional settings-independent emotes
UI_IndependentFilters = 1; // [&] additional settings-independent filters
UI_FontsBtn = 0; // button displaying box with clickable chat fonts
// [ REQUIRE: INSTALLATION (see above) ]
UI_UnicodeChars = 1; // [&] additional buttons in the fonts panel with unicode characters
// [ REQUIRE: UI_FontsBtn enabled ]
UI_EmotesBtn = 1; // button displaying box with clickable chat emotes
UI_GroupEmotes = 1; // [&] emotes panel pagination, display limited number of emotes at one time
// [ REQUIRE: UI_EmotesBtn enabled ]
UI_CommandsBtn = 1; // button displaying modal window with chat commands help
UI_ModPanel = 0; // [&] panel with messages and help for moderators
UI_CustomCaptions = 0; // [&] custom captions for add, refresh, voteskip buttons, and welcome text
UI_PlayerOptions = 1; // [&] additional player options
UI_TransformationBtns = 1; // player transformation buttons
UI_ChannelDatabase = 0; // [&] box with embed additional media database
UI_ChannelGalleries = 0; // [&] box with embed galleries
UI_DisplayModeSel = 1; // selector with player display modes
UI_ChannelTheme = 0; // [&] additional default channel theme
UI_EmbeddingMedia = 1; // [&] possibility to embedding (displaying) images and .webm videos on the chat
UI_MediaControls = 1; // embedded video preloaded controls
// [ REQUIRE: UI_EmbeddingMedia enabled ]
UI_QuickCommandsBtns = 1; // buttons with '/clear' and '/afk' functions
UI_VolumeBtns = 1; // additional volume buttons for YouTube player
UI_EmptyCornerBackground = 0; // [&] random background image for empty playlist row corner
UI_ExtendedGetURLs = 1; // extended 'Get URLs' function
UI_DefaultNonTemp = 1; // default unchecking "Add as temporary" checkbox after loading for registered users
UI_CustomFooter = 0; // [&] custom channel footer
UI_CustomRightFooter = 0; // [&] right-sided footer box
UI_UserStatistics = 1; // displaying in the footer user visits number and current online time
UI_ExternalScript = 0; // [&] additional external script file
UI_ChannelCache = 1; // caching script emotes, additional media database and default gallery
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* ----- DETAILED BASIC CONFIGURATION ----- */
// NOTES:
// a) values for 'MOTDAutoLogo_Mode': 1 = first logo; 2 = random logo; 3 = logo rotation; 7 = weekdays logos
// b) in 'SoundFilters_Array' use .ogg or .wav files, some browsers has problems with embedded .mp3
// c) in 'ModPanel_Array' item leave empty first (username) field to make a message to all moderators
// d) in 'EmbeddingMedia_Images' and 'EmbeddingMedia_Videos' you can define acceptable file extensions
// use CSS syntax: e.g. 'a[href$=""]' defines acceptable end of an URL (file extension)
// you can also define URL fragments: 'a[href*=""]', or add excluding clause: '.not(\'a[href*=""]\'), etc.
/* -- single variables -- */
Favicon_URL = 'https://dl.dropboxusercontent.com/s/xgefazzyhs8xncp/icon.png';
MiniLogo_URL = 'https://dl.dropboxusercontent.com/s/xgefazzyhs8xncp/icon.png';
ChannelName_Caption = 'CyTube Plus';
HeaderDropMenu_Title = 'Synch';
MOTDAutoLogo_Mode = 1;
MOTDAutoLogo_Interval = 20;
RulesBtn_Caption = 'Read Channel Rules';
AttentionBar_URL = '';
ChannelAnnouncement_Title = 'Administration Message';
TitleIcon_URL = 'https://dl.dropboxusercontent.com/s/xgefazzyhs8xncp/icon.png';
TitleBarDescription_Caption = 'Now Playing:';
JoinText_Message = 'joined';
LeaveText_Message = 'left';
UsernameMark_Char = '>';
MessagesSuffix_Text = '~xD';
MessagesSuffix_Percentage = 10;
CustomPingSound_URL = 'https://dl.dropboxusercontent.com/s/0qtsttblgmkewnv/beep.wav';
PlayerHiding_URL = 'https://dl.dropboxusercontent.com/s/xz2o99scw5i7aai/stop.png';
GroupEmotes_Number = 100;
ExternalScript_URL = '';
/* -- arrays -- */
HeaderDropMenu_Array = [
['CyTube Servers', ''],
['Calzoneman CyTube', 'http://cytu.be/'],
['6irc Synchtube', 'http://synchtube.6irc.net/'],
['CyTube Stuff', ''],
['Source code', 'https://github.com/calzoneman/sync'],
['FAQ', 'https://github.com/calzoneman/sync/wiki/Beginner%27s-Guide-and-FAQ'],
['IRC', 'http://webchat.6irc.net/?channels=chat,synchtube'],
['CyTube Plus', 'https://github.com/zimny-lech/CyTube-Plus'],
];
MOTDAutoLogo_Array = [
'https://dl.dropboxusercontent.com/s/7mrz85gl29eiiks/logo.png',
];
MOTDTabs_Array = [
['Home', 'Welcome to our channel!'],
['Playlist', 'Playlist tab.
We watched this, that and this.'],
['Schedule', 'Schedule: