Advertisement
StevoLopata

bleg testing

Feb 26th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.98 KB | None | 0 0
  1. /*
  2. ** Navbar Autohider
  3. */
  4. $("#navbar-autohide").remove()
  5. ;(function(){
  6.  
  7. if($("#navbar-autohide").length)
  8. return
  9.  
  10. $("<style>")
  11. .prop("id","navbar-autohide")
  12. .attr("type","text/css")
  13. .appendTo("head")
  14. .text("\
  15. \
  16. @media screen and (min-width: 1024px){\
  17. nav.navbar:not(:hover) { opacity: 0.15; transition: opacity .5s ease-out;}\
  18. nav.navbar:hover { opacity: 1.00; transition: opacity .3s ease-out;}\
  19. }\
  20. \
  21. ");
  22.  
  23. })();
  24.  
  25.  
  26. setInterval(function(){
  27. USEROPTS.sort_rank = 1;
  28. USEROPTS.sort_afk = 1;
  29. USEROPTS.layout = "fluid";
  30. },1000);
  31.  
  32. // Taima CyTube compatibility
  33. var IGNORE_SCROLL_EVENT = false;
  34. function stripImages(msg){ return msg; }
  35.  
  36.  
  37. /*!
  38. **| CyTube Channel: Wooo Internal Script
  39. **|
  40. **| All code written by Xaekai except where otherwise noted.
  41. **| Copyright 2014-2016 All Rights Reserved
  42. **|
  43. **@preserve
  44. */
  45. if(!this[CHANNEL.name]){this[CHANNEL.name]={}}if(!this[CHANNEL.name].branding){this[CHANNEL.name].branding=$(".navbar-brand").html("").css({"background-image":'url("https://i.imgur.com/ASNU5oi.png")',"background-size":"100%","min-width":"50px","background-repeat":"no-repeat","background-position":"center center"})}if(!this[CHANNEL.name].favicon){this[CHANNEL.name].favicon=$("<link/>").prop("id","favicon").attr("rel","shortcut icon").attr("type","image/png").attr("sizes","64x64").attr("href","http://i.imgur.com/oeldPon.png").appendTo("head")}/*!
  46. **| Xaekai's Sequenced Module Loader
  47. **|
  48. **@preserve
  49. */
  50.  
  51. ({
  52. options: {
  53. designator: {
  54. prefix: 'Woookie-',
  55. delay: 90 * 1000
  56. },
  57. playlist: {
  58. collapse : true,
  59. hidePlaylist : true,
  60. inlineBlame : true,
  61. moveReporting : false,
  62. quickQuality : false,
  63. recentMedia : true,
  64. simpleLeader : true,
  65. syncCheck : true,
  66. thumbnails : true,
  67. timeEstimates : true,
  68. volumeControl : false,
  69. },
  70. various: {
  71. notepad : true,
  72. smartScroll : true,
  73. emoteToggle : true,
  74. },
  75. chatext: {
  76. smartScroll: true
  77. }
  78.  
  79. },
  80. modules: {
  81. 'settings': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_settings.min.js", done: true },
  82. 'audio': { active: 1, rank: -1, url: "https://resources.pink.horse/scripts/external_audiolib.js", done: true },
  83. 'privmsg': { active: 1, rank: 1, url: "https://resources.pink.horse/newscripts/module_privmsg.min.js", done: true },
  84. 'whispers': { active: 0, rank: -1, url: "https://resources.pink.horse/newscripts/module_whispers.min.js", done: true },
  85. 'userlist': { active: 0, rank: -1, url: "https://resources.pink.horse/newscripts/module_userlist.min.js", done: true },
  86. 'md5hash': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_md5.min.js", done: true },
  87. 'designator': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_designator.min.js", done: true },
  88. 'playlist': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_playlist.min.js", done: true },
  89. 'notifier': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_alerts.min.js", done: true },
  90. 'chatline': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_chatline.min.js", done: true },
  91. 'chatext': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_chatext.min.js", done: true },
  92. 'unimoji': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_unimoji.min.js", done: true },
  93. 'hotkeys': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_hotkeys.min.js", done: true },
  94. 'layout': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_layout.min.js", done: true },
  95. 'various': { active: 1, rank: -1, url: "https://resources.pink.horse/newscripts/module_various.min.js", done: true },
  96.  
  97. },
  98.  
  99. /*
  100. ** You generally don't need to touch anything below
  101. */
  102. initialize: function(){
  103. if(CLIENT.modules){ return }else{ CLIENT.modules = this }
  104.  
  105. // Backwards compat
  106. window[CHANNEL.name].modulesOptions = this.options;
  107.  
  108. console.info('[XaeModule]', 'Begin Loading.');
  109.  
  110. this.index = Object.keys(this.modules);
  111. this.sequencerLoader();
  112. },
  113. sequencerLoader : function (){
  114. // After first run we curry the previous modules postload hook (the "done")
  115. // This is mainly used to invoke a cleanup/settings function to
  116. // reassign variables in modules/scripts that don't use module options
  117. if(this.state.prev){
  118. setTimeout(this.modules[this.state.prev].done, 0)
  119. this.state.prev = "";
  120. }
  121.  
  122. if(this.state.pos >= this.index.length){
  123. return console.info('[XaeModule]', 'Loading Complete.');
  124. }
  125.  
  126. var currKey = this.index[this.state.pos];
  127. if(this.state.pos < this.index.length){
  128. if(this.modules[currKey].active){
  129. if(this.modules[currKey].rank <= CLIENT.rank){
  130. console.info('[XaeModule]', 'Loading:', currKey);
  131. this.state.prev = currKey;
  132. this.state.pos++;
  133. $.getScript(this.modules[currKey].url, this.sequencerLoader.bind(this))
  134. } else {
  135. if(this.modules[currKey].rank === 0 && CLIENT.rank === -1){
  136. (function(module){
  137. socket.once('login', (data)=>{
  138. if(data.success){
  139. $.getScript(module.url);
  140. }
  141. })
  142. })(this.modules[currKey])
  143. }
  144. this.state.pos++;
  145. this.sequencerLoader()
  146. }
  147. } else {
  148. this.state.pos++;
  149. this.sequencerLoader()
  150. }
  151. }
  152. },
  153. state: { prev: '', pos: 0 },
  154. }).initialize();
  155.  
  156. /*
  157. ** Client-side Giphy Search Bot Command Emulation
  158. ** Written by Xaekai
  159. */
  160.  
  161. ({
  162. embedCode: '.pic',
  163. errorCode: 'ssc:red ',
  164. giphyKey: 'dc6zaTOxFJmzC',
  165. setupListener: function(){
  166. socket.on("chatMsg", this.handleChatMsg.bind(this));
  167. },
  168. handleChatMsg: function(data){
  169. if (CLIENT.name === data.username && data.msg.trim().indexOf('$giphy') > -1){
  170. var search = data.msg.trim().split('$giphy').pop();
  171. this.giphySearch(search);
  172. }
  173. },
  174. giphySearch: function(query){
  175. $.getJSON(`https://api.giphy.com/v1/gifs/search?api_key=${this.giphyKey}&q=${encodeURIComponent(query)}`)
  176. .done((data)=>{
  177. if(data.data.length > 0){
  178. var index = Math.floor(Math.random()*data.data.length);
  179. var image = data.data[index].images.original.url;
  180. //console.log(image);
  181. socket.emit("chatMsg", { msg: image + this.embedCode, meta: {} });
  182. }
  183. else {
  184. //console.log("No gif found for " + search);
  185. socket.emit("chatMsg", { msg: this.errorCode + " No gif found for " + search });
  186. }
  187. })
  188. .error(function(data) {
  189. console.error("Giphy error: " + data);
  190. })
  191. ;
  192. },
  193. start: function(){
  194. if(CLIENT.giphy){ return }else{ CLIENT.giphy = this }
  195. this.setupListener();
  196. },
  197. }).start();
  198.  
  199. function formatUserlistItem(a){var e={name:a.data("name")||"",rank:a.data("rank"),profile:a.data("profile")||{image:"",text:""},leader:a.data("leader")||!1,icon:a.data("icon")||!1,afk:a.data("afk")||!1},s=$(a.children()[1]);s.removeClass(),s.css("font-style",""),s.addClass(getNameColor(e.rank));var t=e.name.replace(/[^\w-]/g,"\\$");s.addClass("userlist-"+t),a.find(".profile-box").remove(),e.afk?a.addClass("userlist_afk"):a.removeClass("userlist_afk"),a.data("meta")&&a.data("meta").muted?a.addClass("userlist_muted"):a.removeClass("userlist_muted"),a.data("meta")&&a.data("meta").smuted?a.addClass("userlist_smuted"):a.removeClass("userlist_smuted");var o=null;s.mouseenter(function(s){o&&o.remove();var t=s.clientY+5,d=s.clientX;o=$("<div/>").addClass("profile-box linewrap").css("top",t+"px").appendTo(a),e.profile.image&&$("<img/>").addClass("profile-image").attr("src",e.profile.image).appendTo(o),$("<strong/>").text(e.name).appendTo(o);var l=a.data("meta")||{};l.ip&&($("<br/>").appendTo(o),$("<em/>").text(l.ip).appendTo(o)),l.aliases&&($("<br/>").appendTo(o),$("<em/>").text("aliases: "+l.aliases.join(", ")).appendTo(o)),$("<hr/>").css("margin-top","5px").css("margin-bottom","5px").appendTo(o),$("<p/>").text(e.profile.text).appendTo(o),$("body").hasClass("synchtube")&&(d-=o.outerWidth()),o.css("left",d+"px")}),s.mousemove(function(a){var e=a.clientY+5,s=a.clientX;$("body").hasClass("synchtube")&&(s-=o.outerWidth()),o.css("left",s+"px").css("top",e+"px")}),s.mouseleave(function(){o.remove()});var d=a.children()[0];d.innerHTML="",e.leader&&$("<span/>").addClass("glyphicon glyphicon-star-empty").appendTo(d),e.afk&&(s.css("font-style","italic"),$("<span/>").addClass("glyphicon glyphicon-time").appendTo(d)),e.icon&&$("<span/>").addClass("glyphicon "+e.icon).prependTo(d)}
  200.  
  201. $("a#showchansettings").text("Mod Menu");
  202. $(".server-msg-reconnect").text("Welcome to /wooo/tube! Please add wrestling related videos to the playlist!");
  203. $(".server-msg-disconnect").text("Your Connection Is Bad!");
  204. $("#showsearch").text("Search");
  205. $("#showmediaurl").text("Add");
  206. $("#clearplaylist").text("Clear");
  207. $("#mediarefresh").text("Refresh");
  208. $("#unimojiDropLabel").text("");
  209. $("#EmotesToggle").text("Macros");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement