ShaderToy Editor Shader Input UI Fix

It makes the shader input panel scrollable

  1. // ==UserScript==
  2. // @name ShaderToy Editor Shader Input UI Fix
  3. // @name:zh-CN ShaderToy 着色器输入UI修复
  4. // @namespace https://unlucky.ninja/shadertoy
  5. // @version 0.1
  6. // @description It makes the shader input panel scrollable
  7. // @description:zh-CN 使编辑器上方的着色器输入面板可滚动
  8. // @author UnluckyNinja
  9. // @license MIT
  10. // @match https://www.shadertoy.com/*
  11. // @icon https://www.google.com/s2/favicons?sz=64&domain=shadertoy.com
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17. const container = document.querySelector("#editorHeader");
  18. if (container){
  19. container.style['overflow-y'] = 'auto';
  20. }
  21. const header = document.querySelector("#editorHeaderBar");
  22. if (header){
  23. header.style.position = 'sticky';
  24. header.style['z-index'] = '10';
  25. header.style['transform'] = 'translateY(-2px)';
  26. }
  27. })();