Advertisement
liamdalion

Untitled

Oct 21st, 2015
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.69 KB | None | 0 0
  1. // Some text to get the charset autodetection right: äöüßäöüßæ
  2.  
  3. if (window.location.hash === "#debug") {
  4. $.getScript('http://localhost.kuschku.de/custom.js');
  5. } else if (window.location.hash === "#old") {
  6. /*
  7. * The following code is for the sole use of the channel located at http://cytu.be/r/yepityha
  8. */
  9.  
  10. var CUSTOM_RULES = {
  11. '1': "No racism, no sexism, or any other forms of bigotry or discriminatory content. This includes chat messages, links to images, gifs, articles, as well as videos.",
  12. '2': "Be respectful. No defamation of or insulting other users in chat. Do not harass people in public nor PMs. Do not even attempt to doxx someone. We take this very seriously.",
  13. '3': "Do not share PMs that were shared with a reasonable expectation of confidence. If you're being harassed however, we encourage you to share it with a mod or admin.",
  14. '5': "Do not add any videos of or embed any NSFW or NSFL content. Tag NSFW and NSFL links in chat accordingly. This includes all shocking content and anything that could trigger an epileptic attack.",
  15. '6': "No spamming or repetitive messages of any kind. Use a maximum of 3 unique emotes at once. Do not abuse or spam $ commands. Remember: you can PM TARS!",
  16. '7': "No spoilers of movies, series or games we have been or are currently watching or that are scheduled for future viewings. Use tagged spoiler tags if you want to discuss.",
  17. '8': "Do not post any leaked or unreleased content in the playlist. This is per request of CyTube. Not abiding by this rule could get our channel banned.",
  18. '9': "Keep the chat English only. You are permitted to post single messages, greetings or thanks in other languages, but anything beyond that should be kept to PMs.",
  19. '10': "Do not try to manipulate polls or manipulate others into voting for what you want. Neither those here on CyTube nor any linked in the MOTD.",
  20. '11': "Generally act in good faith. Don't push the boundaries of what you can get away with. We don't have a detailed law book, we expect you to act in the spirit of our rules. Admins and mods will decide punishments on a case by case basis.",
  21. '12': "(There's still no rule #4)",
  22. '13': "DONT LINK URLS THAT CRASH PEOPLES BROWSERS OR ARE TROLLING IN ANY SENSE SUCH OF THAT SO ADMINS DONT INSTALL FIXFOX THINKING CHROME IS NOT WORKING"
  23. };
  24.  
  25. CUSTOM_awarded = {};
  26.  
  27.  
  28. CUSTOM_intro = {
  29. 'mrtnwlkr': '<span class="bold italic"><span class="redtext">MARTIN MOTHERFUCKING WALKER IN THE HOUSE</span></span>',
  30. 'mtfp': '<span class="bold"><span class="redtext">mtfp</span> joined</span>',
  31. 'yepityha': '<span class="bold">Let us welcome home our King <span class="redtext">yepityha</span>.</span>',
  32. 'sleepthroughsummer': '<span class="bold">I\'m pleased to announce that <span class="redtext">Summer</span> came.</span>',
  33. 'Gaudium': '<span class="bold">Only one crazy enough to be out in this storm is <span class="redtext">Gaudium</span>.</span>',
  34. 'Soniiruv2': '<span class="bold"><span class="redtext">Soniiruv2</span> has awoken from slumber.</span>',
  35. 'TheKingOfLimbs': '<span class="bold">A wild <span class="redtext">TheKingOfLimbs</span> appears.',
  36. 'mrmooncraft': '<span class="bold">The Pope Worshipper, <span class="redtext">mrmooncraft</span>, has arrived.</span>',
  37. 'Hydroxide': '<span class="bold"><span class="redtext">Hydroxide</span>, the Punmaster and Deliverer has parked his new sled.</span>',
  38. 'blaaze6': '<span class="bold">The Great and Devious Mutton Chop Leader, <span class="redtext">blaaze6</span>, is reporting for duty.</span>',
  39. 'djupcake': '<span class="bold">Allt är täckt av <span class="redtext">djup</span>, <span class="redtext">djup</span>, <span class="redtext">djup</span>, <span class="redtext">djup</span><span class="elsatext">cake</span></span>',
  40. 'ElsaGoneWild': '<span class="bold"><span class="redtext">WORLDSWILDEST</span><span class="elsatext">ELSA</span> has arrived.</span>',
  41. 'themixdude': '<span class="bold">Great Odin\'s Raven! <span class="redtext">themixdude</span></span> is back!',
  42. 'TDa_': '<span class="bold">The official Stream chipmunk, <span class="redtext">TDa_</span>, emerges from the forest.</span>',
  43. 'FrozenRaider': '<span class="bold">Can someone tell <span class="redtext">FrozenRaider</span> WHAT THE HELL IS GOING ON HERE?</span>',
  44. 'Noatak': '<span class="bold">My name is <span class="redtext">Noatak</span>, vanguard of equality: Look on my works, ye Mighty, and despair!</span>',
  45. 'Elsas-Tits': '<span class="bold"><span class="redtext">Elsas-Tits</span> is back! Firmer and perkier than ever!</span>',
  46. 'WWWWWWGMWWWWWWW': '<span class="bold">Hide Rapunzel and hide your spiders, \'cause <span class="redtext">WWWWWWGMWWWWWWW</span> is here and he\'s up to his usual <span class="oranjetext">SHENANIGANS</span>.</span>',
  47. 'NoName999': '<span class="bold">The Man with <span class="redtext">No Name</span> is back.</span>',
  48. 'Annapaca': '<span class="bold">A fluffy <span class="redtext">Annapaca</span> returns from where no one goes.</span>',
  49. 'Amantha77': '<span class="bold">Everyone\'s caring mother <span class="redtext">Amantha</span> is here, go hug her!</span>',
  50. 'Igneek': '<span class="bold">The one with no welcome message, <span class="redtext">Igneek</span>, is back.</span>',
  51. 'Pwntagram': '<span class="bold">It\'s a magical <span class="redtext">Pwnie</span> flying through the sky... SHOOT IT DOWN!</span>',
  52. 'HCAndersen': '<span class="bold">The great storyteller <span class="redtext">HCAndersen</span> has made his way to the stream by carriage, ready to share of his tales!</span>',
  53. 'KamikazePlatypus': '<span class="bold">From just west of weird, a <span class="redtext">KamikazePlatypus</span> crashes into battle.</span>',
  54. 'Price2411': '<span class="bold"><span class="redtext">Price2411</span>, the Egyptian God of procrastination has arrived precisely when he means to.</span>',
  55. 'poler10': '<span class="bold">Amidst a storm of Super Monkeys and the shredded rubber of a thousand bloons, <span class="redtext">poler10</span> emerges.</span>',
  56. '9kz7': '<span class="bold"><span class="redtext">9kz7</span>, the stream\'s #1 shipper of <span class="kristannatext">Kristanna</span>, is now online... and is worth melting for!</span>',
  57. 'Drewshoo': '<span class="bold"><span class="redtext">Drewshoo</span> is in the pipe, 5x5.</span>',
  58. 'joxxill': '<span class="bold"><span class="redtext">joxxill</span> has arrived in his search of magical items</span>',
  59. 'GaryTheLegend': '<span class="bold">I\'m a little rusty on my white girl gangsta, but "ehoyi" must mean that <span class="redtext">GaryTheLegend</span>\'s here!</span>',
  60. 'Sheenellie': '<span class="bold">Behold! The Kawaii prince has risen from the depths of hell and goes by the name <span class="redtext">Sheenellie</span>!</span>',
  61. 'TwistedBulldog': '<span class="bold"><span class="redtext">TwistedBulldog</span> couldn\'t think of a welcome message, so he had 9kz7 make him one.</span>',
  62. 'greatlachlan': '<span class="bold">Kuinka <span class="redtext">greatlachlan</span>ista tuntuu kun hän palaa maahan tekemään vartiokierrosta saatuaan kolmannenkymmenennen ensimmäisen tason, voittaneensa Crotan ja liityttyään streamiin</span>',
  63. 'Asami': '<span class="bold"><span class="redtext">Asami</span> is here, king of comedy, king of cats!</span>',
  64. 'gutlessVADER': '<span class="bold">My name is <span class="redtext">gutlessVADER</span>, and /r/yepityha is my favorite stream on the Citadel.</span>',
  65. 'Gareth001': '<span class="bold"><span class="redtext">Gareth001</span>, the streaming demon, is coming in for a cheeky peek.</span>',
  66. 'greendragons': '<b> A star shines in the hour of our meeting as <span class="redtext">greendragons</span> greets the channel.</b>',
  67.  
  68. };
  69.  
  70. CUSTOM_bot_name = "TARS";
  71.  
  72. CUSTOM_ranks = {
  73. "Liam_": 5,
  74. "yepityha": 4,
  75. "Soniiruv2": 2,
  76. "Lidarius": 2,
  77. "blaaze6": 2,
  78. "TARS": 2,
  79. }
  80.  
  81. var CUSTOM_rank_process_MOTD = function() {
  82. var schedule_regex = /permissions\:\:(\{.*\})/;
  83. var html = $("#motd").html();
  84. var schedule_matches = html.match(schedule_regex);
  85. html = html.replace(schedule_regex, "");
  86. $("#motd").html(html);
  87. }
  88.  
  89. var CUSTOM_schedule_process_MOTD = function() {
  90. var schedule_regex = /schedule\:\:(\[.*\])/;
  91. var html = _CUSTOM_motd_contents;
  92. var schedule_matches = html.match(schedule_regex);
  93. html = html.replace(schedule_regex, "");
  94.  
  95. $("#motd").html(html);
  96.  
  97. if(typeof(_CUSTOM_schedule_data) === 'undefined') {
  98. _CUSTOM_schedule_data = schedule_matches ? $.parseJSON(schedule_matches[1]) : [];
  99. }
  100. if( typeof(CUSTOM_schedule_update_button) !== 'undefined' ) {
  101. CUSTOM_schedule_update_button();
  102. }
  103. }
  104.  
  105. // Schedule
  106. _CUSTOM_motd_contents = "";
  107.  
  108. if (typeof(_setMotd) == 'undefined') { _setMotd = Callbacks.setMotd; }
  109. Callbacks.setMotd = function(data) {
  110. _CUSTOM_motd_contents = data;
  111. _setMotd(data);
  112.  
  113. CUSTOM_schedule_process_MOTD();
  114. };
  115.  
  116. if (typeof(_addUser) == 'undefined') { _addUser = Callbacks.addUser; }
  117. Callbacks.addUser = function(data, ignore_intro) {
  118. _addUser(data);
  119.  
  120. if ( !ignore_intro ) {
  121. CUSTOM_process_intro_message(data.name);
  122. }
  123. };
  124.  
  125.  
  126. Callbacks.userlist = function(data) {
  127. $(".userlist_item").remove();
  128. for(var i = 0; i < data.length; i++) {
  129. Callbacks.addUser(data[i], true);
  130. }
  131. }
  132.  
  133. _CUSTOM_image_embed = [];
  134.  
  135. if($('#arendelle').length) { $('#arendelle').remove(); }
  136. $('#motdrow').prepend('<img id="arendelle" class="center" src="http://i.imgur.com/ZcRb9pP.png">');
  137.  
  138. /*if($('#muffin-button').length) { $('#muffin-button').unbind().remove(); }
  139. //$('#leftcontrols').prepend('<button id="muffin-button" title="Muffin Button" class="btn btn-sm btn-default">Muffin Button</button>');
  140. $('#leftcontrols').prepend('<img id="muffin-button" title="Muffin Button" style="cursor:pointer" src="http://i.imgur.com/JpX92jz.png"/>');
  141. $('#muffin-button').click(function() {
  142. socket.emit("chatMsg", {
  143. msg: "++ENCHANTMENT?++ENCHANTMENT!++",
  144. meta: {}
  145. });
  146. });*/
  147.  
  148. $.ajaxSetup({
  149. cache: false
  150. });
  151.  
  152. $.get("https://ssl.kuschku.de/cdn/custom.css", function(data) {
  153. $("#customcss").remove();
  154. if(!USEROPTS.ignore_channelcss) {
  155. $("<style/>").attr("type", "text/css")
  156. .attr("id", "customcss")
  157. .text(data)
  158. .appendTo($("head"));
  159. }
  160. });
  161.  
  162. // ------- <code author="tanstaff">
  163. var CUSTOM_UTC_time = function() {
  164. var date = new Date();
  165. var hours = ('0' + date.getUTCHours()).slice(-2);
  166. var minutes = ('0' + date.getUTCMinutes()).slice(-2);
  167. var utc_time = hours + ":" + minutes;
  168. return utc_time;
  169. }
  170.  
  171. var CUSTOM_UTC_update_button = function() {
  172. var utc = CUSTOM_UTC_time();
  173. $('#clockstaff').html(utc + ' GMT');
  174. }
  175.  
  176. if($('#clockstaff').length) { $('#clockstaff').unbind().remove(); }
  177.  
  178. $('#modflair').before('<span class="label label-default pull-right pointer" id="clockstaff"></span>');
  179.  
  180. CUSTOM_UTC_update_button();
  181. if (typeof(_CUSTOM_UTC_interval) !== 'undefined') {
  182. clearInterval(_CUSTOM_UTC_interval);
  183. }
  184.  
  185. var _CUSTOM_UTC_interval = setInterval(CUSTOM_UTC_update_button, 5 * 1000);
  186. // ------- </code>
  187.  
  188. /*
  189. * Removing "Currently Playing: " from video title
  190. */
  191. if (typeof(_changeMedia) == 'undefined') { _changeMedia = Callbacks.changeMedia; }
  192. Callbacks.changeMedia = function(data) {
  193. _changeMedia(data);
  194. $("#currenttitle").text(data.title);
  195. }
  196.  
  197.  
  198. // The remainder of our custom JS is loaded from Amazon S3 to get past the 20kB limit on this built-in JS editor.
  199. $.getScript('https://ssl.kuschku.de/cdn/custom.js');
  200.  
  201. } else {
  202. $.getScript('https://ssl.kuschku.de/cdn/beta/custom.js');
  203. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement