TEXT   467   0
   215 2.18 KB    76

TamperMonkey Cytube Script

By SmilesIsPasting
Created: 2021-01-23 21:31:33
Updated: 2021-01-30 17:10:25
Expiry: Never

  1. // ==UserScript==
  2. // @name Cytube playlist tool
  3. // @namespace playlisttool
  4. // @description Cytube playlist tool
  5. // @grant GM_addStyle
  6. // @run-at document-end
  7. // @version 0.0.1
  8. // ==/UserScript==
  9.  
  10. GM_addStyle ( `
  11. #rightpane {
  12. white-space:nowrap;
  13. overflow-x:auto;
  14. }
  15. #rightpane-inner {
  16. display:inline-block;
  17. float:left;
  18. width:100%;
  19. overflow:hidden;
  20. }
  21. #playlist_area {
  22. width:0px;
  23. height:520px;
  24. border-width:2px;
  25. background-color:#2e3338;
  26. color:#fff;
  27. font-weight:400;
  28. padding:5px;
  29. display:inline-block;
  30. margin-left:30px;
  31. }
  32. ` );
  33.  
  34. document.getElementById("rightpane").innerHTML += "<Textarea id='playlist_area'></Textarea>";
  35. document.getElementById("videocontrols").innerHTML += "<button class='btn btn-sm btn-default' id='toggle_button'>Get playlist links</button>";
  36. document.getElementById("toggle_button").onclick = function(){toggle();};
  37.  
  38. var list = [];
  39. var d = document.getElementById("playlist_area");
  40. var r = document.getElementById("rightpane-inner");
  41. var b = document.getElementById("toggle_button");
  42.  
  43. d.style.visibility="hidden";
  44. d.onclick = function(){d.style.borderColor=null;};
  45.  
  46. function check(){
  47. var matches = document.querySelectorAll(".qe_title");
  48. for(var i = 0; i < matches.length; i++){
  49. if(!list.includes(matches[i])){
  50. list.push(matches[i]);
  51. d.value += (matches[i].innerHTML + "\n" + matches[i].getAttribute("href") + "\n\n");
  52. d.style.borderColor="#42b142";
  53. }
  54. }
  55. }
  56.  
  57. function toggle(){
  58. if(d.style.visibility == "hidden"){
  59. if(list == ""){
  60. check();
  61. window.setInterval(check, 30000);
  62. }
  63. d.style.visibility = "visible";
  64. d.style.width="50%";
  65. r.style.width = "50%";
  66. b.innerHTML = "Hide playlist links";
  67. }
  68. else if(d.style.visibility == "visible"){
  69. d.style.visibility = "hidden";
  70. d.style.width = "0px"
  71. r.style.width = "100%";
  72. b.innerHTML = "Show playlist links";
  73. }
  74. }

/mlp/ Rewatch Stream S1E01+02

by SmilesIsPasting

/mlp/ Rewatch Stream S1E05+06

by SmilesIsPasting

/mlp/ Rewatch Stream S1E07+08

by SmilesIsPasting

/mlp/ Rewatch Stream S1E09+10

by SmilesIsPasting

/mlp/ Rewatch Stream S1E11+12

by SmilesIsPasting