Monster Twitch

Stretches stream to max width and hides left navigation bar with an Monster toggle that's to the right of the volume rocker

  1. // ==UserScript==
  2. // @name Monster Twitch
  3. // @author Tracerman
  4. // @version 2.792
  5. // @description Stretches stream to max width and hides left navigation bar with an Monster toggle that's to the right of the volume rocker
  6. // @include http://*.twitch.tv/*
  7. // @include http://twitch.tv/*
  8. // @exclude http://www.twitch.tv/*/chat?popout=
  9. // @exclude http://www.twitch.tv/*/popout
  10. // @exclude http://www.twitch.tv/*/dashboard
  11. // @exclude http://www.twitch.tv/inbox*
  12. // @exclude http://www.twitch.tv/subscriptions*
  13. // @exclude http://store.twitch.tv
  14. // @exclude http://api.twitch.tv/*
  15. // @exclude https://api.twitch.tv/*
  16. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
  17. // @grant GM_addStyle
  18. // @copyright 2014 tracerman
  19. // @icon https://monkeyguts.com//icon/104.png
  20. // @run-at document-end
  21. // @namespace http://enut.co/dev
  22. // ==/UserScript==
  23.  
  24. function pReset () {
  25. console.log("MT: Script deactivated");
  26. var showCheck3 = 1;
  27. if(showCheck3 == 1) {
  28. $("#channel").removeAttr('style');
  29. $("#main_col").children(".tse-scroll-content").first().css("position", "");
  30. $("#chat_line_list").each(function () {
  31. this.style.setProperty("padding", chatLLPadding, "important");
  32. });
  33. $("#chat_line_list").each(function () {
  34. this.style.setProperty("padding", chatLLPadding);
  35. });
  36. $("#left_col").show(300, "swing");
  37. $(".editable").show(300, "swing");
  38. $("#new-user-prompt").show(300, "swing");
  39. //--- Old Panels Handler $("#channel_panels_contain").show(300, "swing");
  40. $(".stats-and-actions").show(300, "swing");
  41. $(".resizer").show(300, "swing");
  42. $("#right_close").show(300, "swing");
  43. $("#right_col").each(function () {
  44. this.style.setProperty("width", "", "important");
  45. });
  46. $("#right_col").each(function () {
  47. this.style.setProperty("width", "340px");
  48. });
  49. $("#main_col").removeAttr('style');
  50. $("#main_col").each(function () {
  51. this.style.setProperty("margin-left", "", "important");
  52. });
  53. $("#main_col").css("margin-left","").css("width", zWidth);
  54. $("#main_col").css("width", "");
  55. $("#main_col").each(function () {
  56. //--- this.style.setProperty("width", "", "important");
  57. });
  58. if (cDisp == "block") {
  59. $("#main_col").each(function () {
  60. //--- this.style.setProperty("margin-right", "0px");
  61. });
  62. }
  63. else {
  64. $("#main_col").each(function () {
  65. this.style.setProperty("width", "");
  66. this.style.setProperty("margin-right", "0px");
  67. });
  68. }
  69. if(zWidth >= 1) {
  70. $("#main_col").each(function () {
  71. //--- this.style.setProperty("width", "");
  72. this.style.setProperty("margin-right", "");
  73. });
  74. }
  75. else {
  76. //--- $("#main_col").css("width", "");
  77. }
  78. $(".dynamic-player").removeAttr("style");
  79. $("#player").each(function () {
  80. this.style.setProperty("position", "relative");
  81. });
  82. $("#content").each(function () {
  83. this.style.setProperty("width", "", "important");
  84. });
  85. $("#content").each(function () {
  86. this.style.setProperty("width", conWidth);
  87. });
  88. $("#chat").each(function () {
  89. this.style.setProperty("width", "", "important");
  90. });
  91. $("#chat").each(function () {
  92. this.style.setProperty("width", chatHeight);
  93. });
  94. $("#chat_line").each(function () {
  95. this.style.setProperty("width", "", "important");
  96. });
  97. $("#chat_line").each(function () {
  98. this.style.setProperty("width", chatLHeight);
  99. });
  100. $("#chat_line_list").each(function () {
  101. this.style.setProperty("width", "", "important");
  102. });
  103. $("#myContainer3").css({"opacity":"0.7"}).delay(300).css({"box-shadow":"inset 0 0 20px black"});
  104. //--- OLD BUTTON BACK .css({"box-shadow":"inset 0 0 20px rgb(138, 138, 138)"});
  105. //--- Old Chat Button
  106. $("#chat_speak").animate({"width":"149px"}, "fast");
  107. //--- New Chat Button
  108. $(".send-chat-button").css("right", "").css("width", "").css("margin-left", "").css("left", chatLeft);
  109. $("button.primary").css("background", "");
  110. $("button.primary").removeAttr("style");
  111. // Show the video bar
  112. $("#twitch_chat").animate({"top":"51px"}, "fast");
  113. $("#chat").removeAttr("style");
  114. $("#chat").each(function () {
  115. this.style.setProperty("top", "51px", "important");
  116. this.style.setProperty("bottom", "0");
  117. });
  118. $(".tse-content").removeAttr("style");
  119. $(".ember-chat .chat-messages .tse-content").css("padding", "");
  120. $("#archives").animate({"top":"51px"}, "fast");
  121. //--- Chat Bottom
  122. $(".chat-messages").removeAttr("style");
  123. $(".chat-buttons-container").css("top", "");
  124. //--- Old Buttons Border
  125. $(".dropdown_glyph").css("border", "", "important").css("box-shadow", "", "important");
  126. //--- New Buttons Border
  127. $(".button.glyph-only svg").css("margin-left", "");
  128. $(".button.glyph-only").css("padding", "");
  129. $(".chat-option-buttons .button").css("margin-right", "").css("border", "", "important").css("box-shadow", "", "important");
  130. $(".chat-option-buttons .button").removeAttr("style");
  131. $("button.viewers").css("margin-right", "").css("border", "", "important").css("box-shadow", "", "important");
  132. $("button.viewers").removeAttr("style");
  133. $("button.emotemenu").css("margin-right", "").css("margin-left", "").css("border", "", "important").css("box-shadow", "", "important");
  134. $("button.emotemenu").removeAttr("style");
  135. $(".normal_button").css("margin-right", "").css("margin-left", "").css("border", "", "important").css("box-shadow", "", "important");
  136. $(".normal_button").removeAttr("style");
  137. $(".normal_button").css("background-image", "url('chrome-extension://bfekkhmgloopfmgfeiadglflhgelikbk/dist/images/gif-btn.png')").css("background-repeat", "no-repeat").css("background-position", "50%");
  138. //--- Chat Background
  139. $(".chat-messages").css("background", "");
  140. //--- New Chat Interface Features
  141. $(".ember-chat .chat-interface").removeAttr("style");
  142. $(".chat-interface").css("background", "").css("border", "", "important").css("box-shadow", "", "!important");
  143. //--- $(".chat-interface").each(function () {
  144. //--- this.style.setProperty("height", "134", "!important");
  145. //---}) ;
  146. $(".textarea-contain").css("top", "").css("left", "").css("right", "");
  147. //--- $(".segmented_tabs").css({"visibility":"visible"}).css({"z-index":"4"});
  148. //--- $(".segmented_tabs").show(300, "swing");
  149. $(".tabs").slideDown(300);
  150. $("#right_col .top").css({"z-index":"4"});
  151. //--- showCheck3 = 2;
  152. bRotate();
  153. rTest = 0;
  154. showCheck3 = 0;
  155. }
  156. }
  157.  
  158.  
  159. /*--- Note, gmMain () will fire under all these conditions:
  160. 1) The page initially loads or does an HTML reload (F5, etc.).
  161. 2) The scheme, host, or port change. These all cause the browser to
  162. load a fresh page.
  163. 3) AJAX changes the URL (even if it does not trigger a new HTML load).
  164. */
  165. var fireOnHashChangesToo = false;
  166. var pageURLCheckTimer = setInterval (
  167. function () {
  168. if ( this.lastPathStr !== location.pathname
  169. || this.lastQueryStr !== location.search
  170. || (fireOnHashChangesToo && this.lastHashStr !== location.hash)
  171. ) {
  172. this.lastPathStr = location.pathname;
  173. this.lastQueryStr = location.search;
  174. this.lastHashStr = location.hash;
  175. gmMain ();
  176. pReset();
  177. }
  178. }
  179. , 1
  180. );
  181.  
  182. function gmMain () {
  183. console.log ('MT: A "New" page has loaded.');
  184. // DO WHATEVER YOU WANT HERE.
  185. function ChatWFix(){
  186. GM_addStyle ( multilineStr ( function () {/*!
  187. #right_col:before {
  188. left: 0px
  189. }
  190. */} ) );
  191. $(".segmented_tabs").css("z-index", "4");
  192. $("#right_col .top").css("z-index", "4");
  193. console.log("TM: Chat Left Position Fixed");
  194. }
  195.  
  196. setTimeout(function () {ChatWFix()}, 5000);
  197. $("#player").ready(function() {
  198. var showCheck3 = 0;
  199. var zNode3 = document.createElement ('div');
  200. var pHeight;
  201. var bHeight;
  202. var cHeight = "340px";
  203. var cDisp;
  204. var conWidth;
  205. var resizeT;
  206. var tHeight;
  207. var zHeight;
  208. var mrCheck;
  209. var mmLeft;
  210. var zWidth = $('#main_col').css("width");
  211. var ZWidthCheck = zWidth;
  212. var chatHeight = "340px";
  213. var chatLHeight;
  214. var chatLLHeight;
  215. var chatLLPadding;
  216. var chatLeft;
  217. var intHeight = $(".chat-interface").css("height");
  218.  
  219. zNode3.innerHTML = '<button id="myButton3" type="button">'
  220. + '</button>';
  221.  
  222. zNode3.setAttribute ('id', 'myContainer3');
  223.  
  224. setTimeout(function () {$("#player").append(zNode3)}, 10000);
  225. $(document.body).on ("click", "#myButton3", ButtonClickAction);
  226. var rTest = 360;
  227. $(window).resize(function() {
  228. //update stuff
  229. if (showCheck3 == 1) {
  230. setTimeout(function() {
  231. showCheck3 = 0;
  232. $("#myButton3").click();
  233. }, 1400);
  234. }
  235. });
  236. function bRotate() {
  237. setTimeout(function(){$("#myContainer3").css("transform", "rotate(" + rTest + "deg)")}, 500);
  238. }
  239. function ButtonClickAction (zEvent) {
  240. zWidth = $('#main_col').css("width");
  241. if(showCheck3 == 1) {
  242. $("#channel").removeAttr('style');
  243. $("#main_col").children(".tse-scroll-content").first().css("position", "");
  244. $("#chat_line_list").each(function () {
  245. this.style.setProperty("padding", chatLLPadding, "important");
  246. });
  247. $("#chat_line_list").each(function () {
  248. this.style.setProperty("padding", chatLLPadding);
  249. });
  250. $("#left_col").show(300, "swing");
  251. $(".editable").show(300, "swing");
  252. $("#new-user-prompt").show(300, "swing");
  253. //--- Old Panels Handler $("#channel_panels_contain").show(300, "swing");
  254. $(".stats-and-actions").show(300, "swing");
  255. $(".resizer").show(300, "swing");
  256. $("#right_close").show(300, "swing");
  257. $("#right_col").each(function () {
  258. this.style.setProperty("width", "", "important");
  259. });
  260. $("#right_col").each(function () {
  261. this.style.setProperty("width", "340px");
  262. });
  263. $("#main_col").removeAttr('style');
  264. $("#main_col").each(function () {
  265. this.style.setProperty("margin-left", "", "important");
  266. });
  267. $("#main_col").css("margin-left","").css("width", zWidth);
  268. $("#main_col").css("width", "");
  269. $("#main_col").each(function () {
  270. //--- this.style.setProperty("width", "", "important");
  271. });
  272. if (cDisp == "block") {
  273. $("#main_col").each(function () {
  274. //--- this.style.setProperty("margin-right", "0px");
  275. });
  276. }
  277. else {
  278. $("#main_col").each(function () {
  279. this.style.setProperty("width", "");
  280. this.style.setProperty("margin-right", "0px");
  281. });
  282. }
  283. if(zWidth >= 1) {
  284. $("#main_col").each(function () {
  285. //--- this.style.setProperty("width", "");
  286. this.style.setProperty("margin-right", "");
  287. });
  288. }
  289. else {
  290. //--- $("#main_col").css("width", "");
  291. }
  292. $(".dynamic-player").removeAttr("style");
  293. $("#player").each(function () {
  294. this.style.setProperty("position", "relative");
  295. });
  296. $("#content").each(function () {
  297. this.style.setProperty("width", "", "important");
  298. });
  299. $("#content").each(function () {
  300. this.style.setProperty("width", conWidth);
  301. });
  302. $("#chat").each(function () {
  303. this.style.setProperty("width", "", "important");
  304. });
  305. $("#chat").each(function () {
  306. this.style.setProperty("width", chatHeight);
  307. });
  308. $("#chat_line").each(function () {
  309. this.style.setProperty("width", "", "important");
  310. });
  311. $("#chat_line").each(function () {
  312. this.style.setProperty("width", chatLHeight);
  313. });
  314. $("#chat_line_list").each(function () {
  315. this.style.setProperty("width", "", "important");
  316. });
  317. $("#myContainer3").css({"opacity":"0.7"}).delay(300).css({"box-shadow":"inset 0 0 20px black"});
  318. //--- OLD BUTTON BACK .css({"box-shadow":"inset 0 0 20px rgb(138, 138, 138)"});
  319. //--- Old Chat Button
  320. $("#chat_speak").animate({"width":"149px"}, "fast");
  321. //--- New Chat Button
  322. $(".send-chat-button").css("right", "").css("width", "").css("margin-left", "").css("left", chatLeft);
  323. $("button.primary").css("background", "");
  324. $("button.primary").removeAttr("style");
  325. // Show the video bar
  326. $("#twitch_chat").animate({"top":"51px"}, "fast");
  327. $("#chat").removeAttr("style");
  328. $("#chat").each(function () {
  329. this.style.setProperty("top", "51px", "important");
  330. this.style.setProperty("bottom", "0");
  331. });
  332. $(".tse-content").removeAttr("style");
  333. $(".ember-chat .chat-messages .tse-content").css("padding", "");
  334. $("#archives").animate({"top":"51px"}, "fast");
  335. //--- Chat Bottom
  336. $(".chat-messages").removeAttr("style");
  337. $(".chat-buttons-container").css("top", "");
  338. //--- Old Buttons Border
  339. $(".dropdown_glyph").css("border", "", "important").css("box-shadow", "", "important");
  340. //--- New Buttons Border
  341. $(".button.glyph-only svg").css("margin-left", "");
  342. $(".button.glyph-only").css("padding", "");
  343. $(".chat-option-buttons .button").css("margin-right", "").css("border", "", "important").css("box-shadow", "", "important");
  344. $(".chat-option-buttons .button").removeAttr("style");
  345. $("button.viewers").css("margin-right", "").css("border", "", "important").css("box-shadow", "", "important");
  346. $("button.viewers").removeAttr("style");
  347. $("button.emotemenu").css("margin-right", "").css("margin-left", "").css("border", "", "important").css("box-shadow", "", "important");
  348. $("button.emotemenu").removeAttr("style");
  349. $(".normal_button").css("margin-right", "").css("margin-left", "").css("border", "", "important").css("box-shadow", "", "important");
  350. $(".normal_button").removeAttr("style");
  351. $(".normal_button").css("background-image", "url('chrome-extension://bfekkhmgloopfmgfeiadglflhgelikbk/dist/images/gif-btn.png')").css("background-repeat", "no-repeat").css("background-position", "50%");
  352. //--- Chat Background
  353. $(".chat-messages").css("background", "");
  354. //--- New Chat Interface Features
  355. $(".ember-chat .chat-interface").removeAttr("style");
  356. $(".chat-interface").css("background", "").css("border", "", "important").css("box-shadow", "", "!important");
  357. //--- $(".chat-interface").each(function () {
  358. //--- this.style.setProperty("height", "134", "!important");
  359. //---}) ;
  360. $(".textarea-contain").css("top", "").css("left", "").css("right", "");
  361. //--- $(".segmented_tabs").css({"visibility":"visible"}).css({"z-index":"4"});
  362. //--- $(".segmented_tabs").show(300, "swing");
  363. $(".tabs").slideDown(300);
  364. $("#right_col .top").css({"z-index":"4"});
  365. //--- showCheck3 = 2;
  366. bRotate();
  367. rTest = 0;
  368. showCheck3 = 0;
  369. }
  370. else if(showCheck3 == 0) {
  371. pHeight = $(".dynamic-player").css("height");
  372. bHeight = $('#left_col').css("width");
  373. cHeight = $('#right_col').css("width");
  374. conWidth = $('#content').css("width");
  375. tHeight = $('#main_col').css("margin-left");
  376. zHeight = $('#main_col').css("margin-right");
  377. chatHeight = $('#chat').css("width");
  378. chatLHeight = $('#chat_line').css("width");
  379. chatLLHeight = $('#chat_line_list').css("width");
  380. chatLLPadding = $('#chat_line_list').css("padding");
  381. cDisp = $('#right_col').css("display");
  382. localStorage.mmLeft = $('#main_col').css("margin-left");
  383. //--- zWidth = $('#main_col').css("width");
  384. chatLeft= $('.send-chat-button').css("left");
  385. //--- intHeight = $(".chat-interface").css("height");
  386. $("#channel").each(function () {
  387. this.style.setProperty("padding", "0 0 0 0", "important");
  388. });
  389. $("#chat_line_list").each(function () {
  390. this.style.setProperty("padding", "0 0 0", "important");
  391. });
  392. $(".editable").hide(300, "swing");
  393. $("#new-user-prompt").hide(300, "swing");
  394. $("#left_col").hide(300, "swing");
  395. $(".resizer").hide(300, "swing");
  396. $(".tabs").slideUp(300);
  397. //--- Old Panels Handler $("#channel_panels_contain").hide(300, "swing");
  398. $(".stats-and-actions").hide(300, "swing");
  399. $(".dynamic-player, .dynamic-player object, .dynamic-player video").each(function () {
  400. this.style.setProperty("height", "100%", "important");
  401. this.style.setProperty("width", "100%", "important");
  402. });
  403. $(".dynamic-player").each(function () {
  404. this.style.setProperty("height", "100%", "important");
  405. this.style.setProperty("width", "100%", "important");
  406. this.style.setProperty("z-index", "999");
  407. });
  408. $("#player").each(function () {
  409. this.style.setProperty("position", "absolute");
  410. });
  411. //--- Video Static
  412. $("#main_col").children(".tse-scroll-content").first().css("position", "static");
  413. //--- End
  414.  
  415. if (cDisp == "block") {
  416. $("#content").each(function () {
  417. this.style.setProperty("width", "275px", "important");
  418. });
  419. $("#right_col").each(function () {
  420. this.style.setProperty("width", "275px", "important");
  421. });
  422. $("#chat").animate({"width":"275px"}, "fast");
  423. $("#chat_line_list").css({"width":""});
  424. $("#chat_line").animate({"width":"272px"}, "fast");
  425.  
  426. $("#main_col").each(function () {
  427. this.style.setProperty("margin-right", "275px", "important");
  428. this.style.setProperty("width", "");
  429. });
  430. $("#right_col .top").css({"z-index":"inherit"});
  431. $("#twitch_chat").css({"top":"0px"});
  432. $("#chat").each(function () {
  433. this.style.setProperty("top", "0px", "important");
  434. });
  435. $(".tse-content").css("padding-bottom", "7px");
  436. $(".ember-chat .chat-messages .tse-content").css("padding", "0 10px");
  437. $("#archives").animate({"top":"0px"}, "100");
  438. //--- Old Chat Button
  439. $("#chat_speak").animate({"width":"84px"}, "100");
  440. //--- New Chat Button
  441. $(".send-chat-button").css("right", "5px").css("width", "120px").css("margin-left", "auto");
  442. $("button.primary").animate({"width": "95px"}, 100).css("height", "28px").css("left", "auto");
  443. // $("button.primary_button").css("background", "black");
  444. // $("button.primary_button").css("background","linear-gradient(black, rgb(100, 65, 165) 5%, black, rgb(100, 65, 165))");
  445. //--- Chat Background
  446. $(".chat-messages").css("overflow", "hidden");
  447. //--- Chat Bottom
  448. $(".chat-messages").each(function () {
  449. this.style.setProperty("bottom", "100px", "important");
  450. });
  451. $(".chat-buttons-container").css("top", "57px");
  452. //--- New Chat Interface Features
  453. $(".chat-interface").css("left", "0").css("right", "0").css("border-top", "0px none");
  454. $(".chat-interface").each(function () {
  455. // this.style.setProperty("height", "100px", "important");
  456. this.style.setProperty("height", "90px", "important");
  457. this.style.setProperty("padding", "20px 0");
  458. // this.style.setProperty("border-top", "0");
  459. });
  460. $(".textarea-contain").css("top", "0").css("left", "0").css("right", "0");
  461. }
  462. else {
  463. $("#content").each(function () {
  464. this.style.setProperty("width", "0px", "important");
  465. });
  466. $("#right_col").each(function () {
  467. this.style.setProperty("width", "0px", "important");
  468. });
  469. $("#main_col").each(function () {
  470. this.style.setProperty("margin-right", "0px");
  471. this.style.setProperty("width", "100%", "important");
  472. });
  473. }
  474. if (zWidth > 0) {
  475. $("#main_col").each(function () {
  476. this.style.setProperty("width", "100%", "important");
  477. });
  478. }
  479. else {
  480. this.style.setProperty("width", "", "important");
  481. }
  482. $("#main_col").each(function () {
  483. this.style.setProperty("margin-left", "0px", "important");
  484. });
  485. $("#right_close").hide(300, "swing");
  486. //--- New Buttons Border
  487. $(".button.glyph-only").css("padding-left", "4px").css("padding-right", "4px");
  488. $(".chat-option-buttons .button").css("margin-right", "2px").css("margin-left", "5px").css("height", "24px");
  489. $(".button.glyph-only svg").css("margin-top", "4px");
  490. $("button.viewers").css("margin-right", "2px");
  491. $("#emote-menu-button").css("margin-right", "2px");
  492. $("#emote-menu-button").each(function () {
  493. this.style.setProperty("margin-left", "5px", "important");
  494. this.style.setProperty("width", "30px", "important");
  495. this.style.setProperty("height", "28px", "important");
  496. });
  497. $(".normal_button").css("margin-right", "2px");
  498. $(".normal_button").each(function () {
  499. this.style.setProperty("margin-left", "5px", "important");
  500. this.style.setProperty("width", "30px", "important");
  501. this.style.setProperty("height", "28px", "important");
  502. });
  503. //--- $("#myContainer3").fadeTo("fast", 1.0).css({"background":"url('http://i61.tinypic.com/ri80w5.png')"}).delay(300).css({"box-shadow":"inset 0 0 20px black"});
  504. $("#myContainer3").css({"opacity":"1"}).delay(300).css({"box-shadow":"inset 0 0 20px black"});
  505. bRotate();
  506. rTest = 360;
  507. showCheck3 = 1;
  508. }
  509. //--- else if(showCheck3 == 2) {
  510. else if(showCheck3 == 5) {
  511. if (cDisp == "block") {
  512. $("#main_col").each(function () {
  513. this.style.setProperty("margin-right", zHeight);
  514. });
  515. }
  516. else {
  517. $("#main_col").each(function () {
  518. this.style.setProperty("margin-right", "0px");
  519. this.style.setProperty("width", "");
  520. });
  521. }
  522. $("#main_col").each(function () {
  523. this.style.setProperty("margin-left", tHeight);
  524. });
  525. $("#main_col").css("width", "");
  526. if (cDisp == "block") {
  527. $("#main_col").each(function () {
  528. this.style.setProperty("margin-right", "340px");
  529. });
  530. }
  531. else {
  532. $("#main_col").css("margin-right", "0", "important");
  533. }
  534. $("#myContainer3").fadeTo("fast", 0.5).delay(300).css({"box-shadow":"inset 0 0 20px navy"});
  535. showCheck3 = 0;
  536. }
  537. else if(showCheck3 == 3) {
  538. }
  539. //--- clearInterval(pageURLCheckTimer);
  540. return false;
  541. }
  542. });
  543. }
  544.  
  545.  
  546.  
  547.  
  548. //--- Style our newly added elements using CSS.
  549. GM_addStyle ( multilineStr ( function () {/*!
  550. #myContainer3 {
  551. position: absolute;
  552. border-radius: 25px;
  553. transition: 1s ease-in-out;
  554. background: url("http://i61.tinypic.com/ri80w5.png");
  555. opacity: 0.7;
  556. background-size: contain !important;
  557. box-shadow: inset 0 0 20px black;
  558. bottom: 0;
  559. left: 0;
  560. font-size: 13px;
  561. border: 0px outset black;
  562. margin-left: 160px;
  563. margin-bottom: 0px;
  564. opacity: 0.5;
  565. width: 27px !important;
  566. height: 27px !important;
  567. z-index: 999;
  568. padding: 0px 0px;
  569. }
  570. #myButton3 {
  571. cursor: pointer;
  572. background: transparent;
  573. border: none !important;
  574. width: 27px !important;
  575. height: 27px !important;
  576. color: purple;
  577. font-weight: bold;
  578. }
  579. #myContainer3 p {
  580. color: purple;
  581. background: transparent;
  582. }
  583. */} ) );
  584.  
  585. function multilineStr (dummyFunc) {
  586. var str = dummyFunc.toString ();
  587. str = str.replace (/^[^\/]+\/\*!?/, '') // Strip function () { /*!
  588. .replace (/\s*\*\/\s*\}\s*$/, '') // Strip */ }
  589. //--- .replace (/\/\/.+$/gm, '') // Double-slash comments wreck CSS. Strip them.
  590. ;
  591. return str;
  592. }