Early TurboBuilder

Get TurboBuilder extension early.

  1. // ==UserScript==
  2. // @name Early TurboBuilder
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Get TurboBuilder extension early.
  6. // @author oc9x97
  7. // @match https://studio.penguinmod.com/editor.html
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Function to remove the specified element
  15. function removeElement(selector) {
  16. var element = document.querySelector(selector);
  17. if (element) {
  18. element.parentNode.removeChild(element);
  19. }
  20. }
  21.  
  22. // Function to add the new element inside the library scroll grid
  23. function addNewElement() {
  24. var libraryScrollGrid = document.querySelector('.library_library-scroll-grid_1jyXm');
  25.  
  26. if (libraryScrollGrid) {
  27. var newElement = document.createElement('a');
  28. newElement.href = 'https://turbobuilder-steel.vercel.app/';
  29. newElement.target = '_blank';
  30. newElement.rel = 'noopener noreferrer';
  31. newElement.style.textDecoration = 'none';
  32. newElement.style.color = 'inherit';
  33.  
  34. newElement.innerHTML = `
  35. <div class="library-item_library-item_1DcMO library-item_featured-item_3V2-t library-item_library-item-extension_3xus9" style="height: 378px;">
  36. <div class="library-item_featured-image-container_1KIHG">
  37. <img class="library-item_featured-image_2gwZ6" loading="lazy" draggable="false" src="static/assets/93db39f338237e6a51790829ba22a879.png">
  38. </div>
  39. <button data-clearclick="true" data-activated="false" class="library-item_library-item-favorite_3N_c1">
  40. <img data-usedimage="true" data-clearclick="true" src="static/assets/e28b110fa5eef35531fa271a3a7b6314.svg">
  41. <img data-usedimage="false" data-clearclick="true" src="static/assets/27802141bca7404b477168369bf3475d.svg">
  42. </button>
  43. <div class="library-item_featured-extension-text_22A1k library-item_featured-text_2KFel">
  44. <span class="library-item_library-item-name_2qMXu">TurboBuilder</span><br>
  45. <span class="library-item_featured-description_MjIJw">Create your own amazing extensions using a scratch-based UI!</span>
  46. </div>
  47. <div class="library-item_featured-extension-metadata_3D8E8">
  48. <div class="library-item_featured-extension-requirement_2u2IO"></div>
  49. <div class="library-item_featured-extension-collaboration_2dGS9">
  50. <div class="library-item_small-bottom-margin_2XgVk">
  51. <div>Credits</div>
  52. <div class="library-item_featured-extension-metadata-detail_1M9BV">Started by JeremyGamer13, continued by jwklong</div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. `;
  58.  
  59. // Append the new element to the library scroll grid
  60. libraryScrollGrid.appendChild(newElement);
  61. }
  62. }
  63.  
  64. // Function to check if the specified elements exist
  65. function checkForElements() {
  66. // Check for the "Coming Soon" element
  67. var comingSoonElement = document.querySelector('.library-item_coming-soon-text_30OPh');
  68. if (comingSoonElement) {
  69. // If the "Coming Soon" element is found, remove it
  70. removeElement('.library-item_library-item_1DcMO.library-item_featured-item_3V2-t.library-item_disabled_1-aDH.library-item_library-item-extension_3xus9');
  71. // Add the new element
  72. addNewElement();
  73. }
  74.  
  75. // Keep repeating
  76. setTimeout(checkForElements, 100);
  77. }
  78.  
  79. // Start checking for the elements
  80. checkForElements();
  81. })();